@xras/ui 0.20.1 → 0.21.0-beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/xras-ui.cjs +17 -17
  2. package/dist/xras-ui.js +5092 -5166
  3. package/package.json +1 -1
package/dist/xras-ui.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var qw=Object.defineProperty;var Hw=(e,t,n)=>t in e?qw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tc=(e,t,n)=>(Hw(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Np=typeof document<"u"?document.currentScript:null;function Ww(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Xs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var kg={exports:{}},fl={},Tg={exports:{}},re={};/**
1
+ "use strict";var Bw=Object.defineProperty;var zw=(e,t,n)=>t in e?Bw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ec=(e,t,n)=>(zw(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Rp=typeof document<"u"?document.currentScript:null;function qw(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Xs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ng={exports:{}},dl={},kg={exports:{}},se={};/**
2
2
  * @license React
3
3
  * react.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Zs=Symbol.for("react.element"),Kw=Symbol.for("react.portal"),Gw=Symbol.for("react.fragment"),Yw=Symbol.for("react.strict_mode"),Qw=Symbol.for("react.profiler"),Xw=Symbol.for("react.provider"),Zw=Symbol.for("react.context"),Jw=Symbol.for("react.forward_ref"),e1=Symbol.for("react.suspense"),t1=Symbol.for("react.memo"),n1=Symbol.for("react.lazy"),kp=Symbol.iterator;function r1(e){return e===null||typeof e!="object"?null:(e=kp&&e[kp]||e["@@iterator"],typeof e=="function"?e:null)}var Og={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pg=Object.assign,$g={};function $o(e,t,n){this.props=e,this.context=t,this.refs=$g,this.updater=n||Og}$o.prototype.isReactComponent={};$o.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")};$o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ig(){}Ig.prototype=$o.prototype;function Od(e,t,n){this.props=e,this.context=t,this.refs=$g,this.updater=n||Og}var Pd=Od.prototype=new Ig;Pd.constructor=Od;Pg(Pd,$o.prototype);Pd.isPureReactComponent=!0;var Tp=Array.isArray,Ag=Object.prototype.hasOwnProperty,$d={current:null},Mg={key:!0,ref:!0,__self:!0,__source:!0};function Dg(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)Ag.call(t,r)&&!Mg.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Zs,type:e,key:s,ref:i,props:o,_owner:$d.current}}function o1(e,t){return{$$typeof:Zs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Id(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zs}function s1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Op=/\/+/g;function nc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?s1(""+e.key):t.toString(36)}function Bi(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Zs:case Kw:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+nc(i,0):r,Tp(o)?(n="",e!=null&&(n=e.replace(Op,"$&/")+"/"),Bi(o,t,n,"",function(u){return u})):o!=null&&(Id(o)&&(o=o1(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Op,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",Tp(e))for(var l=0;l<e.length;l++){s=e[l];var c=r+nc(s,l);i+=Bi(s,t,n,c,o)}else if(c=r1(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=r+nc(s,l++),i+=Bi(s,t,n,c,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function di(e,t,n){if(e==null)return e;var r=[],o=0;return Bi(e,r,"","",function(s){return t.call(n,s,o++)}),r}function i1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ot={current:null},zi={transition:null},a1={ReactCurrentDispatcher:ot,ReactCurrentBatchConfig:zi,ReactCurrentOwner:$d};re.Children={map:di,forEach:function(e,t,n){di(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return di(e,function(){t++}),t},toArray:function(e){return di(e,function(t){return t})||[]},only:function(e){if(!Id(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};re.Component=$o;re.Fragment=Gw;re.Profiler=Qw;re.PureComponent=Od;re.StrictMode=Yw;re.Suspense=e1;re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=a1;re.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Pg({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=$d.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Ag.call(t,c)&&!Mg.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Zs,type:e.type,key:o,ref:s,props:r,_owner:i}};re.createContext=function(e){return e={$$typeof:Zw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Xw,_context:e},e.Consumer=e};re.createElement=Dg;re.createFactory=function(e){var t=Dg.bind(null,e);return t.type=e,t};re.createRef=function(){return{current:null}};re.forwardRef=function(e){return{$$typeof:Jw,render:e}};re.isValidElement=Id;re.lazy=function(e){return{$$typeof:n1,_payload:{_status:-1,_result:e},_init:i1}};re.memo=function(e,t){return{$$typeof:t1,type:e,compare:t===void 0?null:t}};re.startTransition=function(e){var t=zi.transition;zi.transition={};try{e()}finally{zi.transition=t}};re.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};re.useCallback=function(e,t){return ot.current.useCallback(e,t)};re.useContext=function(e){return ot.current.useContext(e)};re.useDebugValue=function(){};re.useDeferredValue=function(e){return ot.current.useDeferredValue(e)};re.useEffect=function(e,t){return ot.current.useEffect(e,t)};re.useId=function(){return ot.current.useId()};re.useImperativeHandle=function(e,t,n){return ot.current.useImperativeHandle(e,t,n)};re.useInsertionEffect=function(e,t){return ot.current.useInsertionEffect(e,t)};re.useLayoutEffect=function(e,t){return ot.current.useLayoutEffect(e,t)};re.useMemo=function(e,t){return ot.current.useMemo(e,t)};re.useReducer=function(e,t,n){return ot.current.useReducer(e,t,n)};re.useRef=function(e){return ot.current.useRef(e)};re.useState=function(e){return ot.current.useState(e)};re.useSyncExternalStore=function(e,t,n){return ot.current.useSyncExternalStore(e,t,n)};re.useTransition=function(){return ot.current.useTransition()};re.version="18.2.0";Tg.exports=re;var w=Tg.exports;const _e=Xs(w),ma=Ww({__proto__:null,default:_e},[w]);/**
9
+ */var Zs=Symbol.for("react.element"),Hw=Symbol.for("react.portal"),Ww=Symbol.for("react.fragment"),Kw=Symbol.for("react.strict_mode"),Gw=Symbol.for("react.profiler"),Yw=Symbol.for("react.provider"),Qw=Symbol.for("react.context"),Xw=Symbol.for("react.forward_ref"),Zw=Symbol.for("react.suspense"),Jw=Symbol.for("react.memo"),e1=Symbol.for("react.lazy"),Np=Symbol.iterator;function t1(e){return e===null||typeof e!="object"?null:(e=Np&&e[Np]||e["@@iterator"],typeof e=="function"?e:null)}var Tg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Og=Object.assign,Pg={};function Io(e,t,n){this.props=e,this.context=t,this.refs=Pg,this.updater=n||Tg}Io.prototype.isReactComponent={};Io.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")};Io.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ig(){}Ig.prototype=Io.prototype;function Td(e,t,n){this.props=e,this.context=t,this.refs=Pg,this.updater=n||Tg}var Od=Td.prototype=new Ig;Od.constructor=Td;Og(Od,Io.prototype);Od.isPureReactComponent=!0;var kp=Array.isArray,$g=Object.prototype.hasOwnProperty,Pd={current:null},Ag={key:!0,ref:!0,__self:!0,__source:!0};function Mg(e,t,n){var r,o={},s=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(s=""+t.key),t)$g.call(t,r)&&!Ag.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Zs,type:e,key:s,ref:i,props:o,_owner:Pd.current}}function n1(e,t){return{$$typeof:Zs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Id(e){return typeof e=="object"&&e!==null&&e.$$typeof===Zs}function r1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Tp=/\/+/g;function tc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?r1(""+e.key):t.toString(36)}function Bi(e,t,n,r,o){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Zs:case Hw:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+tc(i,0):r,kp(o)?(n="",e!=null&&(n=e.replace(Tp,"$&/")+"/"),Bi(o,t,n,"",function(u){return u})):o!=null&&(Id(o)&&(o=n1(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Tp,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",kp(e))for(var l=0;l<e.length;l++){s=e[l];var c=r+tc(s,l);i+=Bi(s,t,n,c,o)}else if(c=t1(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=r+tc(s,l++),i+=Bi(s,t,n,c,o);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function di(e,t,n){if(e==null)return e;var r=[],o=0;return Bi(e,r,"","",function(s){return t.call(n,s,o++)}),r}function o1(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ot={current:null},zi={transition:null},s1={ReactCurrentDispatcher:ot,ReactCurrentBatchConfig:zi,ReactCurrentOwner:Pd};se.Children={map:di,forEach:function(e,t,n){di(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return di(e,function(){t++}),t},toArray:function(e){return di(e,function(t){return t})||[]},only:function(e){if(!Id(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=Io;se.Fragment=Ww;se.Profiler=Gw;se.PureComponent=Td;se.StrictMode=Kw;se.Suspense=Zw;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=s1;se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Og({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Pd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)$g.call(t,c)&&!Ag.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Zs,type:e.type,key:o,ref:s,props:r,_owner:i}};se.createContext=function(e){return e={$$typeof:Qw,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Yw,_context:e},e.Consumer=e};se.createElement=Mg;se.createFactory=function(e){var t=Mg.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:Xw,render:e}};se.isValidElement=Id;se.lazy=function(e){return{$$typeof:e1,_payload:{_status:-1,_result:e},_init:o1}};se.memo=function(e,t){return{$$typeof:Jw,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=zi.transition;zi.transition={};try{e()}finally{zi.transition=t}};se.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};se.useCallback=function(e,t){return ot.current.useCallback(e,t)};se.useContext=function(e){return ot.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return ot.current.useDeferredValue(e)};se.useEffect=function(e,t){return ot.current.useEffect(e,t)};se.useId=function(){return ot.current.useId()};se.useImperativeHandle=function(e,t,n){return ot.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return ot.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return ot.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return ot.current.useMemo(e,t)};se.useReducer=function(e,t,n){return ot.current.useReducer(e,t,n)};se.useRef=function(e){return ot.current.useRef(e)};se.useState=function(e){return ot.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return ot.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return ot.current.useTransition()};se.version="18.2.0";kg.exports=se;var w=kg.exports;const je=Xs(w),ma=qw({__proto__:null,default:je},[w]);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var l1=w,c1=Symbol.for("react.element"),u1=Symbol.for("react.fragment"),d1=Object.prototype.hasOwnProperty,f1=l1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p1={key:!0,ref:!0,__self:!0,__source:!0};function Fg(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)d1.call(t,r)&&!p1.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:c1,type:e,key:s,ref:i,props:o,_owner:f1.current}}fl.Fragment=u1;fl.jsx=Fg;fl.jsxs=Fg;kg.exports=fl;var a=kg.exports,St={},Lg={exports:{}},Nt={},Ug={exports:{}},Vg={};/**
17
+ */var i1=w,a1=Symbol.for("react.element"),l1=Symbol.for("react.fragment"),c1=Object.prototype.hasOwnProperty,u1=i1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d1={key:!0,ref:!0,__self:!0,__source:!0};function Dg(e,t,n){var r,o={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)c1.call(t,r)&&!d1.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:a1,type:e,key:s,ref:i,props:o,_owner:u1.current}}dl.Fragment=l1;dl.jsx=Dg;dl.jsxs=Dg;Ng.exports=dl;var a=Ng.exports,_t={},Fg={exports:{}},kt={},Lg={exports:{}},Ug={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(O,L){var A=O.length;O.push(L);e:for(;0<A;){var W=A-1>>>1,U=O[W];if(0<o(U,L))O[W]=L,O[A]=U,A=W;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var L=O[0],A=O.pop();if(A!==L){O[0]=A;e:for(var W=0,U=O.length,Y=U>>>1;W<Y;){var Z=2*(W+1)-1,J=O[Z],X=Z+1,se=O[X];if(0>o(J,A))X<U&&0>o(se,J)?(O[W]=se,O[X]=A,W=X):(O[W]=J,O[Z]=A,W=Z);else if(X<U&&0>o(se,A))O[W]=se,O[X]=A,W=X;else break e}}return L}function o(O,L){var A=O.sortIndex-L.sortIndex;return A!==0?A:O.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,f=null,p=3,y=!1,m=!1,h=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(O){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=O)r(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function S(O){if(h=!1,b(O),!m)if(n(c)!==null)m=!0,V(_);else{var L=n(u);L!==null&&Q(S,L.startTime-O)}}function _(O,L){m=!1,h&&(h=!1,v(E),E=-1),y=!0;var A=p;try{for(b(L),f=n(c);f!==null&&(!(f.expirationTime>L)||O&&!T());){var W=f.callback;if(typeof W=="function"){f.callback=null,p=f.priorityLevel;var U=W(f.expirationTime<=L);L=e.unstable_now(),typeof U=="function"?f.callback=U:f===n(c)&&r(c),b(L)}else r(c);f=n(c)}if(f!==null)var Y=!0;else{var Z=n(u);Z!==null&&Q(S,Z.startTime-L),Y=!1}return Y}finally{f=null,p=A,y=!1}}var j=!1,C=null,E=-1,N=5,R=-1;function T(){return!(e.unstable_now()-R<N)}function k(){if(C!==null){var O=e.unstable_now();R=O;var L=!0;try{L=C(!0,O)}finally{L?P():(j=!1,C=null)}}else j=!1}var P;if(typeof g=="function")P=function(){g(k)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,F=D.port2;D.port1.onmessage=k,P=function(){F.postMessage(null)}}else P=function(){x(k,0)};function V(O){C=O,j||(j=!0,P())}function Q(O,L){E=x(function(){O(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){m||y||(m=!0,V(_))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(O){switch(p){case 1:case 2:case 3:var L=3;break;default:L=p}var A=p;p=L;try{return O()}finally{p=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,L){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var A=p;p=O;try{return L()}finally{p=A}},e.unstable_scheduleCallback=function(O,L,A){var W=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?W+A:W):A=W,O){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=A+U,O={id:d++,callback:L,priorityLevel:O,startTime:A,expirationTime:U,sortIndex:-1},A>W?(O.sortIndex=A,t(u,O),n(c)===null&&O===n(u)&&(h?(v(E),E=-1):h=!0,Q(S,A-W))):(O.sortIndex=U,t(c,O),m||y||(m=!0,V(_))),O},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(O){var L=p;return function(){var A=p;p=L;try{return O.apply(this,arguments)}finally{p=A}}}})(Vg);Ug.exports=Vg;var h1=Ug.exports;/**
25
+ */(function(e){function t(O,U){var A=O.length;O.push(U);e:for(;0<A;){var H=A-1>>>1,B=O[H];if(0<o(B,U))O[H]=U,O[A]=B,A=H;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var U=O[0],A=O.pop();if(A!==U){O[0]=A;e:for(var H=0,B=O.length,W=B>>>1;H<W;){var Z=2*(H+1)-1,ee=O[Z],X=Z+1,ie=O[X];if(0>o(ee,A))X<B&&0>o(ie,ee)?(O[H]=ie,O[X]=A,H=X):(O[H]=ee,O[Z]=A,H=Z);else if(X<B&&0>o(ie,A))O[H]=ie,O[X]=A,H=X;else break e}}return U}function o(O,U){var A=O.sortIndex-U.sortIndex;return A!==0?A:O.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,f=null,p=3,y=!1,m=!1,h=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(O){for(var U=n(u);U!==null;){if(U.callback===null)r(u);else if(U.startTime<=O)r(u),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(u)}}function S(O){if(h=!1,b(O),!m)if(n(c)!==null)m=!0,V(_);else{var U=n(u);U!==null&&Q(S,U.startTime-O)}}function _(O,U){m=!1,h&&(h=!1,v(E),E=-1),y=!0;var A=p;try{for(b(U),f=n(c);f!==null&&(!(f.expirationTime>U)||O&&!T());){var H=f.callback;if(typeof H=="function"){f.callback=null,p=f.priorityLevel;var B=H(f.expirationTime<=U);U=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(U)}else r(c);f=n(c)}if(f!==null)var W=!0;else{var Z=n(u);Z!==null&&Q(S,Z.startTime-U),W=!1}return W}finally{f=null,p=A,y=!1}}var j=!1,C=null,E=-1,N=5,R=-1;function T(){return!(e.unstable_now()-R<N)}function k(){if(C!==null){var O=e.unstable_now();R=O;var U=!0;try{U=C(!0,O)}finally{U?P():(j=!1,C=null)}}else j=!1}var P;if(typeof g=="function")P=function(){g(k)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,D=M.port2;M.port1.onmessage=k,P=function(){D.postMessage(null)}}else P=function(){x(k,0)};function V(O){C=O,j||(j=!0,P())}function Q(O,U){E=x(function(){O(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){m||y||(m=!0,V(_))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(O){switch(p){case 1:case 2:case 3:var U=3;break;default:U=p}var A=p;p=U;try{return O()}finally{p=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,U){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var A=p;p=O;try{return U()}finally{p=A}},e.unstable_scheduleCallback=function(O,U,A){var H=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?H+A:H):A=H,O){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=A+B,O={id:d++,callback:U,priorityLevel:O,startTime:A,expirationTime:B,sortIndex:-1},A>H?(O.sortIndex=A,t(u,O),n(c)===null&&O===n(u)&&(h?(v(E),E=-1):h=!0,Q(S,A-H))):(O.sortIndex=B,t(c,O),m||y||(m=!0,V(_))),O},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(O){var U=p;return function(){var A=p;p=U;try{return O.apply(this,arguments)}finally{p=A}}}})(Ug);Lg.exports=Ug;var f1=Lg.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Bg=w,_t=h1;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var zg=new Set,js={};function Lr(e,t){vo(e,t),vo(e+"Capture",t)}function vo(e,t){for(js[e]=t,e=0;e<t.length;e++)zg.add(t[e])}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zc=Object.prototype.hasOwnProperty,m1=/^[: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]*$/,Pp={},$p={};function g1(e){return Zc.call($p,e)?!0:Zc.call(Pp,e)?!1:m1.test(e)?$p[e]=!0:(Pp[e]=!0,!1)}function v1(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 y1(e,t,n,r){if(t===null||typeof t>"u"||v1(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 st(e,t,n,r,o,s,i){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=s,this.removeEmptyString=i}var Ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ye[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ye[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ye[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ye[e]=new st(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){Ye[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ye[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ye[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ye[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ye[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ad=/[\-:]([a-z])/g;function Md(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(Ad,Md);Ye[t]=new st(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(Ad,Md);Ye[t]=new st(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(Ad,Md);Ye[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Ye.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ye[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dd(e,t,n,r){var o=Ye.hasOwnProperty(t)?Ye[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(y1(t,n,o,r)&&(n=null),r||o===null?g1(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Fn=Bg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fi=Symbol.for("react.element"),Gr=Symbol.for("react.portal"),Yr=Symbol.for("react.fragment"),Fd=Symbol.for("react.strict_mode"),Jc=Symbol.for("react.profiler"),qg=Symbol.for("react.provider"),Hg=Symbol.for("react.context"),Ld=Symbol.for("react.forward_ref"),eu=Symbol.for("react.suspense"),tu=Symbol.for("react.suspense_list"),Ud=Symbol.for("react.memo"),qn=Symbol.for("react.lazy"),Wg=Symbol.for("react.offscreen"),Ip=Symbol.iterator;function qo(e){return e===null||typeof e!="object"?null:(e=Ip&&e[Ip]||e["@@iterator"],typeof e=="function"?e:null)}var Re=Object.assign,rc;function ss(e){if(rc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rc=t&&t[1]||""}return`
34
- `+rc+e}var oc=!1;function sc(e,t){if(!e||oc)return"";oc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
33
+ */var Vg=w,jt=f1;function I(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Bg=new Set,js={};function Fr(e,t){vo(e,t),vo(e+"Capture",t)}function vo(e,t){for(js[e]=t,e=0;e<t.length;e++)Bg.add(t[e])}var On=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xc=Object.prototype.hasOwnProperty,p1=/^[: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]*$/,Op={},Pp={};function h1(e){return Xc.call(Pp,e)?!0:Xc.call(Op,e)?!1:p1.test(e)?Pp[e]=!0:(Op[e]=!0,!1)}function m1(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 g1(e,t,n,r){if(t===null||typeof t>"u"||m1(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 st(e,t,n,r,o,s,i){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=s,this.removeEmptyString=i}var Ge={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ge[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ge[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ge[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ge[e]=new st(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){Ge[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ge[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ge[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ge[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ge[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var $d=/[\-:]([a-z])/g;function Ad(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($d,Ad);Ge[t]=new st(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($d,Ad);Ge[t]=new st(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($d,Ad);Ge[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ge[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Ge.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ge[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function Md(e,t,n,r){var o=Ge.hasOwnProperty(t)?Ge[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(g1(t,n,o,r)&&(n=null),r||o===null?h1(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ln=Vg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fi=Symbol.for("react.element"),Kr=Symbol.for("react.portal"),Gr=Symbol.for("react.fragment"),Dd=Symbol.for("react.strict_mode"),Zc=Symbol.for("react.profiler"),zg=Symbol.for("react.provider"),qg=Symbol.for("react.context"),Fd=Symbol.for("react.forward_ref"),Jc=Symbol.for("react.suspense"),eu=Symbol.for("react.suspense_list"),Ld=Symbol.for("react.memo"),Hn=Symbol.for("react.lazy"),Hg=Symbol.for("react.offscreen"),Ip=Symbol.iterator;function qo(e){return e===null||typeof e!="object"?null:(e=Ip&&e[Ip]||e["@@iterator"],typeof e=="function"?e:null)}var Ne=Object.assign,nc;function ss(e){if(nc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);nc=t&&t[1]||""}return`
34
+ `+nc+e}var rc=!1;function oc(e,t){if(!e||rc)return"";rc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
35
35
  `),s=r.stack.split(`
36
36
  `),i=o.length-1,l=s.length-1;1<=i&&0<=l&&o[i]!==s[l];)l--;for(;1<=i&&0<=l;i--,l--)if(o[i]!==s[l]){if(i!==1||l!==1)do if(i--,l--,0>l||o[i]!==s[l]){var c=`
37
- `+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{oc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ss(e):""}function x1(e){switch(e.tag){case 5:return ss(e.type);case 16:return ss("Lazy");case 13:return ss("Suspense");case 19:return ss("SuspenseList");case 0:case 2:case 15:return e=sc(e.type,!1),e;case 11:return e=sc(e.type.render,!1),e;case 1:return e=sc(e.type,!0),e;default:return""}}function nu(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 Yr:return"Fragment";case Gr:return"Portal";case Jc:return"Profiler";case Fd:return"StrictMode";case eu:return"Suspense";case tu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Hg:return(e.displayName||"Context")+".Consumer";case qg:return(e._context.displayName||"Context")+".Provider";case Ld:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ud:return t=e.displayName||null,t!==null?t:nu(e.type)||"Memo";case qn:t=e._payload,e=e._init;try{return nu(e(t))}catch{}}return null}function b1(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 nu(t);case 8:return t===Fd?"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 ir(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function w1(e){var t=Kg(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,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pi(e){e._valueTracker||(e._valueTracker=w1(e))}function Gg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Kg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ga(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 ru(e,t){var n=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ap(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ir(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 Yg(e,t){t=t.checked,t!=null&&Dd(e,"checked",t,!1)}function ou(e,t){Yg(e,t);var n=ir(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")?su(e,t.type,n):t.hasOwnProperty("defaultValue")&&su(e,t.type,ir(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Mp(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 su(e,t,n){(t!=="number"||ga(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var is=Array.isArray;function ao(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ir(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function iu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return Re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Dp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(is(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ir(n)}}function Qg(e,t){var n=ir(t.value),r=ir(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Fp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Xg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function au(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Xg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hi,Zg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hi=hi||document.createElement("div"),hi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fs={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},S1=["Webkit","ms","Moz","O"];Object.keys(fs).forEach(function(e){S1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fs[t]=fs[e]})});function Jg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fs.hasOwnProperty(e)&&fs[e]?(""+t).trim():t+"px"}function ev(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Jg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var _1=Re({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 lu(e,t){if(t){if(_1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function cu(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 uu=null;function Vd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var du=null,lo=null,co=null;function Lp(e){if(e=ti(e)){if(typeof du!="function")throw Error(I(280));var t=e.stateNode;t&&(t=vl(t),du(e.stateNode,e.type,t))}}function tv(e){lo?co?co.push(e):co=[e]:lo=e}function nv(){if(lo){var e=lo,t=co;if(co=lo=null,Lp(e),t)for(e=0;e<t.length;e++)Lp(t[e])}}function rv(e,t){return e(t)}function ov(){}var ic=!1;function sv(e,t,n){if(ic)return e(t,n);ic=!0;try{return rv(e,t,n)}finally{ic=!1,(lo!==null||co!==null)&&(ov(),nv())}}function Es(e,t){var n=e.stateNode;if(n===null)return null;var r=vl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var fu=!1;if(Tn)try{var Ho={};Object.defineProperty(Ho,"passive",{get:function(){fu=!0}}),window.addEventListener("test",Ho,Ho),window.removeEventListener("test",Ho,Ho)}catch{fu=!1}function j1(e,t,n,r,o,s,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var ps=!1,va=null,ya=!1,pu=null,C1={onError:function(e){ps=!0,va=e}};function E1(e,t,n,r,o,s,i,l,c){ps=!1,va=null,j1.apply(C1,arguments)}function R1(e,t,n,r,o,s,i,l,c){if(E1.apply(this,arguments),ps){if(ps){var u=va;ps=!1,va=null}else throw Error(I(198));ya||(ya=!0,pu=u)}}function Ur(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function iv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Up(e){if(Ur(e)!==e)throw Error(I(188))}function N1(e){var t=e.alternate;if(!t){if(t=Ur(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Up(o),e;if(s===r)return Up(o),t;s=s.sibling}throw Error(I(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i){for(l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function av(e){return e=N1(e),e!==null?lv(e):null}function lv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=lv(e);if(t!==null)return t;e=e.sibling}return null}var cv=_t.unstable_scheduleCallback,Vp=_t.unstable_cancelCallback,k1=_t.unstable_shouldYield,T1=_t.unstable_requestPaint,Pe=_t.unstable_now,O1=_t.unstable_getCurrentPriorityLevel,Bd=_t.unstable_ImmediatePriority,uv=_t.unstable_UserBlockingPriority,xa=_t.unstable_NormalPriority,P1=_t.unstable_LowPriority,dv=_t.unstable_IdlePriority,pl=null,cn=null;function $1(e){if(cn&&typeof cn.onCommitFiberRoot=="function")try{cn.onCommitFiberRoot(pl,e,void 0,(e.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:M1,I1=Math.log,A1=Math.LN2;function M1(e){return e>>>=0,e===0?32:31-(I1(e)/A1|0)|0}var mi=64,gi=4194304;function as(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 ba(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~o;l!==0?r=as(l):(s&=i,s!==0&&(r=as(s)))}else i=n&~o,i!==0?r=as(i):s!==0&&(r=as(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Yt(t),o=1<<n,r|=e[n],t&=~o;return r}function D1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function F1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Yt(s),l=1<<i,c=o[i];c===-1?(!(l&n)||l&r)&&(o[i]=D1(l,t)):c<=t&&(e.expiredLanes|=l),s&=~l}}function hu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fv(){var e=mi;return mi<<=1,!(mi&4194240)&&(mi=64),e}function ac(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Js(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=n}function L1(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<n;){var o=31-Yt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function zd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Yt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var he=0;function pv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hv,qd,mv,gv,vv,mu=!1,vi=[],Zn=null,Jn=null,er=null,Rs=new Map,Ns=new Map,Kn=[],U1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Bp(e,t){switch(e){case"focusin":case"focusout":Zn=null;break;case"dragenter":case"dragleave":Jn=null;break;case"mouseover":case"mouseout":er=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ns.delete(t.pointerId)}}function Wo(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=ti(t),t!==null&&qd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function V1(e,t,n,r,o){switch(t){case"focusin":return Zn=Wo(Zn,e,t,n,r,o),!0;case"dragenter":return Jn=Wo(Jn,e,t,n,r,o),!0;case"mouseover":return er=Wo(er,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Rs.set(s,Wo(Rs.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Ns.set(s,Wo(Ns.get(s)||null,e,t,n,r,o)),!0}return!1}function yv(e){var t=yr(e.target);if(t!==null){var n=Ur(t);if(n!==null){if(t=n.tag,t===13){if(t=iv(n),t!==null){e.blockedOn=t,vv(e.priority,function(){mv(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);uu=r,n.target.dispatchEvent(r),uu=null}else return t=ti(n),t!==null&&qd(t),e.blockedOn=n,!1;t.shift()}return!0}function zp(e,t,n){qi(e)&&n.delete(t)}function B1(){mu=!1,Zn!==null&&qi(Zn)&&(Zn=null),Jn!==null&&qi(Jn)&&(Jn=null),er!==null&&qi(er)&&(er=null),Rs.forEach(zp),Ns.forEach(zp)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,mu||(mu=!0,_t.unstable_scheduleCallback(_t.unstable_NormalPriority,B1)))}function ks(e){function t(o){return Ko(o,e)}if(0<vi.length){Ko(vi[0],e);for(var n=1;n<vi.length;n++){var r=vi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Zn!==null&&Ko(Zn,e),Jn!==null&&Ko(Jn,e),er!==null&&Ko(er,e),Rs.forEach(t),Ns.forEach(t),n=0;n<Kn.length;n++)r=Kn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Kn.length&&(n=Kn[0],n.blockedOn===null);)yv(n),n.blockedOn===null&&Kn.shift()}var uo=Fn.ReactCurrentBatchConfig,wa=!0;function z1(e,t,n,r){var o=he,s=uo.transition;uo.transition=null;try{he=1,Hd(e,t,n,r)}finally{he=o,uo.transition=s}}function q1(e,t,n,r){var o=he,s=uo.transition;uo.transition=null;try{he=4,Hd(e,t,n,r)}finally{he=o,uo.transition=s}}function Hd(e,t,n,r){if(wa){var o=gu(e,t,n,r);if(o===null)vc(e,t,r,Sa,n),Bp(e,r);else if(V1(o,e,t,n,r))r.stopPropagation();else if(Bp(e,r),t&4&&-1<U1.indexOf(e)){for(;o!==null;){var s=ti(o);if(s!==null&&hv(s),s=gu(e,t,n,r),s===null&&vc(e,t,r,Sa,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else vc(e,t,r,null,n)}}var Sa=null;function gu(e,t,n,r){if(Sa=null,e=Vd(r),e=yr(e),e!==null)if(t=Ur(e),t===null)e=null;else if(n=t.tag,n===13){if(e=iv(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Sa=e,null}function xv(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(O1()){case Bd:return 1;case uv:return 4;case xa:case P1:return 16;case dv:return 536870912;default:return 16}default:return 16}}var Qn=null,Wd=null,Hi=null;function bv(){if(Hi)return Hi;var e,t=Wd,n=t.length,r,o="value"in Qn?Qn.value:Qn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Hi=o.slice(e,1<r?1-r:void 0)}function Wi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yi(){return!0}function qp(){return!1}function kt(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yi:qp,this.isPropagationStopped=qp,this}return Re(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yi)},persist:function(){},isPersistent:yi}),t}var Io={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kd=kt(Io),ei=Re({},Io,{view:0,detail:0}),H1=kt(ei),lc,cc,Go,hl=Re({},ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Go&&(Go&&e.type==="mousemove"?(lc=e.screenX-Go.screenX,cc=e.screenY-Go.screenY):cc=lc=0,Go=e),lc)},movementY:function(e){return"movementY"in e?e.movementY:cc}}),Hp=kt(hl),W1=Re({},hl,{dataTransfer:0}),K1=kt(W1),G1=Re({},ei,{relatedTarget:0}),uc=kt(G1),Y1=Re({},Io,{animationName:0,elapsedTime:0,pseudoElement:0}),Q1=kt(Y1),X1=Re({},Io,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Z1=kt(X1),J1=Re({},Io,{data:0}),Wp=kt(J1),eS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},nS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nS[e])?!!t[e]:!1}function Gd(){return rS}var oS=Re({},ei,{key:function(e){if(e.key){var t=eS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gd,charCode:function(e){return e.type==="keypress"?Wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),sS=kt(oS),iS=Re({},hl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Kp=kt(iS),aS=Re({},ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gd}),lS=kt(aS),cS=Re({},Io,{propertyName:0,elapsedTime:0,pseudoElement:0}),uS=kt(cS),dS=Re({},hl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fS=kt(dS),pS=[9,13,27,32],Yd=Tn&&"CompositionEvent"in window,hs=null;Tn&&"documentMode"in document&&(hs=document.documentMode);var hS=Tn&&"TextEvent"in window&&!hs,wv=Tn&&(!Yd||hs&&8<hs&&11>=hs),Gp=" ",Yp=!1;function Sv(e,t){switch(e){case"keyup":return pS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _v(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qr=!1;function mS(e,t){switch(e){case"compositionend":return _v(t);case"keypress":return t.which!==32?null:(Yp=!0,Gp);case"textInput":return e=t.data,e===Gp&&Yp?null:e;default:return null}}function gS(e,t){if(Qr)return e==="compositionend"||!Yd&&Sv(e,t)?(e=bv(),Hi=Wd=Qn=null,Qr=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return wv&&t.locale!=="ko"?null:t.data;default:return null}}var vS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Qp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!vS[e.type]:t==="textarea"}function jv(e,t,n,r){tv(r),t=_a(t,"onChange"),0<t.length&&(n=new Kd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ms=null,Ts=null;function yS(e){Av(e,0)}function ml(e){var t=Jr(e);if(Gg(t))return e}function xS(e,t){if(e==="change")return t}var Cv=!1;if(Tn){var dc;if(Tn){var fc="oninput"in document;if(!fc){var Xp=document.createElement("div");Xp.setAttribute("oninput","return;"),fc=typeof Xp.oninput=="function"}dc=fc}else dc=!1;Cv=dc&&(!document.documentMode||9<document.documentMode)}function Zp(){ms&&(ms.detachEvent("onpropertychange",Ev),Ts=ms=null)}function Ev(e){if(e.propertyName==="value"&&ml(Ts)){var t=[];jv(t,Ts,e,Vd(e)),sv(yS,t)}}function bS(e,t,n){e==="focusin"?(Zp(),ms=t,Ts=n,ms.attachEvent("onpropertychange",Ev)):e==="focusout"&&Zp()}function wS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ml(Ts)}function SS(e,t){if(e==="click")return ml(t)}function _S(e,t){if(e==="input"||e==="change")return ml(t)}function jS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zt=typeof Object.is=="function"?Object.is:jS;function Os(e,t){if(Zt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Zc.call(t,o)||!Zt(e[o],t[o]))return!1}return!0}function Jp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eh(e,t){var n=Jp(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=Jp(n)}}function Rv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Nv(){for(var e=window,t=ga();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ga(e.document)}return t}function Qd(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 CS(e){var t=Nv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rv(n.ownerDocument.documentElement,n)){if(r!==null&&Qd(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,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=eh(n,s);var i=eh(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var ES=Tn&&"documentMode"in document&&11>=document.documentMode,Xr=null,vu=null,gs=null,yu=!1;function th(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yu||Xr==null||Xr!==ga(r)||(r=Xr,"selectionStart"in r&&Qd(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}),gs&&Os(gs,r)||(gs=r,r=_a(vu,"onSelect"),0<r.length&&(t=new Kd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Xr)))}function xi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zr={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionend:xi("Transition","TransitionEnd")},pc={},kv={};Tn&&(kv=document.createElement("div").style,"AnimationEvent"in window||(delete Zr.animationend.animation,delete Zr.animationiteration.animation,delete Zr.animationstart.animation),"TransitionEvent"in window||delete Zr.transitionend.transition);function gl(e){if(pc[e])return pc[e];if(!Zr[e])return e;var t=Zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in kv)return pc[e]=t[n];return e}var Tv=gl("animationend"),Ov=gl("animationiteration"),Pv=gl("animationstart"),$v=gl("transitionend"),Iv=new Map,nh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function dr(e,t){Iv.set(e,t),Lr(t,[e])}for(var hc=0;hc<nh.length;hc++){var mc=nh[hc],RS=mc.toLowerCase(),NS=mc[0].toUpperCase()+mc.slice(1);dr(RS,"on"+NS)}dr(Tv,"onAnimationEnd");dr(Ov,"onAnimationIteration");dr(Pv,"onAnimationStart");dr("dblclick","onDoubleClick");dr("focusin","onFocus");dr("focusout","onBlur");dr($v,"onTransitionEnd");vo("onMouseEnter",["mouseout","mouseover"]);vo("onMouseLeave",["mouseout","mouseover"]);vo("onPointerEnter",["pointerout","pointerover"]);vo("onPointerLeave",["pointerout","pointerover"]);Lr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Lr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Lr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Lr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Lr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Lr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ls="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),kS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ls));function rh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,R1(r,t,void 0,e),e.currentTarget=null}function Av(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&o.isPropagationStopped())break e;rh(o,l,u),s=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&o.isPropagationStopped())break e;rh(o,l,u),s=c}}}if(ya)throw e=pu,ya=!1,pu=null,e}function xe(e,t){var n=t[_u];n===void 0&&(n=t[_u]=new Set);var r=e+"__bubble";n.has(r)||(Mv(t,e,2,!1),n.add(r))}function gc(e,t,n){var r=0;t&&(r|=4),Mv(n,e,r,t)}var bi="_reactListening"+Math.random().toString(36).slice(2);function Ps(e){if(!e[bi]){e[bi]=!0,zg.forEach(function(n){n!=="selectionchange"&&(kS.has(n)||gc(n,!1,e),gc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bi]||(t[bi]=!0,gc("selectionchange",!1,t))}}function Mv(e,t,n,r){switch(xv(t)){case 1:var o=z1;break;case 4:o=q1;break;default:o=Hd}n=o.bind(null,t,n,e),o=void 0,!fu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function vc(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;i=i.return}for(;l!==null;){if(i=yr(l),i===null)return;if(c=i.tag,c===5||c===6){r=s=i;continue e}l=l.parentNode}}r=r.return}sv(function(){var u=s,d=Vd(n),f=[];e:{var p=Iv.get(e);if(p!==void 0){var y=Kd,m=e;switch(e){case"keypress":if(Wi(n)===0)break e;case"keydown":case"keyup":y=sS;break;case"focusin":m="focus",y=uc;break;case"focusout":m="blur",y=uc;break;case"beforeblur":case"afterblur":y=uc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=Hp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=K1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=lS;break;case Tv:case Ov:case Pv:y=Q1;break;case $v:y=uS;break;case"scroll":y=H1;break;case"wheel":y=fS;break;case"copy":case"cut":case"paste":y=Z1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Kp}var h=(t&4)!==0,x=!h&&e==="scroll",v=h?p!==null?p+"Capture":null:p;h=[];for(var g=u,b;g!==null;){b=g;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,v!==null&&(S=Es(g,v),S!=null&&h.push($s(g,S,b)))),x)break;g=g.return}0<h.length&&(p=new y(p,m,null,n,d),f.push({event:p,listeners:h}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&n!==uu&&(m=n.relatedTarget||n.fromElement)&&(yr(m)||m[On]))break e;if((y||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,y?(m=n.relatedTarget||n.toElement,y=u,m=m?yr(m):null,m!==null&&(x=Ur(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(y=null,m=u),y!==m)){if(h=Hp,S="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(h=Kp,S="onPointerLeave",v="onPointerEnter",g="pointer"),x=y==null?p:Jr(y),b=m==null?p:Jr(m),p=new h(S,g+"leave",y,n,d),p.target=x,p.relatedTarget=b,S=null,yr(d)===u&&(h=new h(v,g+"enter",m,n,d),h.target=b,h.relatedTarget=x,S=h),x=S,y&&m)t:{for(h=y,v=m,g=0,b=h;b;b=zr(b))g++;for(b=0,S=v;S;S=zr(S))b++;for(;0<g-b;)h=zr(h),g--;for(;0<b-g;)v=zr(v),b--;for(;g--;){if(h===v||v!==null&&h===v.alternate)break t;h=zr(h),v=zr(v)}h=null}else h=null;y!==null&&oh(f,p,y,h,!1),m!==null&&x!==null&&oh(f,x,m,h,!0)}}e:{if(p=u?Jr(u):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var _=xS;else if(Qp(p))if(Cv)_=_S;else{_=wS;var j=bS}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=SS);if(_&&(_=_(e,u))){jv(f,_,n,d);break e}j&&j(e,p,u),e==="focusout"&&(j=p._wrapperState)&&j.controlled&&p.type==="number"&&su(p,"number",p.value)}switch(j=u?Jr(u):window,e){case"focusin":(Qp(j)||j.contentEditable==="true")&&(Xr=j,vu=u,gs=null);break;case"focusout":gs=vu=Xr=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,th(f,n,d);break;case"selectionchange":if(ES)break;case"keydown":case"keyup":th(f,n,d)}var C;if(Yd)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Qr?Sv(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(wv&&n.locale!=="ko"&&(Qr||E!=="onCompositionStart"?E==="onCompositionEnd"&&Qr&&(C=bv()):(Qn=d,Wd="value"in Qn?Qn.value:Qn.textContent,Qr=!0)),j=_a(u,E),0<j.length&&(E=new Wp(E,e,null,n,d),f.push({event:E,listeners:j}),C?E.data=C:(C=_v(n),C!==null&&(E.data=C)))),(C=hS?mS(e,n):gS(e,n))&&(u=_a(u,"onBeforeInput"),0<u.length&&(d=new Wp("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=C))}Av(f,t)})}function $s(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _a(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Es(e,n),s!=null&&r.unshift($s(e,s,o)),s=Es(e,t),s!=null&&r.push($s(e,s,o))),e=e.return}return r}function zr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function oh(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,o?(c=Es(n,s),c!=null&&i.unshift($s(n,c,l))):o||(c=Es(n,s),c!=null&&i.push($s(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var TS=/\r\n?/g,OS=/\u0000|\uFFFD/g;function sh(e){return(typeof e=="string"?e:""+e).replace(TS,`
38
- `).replace(OS,"")}function wi(e,t,n){if(t=sh(t),sh(e)!==t&&n)throw Error(I(425))}function ja(){}var xu=null,bu=null;function wu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Su=typeof setTimeout=="function"?setTimeout:void 0,PS=typeof clearTimeout=="function"?clearTimeout:void 0,ih=typeof Promise=="function"?Promise:void 0,$S=typeof queueMicrotask=="function"?queueMicrotask:typeof ih<"u"?function(e){return ih.resolve(null).then(e).catch(IS)}:Su;function IS(e){setTimeout(function(){throw e})}function yc(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ks(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ks(t)}function tr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ah(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ao=Math.random().toString(36).slice(2),ln="__reactFiber$"+Ao,Is="__reactProps$"+Ao,On="__reactContainer$"+Ao,_u="__reactEvents$"+Ao,AS="__reactListeners$"+Ao,MS="__reactHandles$"+Ao;function yr(e){var t=e[ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[On]||n[ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ah(e);e!==null;){if(n=e[ln])return n;e=ah(e)}return t}e=n,n=e.parentNode}return null}function ti(e){return e=e[ln]||e[On],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Jr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function vl(e){return e[Is]||null}var ju=[],eo=-1;function fr(e){return{current:e}}function we(e){0>eo||(e.current=ju[eo],ju[eo]=null,eo--)}function ye(e,t){eo++,ju[eo]=e.current,e.current=t}var ar={},tt=fr(ar),dt=fr(!1),Tr=ar;function yo(e,t){var n=e.type.contextTypes;if(!n)return ar;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ft(e){return e=e.childContextTypes,e!=null}function Ca(){we(dt),we(tt)}function lh(e,t,n){if(tt.current!==ar)throw Error(I(168));ye(tt,t),ye(dt,n)}function Dv(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(I(108,b1(e)||"Unknown",o));return Re({},n,r)}function Ea(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ar,Tr=tt.current,ye(tt,e),ye(dt,dt.current),!0}function ch(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Dv(e,t,Tr),r.__reactInternalMemoizedMergedChildContext=e,we(dt),we(tt),ye(tt,e)):we(dt),ye(dt,n)}var wn=null,yl=!1,xc=!1;function Fv(e){wn===null?wn=[e]:wn.push(e)}function DS(e){yl=!0,Fv(e)}function pr(){if(!xc&&wn!==null){xc=!0;var e=0,t=he;try{var n=wn;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wn=null,yl=!1}catch(o){throw wn!==null&&(wn=wn.slice(e+1)),cv(Bd,pr),o}finally{he=t,xc=!1}}return null}var to=[],no=0,Ra=null,Na=0,$t=[],It=0,Or=null,jn=1,Cn="";function mr(e,t){to[no++]=Na,to[no++]=Ra,Ra=e,Na=t}function Lv(e,t,n){$t[It++]=jn,$t[It++]=Cn,$t[It++]=Or,Or=e;var r=jn;e=Cn;var o=32-Yt(r)-1;r&=~(1<<o),n+=1;var s=32-Yt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,jn=1<<32-Yt(t)+o|n<<o|r,Cn=s+e}else jn=1<<s|n<<o|r,Cn=e}function Xd(e){e.return!==null&&(mr(e,1),Lv(e,1,0))}function Zd(e){for(;e===Ra;)Ra=to[--no],to[no]=null,Na=to[--no],to[no]=null;for(;e===Or;)Or=$t[--It],$t[It]=null,Cn=$t[--It],$t[It]=null,jn=$t[--It],$t[It]=null}var bt=null,xt=null,Se=!1,Kt=null;function Uv(e,t){var n=Mt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function uh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,bt=e,xt=tr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,bt=e,xt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Or!==null?{id:jn,overflow:Cn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Mt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,bt=e,xt=null,!0):!1;default:return!1}}function Cu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Eu(e){if(Se){var t=xt;if(t){var n=t;if(!uh(e,t)){if(Cu(e))throw Error(I(418));t=tr(n.nextSibling);var r=bt;t&&uh(e,t)?Uv(r,n):(e.flags=e.flags&-4097|2,Se=!1,bt=e)}}else{if(Cu(e))throw Error(I(418));e.flags=e.flags&-4097|2,Se=!1,bt=e}}}function dh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function Si(e){if(e!==bt)return!1;if(!Se)return dh(e),Se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!wu(e.type,e.memoizedProps)),t&&(t=xt)){if(Cu(e))throw Vv(),Error(I(418));for(;t;)Uv(e,t),t=tr(t.nextSibling)}if(dh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){xt=tr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}xt=null}}else xt=bt?tr(e.stateNode.nextSibling):null;return!0}function Vv(){for(var e=xt;e;)e=tr(e.nextSibling)}function xo(){xt=bt=null,Se=!1}function Jd(e){Kt===null?Kt=[e]:Kt.push(e)}var FS=Fn.ReactCurrentBatchConfig;function qt(e,t){if(e&&e.defaultProps){t=Re({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var ka=fr(null),Ta=null,ro=null,ef=null;function tf(){ef=ro=Ta=null}function nf(e){var t=ka.current;we(ka),e._currentValue=t}function Ru(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function fo(e,t){Ta=e,ef=ro=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ut=!0),e.firstContext=null)}function Ft(e){var t=e._currentValue;if(ef!==e)if(e={context:e,memoizedValue:t,next:null},ro===null){if(Ta===null)throw Error(I(308));ro=e,Ta.dependencies={lanes:0,firstContext:e}}else ro=ro.next=e;return t}var xr=null;function rf(e){xr===null?xr=[e]:xr.push(e)}function Bv(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,rf(t)):(n.next=o.next,o.next=n),t.interleaved=n,Pn(e,r)}function Pn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Hn=!1;function of(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function nr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,le&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Pn(e,n)}return o=r.interleaved,o===null?(t.next=t,rf(r)):(t.next=o.next,o.next=t),r.interleaved=t,Pn(e,n)}function Ki(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zd(e,n)}}function fh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Oa(e,t,n,r){var o=e.updateQueue;Hn=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?s=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=o.baseState;i=0,d=u=c=null,l=s;do{var p=l.lane,y=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,h=l;switch(p=t,y=n,h.tag){case 1:if(m=h.payload,typeof m=="function"){f=m.call(y,f,p);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,p=typeof m=="function"?m.call(y,f,p):m,p==null)break e;f=Re({},f,p);break e;case 2:Hn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else y={eventTime:y,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=y,c=f):d=d.next=y,i|=p;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;p=l,l=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(d===null&&(c=f),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);$r|=i,e.lanes=i,e.memoizedState=f}}function ph(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(I(191,o));o.call(r)}}}var qv=new Bg.Component().refs;function Nu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Re({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xl={isMounted:function(e){return(e=e._reactInternals)?Ur(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=rt(),o=or(e),s=Rn(r,o);s.payload=t,n!=null&&(s.callback=n),t=nr(e,s,o),t!==null&&(Qt(t,e,o,r),Ki(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=rt(),o=or(e),s=Rn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=nr(e,s,o),t!==null&&(Qt(t,e,o,r),Ki(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rt(),r=or(e),o=Rn(n,r);o.tag=2,t!=null&&(o.callback=t),t=nr(e,o,r),t!==null&&(Qt(t,e,r,n),Ki(t,e,r))}};function hh(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Os(n,r)||!Os(o,s):!0}function Hv(e,t,n){var r=!1,o=ar,s=t.contextType;return typeof s=="object"&&s!==null?s=Ft(s):(o=ft(t)?Tr:tt.current,r=t.contextTypes,s=(r=r!=null)?yo(e,o):ar),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function mh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xl.enqueueReplaceState(t,t.state,null)}function ku(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=qv,of(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Ft(s):(s=ft(t)?Tr:tt.current,o.context=yo(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Nu(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&xl.enqueueReplaceState(o,o.state,null),Oa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Yo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(I(309));var r=n.stateNode}if(!r)throw Error(I(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var l=o.refs;l===qv&&(l=o.refs={}),i===null?delete l[s]:l[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,e))}return e}function _i(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function gh(e){var t=e._init;return t(e._payload)}function Wv(e){function t(v,g){if(e){var b=v.deletions;b===null?(v.deletions=[g],v.flags|=16):b.push(g)}}function n(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function r(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function o(v,g){return v=sr(v,g),v.index=0,v.sibling=null,v}function s(v,g,b){return v.index=b,e?(b=v.alternate,b!==null?(b=b.index,b<g?(v.flags|=2,g):b):(v.flags|=2,g)):(v.flags|=1048576,g)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,g,b,S){return g===null||g.tag!==6?(g=Ec(b,v.mode,S),g.return=v,g):(g=o(g,b),g.return=v,g)}function c(v,g,b,S){var _=b.type;return _===Yr?d(v,g,b.props.children,S,b.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===qn&&gh(_)===g.type)?(S=o(g,b.props),S.ref=Yo(v,g,b),S.return=v,S):(S=Ji(b.type,b.key,b.props,null,v.mode,S),S.ref=Yo(v,g,b),S.return=v,S)}function u(v,g,b,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=Rc(b,v.mode,S),g.return=v,g):(g=o(g,b.children||[]),g.return=v,g)}function d(v,g,b,S,_){return g===null||g.tag!==7?(g=_r(b,v.mode,S,_),g.return=v,g):(g=o(g,b),g.return=v,g)}function f(v,g,b){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Ec(""+g,v.mode,b),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fi:return b=Ji(g.type,g.key,g.props,null,v.mode,b),b.ref=Yo(v,null,g),b.return=v,b;case Gr:return g=Rc(g,v.mode,b),g.return=v,g;case qn:var S=g._init;return f(v,S(g._payload),b)}if(is(g)||qo(g))return g=_r(g,v.mode,b,null),g.return=v,g;_i(v,g)}return null}function p(v,g,b,S){var _=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return _!==null?null:l(v,g,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case fi:return b.key===_?c(v,g,b,S):null;case Gr:return b.key===_?u(v,g,b,S):null;case qn:return _=b._init,p(v,g,_(b._payload),S)}if(is(b)||qo(b))return _!==null?null:d(v,g,b,S,null);_i(v,b)}return null}function y(v,g,b,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(b)||null,l(g,v,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case fi:return v=v.get(S.key===null?b:S.key)||null,c(g,v,S,_);case Gr:return v=v.get(S.key===null?b:S.key)||null,u(g,v,S,_);case qn:var j=S._init;return y(v,g,b,j(S._payload),_)}if(is(S)||qo(S))return v=v.get(b)||null,d(g,v,S,_,null);_i(g,S)}return null}function m(v,g,b,S){for(var _=null,j=null,C=g,E=g=0,N=null;C!==null&&E<b.length;E++){C.index>E?(N=C,C=null):N=C.sibling;var R=p(v,C,b[E],S);if(R===null){C===null&&(C=N);break}e&&C&&R.alternate===null&&t(v,C),g=s(R,g,E),j===null?_=R:j.sibling=R,j=R,C=N}if(E===b.length)return n(v,C),Se&&mr(v,E),_;if(C===null){for(;E<b.length;E++)C=f(v,b[E],S),C!==null&&(g=s(C,g,E),j===null?_=C:j.sibling=C,j=C);return Se&&mr(v,E),_}for(C=r(v,C);E<b.length;E++)N=y(C,v,E,b[E],S),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?E:N.key),g=s(N,g,E),j===null?_=N:j.sibling=N,j=N);return e&&C.forEach(function(T){return t(v,T)}),Se&&mr(v,E),_}function h(v,g,b,S){var _=qo(b);if(typeof _!="function")throw Error(I(150));if(b=_.call(b),b==null)throw Error(I(151));for(var j=_=null,C=g,E=g=0,N=null,R=b.next();C!==null&&!R.done;E++,R=b.next()){C.index>E?(N=C,C=null):N=C.sibling;var T=p(v,C,R.value,S);if(T===null){C===null&&(C=N);break}e&&C&&T.alternate===null&&t(v,C),g=s(T,g,E),j===null?_=T:j.sibling=T,j=T,C=N}if(R.done)return n(v,C),Se&&mr(v,E),_;if(C===null){for(;!R.done;E++,R=b.next())R=f(v,R.value,S),R!==null&&(g=s(R,g,E),j===null?_=R:j.sibling=R,j=R);return Se&&mr(v,E),_}for(C=r(v,C);!R.done;E++,R=b.next())R=y(C,v,E,R.value,S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?E:R.key),g=s(R,g,E),j===null?_=R:j.sibling=R,j=R);return e&&C.forEach(function(k){return t(v,k)}),Se&&mr(v,E),_}function x(v,g,b,S){if(typeof b=="object"&&b!==null&&b.type===Yr&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case fi:e:{for(var _=b.key,j=g;j!==null;){if(j.key===_){if(_=b.type,_===Yr){if(j.tag===7){n(v,j.sibling),g=o(j,b.props.children),g.return=v,v=g;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===qn&&gh(_)===j.type){n(v,j.sibling),g=o(j,b.props),g.ref=Yo(v,j,b),g.return=v,v=g;break e}n(v,j);break}else t(v,j);j=j.sibling}b.type===Yr?(g=_r(b.props.children,v.mode,S,b.key),g.return=v,v=g):(S=Ji(b.type,b.key,b.props,null,v.mode,S),S.ref=Yo(v,g,b),S.return=v,v=S)}return i(v);case Gr:e:{for(j=b.key;g!==null;){if(g.key===j)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(v,g.sibling),g=o(g,b.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else t(v,g);g=g.sibling}g=Rc(b,v.mode,S),g.return=v,v=g}return i(v);case qn:return j=b._init,x(v,g,j(b._payload),S)}if(is(b))return m(v,g,b,S);if(qo(b))return h(v,g,b,S);_i(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(n(v,g.sibling),g=o(g,b),g.return=v,v=g):(n(v,g),g=Ec(b,v.mode,S),g.return=v,v=g),i(v)):n(v,g)}return x}var bo=Wv(!0),Kv=Wv(!1),ni={},un=fr(ni),As=fr(ni),Ms=fr(ni);function br(e){if(e===ni)throw Error(I(174));return e}function sf(e,t){switch(ye(Ms,t),ye(As,e),ye(un,ni),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:au(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=au(t,e)}we(un),ye(un,t)}function wo(){we(un),we(As),we(Ms)}function Gv(e){br(Ms.current);var t=br(un.current),n=au(t,e.type);t!==n&&(ye(As,e),ye(un,n))}function af(e){As.current===e&&(we(un),we(As))}var Ce=fr(0);function Pa(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 bc=[];function lf(){for(var e=0;e<bc.length;e++)bc[e]._workInProgressVersionPrimary=null;bc.length=0}var Gi=Fn.ReactCurrentDispatcher,wc=Fn.ReactCurrentBatchConfig,Pr=0,Ee=null,Ae=null,Ve=null,$a=!1,vs=!1,Ds=0,LS=0;function Xe(){throw Error(I(321))}function cf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Zt(e[n],t[n]))return!1;return!0}function uf(e,t,n,r,o,s){if(Pr=s,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gi.current=e===null||e.memoizedState===null?zS:qS,e=n(r,o),vs){s=0;do{if(vs=!1,Ds=0,25<=s)throw Error(I(301));s+=1,Ve=Ae=null,t.updateQueue=null,Gi.current=HS,e=n(r,o)}while(vs)}if(Gi.current=Ia,t=Ae!==null&&Ae.next!==null,Pr=0,Ve=Ae=Ee=null,$a=!1,t)throw Error(I(300));return e}function df(){var e=Ds!==0;return Ds=0,e}function rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?Ee.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function Lt(){if(Ae===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ae.next;var t=Ve===null?Ee.memoizedState:Ve.next;if(t!==null)Ve=t,Ae=e;else{if(e===null)throw Error(I(310));Ae=e,e={memoizedState:Ae.memoizedState,baseState:Ae.baseState,baseQueue:Ae.baseQueue,queue:Ae.queue,next:null},Ve===null?Ee.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function Fs(e,t){return typeof t=="function"?t(e):t}function Sc(e){var t=Lt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Ae,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var l=i=null,c=null,u=s;do{var d=u.lane;if((Pr&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,i=r):c=c.next=f,Ee.lanes|=d,$r|=d}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,Zt(r,t.memoizedState)||(ut=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Ee.lanes|=s,$r|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _c(e){var t=Lt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);Zt(s,t.memoizedState)||(ut=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Yv(){}function Qv(e,t){var n=Ee,r=Lt(),o=t(),s=!Zt(r.memoizedState,o);if(s&&(r.memoizedState=o,ut=!0),r=r.queue,ff(Jv.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ve!==null&&Ve.memoizedState.tag&1){if(n.flags|=2048,Ls(9,Zv.bind(null,n,r,o,t),void 0,null),Be===null)throw Error(I(349));Pr&30||Xv(n,t,o)}return o}function Xv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Zv(e,t,n,r){t.value=n,t.getSnapshot=r,ey(t)&&ty(e)}function Jv(e,t,n){return n(function(){ey(t)&&ty(e)})}function ey(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zt(e,n)}catch{return!0}}function ty(e){var t=Pn(e,1);t!==null&&Qt(t,e,1,-1)}function vh(e){var t=rn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fs,lastRenderedState:e},t.queue=e,e=e.dispatch=BS.bind(null,Ee,e),[t.memoizedState,e]}function Ls(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ee.updateQueue,t===null?(t={lastEffect:null,stores:null},Ee.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ny(){return Lt().memoizedState}function Yi(e,t,n,r){var o=rn();Ee.flags|=e,o.memoizedState=Ls(1|t,n,void 0,r===void 0?null:r)}function bl(e,t,n,r){var o=Lt();r=r===void 0?null:r;var s=void 0;if(Ae!==null){var i=Ae.memoizedState;if(s=i.destroy,r!==null&&cf(r,i.deps)){o.memoizedState=Ls(t,n,s,r);return}}Ee.flags|=e,o.memoizedState=Ls(1|t,n,s,r)}function yh(e,t){return Yi(8390656,8,e,t)}function ff(e,t){return bl(2048,8,e,t)}function ry(e,t){return bl(4,2,e,t)}function oy(e,t){return bl(4,4,e,t)}function sy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function iy(e,t,n){return n=n!=null?n.concat([e]):null,bl(4,4,sy.bind(null,t,e),n)}function pf(){}function ay(e,t){var n=Lt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&cf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ly(e,t){var n=Lt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&cf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cy(e,t,n){return Pr&21?(Zt(n,t)||(n=fv(),Ee.lanes|=n,$r|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ut=!0),e.memoizedState=n)}function US(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=wc.transition;wc.transition={};try{e(!1),t()}finally{he=n,wc.transition=r}}function uy(){return Lt().memoizedState}function VS(e,t,n){var r=or(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},dy(e))fy(t,n);else if(n=Bv(e,t,n,r),n!==null){var o=rt();Qt(n,e,r,o),py(n,t,r)}}function BS(e,t,n){var r=or(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(dy(e))fy(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,l=s(i,n);if(o.hasEagerState=!0,o.eagerState=l,Zt(l,i)){var c=t.interleaved;c===null?(o.next=o,rf(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=Bv(e,t,o,r),n!==null&&(o=rt(),Qt(n,e,r,o),py(n,t,r))}}function dy(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function fy(e,t){vs=$a=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function py(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zd(e,n)}}var Ia={readContext:Ft,useCallback:Xe,useContext:Xe,useEffect:Xe,useImperativeHandle:Xe,useInsertionEffect:Xe,useLayoutEffect:Xe,useMemo:Xe,useReducer:Xe,useRef:Xe,useState:Xe,useDebugValue:Xe,useDeferredValue:Xe,useTransition:Xe,useMutableSource:Xe,useSyncExternalStore:Xe,useId:Xe,unstable_isNewReconciler:!1},zS={readContext:Ft,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:yh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yi(4194308,4,sy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yi(4,2,e,t)},useMemo:function(e,t){var n=rn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=rn();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=VS.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:vh,useDebugValue:pf,useDeferredValue:function(e){return rn().memoizedState=e},useTransition:function(){var e=vh(!1),t=e[0];return e=US.bind(null,e[1]),rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ee,o=rn();if(Se){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Be===null)throw Error(I(349));Pr&30||Xv(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,yh(Jv.bind(null,r,s,e),[e]),r.flags|=2048,Ls(9,Zv.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=rn(),t=Be.identifierPrefix;if(Se){var n=Cn,r=jn;n=(r&~(1<<32-Yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ds++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=LS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},qS={readContext:Ft,useCallback:ay,useContext:Ft,useEffect:ff,useImperativeHandle:iy,useInsertionEffect:ry,useLayoutEffect:oy,useMemo:ly,useReducer:Sc,useRef:ny,useState:function(){return Sc(Fs)},useDebugValue:pf,useDeferredValue:function(e){var t=Lt();return cy(t,Ae.memoizedState,e)},useTransition:function(){var e=Sc(Fs)[0],t=Lt().memoizedState;return[e,t]},useMutableSource:Yv,useSyncExternalStore:Qv,useId:uy,unstable_isNewReconciler:!1},HS={readContext:Ft,useCallback:ay,useContext:Ft,useEffect:ff,useImperativeHandle:iy,useInsertionEffect:ry,useLayoutEffect:oy,useMemo:ly,useReducer:_c,useRef:ny,useState:function(){return _c(Fs)},useDebugValue:pf,useDeferredValue:function(e){var t=Lt();return Ae===null?t.memoizedState=e:cy(t,Ae.memoizedState,e)},useTransition:function(){var e=_c(Fs)[0],t=Lt().memoizedState;return[e,t]},useMutableSource:Yv,useSyncExternalStore:Qv,useId:uy,unstable_isNewReconciler:!1};function So(e,t){try{var n="",r=t;do n+=x1(r),r=r.return;while(r);var o=n}catch(s){o=`
37
+ `+o[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{rc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ss(e):""}function v1(e){switch(e.tag){case 5:return ss(e.type);case 16:return ss("Lazy");case 13:return ss("Suspense");case 19:return ss("SuspenseList");case 0:case 2:case 15:return e=oc(e.type,!1),e;case 11:return e=oc(e.type.render,!1),e;case 1:return e=oc(e.type,!0),e;default:return""}}function tu(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 Gr:return"Fragment";case Kr:return"Portal";case Zc:return"Profiler";case Dd:return"StrictMode";case Jc:return"Suspense";case eu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qg:return(e.displayName||"Context")+".Consumer";case zg:return(e._context.displayName||"Context")+".Provider";case Fd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ld:return t=e.displayName||null,t!==null?t:tu(e.type)||"Memo";case Hn:t=e._payload,e=e._init;try{return tu(e(t))}catch{}}return null}function y1(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 tu(t);case 8:return t===Dd?"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 lr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function x1(e){var t=Wg(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,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pi(e){e._valueTracker||(e._valueTracker=x1(e))}function Kg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Wg(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ga(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 nu(e,t){var n=t.checked;return Ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function $p(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=lr(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 Gg(e,t){t=t.checked,t!=null&&Md(e,"checked",t,!1)}function ru(e,t){Gg(e,t);var n=lr(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")?ou(e,t.type,n):t.hasOwnProperty("defaultValue")&&ou(e,t.type,lr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ap(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 ou(e,t,n){(t!=="number"||ga(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var is=Array.isArray;function io(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+lr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function su(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return Ne({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mp(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(I(92));if(is(n)){if(1<n.length)throw Error(I(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:lr(n)}}function Yg(e,t){var n=lr(t.value),r=lr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Dp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Qg(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function iu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Qg(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var hi,Xg=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(hi=hi||document.createElement("div"),hi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=hi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Cs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var fs={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},b1=["Webkit","ms","Moz","O"];Object.keys(fs).forEach(function(e){b1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fs[t]=fs[e]})});function Zg(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||fs.hasOwnProperty(e)&&fs[e]?(""+t).trim():t+"px"}function Jg(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Zg(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var w1=Ne({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 au(e,t){if(t){if(w1[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(I(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(I(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(I(61))}if(t.style!=null&&typeof t.style!="object")throw Error(I(62))}}function lu(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 cu=null;function Ud(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var uu=null,ao=null,lo=null;function Fp(e){if(e=ti(e)){if(typeof uu!="function")throw Error(I(280));var t=e.stateNode;t&&(t=gl(t),uu(e.stateNode,e.type,t))}}function ev(e){ao?lo?lo.push(e):lo=[e]:ao=e}function tv(){if(ao){var e=ao,t=lo;if(lo=ao=null,Fp(e),t)for(e=0;e<t.length;e++)Fp(t[e])}}function nv(e,t){return e(t)}function rv(){}var sc=!1;function ov(e,t,n){if(sc)return e(t,n);sc=!0;try{return nv(e,t,n)}finally{sc=!1,(ao!==null||lo!==null)&&(rv(),tv())}}function Es(e,t){var n=e.stateNode;if(n===null)return null;var r=gl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var du=!1;if(On)try{var Ho={};Object.defineProperty(Ho,"passive",{get:function(){du=!0}}),window.addEventListener("test",Ho,Ho),window.removeEventListener("test",Ho,Ho)}catch{du=!1}function S1(e,t,n,r,o,s,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var ps=!1,va=null,ya=!1,fu=null,_1={onError:function(e){ps=!0,va=e}};function j1(e,t,n,r,o,s,i,l,c){ps=!1,va=null,S1.apply(_1,arguments)}function C1(e,t,n,r,o,s,i,l,c){if(j1.apply(this,arguments),ps){if(ps){var u=va;ps=!1,va=null}else throw Error(I(198));ya||(ya=!0,fu=u)}}function Lr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function sv(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Lp(e){if(Lr(e)!==e)throw Error(I(188))}function E1(e){var t=e.alternate;if(!t){if(t=Lr(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return Lp(o),e;if(s===r)return Lp(o),t;s=s.sibling}throw Error(I(188))}if(n.return!==r.return)n=o,r=s;else{for(var i=!1,l=o.child;l;){if(l===n){i=!0,n=o,r=s;break}if(l===r){i=!0,r=o,n=s;break}l=l.sibling}if(!i){for(l=s.child;l;){if(l===n){i=!0,n=s,r=o;break}if(l===r){i=!0,r=s,n=o;break}l=l.sibling}if(!i)throw Error(I(189))}}if(n.alternate!==r)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function iv(e){return e=E1(e),e!==null?av(e):null}function av(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=av(e);if(t!==null)return t;e=e.sibling}return null}var lv=jt.unstable_scheduleCallback,Up=jt.unstable_cancelCallback,R1=jt.unstable_shouldYield,N1=jt.unstable_requestPaint,Pe=jt.unstable_now,k1=jt.unstable_getCurrentPriorityLevel,Vd=jt.unstable_ImmediatePriority,cv=jt.unstable_UserBlockingPriority,xa=jt.unstable_NormalPriority,T1=jt.unstable_LowPriority,uv=jt.unstable_IdlePriority,fl=null,un=null;function O1(e){if(un&&typeof un.onCommitFiberRoot=="function")try{un.onCommitFiberRoot(fl,e,void 0,(e.current.flags&128)===128)}catch{}}var Xt=Math.clz32?Math.clz32:$1,P1=Math.log,I1=Math.LN2;function $1(e){return e>>>=0,e===0?32:31-(P1(e)/I1|0)|0}var mi=64,gi=4194304;function as(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 ba(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,s=e.pingedLanes,i=n&268435455;if(i!==0){var l=i&~o;l!==0?r=as(l):(s&=i,s!==0&&(r=as(s)))}else i=n&~o,i!==0?r=as(i):s!==0&&(r=as(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,s=t&-t,o>=s||o===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Xt(t),o=1<<n,r|=e[n],t&=~o;return r}function A1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function M1(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Xt(s),l=1<<i,c=o[i];c===-1?(!(l&n)||l&r)&&(o[i]=A1(l,t)):c<=t&&(e.expiredLanes|=l),s&=~l}}function pu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dv(){var e=mi;return mi<<=1,!(mi&4194240)&&(mi=64),e}function ic(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Js(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Xt(t),e[t]=n}function D1(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<n;){var o=31-Xt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function Bd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var he=0;function fv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var pv,zd,hv,mv,gv,hu=!1,vi=[],er=null,tr=null,nr=null,Rs=new Map,Ns=new Map,Gn=[],F1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Vp(e,t){switch(e){case"focusin":case"focusout":er=null;break;case"dragenter":case"dragleave":tr=null;break;case"mouseover":case"mouseout":nr=null;break;case"pointerover":case"pointerout":Rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ns.delete(t.pointerId)}}function Wo(e,t,n,r,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[o]},t!==null&&(t=ti(t),t!==null&&zd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function L1(e,t,n,r,o){switch(t){case"focusin":return er=Wo(er,e,t,n,r,o),!0;case"dragenter":return tr=Wo(tr,e,t,n,r,o),!0;case"mouseover":return nr=Wo(nr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Rs.set(s,Wo(Rs.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,Ns.set(s,Wo(Ns.get(s)||null,e,t,n,r,o)),!0}return!1}function vv(e){var t=xr(e.target);if(t!==null){var n=Lr(t);if(n!==null){if(t=n.tag,t===13){if(t=sv(n),t!==null){e.blockedOn=t,gv(e.priority,function(){hv(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function qi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=mu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);cu=r,n.target.dispatchEvent(r),cu=null}else return t=ti(n),t!==null&&zd(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){qi(e)&&n.delete(t)}function U1(){hu=!1,er!==null&&qi(er)&&(er=null),tr!==null&&qi(tr)&&(tr=null),nr!==null&&qi(nr)&&(nr=null),Rs.forEach(Bp),Ns.forEach(Bp)}function Ko(e,t){e.blockedOn===t&&(e.blockedOn=null,hu||(hu=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,U1)))}function ks(e){function t(o){return Ko(o,e)}if(0<vi.length){Ko(vi[0],e);for(var n=1;n<vi.length;n++){var r=vi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(er!==null&&Ko(er,e),tr!==null&&Ko(tr,e),nr!==null&&Ko(nr,e),Rs.forEach(t),Ns.forEach(t),n=0;n<Gn.length;n++)r=Gn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Gn.length&&(n=Gn[0],n.blockedOn===null);)vv(n),n.blockedOn===null&&Gn.shift()}var co=Ln.ReactCurrentBatchConfig,wa=!0;function V1(e,t,n,r){var o=he,s=co.transition;co.transition=null;try{he=1,qd(e,t,n,r)}finally{he=o,co.transition=s}}function B1(e,t,n,r){var o=he,s=co.transition;co.transition=null;try{he=4,qd(e,t,n,r)}finally{he=o,co.transition=s}}function qd(e,t,n,r){if(wa){var o=mu(e,t,n,r);if(o===null)gc(e,t,r,Sa,n),Vp(e,r);else if(L1(o,e,t,n,r))r.stopPropagation();else if(Vp(e,r),t&4&&-1<F1.indexOf(e)){for(;o!==null;){var s=ti(o);if(s!==null&&pv(s),s=mu(e,t,n,r),s===null&&gc(e,t,r,Sa,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else gc(e,t,r,null,n)}}var Sa=null;function mu(e,t,n,r){if(Sa=null,e=Ud(r),e=xr(e),e!==null)if(t=Lr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=sv(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Sa=e,null}function yv(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(k1()){case Vd:return 1;case cv:return 4;case xa:case T1:return 16;case uv:return 536870912;default:return 16}default:return 16}}var Xn=null,Hd=null,Hi=null;function xv(){if(Hi)return Hi;var e,t=Hd,n=t.length,r,o="value"in Xn?Xn.value:Xn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===o[s-r];r++);return Hi=o.slice(e,1<r?1-r:void 0)}function Wi(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yi(){return!0}function zp(){return!1}function Tt(e){function t(n,r,o,s,i){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?yi:zp,this.isPropagationStopped=zp,this}return Ne(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=yi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=yi)},persist:function(){},isPersistent:yi}),t}var $o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wd=Tt($o),ei=Ne({},$o,{view:0,detail:0}),z1=Tt(ei),ac,lc,Go,pl=Ne({},ei,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kd,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Go&&(Go&&e.type==="mousemove"?(ac=e.screenX-Go.screenX,lc=e.screenY-Go.screenY):lc=ac=0,Go=e),ac)},movementY:function(e){return"movementY"in e?e.movementY:lc}}),qp=Tt(pl),q1=Ne({},pl,{dataTransfer:0}),H1=Tt(q1),W1=Ne({},ei,{relatedTarget:0}),cc=Tt(W1),K1=Ne({},$o,{animationName:0,elapsedTime:0,pseudoElement:0}),G1=Tt(K1),Y1=Ne({},$o,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q1=Tt(Y1),X1=Ne({},$o,{data:0}),Hp=Tt(X1),Z1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},J1={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eS[e])?!!t[e]:!1}function Kd(){return tS}var nS=Ne({},ei,{key:function(e){if(e.key){var t=Z1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?J1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kd,charCode:function(e){return e.type==="keypress"?Wi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rS=Tt(nS),oS=Ne({},pl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wp=Tt(oS),sS=Ne({},ei,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kd}),iS=Tt(sS),aS=Ne({},$o,{propertyName:0,elapsedTime:0,pseudoElement:0}),lS=Tt(aS),cS=Ne({},pl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uS=Tt(cS),dS=[9,13,27,32],Gd=On&&"CompositionEvent"in window,hs=null;On&&"documentMode"in document&&(hs=document.documentMode);var fS=On&&"TextEvent"in window&&!hs,bv=On&&(!Gd||hs&&8<hs&&11>=hs),Kp=" ",Gp=!1;function wv(e,t){switch(e){case"keyup":return dS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function pS(e,t){switch(e){case"compositionend":return Sv(t);case"keypress":return t.which!==32?null:(Gp=!0,Kp);case"textInput":return e=t.data,e===Kp&&Gp?null:e;default:return null}}function hS(e,t){if(Yr)return e==="compositionend"||!Gd&&wv(e,t)?(e=xv(),Hi=Hd=Xn=null,Yr=!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.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bv&&t.locale!=="ko"?null:t.data;default:return null}}var mS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Yp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!mS[e.type]:t==="textarea"}function _v(e,t,n,r){ev(r),t=_a(t,"onChange"),0<t.length&&(n=new Wd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ms=null,Ts=null;function gS(e){$v(e,0)}function hl(e){var t=Zr(e);if(Kg(t))return e}function vS(e,t){if(e==="change")return t}var jv=!1;if(On){var uc;if(On){var dc="oninput"in document;if(!dc){var Qp=document.createElement("div");Qp.setAttribute("oninput","return;"),dc=typeof Qp.oninput=="function"}uc=dc}else uc=!1;jv=uc&&(!document.documentMode||9<document.documentMode)}function Xp(){ms&&(ms.detachEvent("onpropertychange",Cv),Ts=ms=null)}function Cv(e){if(e.propertyName==="value"&&hl(Ts)){var t=[];_v(t,Ts,e,Ud(e)),ov(gS,t)}}function yS(e,t,n){e==="focusin"?(Xp(),ms=t,Ts=n,ms.attachEvent("onpropertychange",Cv)):e==="focusout"&&Xp()}function xS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hl(Ts)}function bS(e,t){if(e==="click")return hl(t)}function wS(e,t){if(e==="input"||e==="change")return hl(t)}function SS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:SS;function Os(e,t){if(en(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Xc.call(t,o)||!en(e[o],t[o]))return!1}return!0}function Zp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jp(e,t){var n=Zp(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=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=Zp(n)}}function Ev(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ev(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rv(){for(var e=window,t=ga();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ga(e.document)}return t}function Yd(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 _S(e){var t=Rv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ev(n.ownerDocument.documentElement,n)){if(r!==null&&Yd(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,s=Math.min(r.start,o);r=r.end===void 0?s:Math.min(r.end,o),!e.extend&&s>r&&(o=r,r=s,s=o),o=Jp(n,s);var i=Jp(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var jS=On&&"documentMode"in document&&11>=document.documentMode,Qr=null,gu=null,gs=null,vu=!1;function eh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vu||Qr==null||Qr!==ga(r)||(r=Qr,"selectionStart"in r&&Yd(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}),gs&&Os(gs,r)||(gs=r,r=_a(gu,"onSelect"),0<r.length&&(t=new Wd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Qr)))}function xi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xr={animationend:xi("Animation","AnimationEnd"),animationiteration:xi("Animation","AnimationIteration"),animationstart:xi("Animation","AnimationStart"),transitionend:xi("Transition","TransitionEnd")},fc={},Nv={};On&&(Nv=document.createElement("div").style,"AnimationEvent"in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),"TransitionEvent"in window||delete Xr.transitionend.transition);function ml(e){if(fc[e])return fc[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Nv)return fc[e]=t[n];return e}var kv=ml("animationend"),Tv=ml("animationiteration"),Ov=ml("animationstart"),Pv=ml("transitionend"),Iv=new Map,th="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fr(e,t){Iv.set(e,t),Fr(t,[e])}for(var pc=0;pc<th.length;pc++){var hc=th[pc],CS=hc.toLowerCase(),ES=hc[0].toUpperCase()+hc.slice(1);fr(CS,"on"+ES)}fr(kv,"onAnimationEnd");fr(Tv,"onAnimationIteration");fr(Ov,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(Pv,"onTransitionEnd");vo("onMouseEnter",["mouseout","mouseover"]);vo("onMouseLeave",["mouseout","mouseover"]);vo("onPointerEnter",["pointerout","pointerover"]);vo("onPointerLeave",["pointerout","pointerover"]);Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ls="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),RS=new Set("cancel close invalid load scroll toggle".split(" ").concat(ls));function nh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,C1(r,t,void 0,e),e.currentTarget=null}function $v(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var i=r.length-1;0<=i;i--){var l=r[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==s&&o.isPropagationStopped())break e;nh(o,l,u),s=c}else for(i=0;i<r.length;i++){if(l=r[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==s&&o.isPropagationStopped())break e;nh(o,l,u),s=c}}}if(ya)throw e=fu,ya=!1,fu=null,e}function xe(e,t){var n=t[Su];n===void 0&&(n=t[Su]=new Set);var r=e+"__bubble";n.has(r)||(Av(t,e,2,!1),n.add(r))}function mc(e,t,n){var r=0;t&&(r|=4),Av(n,e,r,t)}var bi="_reactListening"+Math.random().toString(36).slice(2);function Ps(e){if(!e[bi]){e[bi]=!0,Bg.forEach(function(n){n!=="selectionchange"&&(RS.has(n)||mc(n,!1,e),mc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[bi]||(t[bi]=!0,mc("selectionchange",!1,t))}}function Av(e,t,n,r){switch(yv(t)){case 1:var o=V1;break;case 4:o=B1;break;default:o=qd}n=o.bind(null,t,n,e),o=void 0,!du||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function gc(e,t,n,r,o){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(i===4)for(i=r.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===o||c.nodeType===8&&c.parentNode===o))return;i=i.return}for(;l!==null;){if(i=xr(l),i===null)return;if(c=i.tag,c===5||c===6){r=s=i;continue e}l=l.parentNode}}r=r.return}ov(function(){var u=s,d=Ud(n),f=[];e:{var p=Iv.get(e);if(p!==void 0){var y=Wd,m=e;switch(e){case"keypress":if(Wi(n)===0)break e;case"keydown":case"keyup":y=rS;break;case"focusin":m="focus",y=cc;break;case"focusout":m="blur",y=cc;break;case"beforeblur":case"afterblur":y=cc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=qp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=H1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=iS;break;case kv:case Tv:case Ov:y=G1;break;case Pv:y=lS;break;case"scroll":y=z1;break;case"wheel":y=uS;break;case"copy":case"cut":case"paste":y=Q1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Wp}var h=(t&4)!==0,x=!h&&e==="scroll",v=h?p!==null?p+"Capture":null:p;h=[];for(var g=u,b;g!==null;){b=g;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,v!==null&&(S=Es(g,v),S!=null&&h.push(Is(g,S,b)))),x)break;g=g.return}0<h.length&&(p=new y(p,m,null,n,d),f.push({event:p,listeners:h}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&n!==cu&&(m=n.relatedTarget||n.fromElement)&&(xr(m)||m[Pn]))break e;if((y||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,y?(m=n.relatedTarget||n.toElement,y=u,m=m?xr(m):null,m!==null&&(x=Lr(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(y=null,m=u),y!==m)){if(h=qp,S="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(h=Wp,S="onPointerLeave",v="onPointerEnter",g="pointer"),x=y==null?p:Zr(y),b=m==null?p:Zr(m),p=new h(S,g+"leave",y,n,d),p.target=x,p.relatedTarget=b,S=null,xr(d)===u&&(h=new h(v,g+"enter",m,n,d),h.target=b,h.relatedTarget=x,S=h),x=S,y&&m)t:{for(h=y,v=m,g=0,b=h;b;b=Br(b))g++;for(b=0,S=v;S;S=Br(S))b++;for(;0<g-b;)h=Br(h),g--;for(;0<b-g;)v=Br(v),b--;for(;g--;){if(h===v||v!==null&&h===v.alternate)break t;h=Br(h),v=Br(v)}h=null}else h=null;y!==null&&rh(f,p,y,h,!1),m!==null&&x!==null&&rh(f,x,m,h,!0)}}e:{if(p=u?Zr(u):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var _=vS;else if(Yp(p))if(jv)_=wS;else{_=xS;var j=yS}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=bS);if(_&&(_=_(e,u))){_v(f,_,n,d);break e}j&&j(e,p,u),e==="focusout"&&(j=p._wrapperState)&&j.controlled&&p.type==="number"&&ou(p,"number",p.value)}switch(j=u?Zr(u):window,e){case"focusin":(Yp(j)||j.contentEditable==="true")&&(Qr=j,gu=u,gs=null);break;case"focusout":gs=gu=Qr=null;break;case"mousedown":vu=!0;break;case"contextmenu":case"mouseup":case"dragend":vu=!1,eh(f,n,d);break;case"selectionchange":if(jS)break;case"keydown":case"keyup":eh(f,n,d)}var C;if(Gd)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Yr?wv(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(bv&&n.locale!=="ko"&&(Yr||E!=="onCompositionStart"?E==="onCompositionEnd"&&Yr&&(C=xv()):(Xn=d,Hd="value"in Xn?Xn.value:Xn.textContent,Yr=!0)),j=_a(u,E),0<j.length&&(E=new Hp(E,e,null,n,d),f.push({event:E,listeners:j}),C?E.data=C:(C=Sv(n),C!==null&&(E.data=C)))),(C=fS?pS(e,n):hS(e,n))&&(u=_a(u,"onBeforeInput"),0<u.length&&(d=new Hp("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=C))}$v(f,t)})}function Is(e,t,n){return{instance:e,listener:t,currentTarget:n}}function _a(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Es(e,n),s!=null&&r.unshift(Is(e,s,o)),s=Es(e,t),s!=null&&r.push(Is(e,s,o))),e=e.return}return r}function Br(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function rh(e,t,n,r,o){for(var s=t._reactName,i=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,o?(c=Es(n,s),c!=null&&i.unshift(Is(n,c,l))):o||(c=Es(n,s),c!=null&&i.push(Is(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var NS=/\r\n?/g,kS=/\u0000|\uFFFD/g;function oh(e){return(typeof e=="string"?e:""+e).replace(NS,`
38
+ `).replace(kS,"")}function wi(e,t,n){if(t=oh(t),oh(e)!==t&&n)throw Error(I(425))}function ja(){}var yu=null,xu=null;function bu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wu=typeof setTimeout=="function"?setTimeout:void 0,TS=typeof clearTimeout=="function"?clearTimeout:void 0,sh=typeof Promise=="function"?Promise:void 0,OS=typeof queueMicrotask=="function"?queueMicrotask:typeof sh<"u"?function(e){return sh.resolve(null).then(e).catch(PS)}:wu;function PS(e){setTimeout(function(){throw e})}function vc(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),ks(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);ks(t)}function rr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ih(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ao=Math.random().toString(36).slice(2),cn="__reactFiber$"+Ao,$s="__reactProps$"+Ao,Pn="__reactContainer$"+Ao,Su="__reactEvents$"+Ao,IS="__reactListeners$"+Ao,$S="__reactHandles$"+Ao;function xr(e){var t=e[cn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pn]||n[cn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ih(e);e!==null;){if(n=e[cn])return n;e=ih(e)}return t}e=n,n=e.parentNode}return null}function ti(e){return e=e[cn]||e[Pn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function gl(e){return e[$s]||null}var _u=[],Jr=-1;function pr(e){return{current:e}}function we(e){0>Jr||(e.current=_u[Jr],_u[Jr]=null,Jr--)}function ye(e,t){Jr++,_u[Jr]=e.current,e.current=t}var cr={},et=pr(cr),ft=pr(!1),kr=cr;function yo(e,t){var n=e.type.contextTypes;if(!n)return cr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},s;for(s in n)o[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function pt(e){return e=e.childContextTypes,e!=null}function Ca(){we(ft),we(et)}function ah(e,t,n){if(et.current!==cr)throw Error(I(168));ye(et,t),ye(ft,n)}function Mv(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(I(108,y1(e)||"Unknown",o));return Ne({},n,r)}function Ea(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,kr=et.current,ye(et,e),ye(ft,ft.current),!0}function lh(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Mv(e,t,kr),r.__reactInternalMemoizedMergedChildContext=e,we(ft),we(et),ye(et,e)):we(ft),ye(ft,n)}var wn=null,vl=!1,yc=!1;function Dv(e){wn===null?wn=[e]:wn.push(e)}function AS(e){vl=!0,Dv(e)}function hr(){if(!yc&&wn!==null){yc=!0;var e=0,t=he;try{var n=wn;for(he=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wn=null,vl=!1}catch(o){throw wn!==null&&(wn=wn.slice(e+1)),lv(Vd,hr),o}finally{he=t,yc=!1}}return null}var eo=[],to=0,Ra=null,Na=0,At=[],Mt=0,Tr=null,jn=1,Cn="";function gr(e,t){eo[to++]=Na,eo[to++]=Ra,Ra=e,Na=t}function Fv(e,t,n){At[Mt++]=jn,At[Mt++]=Cn,At[Mt++]=Tr,Tr=e;var r=jn;e=Cn;var o=32-Xt(r)-1;r&=~(1<<o),n+=1;var s=32-Xt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,jn=1<<32-Xt(t)+o|n<<o|r,Cn=s+e}else jn=1<<s|n<<o|r,Cn=e}function Qd(e){e.return!==null&&(gr(e,1),Fv(e,1,0))}function Xd(e){for(;e===Ra;)Ra=eo[--to],eo[to]=null,Na=eo[--to],eo[to]=null;for(;e===Tr;)Tr=At[--Mt],At[Mt]=null,Cn=At[--Mt],At[Mt]=null,jn=At[--Mt],At[Mt]=null}var wt=null,bt=null,_e=!1,Yt=null;function Lv(e,t){var n=Ft(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ch(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,wt=e,bt=rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,wt=e,bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Tr!==null?{id:jn,overflow:Cn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ft(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,wt=e,bt=null,!0):!1;default:return!1}}function ju(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cu(e){if(_e){var t=bt;if(t){var n=t;if(!ch(e,t)){if(ju(e))throw Error(I(418));t=rr(n.nextSibling);var r=wt;t&&ch(e,t)?Lv(r,n):(e.flags=e.flags&-4097|2,_e=!1,wt=e)}}else{if(ju(e))throw Error(I(418));e.flags=e.flags&-4097|2,_e=!1,wt=e}}}function uh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;wt=e}function Si(e){if(e!==wt)return!1;if(!_e)return uh(e),_e=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!bu(e.type,e.memoizedProps)),t&&(t=bt)){if(ju(e))throw Uv(),Error(I(418));for(;t;)Lv(e,t),t=rr(t.nextSibling)}if(uh(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){bt=rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}bt=null}}else bt=wt?rr(e.stateNode.nextSibling):null;return!0}function Uv(){for(var e=bt;e;)e=rr(e.nextSibling)}function xo(){bt=wt=null,_e=!1}function Zd(e){Yt===null?Yt=[e]:Yt.push(e)}var MS=Ln.ReactCurrentBatchConfig;function Wt(e,t){if(e&&e.defaultProps){t=Ne({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var ka=pr(null),Ta=null,no=null,Jd=null;function ef(){Jd=no=Ta=null}function tf(e){var t=ka.current;we(ka),e._currentValue=t}function Eu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function uo(e,t){Ta=e,Jd=no=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(Jd!==e)if(e={context:e,memoizedValue:t,next:null},no===null){if(Ta===null)throw Error(I(308));no=e,Ta.dependencies={lanes:0,firstContext:e}}else no=no.next=e;return t}var br=null;function nf(e){br===null?br=[e]:br.push(e)}function Vv(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,nf(t)):(n.next=o.next,o.next=n),t.interleaved=n,In(e,r)}function In(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Wn=!1;function rf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Rn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function or(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ce&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,In(e,n)}return o=r.interleaved,o===null?(t.next=t,nf(r)):(t.next=o.next,o.next=t),r.interleaved=t,In(e,n)}function Ki(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bd(e,n)}}function dh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?o=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Oa(e,t,n,r){var o=e.updateQueue;Wn=!1;var s=o.firstBaseUpdate,i=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?s=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(s!==null){var f=o.baseState;i=0,d=u=c=null,l=s;do{var p=l.lane,y=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,h=l;switch(p=t,y=n,h.tag){case 1:if(m=h.payload,typeof m=="function"){f=m.call(y,f,p);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,p=typeof m=="function"?m.call(y,f,p):m,p==null)break e;f=Ne({},f,p);break e;case 2:Wn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else y={eventTime:y,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=y,c=f):d=d.next=y,i|=p;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;p=l,l=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(d===null&&(c=f),o.baseState=c,o.firstBaseUpdate=u,o.lastBaseUpdate=d,t=o.shared.interleaved,t!==null){o=t;do i|=o.lane,o=o.next;while(o!==t)}else s===null&&(o.shared.lanes=0);Pr|=i,e.lanes=i,e.memoizedState=f}}function fh(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(I(191,o));o.call(r)}}}var zv=new Vg.Component().refs;function Ru(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ne({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yl={isMounted:function(e){return(e=e._reactInternals)?Lr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=rt(),o=ir(e),s=Rn(r,o);s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Zt(t,e,o,r),Ki(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=rt(),o=ir(e),s=Rn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Zt(t,e,o,r),Ki(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rt(),r=ir(e),o=Rn(n,r);o.tag=2,t!=null&&(o.callback=t),t=or(e,o,r),t!==null&&(Zt(t,e,r,n),Ki(t,e,r))}};function ph(e,t,n,r,o,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,i):t.prototype&&t.prototype.isPureReactComponent?!Os(n,r)||!Os(o,s):!0}function qv(e,t,n){var r=!1,o=cr,s=t.contextType;return typeof s=="object"&&s!==null?s=Ut(s):(o=pt(t)?kr:et.current,r=t.contextTypes,s=(r=r!=null)?yo(e,o):cr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function hh(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&yl.enqueueReplaceState(t,t.state,null)}function Nu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=zv,rf(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Ut(s):(s=pt(t)?kr:et.current,o.context=yo(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Ru(e,t,s,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&yl.enqueueReplaceState(o,o.state,null),Oa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Yo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(I(309));var r=n.stateNode}if(!r)throw Error(I(147,e));var o=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(i){var l=o.refs;l===zv&&(l=o.refs={}),i===null?delete l[s]:l[s]=i},t._stringRef=s,t)}if(typeof e!="string")throw Error(I(284));if(!n._owner)throw Error(I(290,e))}return e}function _i(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mh(e){var t=e._init;return t(e._payload)}function Hv(e){function t(v,g){if(e){var b=v.deletions;b===null?(v.deletions=[g],v.flags|=16):b.push(g)}}function n(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function r(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function o(v,g){return v=ar(v,g),v.index=0,v.sibling=null,v}function s(v,g,b){return v.index=b,e?(b=v.alternate,b!==null?(b=b.index,b<g?(v.flags|=2,g):b):(v.flags|=2,g)):(v.flags|=1048576,g)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,g,b,S){return g===null||g.tag!==6?(g=Cc(b,v.mode,S),g.return=v,g):(g=o(g,b),g.return=v,g)}function c(v,g,b,S){var _=b.type;return _===Gr?d(v,g,b.props.children,S,b.key):g!==null&&(g.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Hn&&mh(_)===g.type)?(S=o(g,b.props),S.ref=Yo(v,g,b),S.return=v,S):(S=Ji(b.type,b.key,b.props,null,v.mode,S),S.ref=Yo(v,g,b),S.return=v,S)}function u(v,g,b,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==b.containerInfo||g.stateNode.implementation!==b.implementation?(g=Ec(b,v.mode,S),g.return=v,g):(g=o(g,b.children||[]),g.return=v,g)}function d(v,g,b,S,_){return g===null||g.tag!==7?(g=jr(b,v.mode,S,_),g.return=v,g):(g=o(g,b),g.return=v,g)}function f(v,g,b){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Cc(""+g,v.mode,b),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fi:return b=Ji(g.type,g.key,g.props,null,v.mode,b),b.ref=Yo(v,null,g),b.return=v,b;case Kr:return g=Ec(g,v.mode,b),g.return=v,g;case Hn:var S=g._init;return f(v,S(g._payload),b)}if(is(g)||qo(g))return g=jr(g,v.mode,b,null),g.return=v,g;_i(v,g)}return null}function p(v,g,b,S){var _=g!==null?g.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return _!==null?null:l(v,g,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case fi:return b.key===_?c(v,g,b,S):null;case Kr:return b.key===_?u(v,g,b,S):null;case Hn:return _=b._init,p(v,g,_(b._payload),S)}if(is(b)||qo(b))return _!==null?null:d(v,g,b,S,null);_i(v,b)}return null}function y(v,g,b,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return v=v.get(b)||null,l(g,v,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case fi:return v=v.get(S.key===null?b:S.key)||null,c(g,v,S,_);case Kr:return v=v.get(S.key===null?b:S.key)||null,u(g,v,S,_);case Hn:var j=S._init;return y(v,g,b,j(S._payload),_)}if(is(S)||qo(S))return v=v.get(b)||null,d(g,v,S,_,null);_i(g,S)}return null}function m(v,g,b,S){for(var _=null,j=null,C=g,E=g=0,N=null;C!==null&&E<b.length;E++){C.index>E?(N=C,C=null):N=C.sibling;var R=p(v,C,b[E],S);if(R===null){C===null&&(C=N);break}e&&C&&R.alternate===null&&t(v,C),g=s(R,g,E),j===null?_=R:j.sibling=R,j=R,C=N}if(E===b.length)return n(v,C),_e&&gr(v,E),_;if(C===null){for(;E<b.length;E++)C=f(v,b[E],S),C!==null&&(g=s(C,g,E),j===null?_=C:j.sibling=C,j=C);return _e&&gr(v,E),_}for(C=r(v,C);E<b.length;E++)N=y(C,v,E,b[E],S),N!==null&&(e&&N.alternate!==null&&C.delete(N.key===null?E:N.key),g=s(N,g,E),j===null?_=N:j.sibling=N,j=N);return e&&C.forEach(function(T){return t(v,T)}),_e&&gr(v,E),_}function h(v,g,b,S){var _=qo(b);if(typeof _!="function")throw Error(I(150));if(b=_.call(b),b==null)throw Error(I(151));for(var j=_=null,C=g,E=g=0,N=null,R=b.next();C!==null&&!R.done;E++,R=b.next()){C.index>E?(N=C,C=null):N=C.sibling;var T=p(v,C,R.value,S);if(T===null){C===null&&(C=N);break}e&&C&&T.alternate===null&&t(v,C),g=s(T,g,E),j===null?_=T:j.sibling=T,j=T,C=N}if(R.done)return n(v,C),_e&&gr(v,E),_;if(C===null){for(;!R.done;E++,R=b.next())R=f(v,R.value,S),R!==null&&(g=s(R,g,E),j===null?_=R:j.sibling=R,j=R);return _e&&gr(v,E),_}for(C=r(v,C);!R.done;E++,R=b.next())R=y(C,v,E,R.value,S),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?E:R.key),g=s(R,g,E),j===null?_=R:j.sibling=R,j=R);return e&&C.forEach(function(k){return t(v,k)}),_e&&gr(v,E),_}function x(v,g,b,S){if(typeof b=="object"&&b!==null&&b.type===Gr&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case fi:e:{for(var _=b.key,j=g;j!==null;){if(j.key===_){if(_=b.type,_===Gr){if(j.tag===7){n(v,j.sibling),g=o(j,b.props.children),g.return=v,v=g;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Hn&&mh(_)===j.type){n(v,j.sibling),g=o(j,b.props),g.ref=Yo(v,j,b),g.return=v,v=g;break e}n(v,j);break}else t(v,j);j=j.sibling}b.type===Gr?(g=jr(b.props.children,v.mode,S,b.key),g.return=v,v=g):(S=Ji(b.type,b.key,b.props,null,v.mode,S),S.ref=Yo(v,g,b),S.return=v,v=S)}return i(v);case Kr:e:{for(j=b.key;g!==null;){if(g.key===j)if(g.tag===4&&g.stateNode.containerInfo===b.containerInfo&&g.stateNode.implementation===b.implementation){n(v,g.sibling),g=o(g,b.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else t(v,g);g=g.sibling}g=Ec(b,v.mode,S),g.return=v,v=g}return i(v);case Hn:return j=b._init,x(v,g,j(b._payload),S)}if(is(b))return m(v,g,b,S);if(qo(b))return h(v,g,b,S);_i(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,g!==null&&g.tag===6?(n(v,g.sibling),g=o(g,b),g.return=v,v=g):(n(v,g),g=Cc(b,v.mode,S),g.return=v,v=g),i(v)):n(v,g)}return x}var bo=Hv(!0),Wv=Hv(!1),ni={},dn=pr(ni),As=pr(ni),Ms=pr(ni);function wr(e){if(e===ni)throw Error(I(174));return e}function of(e,t){switch(ye(Ms,t),ye(As,e),ye(dn,ni),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:iu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=iu(t,e)}we(dn),ye(dn,t)}function wo(){we(dn),we(As),we(Ms)}function Kv(e){wr(Ms.current);var t=wr(dn.current),n=iu(t,e.type);t!==n&&(ye(As,e),ye(dn,n))}function sf(e){As.current===e&&(we(dn),we(As))}var Ee=pr(0);function Pa(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 xc=[];function af(){for(var e=0;e<xc.length;e++)xc[e]._workInProgressVersionPrimary=null;xc.length=0}var Gi=Ln.ReactCurrentDispatcher,bc=Ln.ReactCurrentBatchConfig,Or=0,Re=null,Me=null,Ve=null,Ia=!1,vs=!1,Ds=0,DS=0;function Qe(){throw Error(I(321))}function lf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!en(e[n],t[n]))return!1;return!0}function cf(e,t,n,r,o,s){if(Or=s,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Gi.current=e===null||e.memoizedState===null?VS:BS,e=n(r,o),vs){s=0;do{if(vs=!1,Ds=0,25<=s)throw Error(I(301));s+=1,Ve=Me=null,t.updateQueue=null,Gi.current=zS,e=n(r,o)}while(vs)}if(Gi.current=$a,t=Me!==null&&Me.next!==null,Or=0,Ve=Me=Re=null,Ia=!1,t)throw Error(I(300));return e}function uf(){var e=Ds!==0;return Ds=0,e}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ve===null?Re.memoizedState=Ve=e:Ve=Ve.next=e,Ve}function Vt(){if(Me===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Ve===null?Re.memoizedState:Ve.next;if(t!==null)Ve=t,Me=e;else{if(e===null)throw Error(I(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Ve===null?Re.memoizedState=Ve=e:Ve=Ve.next=e}return Ve}function Fs(e,t){return typeof t=="function"?t(e):t}function wc(e){var t=Vt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Me,o=r.baseQueue,s=n.pending;if(s!==null){if(o!==null){var i=o.next;o.next=s.next,s.next=i}r.baseQueue=o=s,n.pending=null}if(o!==null){s=o.next,r=r.baseState;var l=i=null,c=null,u=s;do{var d=u.lane;if((Or&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,i=r):c=c.next=f,Re.lanes|=d,Pr|=d}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,en(r,t.memoizedState)||(dt=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do s=o.lane,Re.lanes|=s,Pr|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Sc(e){var t=Vt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var i=o=o.next;do s=e(s,i.action),i=i.next;while(i!==o);en(s,t.memoizedState)||(dt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Gv(){}function Yv(e,t){var n=Re,r=Vt(),o=t(),s=!en(r.memoizedState,o);if(s&&(r.memoizedState=o,dt=!0),r=r.queue,df(Zv.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Ve!==null&&Ve.memoizedState.tag&1){if(n.flags|=2048,Ls(9,Xv.bind(null,n,r,o,t),void 0,null),Be===null)throw Error(I(349));Or&30||Qv(n,t,o)}return o}function Qv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xv(e,t,n,r){t.value=n,t.getSnapshot=r,Jv(t)&&ey(e)}function Zv(e,t,n){return n(function(){Jv(t)&&ey(e)})}function Jv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!en(e,n)}catch{return!0}}function ey(e){var t=In(e,1);t!==null&&Zt(t,e,1,-1)}function gh(e){var t=on();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fs,lastRenderedState:e},t.queue=e,e=e.dispatch=US.bind(null,Re,e),[t.memoizedState,e]}function Ls(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ty(){return Vt().memoizedState}function Yi(e,t,n,r){var o=on();Re.flags|=e,o.memoizedState=Ls(1|t,n,void 0,r===void 0?null:r)}function xl(e,t,n,r){var o=Vt();r=r===void 0?null:r;var s=void 0;if(Me!==null){var i=Me.memoizedState;if(s=i.destroy,r!==null&&lf(r,i.deps)){o.memoizedState=Ls(t,n,s,r);return}}Re.flags|=e,o.memoizedState=Ls(1|t,n,s,r)}function vh(e,t){return Yi(8390656,8,e,t)}function df(e,t){return xl(2048,8,e,t)}function ny(e,t){return xl(4,2,e,t)}function ry(e,t){return xl(4,4,e,t)}function oy(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sy(e,t,n){return n=n!=null?n.concat([e]):null,xl(4,4,oy.bind(null,t,e),n)}function ff(){}function iy(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ay(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ly(e,t,n){return Or&21?(en(n,t)||(n=dv(),Re.lanes|=n,Pr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,dt=!0),e.memoizedState=n)}function FS(e,t){var n=he;he=n!==0&&4>n?n:4,e(!0);var r=bc.transition;bc.transition={};try{e(!1),t()}finally{he=n,bc.transition=r}}function cy(){return Vt().memoizedState}function LS(e,t,n){var r=ir(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},uy(e))dy(t,n);else if(n=Vv(e,t,n,r),n!==null){var o=rt();Zt(n,e,r,o),fy(n,t,r)}}function US(e,t,n){var r=ir(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(uy(e))dy(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,l=s(i,n);if(o.hasEagerState=!0,o.eagerState=l,en(l,i)){var c=t.interleaved;c===null?(o.next=o,nf(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=Vv(e,t,o,r),n!==null&&(o=rt(),Zt(n,e,r,o),fy(n,t,r))}}function uy(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function dy(e,t){vs=Ia=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function fy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bd(e,n)}}var $a={readContext:Ut,useCallback:Qe,useContext:Qe,useEffect:Qe,useImperativeHandle:Qe,useInsertionEffect:Qe,useLayoutEffect:Qe,useMemo:Qe,useReducer:Qe,useRef:Qe,useState:Qe,useDebugValue:Qe,useDeferredValue:Qe,useTransition:Qe,useMutableSource:Qe,useSyncExternalStore:Qe,useId:Qe,unstable_isNewReconciler:!1},VS={readContext:Ut,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:vh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Yi(4194308,4,oy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yi(4,2,e,t)},useMemo:function(e,t){var n=on();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=on();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=LS.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:gh,useDebugValue:ff,useDeferredValue:function(e){return on().memoizedState=e},useTransition:function(){var e=gh(!1),t=e[0];return e=FS.bind(null,e[1]),on().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,o=on();if(_e){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),Be===null)throw Error(I(349));Or&30||Qv(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,vh(Zv.bind(null,r,s,e),[e]),r.flags|=2048,Ls(9,Xv.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=on(),t=Be.identifierPrefix;if(_e){var n=Cn,r=jn;n=(r&~(1<<32-Xt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ds++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=DS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},BS={readContext:Ut,useCallback:iy,useContext:Ut,useEffect:df,useImperativeHandle:sy,useInsertionEffect:ny,useLayoutEffect:ry,useMemo:ay,useReducer:wc,useRef:ty,useState:function(){return wc(Fs)},useDebugValue:ff,useDeferredValue:function(e){var t=Vt();return ly(t,Me.memoizedState,e)},useTransition:function(){var e=wc(Fs)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:Gv,useSyncExternalStore:Yv,useId:cy,unstable_isNewReconciler:!1},zS={readContext:Ut,useCallback:iy,useContext:Ut,useEffect:df,useImperativeHandle:sy,useInsertionEffect:ny,useLayoutEffect:ry,useMemo:ay,useReducer:Sc,useRef:ty,useState:function(){return Sc(Fs)},useDebugValue:ff,useDeferredValue:function(e){var t=Vt();return Me===null?t.memoizedState=e:ly(t,Me.memoizedState,e)},useTransition:function(){var e=Sc(Fs)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:Gv,useSyncExternalStore:Yv,useId:cy,unstable_isNewReconciler:!1};function So(e,t){try{var n="",r=t;do n+=v1(r),r=r.return;while(r);var o=n}catch(s){o=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:o,digest:null}}function jc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Tu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var WS=typeof WeakMap=="function"?WeakMap:Map;function hy(e,t,n){n=Rn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ma||(Ma=!0,Uu=r),Tu(e,t)},n}function my(e,t,n){n=Rn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Tu(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Tu(e,t),typeof r!="function"&&(rr===null?rr=new Set([this]):rr.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function xh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new WS;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=i_.bind(null,e,t,n),t.then(e,e))}function bh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function wh(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rn(-1,1),t.tag=2,nr(n,t,1))),n.lanes|=1),e)}var KS=Fn.ReactCurrentOwner,ut=!1;function nt(e,t,n,r){t.child=e===null?Kv(t,null,n,r):bo(t,e.child,n,r)}function Sh(e,t,n,r,o){n=n.render;var s=t.ref;return fo(t,o),r=uf(e,t,n,r,s,o),n=df(),e!==null&&!ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$n(e,t,o)):(Se&&n&&Xd(t),t.flags|=1,nt(e,t,r,o),t.child)}function _h(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!wf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,gy(e,t,s,r,o)):(e=Ji(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Os,n(i,r)&&e.ref===t.ref)return $n(e,t,o)}return t.flags|=1,e=sr(s,r),e.ref=t.ref,e.return=t,t.child=e}function gy(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Os(s,r)&&e.ref===t.ref)if(ut=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(ut=!0);else return t.lanes=e.lanes,$n(e,t,o)}return Ou(e,t,n,r,o)}function vy(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(so,yt),yt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ye(so,yt),yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ye(so,yt),yt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ye(so,yt),yt|=r;return nt(e,t,o,n),t.child}function yy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ou(e,t,n,r,o){var s=ft(n)?Tr:tt.current;return s=yo(t,s),fo(t,o),n=uf(e,t,n,r,s,o),r=df(),e!==null&&!ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$n(e,t,o)):(Se&&r&&Xd(t),t.flags|=1,nt(e,t,n,o),t.child)}function jh(e,t,n,r,o){if(ft(n)){var s=!0;Ea(t)}else s=!1;if(fo(t,o),t.stateNode===null)Qi(e,t),Hv(t,n,r),ku(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ft(u):(u=ft(n)?Tr:tt.current,u=yo(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&mh(t,i,r,u),Hn=!1;var p=t.memoizedState;i.state=p,Oa(t,r,i,o),c=t.memoizedState,l!==r||p!==c||dt.current||Hn?(typeof d=="function"&&(Nu(t,n,d,r),c=t.memoizedState),(l=Hn||hh(t,n,l,r,p,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,zv(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:qt(t.type,l),i.props=u,f=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ft(c):(c=ft(n)?Tr:tt.current,c=yo(t,c));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||p!==c)&&mh(t,i,r,c),Hn=!1,p=t.memoizedState,i.state=p,Oa(t,r,i,o);var m=t.memoizedState;l!==f||p!==m||dt.current||Hn?(typeof y=="function"&&(Nu(t,n,y,r),m=t.memoizedState),(u=Hn||hh(t,n,u,r,p,m,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,m,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,m,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Pu(e,t,n,r,s,o)}function Pu(e,t,n,r,o,s){yy(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&ch(t,n,!1),$n(e,t,s);r=t.stateNode,KS.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=bo(t,e.child,null,s),t.child=bo(t,null,l,s)):nt(e,t,l,s),t.memoizedState=r.state,o&&ch(t,n,!0),t.child}function xy(e){var t=e.stateNode;t.pendingContext?lh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&lh(e,t.context,!1),sf(e,t.containerInfo)}function Ch(e,t,n,r,o){return xo(),Jd(o),t.flags|=256,nt(e,t,n,r),t.child}var $u={dehydrated:null,treeContext:null,retryLane:0};function Iu(e){return{baseLanes:e,cachePool:null,transitions:null}}function by(e,t,n){var r=t.pendingProps,o=Ce.current,s=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ye(Ce,o&1),e===null)return Eu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=_l(i,r,0,null),e=_r(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Iu(n),t.memoizedState=$u,e):hf(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return GS(e,t,i,r,l,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=sr(o,c),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?s=sr(l,s):(s=_r(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Iu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=$u,r}return s=e.child,e=s.sibling,r=sr(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function hf(e,t){return t=_l({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ji(e,t,n,r){return r!==null&&Jd(r),bo(t,e.child,null,n),e=hf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GS(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=jc(Error(I(422))),ji(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=_l({mode:"visible",children:r.children},o,0,null),s=_r(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&bo(t,e.child,null,i),t.child.memoizedState=Iu(i),t.memoizedState=$u,s);if(!(t.mode&1))return ji(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(I(419)),r=jc(s,r,void 0),ji(e,t,i,r)}if(l=(i&e.childLanes)!==0,ut||l){if(r=Be,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,Pn(e,o),Qt(r,e,o,-1))}return bf(),r=jc(Error(I(421))),ji(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=a_.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,xt=tr(o.nextSibling),bt=t,Se=!0,Kt=null,e!==null&&($t[It++]=jn,$t[It++]=Cn,$t[It++]=Or,jn=e.id,Cn=e.overflow,Or=t),t=hf(t,r.children),t.flags|=4096,t)}function Eh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ru(e.return,t,n)}function Cc(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function wy(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(nt(e,t,r.children,n),r=Ce.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Eh(e,n,t);else if(e.tag===19)Eh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ye(Ce,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Pa(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Cc(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Pa(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Cc(t,!0,n,null,s);break;case"together":Cc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$r|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=sr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=sr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function YS(e,t,n){switch(t.tag){case 3:xy(t),xo();break;case 5:Gv(t);break;case 1:ft(t.type)&&Ea(t);break;case 4:sf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ye(ka,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ye(Ce,Ce.current&1),t.flags|=128,null):n&t.child.childLanes?by(e,t,n):(ye(Ce,Ce.current&1),e=$n(e,t,n),e!==null?e.sibling:null);ye(Ce,Ce.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return wy(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ye(Ce,Ce.current),r)break;return null;case 22:case 23:return t.lanes=0,vy(e,t,n)}return $n(e,t,n)}var Sy,Au,_y,jy;Sy=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Au=function(){};_y=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,br(un.current);var s=null;switch(n){case"input":o=ru(e,o),r=ru(e,r),s=[];break;case"select":o=Re({},o,{value:void 0}),r=Re({},r,{value:void 0}),s=[];break;case"textarea":o=iu(e,o),r=iu(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ja)}lu(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(js.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(s||(s=[]),s.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(js.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&xe("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};jy=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qo(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function QS(e,t,n){var r=t.pendingProps;switch(Zd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return ft(t.type)&&Ca(),Ze(t),null;case 3:return r=t.stateNode,wo(),we(dt),we(tt),lf(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Si(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Kt!==null&&(zu(Kt),Kt=null))),Au(e,t),Ze(t),null;case 5:af(t);var o=br(Ms.current);if(n=t.type,e!==null&&t.stateNode!=null)_y(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return Ze(t),null}if(e=br(un.current),Si(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ln]=t,r[Is]=s,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(o=0;o<ls.length;o++)xe(ls[o],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":Ap(r,s),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},xe("invalid",r);break;case"textarea":Dp(r,s),xe("invalid",r)}lu(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&wi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&wi(r.textContent,l,e),o=["children",""+l]):js.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&xe("scroll",r)}switch(n){case"input":pi(r),Mp(r,s,!0);break;case"textarea":pi(r),Fp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ja)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Xg(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[ln]=t,e[Is]=r,Sy(e,t,!1,!1),t.stateNode=e;e:{switch(i=cu(n,r),n){case"dialog":xe("cancel",e),xe("close",e),o=r;break;case"iframe":case"object":case"embed":xe("load",e),o=r;break;case"video":case"audio":for(o=0;o<ls.length;o++)xe(ls[o],e);o=r;break;case"source":xe("error",e),o=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),o=r;break;case"details":xe("toggle",e),o=r;break;case"input":Ap(e,r),o=ru(e,r),xe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Re({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Dp(e,r),o=iu(e,r),xe("invalid",e);break;default:o=r}lu(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?ev(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Zg(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Cs(e,c):typeof c=="number"&&Cs(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(js.hasOwnProperty(s)?c!=null&&s==="onScroll"&&xe("scroll",e):c!=null&&Dd(e,s,c,i))}switch(n){case"input":pi(e),Mp(e,r,!1);break;case"textarea":pi(e),Fp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ir(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?ao(e,!!r.multiple,s,!1):r.defaultValue!=null&&ao(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ja)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ze(t),null;case 6:if(e&&t.stateNode!=null)jy(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=br(Ms.current),br(un.current),Si(t)){if(r=t.stateNode,n=t.memoizedProps,r[ln]=t,(s=r.nodeValue!==n)&&(e=bt,e!==null))switch(e.tag){case 3:wi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wi(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ln]=t,t.stateNode=r}return Ze(t),null;case 13:if(we(Ce),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Se&&xt!==null&&t.mode&1&&!(t.flags&128))Vv(),xo(),t.flags|=98560,s=!1;else if(s=Si(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(I(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(I(317));s[ln]=t}else xo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),s=!1}else Kt!==null&&(zu(Kt),Kt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ce.current&1?Me===0&&(Me=3):bf())),t.updateQueue!==null&&(t.flags|=4),Ze(t),null);case 4:return wo(),Au(e,t),e===null&&Ps(t.stateNode.containerInfo),Ze(t),null;case 10:return nf(t.type._context),Ze(t),null;case 17:return ft(t.type)&&Ca(),Ze(t),null;case 19:if(we(Ce),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Qo(s,!1);else{if(Me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Pa(e),i!==null){for(t.flags|=128,Qo(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ye(Ce,Ce.current&1|2),t.child}e=e.sibling}s.tail!==null&&Pe()>_o&&(t.flags|=128,r=!0,Qo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Pa(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Se)return Ze(t),null}else 2*Pe()-s.renderingStartTime>_o&&n!==1073741824&&(t.flags|=128,r=!0,Qo(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Pe(),t.sibling=null,n=Ce.current,ye(Ce,r?n&1|2:n&1),t):(Ze(t),null);case 22:case 23:return xf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?yt&1073741824&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function XS(e,t){switch(Zd(t),t.tag){case 1:return ft(t.type)&&Ca(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wo(),we(dt),we(tt),lf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return af(t),null;case 13:if(we(Ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Ce),null;case 4:return wo(),null;case 10:return nf(t.type._context),null;case 22:case 23:return xf(),null;case 24:return null;default:return null}}var Ci=!1,et=!1,ZS=typeof WeakSet=="function"?WeakSet:Set,B=null;function oo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ne(e,t,r)}else n.current=null}function Mu(e,t,n){try{n()}catch(r){Ne(e,t,r)}}var Rh=!1;function JS(e,t){if(xu=wa,e=Nv(),Qd(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var y;f!==n||o!==0&&f.nodeType!==3||(l=i+o),f!==s||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=i),p===s&&++d===r&&(c=i),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(bu={focusedElem:e,selectionRange:n},wa=!1,B=t;B!==null;)if(t=B,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,B=e;else for(;B!==null;){t=B;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,x=m.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?h:qt(t.type,h),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(S){Ne(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,B=e;break}B=t.return}return m=Rh,Rh=!1,m}function ys(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 s=o.destroy;o.destroy=void 0,s!==void 0&&Mu(t,n,s)}o=o.next}while(o!==r)}}function wl(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 Du(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 Cy(e){var t=e.alternate;t!==null&&(e.alternate=null,Cy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ln],delete t[Is],delete t[_u],delete t[AS],delete t[MS])),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 Ey(e){return e.tag===5||e.tag===3||e.tag===4}function Nh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ey(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 Fu(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=ja));else if(r!==4&&(e=e.child,e!==null))for(Fu(e,t,n),e=e.sibling;e!==null;)Fu(e,t,n),e=e.sibling}function Lu(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(Lu(e,t,n),e=e.sibling;e!==null;)Lu(e,t,n),e=e.sibling}var He=null,Ht=!1;function zn(e,t,n){for(n=n.child;n!==null;)Ry(e,t,n),n=n.sibling}function Ry(e,t,n){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(pl,n)}catch{}switch(n.tag){case 5:et||oo(n,t);case 6:var r=He,o=Ht;He=null,zn(e,t,n),He=r,Ht=o,He!==null&&(Ht?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(Ht?(e=He,n=n.stateNode,e.nodeType===8?yc(e.parentNode,n):e.nodeType===1&&yc(e,n),ks(e)):yc(He,n.stateNode));break;case 4:r=He,o=Ht,He=n.stateNode.containerInfo,Ht=!0,zn(e,t,n),He=r,Ht=o;break;case 0:case 11:case 14:case 15:if(!et&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Mu(n,t,i),o=o.next}while(o!==r)}zn(e,t,n);break;case 1:if(!et&&(oo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ne(n,t,l)}zn(e,t,n);break;case 21:zn(e,t,n);break;case 22:n.mode&1?(et=(r=et)||n.memoizedState!==null,zn(e,t,n),et=r):zn(e,t,n);break;default:zn(e,t,n)}}function kh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ZS),t.forEach(function(r){var o=l_.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Bt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:He=l.stateNode,Ht=!1;break e;case 3:He=l.stateNode.containerInfo,Ht=!0;break e;case 4:He=l.stateNode.containerInfo,Ht=!0;break e}l=l.return}if(He===null)throw Error(I(160));Ry(s,i,o),He=null,Ht=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){Ne(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ny(t,e),t=t.sibling}function Ny(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),tn(e),r&4){try{ys(3,e,e.return),wl(3,e)}catch(h){Ne(e,e.return,h)}try{ys(5,e,e.return)}catch(h){Ne(e,e.return,h)}}break;case 1:Bt(t,e),tn(e),r&512&&n!==null&&oo(n,n.return);break;case 5:if(Bt(t,e),tn(e),r&512&&n!==null&&oo(n,n.return),e.flags&32){var o=e.stateNode;try{Cs(o,"")}catch(h){Ne(e,e.return,h)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Yg(o,s),cu(l,i);var u=cu(l,s);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?ev(o,f):d==="dangerouslySetInnerHTML"?Zg(o,f):d==="children"?Cs(o,f):Dd(o,d,f,u)}switch(l){case"input":ou(o,s);break;case"textarea":Qg(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var y=s.value;y!=null?ao(o,!!s.multiple,y,!1):p!==!!s.multiple&&(s.defaultValue!=null?ao(o,!!s.multiple,s.defaultValue,!0):ao(o,!!s.multiple,s.multiple?[]:"",!1))}o[Is]=s}catch(h){Ne(e,e.return,h)}}break;case 6:if(Bt(t,e),tn(e),r&4){if(e.stateNode===null)throw Error(I(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(h){Ne(e,e.return,h)}}break;case 3:if(Bt(t,e),tn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ks(t.containerInfo)}catch(h){Ne(e,e.return,h)}break;case 4:Bt(t,e),tn(e);break;case 13:Bt(t,e),tn(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(vf=Pe())),r&4&&kh(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(et=(u=et)||d,Bt(t,e),et=u):Bt(t,e),tn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(B=e,d=e.child;d!==null;){for(f=B=d;B!==null;){switch(p=B,y=p.child,p.tag){case 0:case 11:case 14:case 15:ys(4,p,p.return);break;case 1:oo(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(h){Ne(r,n,h)}}break;case 5:oo(p,p.return);break;case 22:if(p.memoizedState!==null){Oh(f);continue}}y!==null?(y.return=p,B=y):Oh(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{o=f.stateNode,u?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Jg("display",i))}catch(h){Ne(e,e.return,h)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(h){Ne(e,e.return,h)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Bt(t,e),tn(e),r&4&&kh(e);break;case 21:break;default:Bt(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ey(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Cs(o,""),r.flags&=-33);var s=Nh(e);Lu(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=Nh(e);Fu(e,l,i);break;default:throw Error(I(161))}}catch(c){Ne(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function e_(e,t,n){B=e,ky(e)}function ky(e,t,n){for(var r=(e.mode&1)!==0;B!==null;){var o=B,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Ci;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||et;l=Ci;var u=et;if(Ci=i,(et=c)&&!u)for(B=o;B!==null;)i=B,c=i.child,i.tag===22&&i.memoizedState!==null?Ph(o):c!==null?(c.return=i,B=c):Ph(o);for(;s!==null;)B=s,ky(s),s=s.sibling;B=o,Ci=l,et=u}Th(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,B=s):Th(e)}}function Th(e){for(;B!==null;){var t=B;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:et||wl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!et)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:qt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ph(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ph(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&ks(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}et||t.flags&512&&Du(t)}catch(p){Ne(t,t.return,p)}}if(t===e){B=null;break}if(n=t.sibling,n!==null){n.return=t.return,B=n;break}B=t.return}}function Oh(e){for(;B!==null;){var t=B;if(t===e){B=null;break}var n=t.sibling;if(n!==null){n.return=t.return,B=n;break}B=t.return}}function Ph(e){for(;B!==null;){var t=B;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wl(4,t)}catch(c){Ne(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){Ne(t,o,c)}}var s=t.return;try{Du(t)}catch(c){Ne(t,s,c)}break;case 5:var i=t.return;try{Du(t)}catch(c){Ne(t,i,c)}}}catch(c){Ne(t,t.return,c)}if(t===e){B=null;break}var l=t.sibling;if(l!==null){l.return=t.return,B=l;break}B=t.return}}var t_=Math.ceil,Aa=Fn.ReactCurrentDispatcher,mf=Fn.ReactCurrentOwner,Dt=Fn.ReactCurrentBatchConfig,le=0,Be=null,Ie=null,Ge=0,yt=0,so=fr(0),Me=0,Us=null,$r=0,Sl=0,gf=0,xs=null,ct=null,vf=0,_o=1/0,bn=null,Ma=!1,Uu=null,rr=null,Ei=!1,Xn=null,Da=0,bs=0,Vu=null,Xi=-1,Zi=0;function rt(){return le&6?Pe():Xi!==-1?Xi:Xi=Pe()}function or(e){return e.mode&1?le&2&&Ge!==0?Ge&-Ge:FS.transition!==null?(Zi===0&&(Zi=fv()),Zi):(e=he,e!==0||(e=window.event,e=e===void 0?16:xv(e.type)),e):1}function Qt(e,t,n,r){if(50<bs)throw bs=0,Vu=null,Error(I(185));Js(e,n,r),(!(le&2)||e!==Be)&&(e===Be&&(!(le&2)&&(Sl|=n),Me===4&&Gn(e,Ge)),pt(e,r),n===1&&le===0&&!(t.mode&1)&&(_o=Pe()+500,yl&&pr()))}function pt(e,t){var n=e.callbackNode;F1(e,t);var r=ba(e,e===Be?Ge:0);if(r===0)n!==null&&Vp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vp(n),t===1)e.tag===0?DS($h.bind(null,e)):Fv($h.bind(null,e)),$S(function(){!(le&6)&&pr()}),n=null;else{switch(pv(r)){case 1:n=Bd;break;case 4:n=uv;break;case 16:n=xa;break;case 536870912:n=dv;break;default:n=xa}n=Dy(n,Ty.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ty(e,t){if(Xi=-1,Zi=0,le&6)throw Error(I(327));var n=e.callbackNode;if(po()&&e.callbackNode!==n)return null;var r=ba(e,e===Be?Ge:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fa(e,r);else{t=r;var o=le;le|=2;var s=Py();(Be!==e||Ge!==t)&&(bn=null,_o=Pe()+500,Sr(e,t));do try{o_();break}catch(l){Oy(e,l)}while(!0);tf(),Aa.current=s,le=o,Ie!==null?t=0:(Be=null,Ge=0,t=Me)}if(t!==0){if(t===2&&(o=hu(e),o!==0&&(r=o,t=Bu(e,o))),t===1)throw n=Us,Sr(e,0),Gn(e,r),pt(e,Pe()),n;if(t===6)Gn(e,r);else{if(o=e.current.alternate,!(r&30)&&!n_(o)&&(t=Fa(e,r),t===2&&(s=hu(e),s!==0&&(r=s,t=Bu(e,s))),t===1))throw n=Us,Sr(e,0),Gn(e,r),pt(e,Pe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:gr(e,ct,bn);break;case 3:if(Gn(e,r),(r&130023424)===r&&(t=vf+500-Pe(),10<t)){if(ba(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){rt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Su(gr.bind(null,e,ct,bn),t);break}gr(e,ct,bn);break;case 4:if(Gn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Yt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*t_(r/1960))-r,10<r){e.timeoutHandle=Su(gr.bind(null,e,ct,bn),r);break}gr(e,ct,bn);break;case 5:gr(e,ct,bn);break;default:throw Error(I(329))}}}return pt(e,Pe()),e.callbackNode===n?Ty.bind(null,e):null}function Bu(e,t){var n=xs;return e.current.memoizedState.isDehydrated&&(Sr(e,t).flags|=256),e=Fa(e,t),e!==2&&(t=ct,ct=n,t!==null&&zu(t)),e}function zu(e){ct===null?ct=e:ct.push.apply(ct,e)}function n_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!Zt(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Gn(e,t){for(t&=~gf,t&=~Sl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Yt(t),r=1<<n;e[n]=-1,t&=~r}}function $h(e){if(le&6)throw Error(I(327));po();var t=ba(e,0);if(!(t&1))return pt(e,Pe()),null;var n=Fa(e,t);if(e.tag!==0&&n===2){var r=hu(e);r!==0&&(t=r,n=Bu(e,r))}if(n===1)throw n=Us,Sr(e,0),Gn(e,t),pt(e,Pe()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,gr(e,ct,bn),pt(e,Pe()),null}function yf(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(_o=Pe()+500,yl&&pr())}}function Ir(e){Xn!==null&&Xn.tag===0&&!(le&6)&&po();var t=le;le|=1;var n=Dt.transition,r=he;try{if(Dt.transition=null,he=1,e)return e()}finally{he=r,Dt.transition=n,le=t,!(le&6)&&pr()}}function xf(){yt=so.current,we(so)}function Sr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,PS(n)),Ie!==null)for(n=Ie.return;n!==null;){var r=n;switch(Zd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ca();break;case 3:wo(),we(dt),we(tt),lf();break;case 5:af(r);break;case 4:wo();break;case 13:we(Ce);break;case 19:we(Ce);break;case 10:nf(r.type._context);break;case 22:case 23:xf()}n=n.return}if(Be=e,Ie=e=sr(e.current,null),Ge=yt=t,Me=0,Us=null,gf=Sl=$r=0,ct=xs=null,xr!==null){for(t=0;t<xr.length;t++)if(n=xr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}xr=null}return e}function Oy(e,t){do{var n=Ie;try{if(tf(),Gi.current=Ia,$a){for(var r=Ee.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}$a=!1}if(Pr=0,Ve=Ae=Ee=null,vs=!1,Ds=0,mf.current=null,n===null||n.return===null){Me=1,Us=t,Ie=null;break}e:{var s=e,i=n.return,l=n,c=t;if(t=Ge,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=bh(i);if(y!==null){y.flags&=-257,wh(y,i,l,s,t),y.mode&1&&xh(s,u,t),t=y,c=u;var m=t.updateQueue;if(m===null){var h=new Set;h.add(c),t.updateQueue=h}else m.add(c);break e}else{if(!(t&1)){xh(s,u,t),bf();break e}c=Error(I(426))}}else if(Se&&l.mode&1){var x=bh(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),wh(x,i,l,s,t),Jd(So(c,l));break e}}s=c=So(c,l),Me!==4&&(Me=2),xs===null?xs=[s]:xs.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var v=hy(s,c,t);fh(s,v);break e;case 1:l=c;var g=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(rr===null||!rr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=my(s,l,t);fh(s,S);break e}}s=s.return}while(s!==null)}Iy(n)}catch(_){t=_,Ie===n&&n!==null&&(Ie=n=n.return);continue}break}while(!0)}function Py(){var e=Aa.current;return Aa.current=Ia,e===null?Ia:e}function bf(){(Me===0||Me===3||Me===2)&&(Me=4),Be===null||!($r&268435455)&&!(Sl&268435455)||Gn(Be,Ge)}function Fa(e,t){var n=le;le|=2;var r=Py();(Be!==e||Ge!==t)&&(bn=null,Sr(e,t));do try{r_();break}catch(o){Oy(e,o)}while(!0);if(tf(),le=n,Aa.current=r,Ie!==null)throw Error(I(261));return Be=null,Ge=0,Me}function r_(){for(;Ie!==null;)$y(Ie)}function o_(){for(;Ie!==null&&!k1();)$y(Ie)}function $y(e){var t=My(e.alternate,e,yt);e.memoizedProps=e.pendingProps,t===null?Iy(e):Ie=t,mf.current=null}function Iy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=XS(n,t),n!==null){n.flags&=32767,Ie=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Ie=null;return}}else if(n=QS(n,t,yt),n!==null){Ie=n;return}if(t=t.sibling,t!==null){Ie=t;return}Ie=t=e}while(t!==null);Me===0&&(Me=5)}function gr(e,t,n){var r=he,o=Dt.transition;try{Dt.transition=null,he=1,s_(e,t,n,r)}finally{Dt.transition=o,he=r}return null}function s_(e,t,n,r){do po();while(Xn!==null);if(le&6)throw Error(I(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(L1(e,s),e===Be&&(Ie=Be=null,Ge=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ei||(Ei=!0,Dy(xa,function(){return po(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Dt.transition,Dt.transition=null;var i=he;he=1;var l=le;le|=4,mf.current=null,JS(e,n),Ny(n,e),CS(bu),wa=!!xu,bu=xu=null,e.current=n,e_(n),T1(),le=l,he=i,Dt.transition=s}else e.current=n;if(Ei&&(Ei=!1,Xn=e,Da=o),s=e.pendingLanes,s===0&&(rr=null),$1(n.stateNode),pt(e,Pe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ma)throw Ma=!1,e=Uu,Uu=null,e;return Da&1&&e.tag!==0&&po(),s=e.pendingLanes,s&1?e===Vu?bs++:(bs=0,Vu=e):bs=0,pr(),null}function po(){if(Xn!==null){var e=pv(Da),t=Dt.transition,n=he;try{if(Dt.transition=null,he=16>e?16:e,Xn===null)var r=!1;else{if(e=Xn,Xn=null,Da=0,le&6)throw Error(I(331));var o=le;for(le|=4,B=e.current;B!==null;){var s=B,i=s.child;if(B.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(B=u;B!==null;){var d=B;switch(d.tag){case 0:case 11:case 15:ys(8,d,s)}var f=d.child;if(f!==null)f.return=d,B=f;else for(;B!==null;){d=B;var p=d.sibling,y=d.return;if(Cy(d),d===u){B=null;break}if(p!==null){p.return=y,B=p;break}B=y}}}var m=s.alternate;if(m!==null){var h=m.child;if(h!==null){m.child=null;do{var x=h.sibling;h.sibling=null,h=x}while(h!==null)}}B=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,B=i;else e:for(;B!==null;){if(s=B,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ys(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,B=v;break e}B=s.return}}var g=e.current;for(B=g;B!==null;){i=B;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,B=b;else e:for(i=g;B!==null;){if(l=B,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:wl(9,l)}}catch(_){Ne(l,l.return,_)}if(l===i){B=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,B=S;break e}B=l.return}}if(le=o,pr(),cn&&typeof cn.onPostCommitFiberRoot=="function")try{cn.onPostCommitFiberRoot(pl,e)}catch{}r=!0}return r}finally{he=n,Dt.transition=t}}return!1}function Ih(e,t,n){t=So(n,t),t=hy(e,t,1),e=nr(e,t,1),t=rt(),e!==null&&(Js(e,1,t),pt(e,t))}function Ne(e,t,n){if(e.tag===3)Ih(e,e,n);else for(;t!==null;){if(t.tag===3){Ih(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(rr===null||!rr.has(r))){e=So(n,e),e=my(t,e,1),t=nr(t,e,1),e=rt(),t!==null&&(Js(t,1,e),pt(t,e));break}}t=t.return}}function i_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=rt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Ge&n)===n&&(Me===4||Me===3&&(Ge&130023424)===Ge&&500>Pe()-vf?Sr(e,0):gf|=n),pt(e,t)}function Ay(e,t){t===0&&(e.mode&1?(t=gi,gi<<=1,!(gi&130023424)&&(gi=4194304)):t=1);var n=rt();e=Pn(e,t),e!==null&&(Js(e,t,n),pt(e,n))}function a_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ay(e,n)}function l_(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(I(314))}r!==null&&r.delete(t),Ay(e,n)}var My;My=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||dt.current)ut=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ut=!1,YS(e,t,n);ut=!!(e.flags&131072)}else ut=!1,Se&&t.flags&1048576&&Lv(t,Na,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qi(e,t),e=t.pendingProps;var o=yo(t,tt.current);fo(t,n),o=uf(null,t,r,e,o,n);var s=df();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,ft(r)?(s=!0,Ea(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,of(t),o.updater=xl,t.stateNode=o,o._reactInternals=t,ku(t,r,e,n),t=Pu(null,t,r,!0,s,n)):(t.tag=0,Se&&s&&Xd(t),nt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=u_(r),e=qt(r,e),o){case 0:t=Ou(null,t,r,e,n);break e;case 1:t=jh(null,t,r,e,n);break e;case 11:t=Sh(null,t,r,e,n);break e;case 14:t=_h(null,t,r,qt(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:qt(r,o),Ou(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:qt(r,o),jh(e,t,r,o,n);case 3:e:{if(xy(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,zv(e,t),Oa(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=So(Error(I(423)),t),t=Ch(e,t,r,n,o);break e}else if(r!==o){o=So(Error(I(424)),t),t=Ch(e,t,r,n,o);break e}else for(xt=tr(t.stateNode.containerInfo.firstChild),bt=t,Se=!0,Kt=null,n=Kv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xo(),r===o){t=$n(e,t,n);break e}nt(e,t,r,n)}t=t.child}return t;case 5:return Gv(t),e===null&&Eu(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,wu(r,o)?i=null:s!==null&&wu(r,s)&&(t.flags|=32),yy(e,t),nt(e,t,i,n),t.child;case 6:return e===null&&Eu(t),null;case 13:return by(e,t,n);case 4:return sf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bo(t,null,r,n):nt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:qt(r,o),Sh(e,t,r,o,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,ye(ka,r._currentValue),r._currentValue=i,s!==null)if(Zt(s.value,i)){if(s.children===o.children&&!dt.current){t=$n(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){i=s.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=Rn(-1,n&-n),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Ru(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(I(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Ru(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}nt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,fo(t,n),o=Ft(o),r=r(o),t.flags|=1,nt(e,t,r,n),t.child;case 14:return r=t.type,o=qt(r,t.pendingProps),o=qt(r.type,o),_h(e,t,r,o,n);case 15:return gy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:qt(r,o),Qi(e,t),t.tag=1,ft(r)?(e=!0,Ea(t)):e=!1,fo(t,n),Hv(t,r,o),ku(t,r,o,n),Pu(null,t,r,!0,e,n);case 19:return wy(e,t,n);case 22:return vy(e,t,n)}throw Error(I(156,t.tag))};function Dy(e,t){return cv(e,t)}function c_(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 Mt(e,t,n,r){return new c_(e,t,n,r)}function wf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function u_(e){if(typeof e=="function")return wf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ld)return 11;if(e===Ud)return 14}return 2}function sr(e,t){var n=e.alternate;return n===null?(n=Mt(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 Ji(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")wf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Yr:return _r(n.children,o,s,t);case Fd:i=8,o|=8;break;case Jc:return e=Mt(12,n,t,o|2),e.elementType=Jc,e.lanes=s,e;case eu:return e=Mt(13,n,t,o),e.elementType=eu,e.lanes=s,e;case tu:return e=Mt(19,n,t,o),e.elementType=tu,e.lanes=s,e;case Wg:return _l(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case qg:i=10;break e;case Hg:i=9;break e;case Ld:i=11;break e;case Ud:i=14;break e;case qn:i=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Mt(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function _r(e,t,n,r){return e=Mt(7,e,r,t),e.lanes=n,e}function _l(e,t,n,r){return e=Mt(22,e,r,t),e.elementType=Wg,e.lanes=n,e.stateNode={isHidden:!1},e}function Ec(e,t,n){return e=Mt(6,e,null,t),e.lanes=n,e}function Rc(e,t,n){return t=Mt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function d_(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=ac(0),this.expirationTimes=ac(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ac(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Sf(e,t,n,r,o,s,i,l,c){return e=new d_(e,t,n,l,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Mt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},of(s),e}function f_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Gr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Fy(e){if(!e)return ar;e=e._reactInternals;e:{if(Ur(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ft(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(ft(n))return Dv(e,n,t)}return t}function Ly(e,t,n,r,o,s,i,l,c){return e=Sf(n,r,!0,e,o,s,i,l,c),e.context=Fy(null),n=e.current,r=rt(),o=or(n),s=Rn(r,o),s.callback=t??null,nr(n,s,o),e.current.lanes=o,Js(e,o,r),pt(e,r),e}function jl(e,t,n,r){var o=t.current,s=rt(),i=or(o);return n=Fy(n),t.context===null?t.context=n:t.pendingContext=n,t=Rn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=nr(o,t,i),e!==null&&(Qt(e,o,i,s),Ki(e,o,i)),i}function La(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ah(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _f(e,t){Ah(e,t),(e=e.alternate)&&Ah(e,t)}function p_(){return null}var Uy=typeof reportError=="function"?reportError:function(e){console.error(e)};function jf(e){this._internalRoot=e}Cl.prototype.render=jf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));jl(e,t,null,null)};Cl.prototype.unmount=jf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ir(function(){jl(null,e,null,null)}),t[On]=null}};function Cl(e){this._internalRoot=e}Cl.prototype.unstable_scheduleHydration=function(e){if(e){var t=gv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kn.length&&t!==0&&t<Kn[n].priority;n++);Kn.splice(n,0,e),n===0&&yv(e)}};function Cf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function El(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Mh(){}function h_(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=La(i);s.call(u)}}var i=Ly(t,r,e,0,null,!1,!1,"",Mh);return e._reactRootContainer=i,e[On]=i.current,Ps(e.nodeType===8?e.parentNode:e),Ir(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=La(c);l.call(u)}}var c=Sf(e,0,!1,null,null,!1,!1,"",Mh);return e._reactRootContainer=c,e[On]=c.current,Ps(e.nodeType===8?e.parentNode:e),Ir(function(){jl(t,c,n,r)}),c}function Rl(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var l=o;o=function(){var c=La(i);l.call(c)}}jl(t,i,e,o)}else i=h_(n,t,e,o,r);return La(i)}hv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=as(t.pendingLanes);n!==0&&(zd(t,n|1),pt(t,Pe()),!(le&6)&&(_o=Pe()+500,pr()))}break;case 13:Ir(function(){var r=Pn(e,1);if(r!==null){var o=rt();Qt(r,e,1,o)}}),_f(e,1)}};qd=function(e){if(e.tag===13){var t=Pn(e,134217728);if(t!==null){var n=rt();Qt(t,e,134217728,n)}_f(e,134217728)}};mv=function(e){if(e.tag===13){var t=or(e),n=Pn(e,t);if(n!==null){var r=rt();Qt(n,e,t,r)}_f(e,t)}};gv=function(){return he};vv=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};du=function(e,t,n){switch(t){case"input":if(ou(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=vl(r);if(!o)throw Error(I(90));Gg(r),ou(r,o)}}}break;case"textarea":Qg(e,n);break;case"select":t=n.value,t!=null&&ao(e,!!n.multiple,t,!1)}};rv=yf;ov=Ir;var m_={usingClientEntryPoint:!1,Events:[ti,Jr,vl,tv,nv,yf]},Xo={findFiberByHostInstance:yr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},g_={bundleType:Xo.bundleType,version:Xo.version,rendererPackageName:Xo.rendererPackageName,rendererConfig:Xo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Fn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=av(e),e===null?null:e.stateNode},findFiberByHostInstance:Xo.findFiberByHostInstance||p_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ri=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ri.isDisabled&&Ri.supportsFiber)try{pl=Ri.inject(g_),cn=Ri}catch{}}Nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=m_;Nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cf(t))throw Error(I(200));return f_(e,t,null,n)};Nt.createRoot=function(e,t){if(!Cf(e))throw Error(I(299));var n=!1,r="",o=Uy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Sf(e,1,!1,null,null,n,!1,r,o),e[On]=t.current,Ps(e.nodeType===8?e.parentNode:e),new jf(t)};Nt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=av(t),e=e===null?null:e.stateNode,e};Nt.flushSync=function(e){return Ir(e)};Nt.hydrate=function(e,t,n){if(!El(t))throw Error(I(200));return Rl(null,e,t,!0,n)};Nt.hydrateRoot=function(e,t,n){if(!Cf(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Uy;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Ly(t,null,e,1,n??null,o,!1,s,i),e[On]=t.current,Ps(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Cl(t)};Nt.render=function(e,t,n){if(!El(t))throw Error(I(200));return Rl(null,e,t,!1,n)};Nt.unmountComponentAtNode=function(e){if(!El(e))throw Error(I(40));return e._reactRootContainer?(Ir(function(){Rl(null,null,e,!1,function(){e._reactRootContainer=null,e[On]=null})}),!0):!1};Nt.unstable_batchedUpdates=yf;Nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!El(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return Rl(e,t,n,!1,r)};Nt.version="18.2.0-next-9e3b772b8-20220608";function Vy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Vy)}catch(e){console.error(e)}}Vy(),Lg.exports=Nt;var Ef=Lg.exports;const wr=Xs(Ef);var Dh=Ef;St.createRoot=Dh.createRoot,St.hydrateRoot=Dh.hydrateRoot;function qe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var v_=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fh=v_,Nc=()=>Math.random().toString(36).substring(7).split("").join("."),y_={INIT:`@@redux/INIT${Nc()}`,REPLACE:`@@redux/REPLACE${Nc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Nc()}`},Ua=y_;function Rf(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function By(e,t,n){if(typeof e!="function")throw new Error(qe(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qe(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qe(1));return n(By)(e,t)}let r=e,o=t,s=new Map,i=s,l=0,c=!1;function u(){i===s&&(i=new Map,s.forEach((x,v)=>{i.set(v,x)}))}function d(){if(c)throw new Error(qe(3));return o}function f(x){if(typeof x!="function")throw new Error(qe(4));if(c)throw new Error(qe(5));let v=!0;u();const g=l++;return i.set(g,x),function(){if(v){if(c)throw new Error(qe(6));v=!1,u(),i.delete(g),s=null}}}function p(x){if(!Rf(x))throw new Error(qe(7));if(typeof x.type>"u")throw new Error(qe(8));if(typeof x.type!="string")throw new Error(qe(17));if(c)throw new Error(qe(9));try{c=!0,o=r(o,x)}finally{c=!1}return(s=i).forEach(g=>{g()}),x}function y(x){if(typeof x!="function")throw new Error(qe(10));r=x,p({type:Ua.REPLACE})}function m(){const x=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(qe(11));function g(){const S=v;S.next&&S.next(d())}return g(),{unsubscribe:x(g)}},[Fh](){return this}}}return p({type:Ua.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:y,[Fh]:m}}function x_(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ua.INIT})>"u")throw new Error(qe(12));if(typeof n(void 0,{type:Ua.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qe(13))})}function b_(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;try{x_(n)}catch(s){o=s}return function(i={},l){if(o)throw o;let c=!1;const u={};for(let d=0;d<r.length;d++){const f=r[d],p=n[f],y=i[f],m=p(y,l);if(typeof m>"u")throw l&&l.type,new Error(qe(14));u[f]=m,c=c||m!==y}return c=c||r.length!==Object.keys(i).length,c?u:i}}function Va(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function w_(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(qe(15))};const i={getState:o.getState,dispatch:(c,...u)=>s(c,...u)},l=e.map(c=>c(i));return s=Va(...l)(o.dispatch),{...o,dispatch:s}}}function S_(e){return Rf(e)&&"type"in e&&typeof e.type=="string"}var zy=Symbol.for("immer-nothing"),Lh=Symbol.for("immer-draftable"),jt=Symbol.for("immer-state");function Gt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jo=Object.getPrototypeOf;function lr(e){return!!e&&!!e[jt]}function In(e){var t;return e?qy(e)||Array.isArray(e)||!!e[Lh]||!!((t=e.constructor)!=null&&t[Lh])||kl(e)||Tl(e):!1}var __=Object.prototype.constructor.toString();function qy(e){if(!e||typeof e!="object")return!1;const t=jo(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===__}function Vs(e,t){Nl(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Nl(e){const t=e[jt];return t?t.type_:Array.isArray(e)?1:kl(e)?2:Tl(e)?3:0}function qu(e,t){return Nl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Hy(e,t,n){const r=Nl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function j_(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function kl(e){return e instanceof Map}function Tl(e){return e instanceof Set}function vr(e){return e.copy_||e.base_}function Hu(e,t){if(kl(e))return new Map(e);if(Tl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&qy(e))return jo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[jt];let r=Reflect.ownKeys(n);for(let o=0;o<r.length;o++){const s=r[o],i=n[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[s]})}return Object.create(jo(e),n)}function Nf(e,t=!1){return Ol(e)||lr(e)||!In(e)||(Nl(e)>1&&(e.set=e.add=e.clear=e.delete=C_),Object.freeze(e),t&&Vs(e,(n,r)=>Nf(r,!0))),e}function C_(){Gt(2)}function Ol(e){return Object.isFrozen(e)}var E_={};function Ar(e){const t=E_[e];return t||Gt(0,e),t}var Bs;function Wy(){return Bs}function R_(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Uh(e,t){t&&(Ar("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Wu(e){Ku(e),e.drafts_.forEach(N_),e.drafts_=null}function Ku(e){e===Bs&&(Bs=e.parent_)}function Vh(e){return Bs=R_(Bs,e)}function N_(e){const t=e[jt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[jt].modified_&&(Wu(t),Gt(4)),In(e)&&(e=Ba(t,e),t.parent_||za(t,e)),t.patches_&&Ar("Patches").generateReplacementPatches_(n[jt].base_,e,t.patches_,t.inversePatches_)):e=Ba(t,n,[]),Wu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==zy?e:void 0}function Ba(e,t,n){if(Ol(t))return t;const r=t[jt];if(!r)return Vs(t,(o,s)=>zh(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return za(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),Vs(s,(l,c)=>zh(e,r,o,l,c,n,i)),za(e,o,!1),n&&e.patches_&&Ar("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function zh(e,t,n,r,o,s,i){if(lr(o)){const l=s&&t&&t.type_!==3&&!qu(t.assigned_,r)?s.concat(r):void 0,c=Ba(e,o,l);if(Hy(n,r,c),lr(c))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(In(o)&&!Ol(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ba(e,o),(!t||!t.scope_.parent_)&&za(e,o)}}function za(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Nf(t,n)}function k_(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Wy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=kf;n&&(o=[r],s=zs);const{revoke:i,proxy:l}=Proxy.revocable(o,s);return r.draft_=l,r.revoke_=i,l}var kf={get(e,t){if(t===jt)return e;const n=vr(e);if(!qu(n,t))return T_(e,n,t);const r=n[t];return e.finalized_||!In(r)?r:r===kc(e.base_,t)?(Tc(e),e.copy_[t]=Yu(r,e)):r},has(e,t){return t in vr(e)},ownKeys(e){return Reflect.ownKeys(vr(e))},set(e,t,n){const r=Ky(vr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=kc(vr(e),t),s=o==null?void 0:o[jt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(j_(n,o)&&(n!==void 0||qu(e.base_,t)))return!0;Tc(e),Gu(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return kc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Tc(e),Gu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=vr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Gt(11)},getPrototypeOf(e){return jo(e.base_)},setPrototypeOf(){Gt(12)}},zs={};Vs(kf,(e,t)=>{zs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});zs.deleteProperty=function(e,t){return zs.set.call(this,e,t,void 0)};zs.set=function(e,t,n){return kf.set.call(this,e[0],t,n,e[0])};function kc(e,t){const n=e[jt];return(n?vr(n):e)[t]}function T_(e,t,n){var o;const r=Ky(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Ky(e,t){if(!(t in e))return;let n=jo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jo(n)}}function Gu(e){e.modified_||(e.modified_=!0,e.parent_&&Gu(e.parent_))}function Tc(e){e.copy_||(e.copy_=Hu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var O_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const i=this;return function(c=s,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&Gt(6),r!==void 0&&typeof r!="function"&&Gt(7);let o;if(In(t)){const s=Vh(this),i=Yu(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Wu(s):Ku(s)}return Uh(s,r),Bh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===zy&&(o=void 0),this.autoFreeze_&&Nf(o,!0),r){const s=[],i=[];Ar("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Gt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,c=>t(c,...l));let r,o;return[this.produce(t,n,(i,l)=>{r=i,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){In(e)||Gt(8),lr(e)&&(e=Gy(e));const t=Vh(this),n=Yu(e,void 0);return n[jt].isManual_=!0,Ku(t),n}finishDraft(e,t){const n=e&&e[jt];(!n||!n.isManual_)&&Gt(9);const{scope_:r}=n;return Uh(r,t),Bh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=Ar("Patches").applyPatches_;return lr(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Yu(e,t){const n=kl(e)?Ar("MapSet").proxyMap_(e,t):Tl(e)?Ar("MapSet").proxySet_(e,t):k_(e,t);return(t?t.scope_:Wy()).drafts_.push(n),n}function Gy(e){return lr(e)||Gt(10,e),Yy(e)}function Yy(e){if(!In(e)||Ol(e))return e;const t=e[jt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Hu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Hu(e,!0);return Vs(n,(r,o)=>{Hy(n,r,Yy(o))}),t&&(t.finalized_=!1),n}var Ct=new O_,Pt=Ct.produce;Ct.produceWithPatches.bind(Ct);Ct.setAutoFreeze.bind(Ct);Ct.setUseStrictShallowCopy.bind(Ct);Ct.applyPatches.bind(Ct);Ct.createDraft.bind(Ct);Ct.finishDraft.bind(Ct);function P_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function $_(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function I_(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var qh=e=>Array.isArray(e)?e:[e];function A_(e){const t=Array.isArray(e[0])?e[0]:e;return I_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function M_(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var D_=class{constructor(e){this.value=e}deref(){return this.value}},F_=typeof WeakRef<"u"?WeakRef:D_,L_=0,Hh=1;function Ni(){return{s:L_,v:void 0,o:null,p:null}}function Tf(e,t={}){let n=Ni();const{resultEqualityCheck:r}=t;let o,s=0;function i(){var f;let l=n;const{length:c}=arguments;for(let p=0,y=c;p<y;p++){const m=arguments[p];if(typeof m=="function"||typeof m=="object"&&m!==null){let h=l.o;h===null&&(l.o=h=new WeakMap);const x=h.get(m);x===void 0?(l=Ni(),h.set(m,l)):l=x}else{let h=l.p;h===null&&(l.p=h=new Map);const x=h.get(m);x===void 0?(l=Ni(),h.set(m,l)):l=x}}const u=l;let d;if(l.s===Hh?d=l.v:(d=e.apply(null,arguments),s++),u.s=Hh,r){const p=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;p!=null&&r(p,d)&&(d=p,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new F_(d):d}return u.v=d,d}return i.clearCache=()=>{n=Ni(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function Qy(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,l,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),P_(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:y=Tf,argsMemoizeOptions:m=[],devModeChecks:h={}}=d,x=qh(p),v=qh(m),g=A_(o),b=f(function(){return s++,u.apply(null,arguments)},...x),S=y(function(){i++;const j=M_(g,arguments);return l=b.apply(null,j),l},...v);return Object.assign(S,{resultFunc:u,memoizedResultFunc:b,dependencies:g,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var U_=Qy(Tf),V_=Object.assign((e,t=U_)=>{$_(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,l,c)=>(i[n[c]]=l,i),{}))},{withTypes:()=>V_});function Xy(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var B_=Xy(),z_=Xy,q_=(...e)=>{const t=Qy(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(lr(i)?Gy(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};q_(Tf);var H_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Va:Va.apply(null,arguments)},W_=e=>e&&typeof e.match=="function";function Nn(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(ht(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>S_(r)&&r.type===e,n}var Zy=class cs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cs.prototype)}static get[Symbol.species](){return cs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cs(...t[0].concat(this)):new cs(...t.concat(this))}};function Wh(e){return In(e)?Pt(e,()=>{}):e}function Kh(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(ht(10));const r=n.insert(t,e);return e.set(t,r),r}function K_(e){return typeof e=="boolean"}var G_=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new Zy;return n&&(K_(n)?i.push(B_):i.push(z_(n.extraArgument))),i},Y_="RTK_autoBatch",Jy=e=>t=>{setTimeout(t,e)},Q_=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Jy(10),X_=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,i=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?Q_:e.type==="callback"?e.queueNotification:Jy(e.timeout),u=()=>{i=!1,s&&(s=!1,l.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const f=()=>o&&d(),p=r.subscribe(f);return l.add(d),()=>{p(),l.delete(d)}},dispatch(d){var f;try{return o=!((f=d==null?void 0:d.meta)!=null&&f[Y_]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},Z_=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new Zy(e);return r&&o.push(X_(typeof r=="object"?r:void 0)),o},J_=!0;function Mo(e){const t=G_(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(Rf(n))l=b_(n);else throw new Error(ht(1));let c;typeof r=="function"?c=r(t):c=t();let u=Va;o&&(u=H_({trace:!J_,...typeof o=="object"&&o}));const d=w_(...c),f=Z_(d);let p=typeof i=="function"?i(f):f();const y=u(...p);return By(l,s,y)}function ex(e){const t={},n=[];let r;const o={addCase(s,i){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(ht(28));if(l in t)throw new Error(ht(29));return t[l]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function ej(e){return typeof e=="function"}function tj(e,t){let[n,r,o]=ex(t),s;if(ej(e))s=()=>Wh(e());else{const l=Wh(e);s=()=>l}function i(l=s(),c){let u=[n[c.type],...r.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[o]),u.reduce((d,f)=>{if(f)if(lr(d)){const y=f(d,c);return y===void 0?d:y}else{if(In(d))return Pt(d,p=>f(p,c));{const p=f(d,c);if(p===void 0){if(d===null)return d;throw new Error(ht(9))}return p}}return d},l)}return i.getInitialState=s,i}var nj="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",tx=(e=21)=>{let t="",n=e;for(;n--;)t+=nj[Math.random()*64|0];return t},rj=(e,t)=>W_(e)?e.match(t):e(t);function oj(...e){return t=>e.some(n=>rj(n,t))}var sj=["name","message","stack","code"],Oc=class{constructor(e,t){tc(this,"_type");this.payload=e,this.meta=t}},Gh=class{constructor(e,t){tc(this,"_type");this.payload=e,this.meta=t}},ij=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of sj)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Qe=(()=>{function e(t,n,r){const o=Nn(t+"/fulfilled",(c,u,d,f)=>({payload:c,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),s=Nn(t+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=Nn(t+"/rejected",(c,u,d,f,p)=>({payload:f,error:(r&&r.serializeError||ij)(c||"Rejected"),meta:{...p||{},arg:d,requestId:u,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function l(c){return(u,d,f)=>{const p=r!=null&&r.idGenerator?r.idGenerator(c):tx(),y=new AbortController;let m,h;function x(g){h=g,y.abort()}const v=async function(){var S,_;let g;try{let j=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,c,{getState:d,extra:f});if(lj(j)&&(j=await j),j===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const C=new Promise((E,N)=>{m=()=>{N({name:"AbortError",message:h||"Aborted"})},y.signal.addEventListener("abort",m)});u(s(p,c,(_=r==null?void 0:r.getPendingMeta)==null?void 0:_.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),g=await Promise.race([C,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:y.signal,abort:x,rejectWithValue:(E,N)=>new Oc(E,N),fulfillWithValue:(E,N)=>new Gh(E,N)})).then(E=>{if(E instanceof Oc)throw E;return E instanceof Gh?o(E.payload,p,c,E.meta):o(E,p,c)})])}catch(j){g=j instanceof Oc?i(null,p,c,j.payload,j.meta):i(j,p,c)}finally{m&&y.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&i.match(g)&&g.meta.condition||u(g),g}();return Object.assign(v,{abort:x,requestId:p,arg:c,unwrap(){return v.then(aj)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:oj(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function aj(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function lj(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var cj=Symbol.for("rtk-slice-createasyncthunk");function uj(e,t){return`${e}/${t}`}function dj({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[cj];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(ht(11));typeof process<"u";const l=(typeof o.reducers=="function"?o.reducers(pj()):o.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(b,S){const _=typeof b=="string"?b:b.type;if(!_)throw new Error(ht(12));if(_ in u.sliceCaseReducersByType)throw new Error(ht(13));return u.sliceCaseReducersByType[_]=S,d},addMatcher(b,S){return u.sliceMatchers.push({matcher:b,reducer:S}),d},exposeAction(b,S){return u.actionCreators[b]=S,d},exposeCaseReducer(b,S){return u.sliceCaseReducersByName[b]=S,d}};c.forEach(b=>{const S=l[b],_={reducerName:b,type:uj(s,b),createNotation:typeof o.reducers=="function"};mj(S)?vj(_,S,d,t):hj(_,S,d)});function f(){const[b={},S=[],_=void 0]=typeof o.extraReducers=="function"?ex(o.extraReducers):[o.extraReducers],j={...b,...u.sliceCaseReducersByType};return tj(o.initialState,C=>{for(let E in j)C.addCase(E,j[E]);for(let E of u.sliceMatchers)C.addMatcher(E.matcher,E.reducer);for(let E of S)C.addMatcher(E.matcher,E.reducer);_&&C.addDefaultCase(_)})}const p=b=>b,y=new Map;let m;function h(b,S){return m||(m=f()),m(b,S)}function x(){return m||(m=f()),m.getInitialState()}function v(b,S=!1){function _(C){let E=C[b];return typeof E>"u"&&S&&(E=x()),E}function j(C=p){const E=Kh(y,S,{insert:()=>new WeakMap});return Kh(E,C,{insert:()=>{const N={};for(const[R,T]of Object.entries(o.selectors??{}))N[R]=fj(T,C,x,S);return N}})}return{reducerPath:b,getSelectors:j,get selectors(){return j(_)},selectSlice:_}}const g={name:s,reducer:h,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:x,...v(i),injectInto(b,{reducerPath:S,..._}={}){const j=S??i;return b.inject({reducerPath:j,reducer:h},_),{...g,...v(j,!0)}}};return g}}function fj(e,t,n,r){function o(s,...i){let l=t(s);return typeof l>"u"&&r&&(l=n()),e(l,...i)}return o.unwrapped=e,o}var ri=dj();function pj(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function hj({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!gj(r))throw new Error(ht(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?Nn(e,i):Nn(e))}function mj(e){return e._reducerDefinitionType==="asyncThunk"}function gj(e){return e._reducerDefinitionType==="reducerWithPrepare"}function vj({type:e,reducerName:t},n,r,o){if(!o)throw new Error(ht(18));const{payloadCreator:s,fulfilled:i,pending:l,rejected:c,settled:u,options:d}=n,f=o(e,s,d);r.exposeAction(t,f),i&&r.addCase(f.fulfilled,i),l&&r.addCase(f.pending,l),c&&r.addCase(f.rejected,c),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:i||ki,pending:l||ki,rejected:c||ki,settled:u||ki})}function ki(){}var yj=(e,t)=>{if(typeof e!="function")throw new Error(ht(32))},Of="listenerMiddleware",xj=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=Nn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(ht(21));return yj(s),{predicate:o,type:t,effect:s}},bj=Object.assign(e=>{const{type:t,predicate:n,effect:r}=xj(e);return{id:tx(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(ht(22))}}},{withTypes:()=>bj}),wj=Object.assign(Nn(`${Of}/add`),{withTypes:()=>wj});Nn(`${Of}/removeAll`);var Sj=Object.assign(Nn(`${Of}/remove`),{withTypes:()=>Sj});function ht(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var nx={exports:{}},rx={};/**
40
+ `+s.stack}return{value:e,source:t,stack:o,digest:null}}function _c(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ku(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var qS=typeof WeakMap=="function"?WeakMap:Map;function py(e,t,n){n=Rn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ma||(Ma=!0,Lu=r),ku(e,t)},n}function hy(e,t,n){n=Rn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ku(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ku(e,t),typeof r!="function"&&(sr===null?sr=new Set([this]):sr.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function yh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qS;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=o_.bind(null,e,t,n),t.then(e,e))}function xh(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function bh(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rn(-1,1),t.tag=2,or(n,t,1))),n.lanes|=1),e)}var HS=Ln.ReactCurrentOwner,dt=!1;function tt(e,t,n,r){t.child=e===null?Wv(t,null,n,r):bo(t,e.child,n,r)}function wh(e,t,n,r,o){n=n.render;var s=t.ref;return uo(t,o),r=cf(e,t,n,r,s,o),n=uf(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$n(e,t,o)):(_e&&n&&Qd(t),t.flags|=1,tt(e,t,r,o),t.child)}function Sh(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!bf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,my(e,t,s,r,o)):(e=Ji(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&o)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Os,n(i,r)&&e.ref===t.ref)return $n(e,t,o)}return t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e}function my(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Os(s,r)&&e.ref===t.ref)if(dt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(dt=!0);else return t.lanes=e.lanes,$n(e,t,o)}return Tu(e,t,n,r,o)}function gy(e,t,n){var r=t.pendingProps,o=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ye(oo,xt),xt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ye(oo,xt),xt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,ye(oo,xt),xt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,ye(oo,xt),xt|=r;return tt(e,t,o,n),t.child}function vy(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tu(e,t,n,r,o){var s=pt(n)?kr:et.current;return s=yo(t,s),uo(t,o),n=cf(e,t,n,r,s,o),r=uf(),e!==null&&!dt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,$n(e,t,o)):(_e&&r&&Qd(t),t.flags|=1,tt(e,t,n,o),t.child)}function _h(e,t,n,r,o){if(pt(n)){var s=!0;Ea(t)}else s=!1;if(uo(t,o),t.stateNode===null)Qi(e,t),qv(t,n,r),Nu(t,n,r,o),r=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ut(u):(u=pt(n)?kr:et.current,u=yo(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==r||c!==u)&&hh(t,i,r,u),Wn=!1;var p=t.memoizedState;i.state=p,Oa(t,r,i,o),c=t.memoizedState,l!==r||p!==c||ft.current||Wn?(typeof d=="function"&&(Ru(t,n,d,r),c=t.memoizedState),(l=Wn||ph(t,n,l,r,p,c,u))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=u,r=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Bv(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Wt(t.type,l),i.props=u,f=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ut(c):(c=pt(n)?kr:et.current,c=yo(t,c));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||p!==c)&&hh(t,i,r,c),Wn=!1,p=t.memoizedState,i.state=p,Oa(t,r,i,o);var m=t.memoizedState;l!==f||p!==m||ft.current||Wn?(typeof y=="function"&&(Ru(t,n,y,r),m=t.memoizedState),(u=Wn||ph(t,n,u,r,p,m,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,m,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,m,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),i.props=r,i.state=m,i.context=c,r=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Ou(e,t,n,r,s,o)}function Ou(e,t,n,r,o,s){vy(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&lh(t,n,!1),$n(e,t,s);r=t.stateNode,HS.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=bo(t,e.child,null,s),t.child=bo(t,null,l,s)):tt(e,t,l,s),t.memoizedState=r.state,o&&lh(t,n,!0),t.child}function yy(e){var t=e.stateNode;t.pendingContext?ah(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ah(e,t.context,!1),of(e,t.containerInfo)}function jh(e,t,n,r,o){return xo(),Zd(o),t.flags|=256,tt(e,t,n,r),t.child}var Pu={dehydrated:null,treeContext:null,retryLane:0};function Iu(e){return{baseLanes:e,cachePool:null,transitions:null}}function xy(e,t,n){var r=t.pendingProps,o=Ee.current,s=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),ye(Ee,o&1),e===null)return Cu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,s?(r=t.mode,s=t.child,i={mode:"hidden",children:i},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=i):s=Sl(i,r,0,null),e=jr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Iu(n),t.memoizedState=Pu,e):pf(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return WS(e,t,i,r,l,o,n);if(s){s=r.fallback,i=t.mode,o=e.child,l=o.sibling;var c={mode:"hidden",children:r.children};return!(i&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=ar(o,c),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?s=ar(l,s):(s=jr(s,i,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,i=e.child.memoizedState,i=i===null?Iu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Pu,r}return s=e.child,e=s.sibling,r=ar(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function pf(e,t){return t=Sl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ji(e,t,n,r){return r!==null&&Zd(r),bo(t,e.child,null,n),e=pf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WS(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=_c(Error(I(422))),ji(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Sl({mode:"visible",children:r.children},o,0,null),s=jr(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&bo(t,e.child,null,i),t.child.memoizedState=Iu(i),t.memoizedState=Pu,s);if(!(t.mode&1))return ji(e,t,i,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(I(419)),r=_c(s,r,void 0),ji(e,t,i,r)}if(l=(i&e.childLanes)!==0,dt||l){if(r=Be,r!==null){switch(i&-i){case 4:o=2;break;case 16:o=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|i)?0:o,o!==0&&o!==s.retryLane&&(s.retryLane=o,In(e,o),Zt(r,e,o,-1))}return xf(),r=_c(Error(I(421))),ji(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=s_.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,bt=rr(o.nextSibling),wt=t,_e=!0,Yt=null,e!==null&&(At[Mt++]=jn,At[Mt++]=Cn,At[Mt++]=Tr,jn=e.id,Cn=e.overflow,Tr=t),t=pf(t,r.children),t.flags|=4096,t)}function Ch(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Eu(e.return,t,n)}function jc(e,t,n,r,o){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o)}function by(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(tt(e,t,r.children,n),r=Ee.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ch(e,n,t);else if(e.tag===19)Ch(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ye(Ee,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Pa(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),jc(t,!1,o,n,s);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Pa(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}jc(t,!0,n,null,s);break;case"together":jc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function $n(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=ar(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ar(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function KS(e,t,n){switch(t.tag){case 3:yy(t),xo();break;case 5:Kv(t);break;case 1:pt(t.type)&&Ea(t);break;case 4:of(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;ye(ka,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ye(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?xy(e,t,n):(ye(Ee,Ee.current&1),e=$n(e,t,n),e!==null?e.sibling:null);ye(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return by(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ye(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,gy(e,t,n)}return $n(e,t,n)}var wy,$u,Sy,_y;wy=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$u=function(){};Sy=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,wr(dn.current);var s=null;switch(n){case"input":o=nu(e,o),r=nu(e,r),s=[];break;case"select":o=Ne({},o,{value:void 0}),r=Ne({},r,{value:void 0}),s=[];break;case"textarea":o=su(e,o),r=su(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ja)}au(n,r);var i;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(js.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(l=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(n||(n={}),n[i]=c[i])}else n||(s||(s=[]),s.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(js.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&xe("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};_y=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qo(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function GS(e,t,n){var r=t.pendingProps;switch(Xd(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return pt(t.type)&&Ca(),Xe(t),null;case 3:return r=t.stateNode,wo(),we(ft),we(et),af(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Si(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yt!==null&&(Bu(Yt),Yt=null))),$u(e,t),Xe(t),null;case 5:sf(t);var o=wr(Ms.current);if(n=t.type,e!==null&&t.stateNode!=null)Sy(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return Xe(t),null}if(e=wr(dn.current),Si(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[cn]=t,r[$s]=s,e=(t.mode&1)!==0,n){case"dialog":xe("cancel",r),xe("close",r);break;case"iframe":case"object":case"embed":xe("load",r);break;case"video":case"audio":for(o=0;o<ls.length;o++)xe(ls[o],r);break;case"source":xe("error",r);break;case"img":case"image":case"link":xe("error",r),xe("load",r);break;case"details":xe("toggle",r);break;case"input":$p(r,s),xe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},xe("invalid",r);break;case"textarea":Mp(r,s),xe("invalid",r)}au(n,s),o=null;for(var i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&wi(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&wi(r.textContent,l,e),o=["children",""+l]):js.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&xe("scroll",r)}switch(n){case"input":pi(r),Ap(r,s,!0);break;case"textarea":pi(r),Dp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ja)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{i=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Qg(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[cn]=t,e[$s]=r,wy(e,t,!1,!1),t.stateNode=e;e:{switch(i=lu(n,r),n){case"dialog":xe("cancel",e),xe("close",e),o=r;break;case"iframe":case"object":case"embed":xe("load",e),o=r;break;case"video":case"audio":for(o=0;o<ls.length;o++)xe(ls[o],e);o=r;break;case"source":xe("error",e),o=r;break;case"img":case"image":case"link":xe("error",e),xe("load",e),o=r;break;case"details":xe("toggle",e),o=r;break;case"input":$p(e,r),o=nu(e,r),xe("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Ne({},r,{value:void 0}),xe("invalid",e);break;case"textarea":Mp(e,r),o=su(e,r),xe("invalid",e);break;default:o=r}au(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?Jg(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Xg(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Cs(e,c):typeof c=="number"&&Cs(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(js.hasOwnProperty(s)?c!=null&&s==="onScroll"&&xe("scroll",e):c!=null&&Md(e,s,c,i))}switch(n){case"input":pi(e),Ap(e,r,!1);break;case"textarea":pi(e),Dp(e);break;case"option":r.value!=null&&e.setAttribute("value",""+lr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?io(e,!!r.multiple,s,!1):r.defaultValue!=null&&io(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ja)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Xe(t),null;case 6:if(e&&t.stateNode!=null)_y(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=wr(Ms.current),wr(dn.current),Si(t)){if(r=t.stateNode,n=t.memoizedProps,r[cn]=t,(s=r.nodeValue!==n)&&(e=wt,e!==null))switch(e.tag){case 3:wi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&wi(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[cn]=t,t.stateNode=r}return Xe(t),null;case 13:if(we(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_e&&bt!==null&&t.mode&1&&!(t.flags&128))Uv(),xo(),t.flags|=98560,s=!1;else if(s=Si(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(I(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(I(317));s[cn]=t}else xo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Xe(t),s=!1}else Yt!==null&&(Bu(Yt),Yt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ee.current&1?De===0&&(De=3):xf())),t.updateQueue!==null&&(t.flags|=4),Xe(t),null);case 4:return wo(),$u(e,t),e===null&&Ps(t.stateNode.containerInfo),Xe(t),null;case 10:return tf(t.type._context),Xe(t),null;case 17:return pt(t.type)&&Ca(),Xe(t),null;case 19:if(we(Ee),s=t.memoizedState,s===null)return Xe(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Qo(s,!1);else{if(De!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Pa(e),i!==null){for(t.flags|=128,Qo(s,!1),r=i.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,i=s.alternate,i===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=i.childLanes,s.lanes=i.lanes,s.child=i.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=i.memoizedProps,s.memoizedState=i.memoizedState,s.updateQueue=i.updateQueue,s.type=i.type,e=i.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ye(Ee,Ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&Pe()>_o&&(t.flags|=128,r=!0,Qo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Pa(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!_e)return Xe(t),null}else 2*Pe()-s.renderingStartTime>_o&&n!==1073741824&&(t.flags|=128,r=!0,Qo(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(n=s.last,n!==null?n.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Pe(),t.sibling=null,n=Ee.current,ye(Ee,r?n&1|2:n&1),t):(Xe(t),null);case 22:case 23:return yf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xt&1073741824&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function YS(e,t){switch(Xd(t),t.tag){case 1:return pt(t.type)&&Ca(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return wo(),we(ft),we(et),af(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return sf(t),null;case 13:if(we(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return we(Ee),null;case 4:return wo(),null;case 10:return tf(t.type._context),null;case 22:case 23:return yf(),null;case 24:return null;default:return null}}var Ci=!1,Je=!1,QS=typeof WeakSet=="function"?WeakSet:Set,z=null;function ro(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ke(e,t,r)}else n.current=null}function Au(e,t,n){try{n()}catch(r){ke(e,t,r)}}var Eh=!1;function XS(e,t){if(yu=wa,e=Rv(),Yd(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,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,l=-1,c=-1,u=0,d=0,f=e,p=null;t:for(;;){for(var y;f!==n||o!==0&&f.nodeType!==3||(l=i+o),f!==s||r!==0&&f.nodeType!==3||(c=i+r),f.nodeType===3&&(i+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=i),p===s&&++d===r&&(c=i),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(xu={focusedElem:e,selectionRange:n},wa=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var h=m.memoizedProps,x=m.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?h:Wt(t.type,h),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(S){ke(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return m=Eh,Eh=!1,m}function ys(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 s=o.destroy;o.destroy=void 0,s!==void 0&&Au(t,n,s)}o=o.next}while(o!==r)}}function bl(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 Mu(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 jy(e){var t=e.alternate;t!==null&&(e.alternate=null,jy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cn],delete t[$s],delete t[Su],delete t[IS],delete t[$S])),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 Cy(e){return e.tag===5||e.tag===3||e.tag===4}function Rh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cy(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 Du(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=ja));else if(r!==4&&(e=e.child,e!==null))for(Du(e,t,n),e=e.sibling;e!==null;)Du(e,t,n),e=e.sibling}function Fu(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(Fu(e,t,n),e=e.sibling;e!==null;)Fu(e,t,n),e=e.sibling}var He=null,Kt=!1;function qn(e,t,n){for(n=n.child;n!==null;)Ey(e,t,n),n=n.sibling}function Ey(e,t,n){if(un&&typeof un.onCommitFiberUnmount=="function")try{un.onCommitFiberUnmount(fl,n)}catch{}switch(n.tag){case 5:Je||ro(n,t);case 6:var r=He,o=Kt;He=null,qn(e,t,n),He=r,Kt=o,He!==null&&(Kt?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(Kt?(e=He,n=n.stateNode,e.nodeType===8?vc(e.parentNode,n):e.nodeType===1&&vc(e,n),ks(e)):vc(He,n.stateNode));break;case 4:r=He,o=Kt,He=n.stateNode.containerInfo,Kt=!0,qn(e,t,n),He=r,Kt=o;break;case 0:case 11:case 14:case 15:if(!Je&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var s=o,i=s.destroy;s=s.tag,i!==void 0&&(s&2||s&4)&&Au(n,t,i),o=o.next}while(o!==r)}qn(e,t,n);break;case 1:if(!Je&&(ro(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ke(n,t,l)}qn(e,t,n);break;case 21:qn(e,t,n);break;case 22:n.mode&1?(Je=(r=Je)||n.memoizedState!==null,qn(e,t,n),Je=r):qn(e,t,n);break;default:qn(e,t,n)}}function Nh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new QS),t.forEach(function(r){var o=i_.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function qt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var s=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:He=l.stateNode,Kt=!1;break e;case 3:He=l.stateNode.containerInfo,Kt=!0;break e;case 4:He=l.stateNode.containerInfo,Kt=!0;break e}l=l.return}if(He===null)throw Error(I(160));Ey(s,i,o),He=null,Kt=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){ke(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ry(t,e),t=t.sibling}function Ry(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qt(t,e),nn(e),r&4){try{ys(3,e,e.return),bl(3,e)}catch(h){ke(e,e.return,h)}try{ys(5,e,e.return)}catch(h){ke(e,e.return,h)}}break;case 1:qt(t,e),nn(e),r&512&&n!==null&&ro(n,n.return);break;case 5:if(qt(t,e),nn(e),r&512&&n!==null&&ro(n,n.return),e.flags&32){var o=e.stateNode;try{Cs(o,"")}catch(h){ke(e,e.return,h)}}if(r&4&&(o=e.stateNode,o!=null)){var s=e.memoizedProps,i=n!==null?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Gg(o,s),lu(l,i);var u=lu(l,s);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?Jg(o,f):d==="dangerouslySetInnerHTML"?Xg(o,f):d==="children"?Cs(o,f):Md(o,d,f,u)}switch(l){case"input":ru(o,s);break;case"textarea":Yg(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var y=s.value;y!=null?io(o,!!s.multiple,y,!1):p!==!!s.multiple&&(s.defaultValue!=null?io(o,!!s.multiple,s.defaultValue,!0):io(o,!!s.multiple,s.multiple?[]:"",!1))}o[$s]=s}catch(h){ke(e,e.return,h)}}break;case 6:if(qt(t,e),nn(e),r&4){if(e.stateNode===null)throw Error(I(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(h){ke(e,e.return,h)}}break;case 3:if(qt(t,e),nn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ks(t.containerInfo)}catch(h){ke(e,e.return,h)}break;case 4:qt(t,e),nn(e);break;case 13:qt(t,e),nn(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(gf=Pe())),r&4&&Nh(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Je=(u=Je)||d,qt(t,e),Je=u):qt(t,e),nn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(z=e,d=e.child;d!==null;){for(f=z=d;z!==null;){switch(p=z,y=p.child,p.tag){case 0:case 11:case 14:case 15:ys(4,p,p.return);break;case 1:ro(p,p.return);var m=p.stateNode;if(typeof m.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(h){ke(r,n,h)}}break;case 5:ro(p,p.return);break;case 22:if(p.memoizedState!==null){Th(f);continue}}y!==null?(y.return=p,z=y):Th(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{o=f.stateNode,u?(s=o.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=f.stateNode,c=f.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Zg("display",i))}catch(h){ke(e,e.return,h)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(h){ke(e,e.return,h)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:qt(t,e),nn(e),r&4&&Nh(e);break;case 21:break;default:qt(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Cy(n)){var r=n;break e}n=n.return}throw Error(I(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Cs(o,""),r.flags&=-33);var s=Rh(e);Fu(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=Rh(e);Du(e,l,i);break;default:throw Error(I(161))}}catch(c){ke(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ZS(e,t,n){z=e,Ny(e)}function Ny(e,t,n){for(var r=(e.mode&1)!==0;z!==null;){var o=z,s=o.child;if(o.tag===22&&r){var i=o.memoizedState!==null||Ci;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||Je;l=Ci;var u=Je;if(Ci=i,(Je=c)&&!u)for(z=o;z!==null;)i=z,c=i.child,i.tag===22&&i.memoizedState!==null?Oh(o):c!==null?(c.return=i,z=c):Oh(o);for(;s!==null;)z=s,Ny(s),s=s.sibling;z=o,Ci=l,Je=u}kh(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,z=s):kh(e)}}function kh(e){for(;z!==null;){var t=z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Je||bl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Je)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Wt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&fh(t,s,r);break;case 3:var i=t.updateQueue;if(i!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}fh(t,i,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&ks(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}Je||t.flags&512&&Mu(t)}catch(p){ke(t,t.return,p)}}if(t===e){z=null;break}if(n=t.sibling,n!==null){n.return=t.return,z=n;break}z=t.return}}function Th(e){for(;z!==null;){var t=z;if(t===e){z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,z=n;break}z=t.return}}function Oh(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{bl(4,t)}catch(c){ke(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){ke(t,o,c)}}var s=t.return;try{Mu(t)}catch(c){ke(t,s,c)}break;case 5:var i=t.return;try{Mu(t)}catch(c){ke(t,i,c)}}}catch(c){ke(t,t.return,c)}if(t===e){z=null;break}var l=t.sibling;if(l!==null){l.return=t.return,z=l;break}z=t.return}}var JS=Math.ceil,Aa=Ln.ReactCurrentDispatcher,hf=Ln.ReactCurrentOwner,Lt=Ln.ReactCurrentBatchConfig,ce=0,Be=null,$e=null,Ke=0,xt=0,oo=pr(0),De=0,Us=null,Pr=0,wl=0,mf=0,xs=null,ut=null,gf=0,_o=1/0,bn=null,Ma=!1,Lu=null,sr=null,Ei=!1,Zn=null,Da=0,bs=0,Uu=null,Xi=-1,Zi=0;function rt(){return ce&6?Pe():Xi!==-1?Xi:Xi=Pe()}function ir(e){return e.mode&1?ce&2&&Ke!==0?Ke&-Ke:MS.transition!==null?(Zi===0&&(Zi=dv()),Zi):(e=he,e!==0||(e=window.event,e=e===void 0?16:yv(e.type)),e):1}function Zt(e,t,n,r){if(50<bs)throw bs=0,Uu=null,Error(I(185));Js(e,n,r),(!(ce&2)||e!==Be)&&(e===Be&&(!(ce&2)&&(wl|=n),De===4&&Yn(e,Ke)),ht(e,r),n===1&&ce===0&&!(t.mode&1)&&(_o=Pe()+500,vl&&hr()))}function ht(e,t){var n=e.callbackNode;M1(e,t);var r=ba(e,e===Be?Ke:0);if(r===0)n!==null&&Up(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Up(n),t===1)e.tag===0?AS(Ph.bind(null,e)):Dv(Ph.bind(null,e)),OS(function(){!(ce&6)&&hr()}),n=null;else{switch(fv(r)){case 1:n=Vd;break;case 4:n=cv;break;case 16:n=xa;break;case 536870912:n=uv;break;default:n=xa}n=My(n,ky.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ky(e,t){if(Xi=-1,Zi=0,ce&6)throw Error(I(327));var n=e.callbackNode;if(fo()&&e.callbackNode!==n)return null;var r=ba(e,e===Be?Ke:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Fa(e,r);else{t=r;var o=ce;ce|=2;var s=Oy();(Be!==e||Ke!==t)&&(bn=null,_o=Pe()+500,_r(e,t));do try{n_();break}catch(l){Ty(e,l)}while(!0);ef(),Aa.current=s,ce=o,$e!==null?t=0:(Be=null,Ke=0,t=De)}if(t!==0){if(t===2&&(o=pu(e),o!==0&&(r=o,t=Vu(e,o))),t===1)throw n=Us,_r(e,0),Yn(e,r),ht(e,Pe()),n;if(t===6)Yn(e,r);else{if(o=e.current.alternate,!(r&30)&&!e_(o)&&(t=Fa(e,r),t===2&&(s=pu(e),s!==0&&(r=s,t=Vu(e,s))),t===1))throw n=Us,_r(e,0),Yn(e,r),ht(e,Pe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:vr(e,ut,bn);break;case 3:if(Yn(e,r),(r&130023424)===r&&(t=gf+500-Pe(),10<t)){if(ba(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){rt(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=wu(vr.bind(null,e,ut,bn),t);break}vr(e,ut,bn);break;case 4:if(Yn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Xt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=Pe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*JS(r/1960))-r,10<r){e.timeoutHandle=wu(vr.bind(null,e,ut,bn),r);break}vr(e,ut,bn);break;case 5:vr(e,ut,bn);break;default:throw Error(I(329))}}}return ht(e,Pe()),e.callbackNode===n?ky.bind(null,e):null}function Vu(e,t){var n=xs;return e.current.memoizedState.isDehydrated&&(_r(e,t).flags|=256),e=Fa(e,t),e!==2&&(t=ut,ut=n,t!==null&&Bu(t)),e}function Bu(e){ut===null?ut=e:ut.push.apply(ut,e)}function e_(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],s=o.getSnapshot;o=o.value;try{if(!en(s(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Yn(e,t){for(t&=~mf,t&=~wl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Xt(t),r=1<<n;e[n]=-1,t&=~r}}function Ph(e){if(ce&6)throw Error(I(327));fo();var t=ba(e,0);if(!(t&1))return ht(e,Pe()),null;var n=Fa(e,t);if(e.tag!==0&&n===2){var r=pu(e);r!==0&&(t=r,n=Vu(e,r))}if(n===1)throw n=Us,_r(e,0),Yn(e,t),ht(e,Pe()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,ut,bn),ht(e,Pe()),null}function vf(e,t){var n=ce;ce|=1;try{return e(t)}finally{ce=n,ce===0&&(_o=Pe()+500,vl&&hr())}}function Ir(e){Zn!==null&&Zn.tag===0&&!(ce&6)&&fo();var t=ce;ce|=1;var n=Lt.transition,r=he;try{if(Lt.transition=null,he=1,e)return e()}finally{he=r,Lt.transition=n,ce=t,!(ce&6)&&hr()}}function yf(){xt=oo.current,we(oo)}function _r(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,TS(n)),$e!==null)for(n=$e.return;n!==null;){var r=n;switch(Xd(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ca();break;case 3:wo(),we(ft),we(et),af();break;case 5:sf(r);break;case 4:wo();break;case 13:we(Ee);break;case 19:we(Ee);break;case 10:tf(r.type._context);break;case 22:case 23:yf()}n=n.return}if(Be=e,$e=e=ar(e.current,null),Ke=xt=t,De=0,Us=null,mf=wl=Pr=0,ut=xs=null,br!==null){for(t=0;t<br.length;t++)if(n=br[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,s=n.pending;if(s!==null){var i=s.next;s.next=o,r.next=i}n.pending=r}br=null}return e}function Ty(e,t){do{var n=$e;try{if(ef(),Gi.current=$a,Ia){for(var r=Re.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Ia=!1}if(Or=0,Ve=Me=Re=null,vs=!1,Ds=0,hf.current=null,n===null||n.return===null){De=1,Us=t,$e=null;break}e:{var s=e,i=n.return,l=n,c=t;if(t=Ke,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=xh(i);if(y!==null){y.flags&=-257,bh(y,i,l,s,t),y.mode&1&&yh(s,u,t),t=y,c=u;var m=t.updateQueue;if(m===null){var h=new Set;h.add(c),t.updateQueue=h}else m.add(c);break e}else{if(!(t&1)){yh(s,u,t),xf();break e}c=Error(I(426))}}else if(_e&&l.mode&1){var x=xh(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),bh(x,i,l,s,t),Zd(So(c,l));break e}}s=c=So(c,l),De!==4&&(De=2),xs===null?xs=[s]:xs.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var v=py(s,c,t);dh(s,v);break e;case 1:l=c;var g=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(sr===null||!sr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=hy(s,l,t);dh(s,S);break e}}s=s.return}while(s!==null)}Iy(n)}catch(_){t=_,$e===n&&n!==null&&($e=n=n.return);continue}break}while(!0)}function Oy(){var e=Aa.current;return Aa.current=$a,e===null?$a:e}function xf(){(De===0||De===3||De===2)&&(De=4),Be===null||!(Pr&268435455)&&!(wl&268435455)||Yn(Be,Ke)}function Fa(e,t){var n=ce;ce|=2;var r=Oy();(Be!==e||Ke!==t)&&(bn=null,_r(e,t));do try{t_();break}catch(o){Ty(e,o)}while(!0);if(ef(),ce=n,Aa.current=r,$e!==null)throw Error(I(261));return Be=null,Ke=0,De}function t_(){for(;$e!==null;)Py($e)}function n_(){for(;$e!==null&&!R1();)Py($e)}function Py(e){var t=Ay(e.alternate,e,xt);e.memoizedProps=e.pendingProps,t===null?Iy(e):$e=t,hf.current=null}function Iy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=YS(n,t),n!==null){n.flags&=32767,$e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,$e=null;return}}else if(n=GS(n,t,xt),n!==null){$e=n;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);De===0&&(De=5)}function vr(e,t,n){var r=he,o=Lt.transition;try{Lt.transition=null,he=1,r_(e,t,n,r)}finally{Lt.transition=o,he=r}return null}function r_(e,t,n,r){do fo();while(Zn!==null);if(ce&6)throw Error(I(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(I(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(D1(e,s),e===Be&&($e=Be=null,Ke=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ei||(Ei=!0,My(xa,function(){return fo(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Lt.transition,Lt.transition=null;var i=he;he=1;var l=ce;ce|=4,hf.current=null,XS(e,n),Ry(n,e),_S(xu),wa=!!yu,xu=yu=null,e.current=n,ZS(n),N1(),ce=l,he=i,Lt.transition=s}else e.current=n;if(Ei&&(Ei=!1,Zn=e,Da=o),s=e.pendingLanes,s===0&&(sr=null),O1(n.stateNode),ht(e,Pe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Ma)throw Ma=!1,e=Lu,Lu=null,e;return Da&1&&e.tag!==0&&fo(),s=e.pendingLanes,s&1?e===Uu?bs++:(bs=0,Uu=e):bs=0,hr(),null}function fo(){if(Zn!==null){var e=fv(Da),t=Lt.transition,n=he;try{if(Lt.transition=null,he=16>e?16:e,Zn===null)var r=!1;else{if(e=Zn,Zn=null,Da=0,ce&6)throw Error(I(331));var o=ce;for(ce|=4,z=e.current;z!==null;){var s=z,i=s.child;if(z.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(z=u;z!==null;){var d=z;switch(d.tag){case 0:case 11:case 15:ys(8,d,s)}var f=d.child;if(f!==null)f.return=d,z=f;else for(;z!==null;){d=z;var p=d.sibling,y=d.return;if(jy(d),d===u){z=null;break}if(p!==null){p.return=y,z=p;break}z=y}}}var m=s.alternate;if(m!==null){var h=m.child;if(h!==null){m.child=null;do{var x=h.sibling;h.sibling=null,h=x}while(h!==null)}}z=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,z=i;else e:for(;z!==null;){if(s=z,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ys(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,z=v;break e}z=s.return}}var g=e.current;for(z=g;z!==null;){i=z;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,z=b;else e:for(i=g;z!==null;){if(l=z,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:bl(9,l)}}catch(_){ke(l,l.return,_)}if(l===i){z=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,z=S;break e}z=l.return}}if(ce=o,hr(),un&&typeof un.onPostCommitFiberRoot=="function")try{un.onPostCommitFiberRoot(fl,e)}catch{}r=!0}return r}finally{he=n,Lt.transition=t}}return!1}function Ih(e,t,n){t=So(n,t),t=py(e,t,1),e=or(e,t,1),t=rt(),e!==null&&(Js(e,1,t),ht(e,t))}function ke(e,t,n){if(e.tag===3)Ih(e,e,n);else for(;t!==null;){if(t.tag===3){Ih(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(sr===null||!sr.has(r))){e=So(n,e),e=hy(t,e,1),t=or(t,e,1),e=rt(),t!==null&&(Js(t,1,e),ht(t,e));break}}t=t.return}}function o_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=rt(),e.pingedLanes|=e.suspendedLanes&n,Be===e&&(Ke&n)===n&&(De===4||De===3&&(Ke&130023424)===Ke&&500>Pe()-gf?_r(e,0):mf|=n),ht(e,t)}function $y(e,t){t===0&&(e.mode&1?(t=gi,gi<<=1,!(gi&130023424)&&(gi=4194304)):t=1);var n=rt();e=In(e,t),e!==null&&(Js(e,t,n),ht(e,n))}function s_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$y(e,n)}function i_(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(I(314))}r!==null&&r.delete(t),$y(e,n)}var Ay;Ay=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ft.current)dt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dt=!1,KS(e,t,n);dt=!!(e.flags&131072)}else dt=!1,_e&&t.flags&1048576&&Fv(t,Na,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qi(e,t),e=t.pendingProps;var o=yo(t,et.current);uo(t,n),o=cf(null,t,r,e,o,n);var s=uf();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,pt(r)?(s=!0,Ea(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,rf(t),o.updater=yl,t.stateNode=o,o._reactInternals=t,Nu(t,r,e,n),t=Ou(null,t,r,!0,s,n)):(t.tag=0,_e&&s&&Qd(t),tt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qi(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=l_(r),e=Wt(r,e),o){case 0:t=Tu(null,t,r,e,n);break e;case 1:t=_h(null,t,r,e,n);break e;case 11:t=wh(null,t,r,e,n);break e;case 14:t=Sh(null,t,r,Wt(r.type,e),n);break e}throw Error(I(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),Tu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),_h(e,t,r,o,n);case 3:e:{if(yy(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Bv(e,t),Oa(t,r,null,n);var i=t.memoizedState;if(r=i.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){o=So(Error(I(423)),t),t=jh(e,t,r,n,o);break e}else if(r!==o){o=So(Error(I(424)),t),t=jh(e,t,r,n,o);break e}else for(bt=rr(t.stateNode.containerInfo.firstChild),wt=t,_e=!0,Yt=null,n=Wv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(xo(),r===o){t=$n(e,t,n);break e}tt(e,t,r,n)}t=t.child}return t;case 5:return Kv(t),e===null&&Cu(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,bu(r,o)?i=null:s!==null&&bu(r,s)&&(t.flags|=32),vy(e,t),tt(e,t,i,n),t.child;case 6:return e===null&&Cu(t),null;case 13:return xy(e,t,n);case 4:return of(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bo(t,null,r,n):tt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),wh(e,t,r,o,n);case 7:return tt(e,t,t.pendingProps,n),t.child;case 8:return tt(e,t,t.pendingProps.children,n),t.child;case 12:return tt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,s=t.memoizedProps,i=o.value,ye(ka,r._currentValue),r._currentValue=i,s!==null)if(en(s.value,i)){if(s.children===o.children&&!ft.current){t=$n(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){i=s.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=Rn(-1,n&-n),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Eu(s.return,n,t),l.lanes|=n;break}c=c.next}}else if(s.tag===10)i=s.type===t.type?null:s.child;else if(s.tag===18){if(i=s.return,i===null)throw Error(I(341));i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Eu(i,n,t),i=s.sibling}else i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===t){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}tt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,uo(t,n),o=Ut(o),r=r(o),t.flags|=1,tt(e,t,r,n),t.child;case 14:return r=t.type,o=Wt(r,t.pendingProps),o=Wt(r.type,o),Sh(e,t,r,o,n);case 15:return my(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),Qi(e,t),t.tag=1,pt(r)?(e=!0,Ea(t)):e=!1,uo(t,n),qv(t,r,o),Nu(t,r,o,n),Ou(null,t,r,!0,e,n);case 19:return by(e,t,n);case 22:return gy(e,t,n)}throw Error(I(156,t.tag))};function My(e,t){return lv(e,t)}function a_(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 Ft(e,t,n,r){return new a_(e,t,n,r)}function bf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function l_(e){if(typeof e=="function")return bf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Fd)return 11;if(e===Ld)return 14}return 2}function ar(e,t){var n=e.alternate;return n===null?(n=Ft(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 Ji(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")bf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Gr:return jr(n.children,o,s,t);case Dd:i=8,o|=8;break;case Zc:return e=Ft(12,n,t,o|2),e.elementType=Zc,e.lanes=s,e;case Jc:return e=Ft(13,n,t,o),e.elementType=Jc,e.lanes=s,e;case eu:return e=Ft(19,n,t,o),e.elementType=eu,e.lanes=s,e;case Hg:return Sl(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zg:i=10;break e;case qg:i=9;break e;case Fd:i=11;break e;case Ld:i=14;break e;case Hn:i=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Ft(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function jr(e,t,n,r){return e=Ft(7,e,r,t),e.lanes=n,e}function Sl(e,t,n,r){return e=Ft(22,e,r,t),e.elementType=Hg,e.lanes=n,e.stateNode={isHidden:!1},e}function Cc(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function Ec(e,t,n){return t=Ft(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function c_(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=ic(0),this.expirationTimes=ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ic(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function wf(e,t,n,r,o,s,i,l,c){return e=new c_(e,t,n,l,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ft(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},rf(s),e}function u_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Kr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Dy(e){if(!e)return cr;e=e._reactInternals;e:{if(Lr(e)!==e||e.tag!==1)throw Error(I(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(I(171))}if(e.tag===1){var n=e.type;if(pt(n))return Mv(e,n,t)}return t}function Fy(e,t,n,r,o,s,i,l,c){return e=wf(n,r,!0,e,o,s,i,l,c),e.context=Dy(null),n=e.current,r=rt(),o=ir(n),s=Rn(r,o),s.callback=t??null,or(n,s,o),e.current.lanes=o,Js(e,o,r),ht(e,r),e}function _l(e,t,n,r){var o=t.current,s=rt(),i=ir(o);return n=Dy(n),t.context===null?t.context=n:t.pendingContext=n,t=Rn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=or(o,t,i),e!==null&&(Zt(e,o,i,s),Ki(e,o,i)),i}function La(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function $h(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Sf(e,t){$h(e,t),(e=e.alternate)&&$h(e,t)}function d_(){return null}var Ly=typeof reportError=="function"?reportError:function(e){console.error(e)};function _f(e){this._internalRoot=e}jl.prototype.render=_f.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));_l(e,t,null,null)};jl.prototype.unmount=_f.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ir(function(){_l(null,e,null,null)}),t[Pn]=null}};function jl(e){this._internalRoot=e}jl.prototype.unstable_scheduleHydration=function(e){if(e){var t=mv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Gn.length&&t!==0&&t<Gn[n].priority;n++);Gn.splice(n,0,e),n===0&&vv(e)}};function jf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ah(){}function f_(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=La(i);s.call(u)}}var i=Fy(t,r,e,0,null,!1,!1,"",Ah);return e._reactRootContainer=i,e[Pn]=i.current,Ps(e.nodeType===8?e.parentNode:e),Ir(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=La(c);l.call(u)}}var c=wf(e,0,!1,null,null,!1,!1,"",Ah);return e._reactRootContainer=c,e[Pn]=c.current,Ps(e.nodeType===8?e.parentNode:e),Ir(function(){_l(t,c,n,r)}),c}function El(e,t,n,r,o){var s=n._reactRootContainer;if(s){var i=s;if(typeof o=="function"){var l=o;o=function(){var c=La(i);l.call(c)}}_l(t,i,e,o)}else i=f_(n,t,e,o,r);return La(i)}pv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=as(t.pendingLanes);n!==0&&(Bd(t,n|1),ht(t,Pe()),!(ce&6)&&(_o=Pe()+500,hr()))}break;case 13:Ir(function(){var r=In(e,1);if(r!==null){var o=rt();Zt(r,e,1,o)}}),Sf(e,1)}};zd=function(e){if(e.tag===13){var t=In(e,134217728);if(t!==null){var n=rt();Zt(t,e,134217728,n)}Sf(e,134217728)}};hv=function(e){if(e.tag===13){var t=ir(e),n=In(e,t);if(n!==null){var r=rt();Zt(n,e,t,r)}Sf(e,t)}};mv=function(){return he};gv=function(e,t){var n=he;try{return he=e,t()}finally{he=n}};uu=function(e,t,n){switch(t){case"input":if(ru(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=gl(r);if(!o)throw Error(I(90));Kg(r),ru(r,o)}}}break;case"textarea":Yg(e,n);break;case"select":t=n.value,t!=null&&io(e,!!n.multiple,t,!1)}};nv=vf;rv=Ir;var p_={usingClientEntryPoint:!1,Events:[ti,Zr,gl,ev,tv,vf]},Xo={findFiberByHostInstance:xr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},h_={bundleType:Xo.bundleType,version:Xo.version,rendererPackageName:Xo.rendererPackageName,rendererConfig:Xo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ln.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=iv(e),e===null?null:e.stateNode},findFiberByHostInstance:Xo.findFiberByHostInstance||d_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ri=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ri.isDisabled&&Ri.supportsFiber)try{fl=Ri.inject(h_),un=Ri}catch{}}kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=p_;kt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jf(t))throw Error(I(200));return u_(e,t,null,n)};kt.createRoot=function(e,t){if(!jf(e))throw Error(I(299));var n=!1,r="",o=Ly;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=wf(e,1,!1,null,null,n,!1,r,o),e[Pn]=t.current,Ps(e.nodeType===8?e.parentNode:e),new _f(t)};kt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=iv(t),e=e===null?null:e.stateNode,e};kt.flushSync=function(e){return Ir(e)};kt.hydrate=function(e,t,n){if(!Cl(t))throw Error(I(200));return El(null,e,t,!0,n)};kt.hydrateRoot=function(e,t,n){if(!jf(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Ly;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Fy(t,null,e,1,n??null,o,!1,s,i),e[Pn]=t.current,Ps(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new jl(t)};kt.render=function(e,t,n){if(!Cl(t))throw Error(I(200));return El(null,e,t,!1,n)};kt.unmountComponentAtNode=function(e){if(!Cl(e))throw Error(I(40));return e._reactRootContainer?(Ir(function(){El(null,null,e,!1,function(){e._reactRootContainer=null,e[Pn]=null})}),!0):!1};kt.unstable_batchedUpdates=vf;kt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cl(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return El(e,t,n,!1,r)};kt.version="18.2.0-next-9e3b772b8-20220608";function Uy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uy)}catch(e){console.error(e)}}Uy(),Fg.exports=kt;var Cf=Fg.exports;const Sr=Xs(Cf);var Mh=Cf;_t.createRoot=Mh.createRoot,_t.hydrateRoot=Mh.hydrateRoot;function qe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var m_=typeof Symbol=="function"&&Symbol.observable||"@@observable",Dh=m_,Rc=()=>Math.random().toString(36).substring(7).split("").join("."),g_={INIT:`@@redux/INIT${Rc()}`,REPLACE:`@@redux/REPLACE${Rc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Rc()}`},Ua=g_;function Ef(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Vy(e,t,n){if(typeof e!="function")throw new Error(qe(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(qe(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(qe(1));return n(Vy)(e,t)}let r=e,o=t,s=new Map,i=s,l=0,c=!1;function u(){i===s&&(i=new Map,s.forEach((x,v)=>{i.set(v,x)}))}function d(){if(c)throw new Error(qe(3));return o}function f(x){if(typeof x!="function")throw new Error(qe(4));if(c)throw new Error(qe(5));let v=!0;u();const g=l++;return i.set(g,x),function(){if(v){if(c)throw new Error(qe(6));v=!1,u(),i.delete(g),s=null}}}function p(x){if(!Ef(x))throw new Error(qe(7));if(typeof x.type>"u")throw new Error(qe(8));if(typeof x.type!="string")throw new Error(qe(17));if(c)throw new Error(qe(9));try{c=!0,o=r(o,x)}finally{c=!1}return(s=i).forEach(g=>{g()}),x}function y(x){if(typeof x!="function")throw new Error(qe(10));r=x,p({type:Ua.REPLACE})}function m(){const x=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(qe(11));function g(){const S=v;S.next&&S.next(d())}return g(),{unsubscribe:x(g)}},[Dh](){return this}}}return p({type:Ua.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:y,[Dh]:m}}function v_(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ua.INIT})>"u")throw new Error(qe(12));if(typeof n(void 0,{type:Ua.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(qe(13))})}function y_(e){const t=Object.keys(e),n={};for(let s=0;s<t.length;s++){const i=t[s];typeof e[i]=="function"&&(n[i]=e[i])}const r=Object.keys(n);let o;try{v_(n)}catch(s){o=s}return function(i={},l){if(o)throw o;let c=!1;const u={};for(let d=0;d<r.length;d++){const f=r[d],p=n[f],y=i[f],m=p(y,l);if(typeof m>"u")throw l&&l.type,new Error(qe(14));u[f]=m,c=c||m!==y}return c=c||r.length!==Object.keys(i).length,c?u:i}}function Va(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function x_(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(qe(15))};const i={getState:o.getState,dispatch:(c,...u)=>s(c,...u)},l=e.map(c=>c(i));return s=Va(...l)(o.dispatch),{...o,dispatch:s}}}function b_(e){return Ef(e)&&"type"in e&&typeof e.type=="string"}var By=Symbol.for("immer-nothing"),Fh=Symbol.for("immer-draftable"),Ct=Symbol.for("immer-state");function Qt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var jo=Object.getPrototypeOf;function ur(e){return!!e&&!!e[Ct]}function An(e){var t;return e?zy(e)||Array.isArray(e)||!!e[Fh]||!!((t=e.constructor)!=null&&t[Fh])||Nl(e)||kl(e):!1}var w_=Object.prototype.constructor.toString();function zy(e){if(!e||typeof e!="object")return!1;const t=jo(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===w_}function Vs(e,t){Rl(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Rl(e){const t=e[Ct];return t?t.type_:Array.isArray(e)?1:Nl(e)?2:kl(e)?3:0}function zu(e,t){return Rl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function qy(e,t,n){const r=Rl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function S_(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Nl(e){return e instanceof Map}function kl(e){return e instanceof Set}function yr(e){return e.copy_||e.base_}function qu(e,t){if(Nl(e))return new Map(e);if(kl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&zy(e))return jo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ct];let r=Reflect.ownKeys(n);for(let o=0;o<r.length;o++){const s=r[o],i=n[s];i.writable===!1&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[s]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[s]})}return Object.create(jo(e),n)}function Rf(e,t=!1){return Tl(e)||ur(e)||!An(e)||(Rl(e)>1&&(e.set=e.add=e.clear=e.delete=__),Object.freeze(e),t&&Vs(e,(n,r)=>Rf(r,!0))),e}function __(){Qt(2)}function Tl(e){return Object.isFrozen(e)}var j_={};function $r(e){const t=j_[e];return t||Qt(0,e),t}var Bs;function Hy(){return Bs}function C_(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Lh(e,t){t&&($r("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Hu(e){Wu(e),e.drafts_.forEach(E_),e.drafts_=null}function Wu(e){e===Bs&&(Bs=e.parent_)}function Uh(e){return Bs=C_(Bs,e)}function E_(e){const t=e[Ct];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Vh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ct].modified_&&(Hu(t),Qt(4)),An(e)&&(e=Ba(t,e),t.parent_||za(t,e)),t.patches_&&$r("Patches").generateReplacementPatches_(n[Ct].base_,e,t.patches_,t.inversePatches_)):e=Ba(t,n,[]),Hu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==By?e:void 0}function Ba(e,t,n){if(Tl(t))return t;const r=t[Ct];if(!r)return Vs(t,(o,s)=>Bh(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return za(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let s=o,i=!1;r.type_===3&&(s=new Set(o),o.clear(),i=!0),Vs(s,(l,c)=>Bh(e,r,o,l,c,n,i)),za(e,o,!1),n&&e.patches_&&$r("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Bh(e,t,n,r,o,s,i){if(ur(o)){const l=s&&t&&t.type_!==3&&!zu(t.assigned_,r)?s.concat(r):void 0,c=Ba(e,o,l);if(qy(n,r,c),ur(c))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(An(o)&&!Tl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ba(e,o),(!t||!t.scope_.parent_)&&za(e,o)}}function za(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Rf(t,n)}function R_(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Hy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=Nf;n&&(o=[r],s=zs);const{revoke:i,proxy:l}=Proxy.revocable(o,s);return r.draft_=l,r.revoke_=i,l}var Nf={get(e,t){if(t===Ct)return e;const n=yr(e);if(!zu(n,t))return N_(e,n,t);const r=n[t];return e.finalized_||!An(r)?r:r===Nc(e.base_,t)?(kc(e),e.copy_[t]=Gu(r,e)):r},has(e,t){return t in yr(e)},ownKeys(e){return Reflect.ownKeys(yr(e))},set(e,t,n){const r=Wy(yr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Nc(yr(e),t),s=o==null?void 0:o[Ct];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(S_(n,o)&&(n!==void 0||zu(e.base_,t)))return!0;kc(e),Ku(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Nc(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,kc(e),Ku(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=yr(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Qt(11)},getPrototypeOf(e){return jo(e.base_)},setPrototypeOf(){Qt(12)}},zs={};Vs(Nf,(e,t)=>{zs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});zs.deleteProperty=function(e,t){return zs.set.call(this,e,t,void 0)};zs.set=function(e,t,n){return Nf.set.call(this,e[0],t,n,e[0])};function Nc(e,t){const n=e[Ct];return(n?yr(n):e)[t]}function N_(e,t,n){var o;const r=Wy(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function Wy(e,t){if(!(t in e))return;let n=jo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=jo(n)}}function Ku(e){e.modified_||(e.modified_=!0,e.parent_&&Ku(e.parent_))}function kc(e){e.copy_||(e.copy_=qu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var k_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const i=this;return function(c=s,...u){return i.produce(c,d=>n.call(this,d,...u))}}typeof n!="function"&&Qt(6),r!==void 0&&typeof r!="function"&&Qt(7);let o;if(An(t)){const s=Uh(this),i=Gu(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Hu(s):Wu(s)}return Lh(s,r),Vh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===By&&(o=void 0),this.autoFreeze_&&Rf(o,!0),r){const s=[],i=[];$r("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Qt(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(i,...l)=>this.produceWithPatches(i,c=>t(c,...l));let r,o;return[this.produce(t,n,(i,l)=>{r=i,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){An(e)||Qt(8),ur(e)&&(e=Ky(e));const t=Uh(this),n=Gu(e,void 0);return n[Ct].isManual_=!0,Wu(t),n}finishDraft(e,t){const n=e&&e[Ct];(!n||!n.isManual_)&&Qt(9);const{scope_:r}=n;return Lh(r,t),Vh(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=$r("Patches").applyPatches_;return ur(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Gu(e,t){const n=Nl(e)?$r("MapSet").proxyMap_(e,t):kl(e)?$r("MapSet").proxySet_(e,t):R_(e,t);return(t?t.scope_:Hy()).drafts_.push(n),n}function Ky(e){return ur(e)||Qt(10,e),Gy(e)}function Gy(e){if(!An(e)||Tl(e))return e;const t=e[Ct];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=qu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=qu(e,!0);return Vs(n,(r,o)=>{qy(n,r,Gy(o))}),t&&(t.finalized_=!1),n}var Et=new k_,$t=Et.produce;Et.produceWithPatches.bind(Et);Et.setAutoFreeze.bind(Et);Et.setUseStrictShallowCopy.bind(Et);Et.applyPatches.bind(Et);Et.createDraft.bind(Et);Et.finishDraft.bind(Et);function T_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function O_(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function P_(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var zh=e=>Array.isArray(e)?e:[e];function I_(e){const t=Array.isArray(e[0])?e[0]:e;return P_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $_(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var A_=class{constructor(e){this.value=e}deref(){return this.value}},M_=typeof WeakRef<"u"?WeakRef:A_,D_=0,qh=1;function Ni(){return{s:D_,v:void 0,o:null,p:null}}function kf(e,t={}){let n=Ni();const{resultEqualityCheck:r}=t;let o,s=0;function i(){var f;let l=n;const{length:c}=arguments;for(let p=0,y=c;p<y;p++){const m=arguments[p];if(typeof m=="function"||typeof m=="object"&&m!==null){let h=l.o;h===null&&(l.o=h=new WeakMap);const x=h.get(m);x===void 0?(l=Ni(),h.set(m,l)):l=x}else{let h=l.p;h===null&&(l.p=h=new Map);const x=h.get(m);x===void 0?(l=Ni(),h.set(m,l)):l=x}}const u=l;let d;if(l.s===qh?d=l.v:(d=e.apply(null,arguments),s++),u.s=qh,r){const p=((f=o==null?void 0:o.deref)==null?void 0:f.call(o))??o;p!=null&&r(p,d)&&(d=p,s!==0&&s--),o=typeof d=="object"&&d!==null||typeof d=="function"?new M_(d):d}return u.v=d,d}return i.clearCache=()=>{n=Ni(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function Yy(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let s=0,i=0,l,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),T_(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:y=kf,argsMemoizeOptions:m=[],devModeChecks:h={}}=d,x=zh(p),v=zh(m),g=I_(o),b=f(function(){return s++,u.apply(null,arguments)},...x),S=y(function(){i++;const j=$_(g,arguments);return l=b.apply(null,j),l},...v);return Object.assign(S,{resultFunc:u,memoizedResultFunc:b,dependencies:g,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var F_=Yy(kf),L_=Object.assign((e,t=F_)=>{O_(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(s=>e[s]);return t(r,(...s)=>s.reduce((i,l,c)=>(i[n[c]]=l,i),{}))},{withTypes:()=>L_});function Qy(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var U_=Qy(),V_=Qy,B_=(...e)=>{const t=Yy(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(ur(i)?Ky(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};B_(kf);var z_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Va:Va.apply(null,arguments)},q_=e=>e&&typeof e.match=="function";function Nn(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(mt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>b_(r)&&r.type===e,n}var Xy=class cs extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,cs.prototype)}static get[Symbol.species](){return cs}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new cs(...t[0].concat(this)):new cs(...t.concat(this))}};function Hh(e){return An(e)?$t(e,()=>{}):e}function Wh(e,t,n){if(e.has(t)){let o=e.get(t);return n.update&&(o=n.update(o,t,e),e.set(t,o)),o}if(!n.insert)throw new Error(mt(10));const r=n.insert(t,e);return e.set(t,r),r}function H_(e){return typeof e=="boolean"}var W_=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new Xy;return n&&(H_(n)?i.push(U_):i.push(V_(n.extraArgument))),i},K_="RTK_autoBatch",Zy=e=>t=>{setTimeout(t,e)},G_=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Zy(10),Y_=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,s=!1,i=!1;const l=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?G_:e.type==="callback"?e.queueNotification:Zy(e.timeout),u=()=>{i=!1,s&&(s=!1,l.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const f=()=>o&&d(),p=r.subscribe(f);return l.add(d),()=>{p(),l.delete(d)}},dispatch(d){var f;try{return o=!((f=d==null?void 0:d.meta)!=null&&f[K_]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},Q_=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new Xy(e);return r&&o.push(Y_(typeof r=="object"?r:void 0)),o},X_=!0;function Mo(e){const t=W_(),{reducer:n=void 0,middleware:r,devTools:o=!0,preloadedState:s=void 0,enhancers:i=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(Ef(n))l=y_(n);else throw new Error(mt(1));let c;typeof r=="function"?c=r(t):c=t();let u=Va;o&&(u=z_({trace:!X_,...typeof o=="object"&&o}));const d=x_(...c),f=Q_(d);let p=typeof i=="function"?i(f):f();const y=u(...p);return Vy(l,s,y)}function Jy(e){const t={},n=[];let r;const o={addCase(s,i){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(mt(28));if(l in t)throw new Error(mt(29));return t[l]=i,o},addMatcher(s,i){return n.push({matcher:s,reducer:i}),o},addDefaultCase(s){return r=s,o}};return e(o),[t,n,r]}function Z_(e){return typeof e=="function"}function J_(e,t){let[n,r,o]=Jy(t),s;if(Z_(e))s=()=>Hh(e());else{const l=Hh(e);s=()=>l}function i(l=s(),c){let u=[n[c.type],...r.filter(({matcher:d})=>d(c)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[o]),u.reduce((d,f)=>{if(f)if(ur(d)){const y=f(d,c);return y===void 0?d:y}else{if(An(d))return $t(d,p=>f(p,c));{const p=f(d,c);if(p===void 0){if(d===null)return d;throw new Error(mt(9))}return p}}return d},l)}return i.getInitialState=s,i}var ej="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ex=(e=21)=>{let t="",n=e;for(;n--;)t+=ej[Math.random()*64|0];return t},tj=(e,t)=>q_(e)?e.match(t):e(t);function nj(...e){return t=>e.some(n=>tj(n,t))}var rj=["name","message","stack","code"],Tc=class{constructor(e,t){ec(this,"_type");this.payload=e,this.meta=t}},Kh=class{constructor(e,t){ec(this,"_type");this.payload=e,this.meta=t}},oj=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of rj)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Ye=(()=>{function e(t,n,r){const o=Nn(t+"/fulfilled",(c,u,d,f)=>({payload:c,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),s=Nn(t+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=Nn(t+"/rejected",(c,u,d,f,p)=>({payload:f,error:(r&&r.serializeError||oj)(c||"Rejected"),meta:{...p||{},arg:d,requestId:u,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"}}));function l(c){return(u,d,f)=>{const p=r!=null&&r.idGenerator?r.idGenerator(c):ex(),y=new AbortController;let m,h;function x(g){h=g,y.abort()}const v=async function(){var S,_;let g;try{let j=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,c,{getState:d,extra:f});if(ij(j)&&(j=await j),j===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const C=new Promise((E,N)=>{m=()=>{N({name:"AbortError",message:h||"Aborted"})},y.signal.addEventListener("abort",m)});u(s(p,c,(_=r==null?void 0:r.getPendingMeta)==null?void 0:_.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),g=await Promise.race([C,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:y.signal,abort:x,rejectWithValue:(E,N)=>new Tc(E,N),fulfillWithValue:(E,N)=>new Kh(E,N)})).then(E=>{if(E instanceof Tc)throw E;return E instanceof Kh?o(E.payload,p,c,E.meta):o(E,p,c)})])}catch(j){g=j instanceof Tc?i(null,p,c,j.payload,j.meta):i(j,p,c)}finally{m&&y.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&i.match(g)&&g.meta.condition||u(g),g}();return Object.assign(v,{abort:x,requestId:p,arg:c,unwrap(){return v.then(sj)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:nj(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function sj(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ij(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var aj=Symbol.for("rtk-slice-createasyncthunk");function lj(e,t){return`${e}/${t}`}function cj({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[aj];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(mt(11));typeof process<"u";const l=(typeof o.reducers=="function"?o.reducers(dj()):o.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(b,S){const _=typeof b=="string"?b:b.type;if(!_)throw new Error(mt(12));if(_ in u.sliceCaseReducersByType)throw new Error(mt(13));return u.sliceCaseReducersByType[_]=S,d},addMatcher(b,S){return u.sliceMatchers.push({matcher:b,reducer:S}),d},exposeAction(b,S){return u.actionCreators[b]=S,d},exposeCaseReducer(b,S){return u.sliceCaseReducersByName[b]=S,d}};c.forEach(b=>{const S=l[b],_={reducerName:b,type:lj(s,b),createNotation:typeof o.reducers=="function"};pj(S)?mj(_,S,d,t):fj(_,S,d)});function f(){const[b={},S=[],_=void 0]=typeof o.extraReducers=="function"?Jy(o.extraReducers):[o.extraReducers],j={...b,...u.sliceCaseReducersByType};return J_(o.initialState,C=>{for(let E in j)C.addCase(E,j[E]);for(let E of u.sliceMatchers)C.addMatcher(E.matcher,E.reducer);for(let E of S)C.addMatcher(E.matcher,E.reducer);_&&C.addDefaultCase(_)})}const p=b=>b,y=new Map;let m;function h(b,S){return m||(m=f()),m(b,S)}function x(){return m||(m=f()),m.getInitialState()}function v(b,S=!1){function _(C){let E=C[b];return typeof E>"u"&&S&&(E=x()),E}function j(C=p){const E=Wh(y,S,{insert:()=>new WeakMap});return Wh(E,C,{insert:()=>{const N={};for(const[R,T]of Object.entries(o.selectors??{}))N[R]=uj(T,C,x,S);return N}})}return{reducerPath:b,getSelectors:j,get selectors(){return j(_)},selectSlice:_}}const g={name:s,reducer:h,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:x,...v(i),injectInto(b,{reducerPath:S,..._}={}){const j=S??i;return b.inject({reducerPath:j,reducer:h},_),{...g,...v(j,!0)}}};return g}}function uj(e,t,n,r){function o(s,...i){let l=t(s);return typeof l>"u"&&r&&(l=n()),e(l,...i)}return o.unwrapped=e,o}var ri=cj();function dj(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function fj({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!hj(r))throw new Error(mt(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?Nn(e,i):Nn(e))}function pj(e){return e._reducerDefinitionType==="asyncThunk"}function hj(e){return e._reducerDefinitionType==="reducerWithPrepare"}function mj({type:e,reducerName:t},n,r,o){if(!o)throw new Error(mt(18));const{payloadCreator:s,fulfilled:i,pending:l,rejected:c,settled:u,options:d}=n,f=o(e,s,d);r.exposeAction(t,f),i&&r.addCase(f.fulfilled,i),l&&r.addCase(f.pending,l),c&&r.addCase(f.rejected,c),u&&r.addMatcher(f.settled,u),r.exposeCaseReducer(t,{fulfilled:i||ki,pending:l||ki,rejected:c||ki,settled:u||ki})}function ki(){}var gj=(e,t)=>{if(typeof e!="function")throw new Error(mt(32))},Tf="listenerMiddleware",vj=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=Nn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(mt(21));return gj(s),{predicate:o,type:t,effect:s}},yj=Object.assign(e=>{const{type:t,predicate:n,effect:r}=vj(e);return{id:ex(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(mt(22))}}},{withTypes:()=>yj}),xj=Object.assign(Nn(`${Tf}/add`),{withTypes:()=>xj});Nn(`${Tf}/removeAll`);var bj=Object.assign(Nn(`${Tf}/remove`),{withTypes:()=>bj});function mt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var tx={exports:{}},nx={};/**
41
41
  * @license React
42
42
  * use-sync-external-store-with-selector.production.min.js
43
43
  *
@@ -45,26 +45,26 @@ Error generating stack: `+s.message+`
45
45
  *
46
46
  * This source code is licensed under the MIT license found in the
47
47
  * LICENSE file in the root directory of this source tree.
48
- */var oi=w;function _j(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jj=typeof Object.is=="function"?Object.is:_j,Cj=oi.useSyncExternalStore,Ej=oi.useRef,Rj=oi.useEffect,Nj=oi.useMemo,kj=oi.useDebugValue;rx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=Ej(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=Nj(function(){function c(y){if(!u){if(u=!0,d=y,y=r(y),o!==void 0&&i.hasValue){var m=i.value;if(o(m,y))return f=m}return f=y}if(m=f,jj(d,y))return m;var h=r(y);return o!==void 0&&o(m,h)?m:(d=y,f=h)}var u=!1,d,f,p=n===void 0?null:n;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,n,r,o]);var l=Cj(e,s[0],s[1]);return Rj(function(){i.hasValue=!0,i.value=l},[l]),kj(l),l};nx.exports=rx;var Tj=nx.exports,oe="default"in ma?_e:ma,Yh=Symbol.for("react-redux-context"),Qh=typeof globalThis<"u"?globalThis:{};function Oj(){if(!oe.createContext)return{};const e=Qh[Yh]??(Qh[Yh]=new Map);let t=e.get(oe.createContext);return t||(t=oe.createContext(null),e.set(oe.createContext,t)),t}var An=Oj(),ox=()=>{throw new Error("uSES not initialized!")};function Pf(e=An){return function(){return oe.useContext(e)}}var sx=Pf(),ix=ox,Pj=e=>{ix=e},$j=(e,t)=>e===t;function Ij(e=An){const t=e===An?sx:Pf(e),n=(r,o={})=>{const{equalityFn:s=$j,devModeChecks:i={}}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:c,getServerState:u,stabilityCheck:d,identityFunctionCheck:f}=t();oe.useRef(!0);const p=oe.useCallback({[r.name](m){return r(m)}}[r.name],[r,d,i.stabilityCheck]),y=ix(c.addNestedSub,l.getState,u||l.getState,p,s);return oe.useDebugValue(y),y};return Object.assign(n,{withTypes:()=>n}),n}var fe=Ij(),Aj=Symbol.for("react.element"),Mj=Symbol.for("react.portal"),Dj=Symbol.for("react.fragment"),Fj=Symbol.for("react.strict_mode"),Lj=Symbol.for("react.profiler"),Uj=Symbol.for("react.provider"),Vj=Symbol.for("react.context"),Bj=Symbol.for("react.server_context"),ax=Symbol.for("react.forward_ref"),zj=Symbol.for("react.suspense"),qj=Symbol.for("react.suspense_list"),$f=Symbol.for("react.memo"),Hj=Symbol.for("react.lazy"),Wj=ax,Kj=$f;function Gj(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case Aj:{const n=e.type;switch(n){case Dj:case Lj:case Fj:case zj:case qj:return n;default:{const r=n&&n.$$typeof;switch(r){case Bj:case Vj:case ax:case Hj:case $f:case Uj:return r;default:return t}}}}case Mj:return t}}}function Yj(e){return Gj(e)===$f}function Qj(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let l=!1,c,u,d,f,p;function y(g,b){return c=g,u=b,d=e(c,u),f=t(r,u),p=n(d,f,u),l=!0,p}function m(){return d=e(c,u),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function h(){return e.dependsOnOwnProps&&(d=e(c,u)),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function x(){const g=e(c,u),b=!i(g,d);return d=g,b&&(p=n(d,f,u)),p}function v(g,b){const S=!s(b,u),_=!o(g,c,b,u);return c=g,u=b,S&&_?m():S?h():_?x():p}return function(b,S){return l?v(b,S):y(b,S)}}function Xj(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const s=t(e,o),i=n(e,o),l=r(e,o);return Qj(s,i,l,e,o)}function Zj(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...s)=>t(o(...s)))}return n}function Qu(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Xh(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function lx(e,t){return function(r,{displayName:o}){const s=function(l,c){return s.dependsOnOwnProps?s.mapToProps(l,c):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,c){s.mapToProps=e,s.dependsOnOwnProps=Xh(e);let u=s(l,c);return typeof u=="function"&&(s.mapToProps=u,s.dependsOnOwnProps=Xh(u),u=s(l,c)),u},s}}function If(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Jj(e){return e&&typeof e=="object"?Qu(t=>Zj(e,t)):e?typeof e=="function"?lx(e):If(e,"mapDispatchToProps"):Qu(t=>({dispatch:t}))}function eC(e){return e?typeof e=="function"?lx(e):If(e,"mapStateToProps"):Qu(()=>({}))}function tC(e,t,n){return{...n,...e,...t}}function nC(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let s=!1,i;return function(c,u,d){const f=e(c,u,d);return s?o(f,i)||(i=f):(s=!0,i=f),i}}}function rC(e){return e?typeof e=="function"?nC(e):If(e,"mergeProps"):()=>tC}function oC(e){e()}function sC(){let e=null,t=null;return{clear(){e=null,t=null},notify(){oC(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Zh={notify(){},get:()=>[]};function cx(e,t){let n,r=Zh,o=0,s=!1;function i(h){d();const x=r.subscribe(h);let v=!1;return()=>{v||(v=!0,x(),f())}}function l(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function u(){return s}function d(){o++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=sC())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Zh)}function p(){s||(s=!0,d())}function y(){s&&(s=!1,f())}const m={addNestedSub:i,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:y,getListeners:()=>r};return m}var iC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qa=iC?oe.useLayoutEffect:oe.useEffect;function Jh(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Pc(e,t){if(Jh(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Jh(e[n[o]],t[n[o]]))return!1;return!0}var aC={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},lC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},cC={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ux={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},uC={[Wj]:cC,[Kj]:ux};function em(e){return Yj(e)?ux:uC[e.$$typeof]||aC}var dC=Object.defineProperty,fC=Object.getOwnPropertyNames,tm=Object.getOwnPropertySymbols,pC=Object.getOwnPropertyDescriptor,hC=Object.getPrototypeOf,nm=Object.prototype;function Xu(e,t){if(typeof t!="string"){if(nm){const s=hC(t);s&&s!==nm&&Xu(e,s)}let n=fC(t);tm&&(n=n.concat(tm(t)));const r=em(e),o=em(t);for(let s=0;s<n.length;++s){const i=n[s];if(!lC[i]&&!(o&&o[i])&&!(r&&r[i])){const l=pC(t,i);try{dC(e,i,l)}catch{}}}}return e}var dx=ox,mC=e=>{dx=e},gC=[null,null];function vC(e,t,n){qa(()=>e(...t),n)}function yC(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function xC(e,t,n,r,o,s,i,l,c,u,d){if(!e)return()=>{};let f=!1,p=null;const y=()=>{if(f||!l.current)return;const h=t.getState();let x,v;try{x=r(h,o.current)}catch(g){v=g,p=g}v||(p=null),x===s.current?i.current||u():(s.current=x,c.current=x,i.current=!0,d())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function bC(e,t){return e===t}function wC(e,t,n,{pure:r,areStatesEqual:o=bC,areOwnPropsEqual:s=Pc,areStatePropsEqual:i=Pc,areMergedPropsEqual:l=Pc,forwardRef:c=!1,context:u=An}={}){const d=u,f=eC(e),p=Jj(t),y=rC(n),m=!!e;return x=>{const v=x.displayName||x.name||"Component",g=`Connect(${v})`,b={shouldHandleStateChanges:m,displayName:g,wrappedComponentName:v,WrappedComponent:x,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:y,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:l};function S(C){const[E,N,R]=oe.useMemo(()=>{const{reactReduxForwardedRef:ee,...Oe}=C;return[C.context,ee,Oe]},[C]),T=oe.useMemo(()=>{let ee=d;return E!=null&&E.Consumer,ee},[E,d]),k=oe.useContext(T),P=!!C.store&&!!C.store.getState&&!!C.store.dispatch,D=!!k&&!!k.store,F=P?C.store:k.store,V=D?k.getServerState:F.getState,Q=oe.useMemo(()=>Xj(F.dispatch,b),[F]),[O,L]=oe.useMemo(()=>{if(!m)return gC;const ee=cx(F,P?void 0:k.subscription),Oe=ee.notifyNestedSubs.bind(ee);return[ee,Oe]},[F,P,k]),A=oe.useMemo(()=>P?k:{...k,subscription:O},[P,k,O]),W=oe.useRef(),U=oe.useRef(R),Y=oe.useRef(),Z=oe.useRef(!1);oe.useRef(!1);const J=oe.useRef(!1),X=oe.useRef();qa(()=>(J.current=!0,()=>{J.current=!1}),[]);const se=oe.useMemo(()=>()=>Y.current&&R===U.current?Y.current:Q(F.getState(),R),[F,R]),pe=oe.useMemo(()=>Oe=>O?xC(m,F,O,Q,U,W,Z,J,Y,L,Oe):()=>{},[O]);vC(yC,[U,W,Z,R,Y,L]);let M;try{M=dx(pe,se,V?()=>Q(V(),R):se)}catch(ee){throw X.current&&(ee.message+=`
48
+ */var oi=w;function wj(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sj=typeof Object.is=="function"?Object.is:wj,_j=oi.useSyncExternalStore,jj=oi.useRef,Cj=oi.useEffect,Ej=oi.useMemo,Rj=oi.useDebugValue;nx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=jj(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=Ej(function(){function c(y){if(!u){if(u=!0,d=y,y=r(y),o!==void 0&&i.hasValue){var m=i.value;if(o(m,y))return f=m}return f=y}if(m=f,Sj(d,y))return m;var h=r(y);return o!==void 0&&o(m,h)?m:(d=y,f=h)}var u=!1,d,f,p=n===void 0?null:n;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,n,r,o]);var l=_j(e,s[0],s[1]);return Cj(function(){i.hasValue=!0,i.value=l},[l]),Rj(l),l};tx.exports=nx;var Nj=tx.exports,ae="default"in ma?je:ma,Gh=Symbol.for("react-redux-context"),Yh=typeof globalThis<"u"?globalThis:{};function kj(){if(!ae.createContext)return{};const e=Yh[Gh]??(Yh[Gh]=new Map);let t=e.get(ae.createContext);return t||(t=ae.createContext(null),e.set(ae.createContext,t)),t}var Mn=kj(),rx=()=>{throw new Error("uSES not initialized!")};function Of(e=Mn){return function(){return ae.useContext(e)}}var ox=Of(),sx=rx,Tj=e=>{sx=e},Oj=(e,t)=>e===t;function Pj(e=Mn){const t=e===Mn?ox:Of(e),n=(r,o={})=>{const{equalityFn:s=Oj,devModeChecks:i={}}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:c,getServerState:u,stabilityCheck:d,identityFunctionCheck:f}=t();ae.useRef(!0);const p=ae.useCallback({[r.name](m){return r(m)}}[r.name],[r,d,i.stabilityCheck]),y=sx(c.addNestedSub,l.getState,u||l.getState,p,s);return ae.useDebugValue(y),y};return Object.assign(n,{withTypes:()=>n}),n}var pe=Pj(),Ij=Symbol.for("react.element"),$j=Symbol.for("react.portal"),Aj=Symbol.for("react.fragment"),Mj=Symbol.for("react.strict_mode"),Dj=Symbol.for("react.profiler"),Fj=Symbol.for("react.provider"),Lj=Symbol.for("react.context"),Uj=Symbol.for("react.server_context"),ix=Symbol.for("react.forward_ref"),Vj=Symbol.for("react.suspense"),Bj=Symbol.for("react.suspense_list"),Pf=Symbol.for("react.memo"),zj=Symbol.for("react.lazy"),qj=ix,Hj=Pf;function Wj(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case Ij:{const n=e.type;switch(n){case Aj:case Dj:case Mj:case Vj:case Bj:return n;default:{const r=n&&n.$$typeof;switch(r){case Uj:case Lj:case ix:case zj:case Pf:case Fj:return r;default:return t}}}}case $j:return t}}}function Kj(e){return Wj(e)===Pf}function Gj(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let l=!1,c,u,d,f,p;function y(g,b){return c=g,u=b,d=e(c,u),f=t(r,u),p=n(d,f,u),l=!0,p}function m(){return d=e(c,u),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function h(){return e.dependsOnOwnProps&&(d=e(c,u)),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function x(){const g=e(c,u),b=!i(g,d);return d=g,b&&(p=n(d,f,u)),p}function v(g,b){const S=!s(b,u),_=!o(g,c,b,u);return c=g,u=b,S&&_?m():S?h():_?x():p}return function(b,S){return l?v(b,S):y(b,S)}}function Yj(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const s=t(e,o),i=n(e,o),l=r(e,o);return Gj(s,i,l,e,o)}function Qj(e,t){const n={};for(const r in e){const o=e[r];typeof o=="function"&&(n[r]=(...s)=>t(o(...s)))}return n}function Yu(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function Qh(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function ax(e,t){return function(r,{displayName:o}){const s=function(l,c){return s.dependsOnOwnProps?s.mapToProps(l,c):s.mapToProps(l,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(l,c){s.mapToProps=e,s.dependsOnOwnProps=Qh(e);let u=s(l,c);return typeof u=="function"&&(s.mapToProps=u,s.dependsOnOwnProps=Qh(u),u=s(l,c)),u},s}}function If(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Xj(e){return e&&typeof e=="object"?Yu(t=>Qj(e,t)):e?typeof e=="function"?ax(e):If(e,"mapDispatchToProps"):Yu(t=>({dispatch:t}))}function Zj(e){return e?typeof e=="function"?ax(e):If(e,"mapStateToProps"):Yu(()=>({}))}function Jj(e,t,n){return{...n,...e,...t}}function eC(e){return function(n,{displayName:r,areMergedPropsEqual:o}){let s=!1,i;return function(c,u,d){const f=e(c,u,d);return s?o(f,i)||(i=f):(s=!0,i=f),i}}}function tC(e){return e?typeof e=="function"?eC(e):If(e,"mergeProps"):()=>Jj}function nC(e){e()}function rC(){let e=null,t=null;return{clear(){e=null,t=null},notify(){nC(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!r||e===null||(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Xh={notify(){},get:()=>[]};function lx(e,t){let n,r=Xh,o=0,s=!1;function i(h){d();const x=r.subscribe(h);let v=!1;return()=>{v||(v=!0,x(),f())}}function l(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function u(){return s}function d(){o++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=rC())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=Xh)}function p(){s||(s=!0,d())}function y(){s&&(s=!1,f())}const m={addNestedSub:i,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:y,getListeners:()=>r};return m}var oC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qa=oC?ae.useLayoutEffect:ae.useEffect;function Zh(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Oc(e,t){if(Zh(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!Zh(e[n[o]],t[n[o]]))return!1;return!0}var sC={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},iC={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},aC={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},lC={[qj]:aC,[Hj]:cx};function Jh(e){return Kj(e)?cx:lC[e.$$typeof]||sC}var cC=Object.defineProperty,uC=Object.getOwnPropertyNames,em=Object.getOwnPropertySymbols,dC=Object.getOwnPropertyDescriptor,fC=Object.getPrototypeOf,tm=Object.prototype;function Qu(e,t){if(typeof t!="string"){if(tm){const s=fC(t);s&&s!==tm&&Qu(e,s)}let n=uC(t);em&&(n=n.concat(em(t)));const r=Jh(e),o=Jh(t);for(let s=0;s<n.length;++s){const i=n[s];if(!iC[i]&&!(o&&o[i])&&!(r&&r[i])){const l=dC(t,i);try{cC(e,i,l)}catch{}}}}return e}var ux=rx,pC=e=>{ux=e},hC=[null,null];function mC(e,t,n){qa(()=>e(...t),n)}function gC(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function vC(e,t,n,r,o,s,i,l,c,u,d){if(!e)return()=>{};let f=!1,p=null;const y=()=>{if(f||!l.current)return;const h=t.getState();let x,v;try{x=r(h,o.current)}catch(g){v=g,p=g}v||(p=null),x===s.current?i.current||u():(s.current=x,c.current=x,i.current=!0,d())};return n.onStateChange=y,n.trySubscribe(),y(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function yC(e,t){return e===t}function xC(e,t,n,{pure:r,areStatesEqual:o=yC,areOwnPropsEqual:s=Oc,areStatePropsEqual:i=Oc,areMergedPropsEqual:l=Oc,forwardRef:c=!1,context:u=Mn}={}){const d=u,f=Zj(e),p=Xj(t),y=tC(n),m=!!e;return x=>{const v=x.displayName||x.name||"Component",g=`Connect(${v})`,b={shouldHandleStateChanges:m,displayName:g,wrappedComponentName:v,WrappedComponent:x,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:y,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:l};function S(C){const[E,N,R]=ae.useMemo(()=>{const{reactReduxForwardedRef:L,...te}=C;return[C.context,L,te]},[C]),T=ae.useMemo(()=>{let L=d;return E!=null&&E.Consumer,L},[E,d]),k=ae.useContext(T),P=!!C.store&&!!C.store.getState&&!!C.store.dispatch,M=!!k&&!!k.store,D=P?C.store:k.store,V=M?k.getServerState:D.getState,Q=ae.useMemo(()=>Yj(D.dispatch,b),[D]),[O,U]=ae.useMemo(()=>{if(!m)return hC;const L=lx(D,P?void 0:k.subscription),te=L.notifyNestedSubs.bind(L);return[L,te]},[D,P,k]),A=ae.useMemo(()=>P?k:{...k,subscription:O},[P,k,O]),H=ae.useRef(),B=ae.useRef(R),W=ae.useRef(),Z=ae.useRef(!1);ae.useRef(!1);const ee=ae.useRef(!1),X=ae.useRef();qa(()=>(ee.current=!0,()=>{ee.current=!1}),[]);const ie=ae.useMemo(()=>()=>W.current&&R===B.current?W.current:Q(D.getState(),R),[D,R]),ge=ae.useMemo(()=>te=>O?vC(m,D,O,Q,B,H,Z,ee,W,U,te):()=>{},[O]);mC(gC,[B,H,Z,R,W,U]);let Se;try{Se=ux(ge,ie,V?()=>Q(V(),R):ie)}catch(L){throw X.current&&(L.message+=`
49
49
  The error may be correlated with this previous error:
50
50
  ${X.current.stack}
51
51
 
52
- `),ee}qa(()=>{X.current=void 0,Y.current=void 0,W.current=M});const z=oe.useMemo(()=>oe.createElement(x,{...M,ref:N}),[N,x,M]);return oe.useMemo(()=>m?oe.createElement(T.Provider,{value:A},z):z,[T,z,A])}const j=oe.memo(S);if(j.WrappedComponent=x,j.displayName=S.displayName=g,c){const E=oe.forwardRef(function(R,T){return oe.createElement(j,{...R,reactReduxForwardedRef:T})});return E.displayName=g,E.WrappedComponent=x,Xu(E,x)}return Xu(j,x)}}var Jt=wC;function SC({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=oe.useMemo(()=>{const u=cx(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),l=oe.useMemo(()=>e.getState(),[e]);qa(()=>{const{subscription:u}=i;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),l!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[i,l]);const c=t||An;return oe.createElement(c.Provider,{value:i},n)}var Vr=SC;function fx(e=An){const t=e===An?sx:Pf(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var _C=fx();function jC(e=An){const t=e===An?_C:fx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var it=jC();Pj(Tj.useSyncExternalStoreWithSelector);mC(w.useSyncExternalStore);const nn="https://allocations.access-ci.org",te={creditAlertThreshold:1e3,resourceTypeIcons:{credit:"cash-coin",compute:"cpu-fill",storage:"hdd-fill",program:"person-square"},routes:{edit_request_action_path:(e,t)=>`/requests/${e}/actions/${t}/edit`,edit_request_path:e=>`/requests/${e}/edit`,how_to_path:()=>"/how-to",get_your_first_project_path:()=>`${nn}/get-your-first-project`,profile_path:()=>`${nn}/profile`,project_types_path:()=>`${nn}/project-types`,projects_path:()=>`${nn}/projects`,projects_save_users_path:()=>"/projects/save_users",renew_request_path:e=>`${nn}/requests/${e}/renew`,request_action_path:(e,t)=>`${nn}/requests/${e}/actions/${t}`,request_actions_path:e=>`${nn}/requests/${e}/actions`,request_path:e=>`${nn}/requests/${e}`,resources_path:()=>`${nn}/resources`,search_people_path:()=>`${nn}/search/people`,usage_detail_path:(e,t)=>`/usage/${e}/${t}`},roleIcons:{PI:"person-fill-check","Co-PI":"person-fill-add","Allocation Manager":"person-fill-gear",User:"people-fill"}},ho=(e,t,n="round")=>{const r=Math.pow(10,t||0);return Math[n](e*r)/r},CC=e=>new Date(`${e}T00:00:00`),EC={year:"numeric",month:"short",day:"numeric"},jr=(e,t)=>CC(e).toLocaleString("en-us",t||EC),Ke=(e,{abbreviate:t=!1,decimalPlaces:n=void 0}={})=>{if(t){let r=0;for(;Math.abs(e)/Math.pow(1e3,r)>=1e3;)r+=1;const o=["","K","M","B","T","Q"][r];return`${(e/Math.pow(1e3,r)).toLocaleString("en-US",{maximumSignificantDigits:3})}${o}`}return e.toLocaleString("en-US",{maximumFractionDigits:n,minimumFractionDigits:n})},Af=(e,t)=>{if(e.startDate&&e.endDate){const o=jr(e.startDate,t),s=jr(e.endDate,t);return`${e.allocationType}: ${o} to ${s}`}const n=jr(e.entryDate,t),r=e.status=="Incomplete"?"Started":"Submitted";return`${e.allocationType}: ${r} ${n}`},cr=e=>a.jsx("i",{className:`bi bi-${e}`}),Pl=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},rm=e=>{const t=Pl(e.name);return t.short||t.full},Ha=(e,t)=>e.isCredit>t.isCredit||e.isActive>t.isActive||rm(e)<rm(t)?-1:1,om=(...e)=>{for(let t of e)if(t!=null)return t;return null},px=(e,t="and",n=", ")=>e.reduce((r,o,s)=>a.jsxs(a.Fragment,{children:[r,e.length-1>s?n:` ${t} `,o]})),Mf=e=>e?a.jsxs(a.Fragment,{children:[cr("check-circle")," Yes"]}):a.jsxs(a.Fragment,{children:[cr("x-circle")," No"]}),Df=e=>px(e.users.filter(({role:t})=>["pi","co_pi","allocation_manager"].includes(t)).map(t=>`${t.firstName} ${t.lastName}`),"or"),Wa=(e,t)=>t==1&&e.endsWith("s")?e.slice(0,-1):e,hx=(e,t,n)=>`1 ${Wa(e,1)} = ${Ke(t)} ${Wa(n,t)}`,mx=e=>{let t=0,n=0;for(let r of e.resources){if(r.isBoolean)continue;let{unitCost:o}=r.exchangeRates.base;t+=r.allocated*o,n+=Math.min(r.used,r.allocated)*o}return t>0?n/t:0},$l=[{role:"pi",name:"PI",xrasRole:"PI"},{role:"co_pi",name:"Co-PI",xrasRole:"CoPI"},{role:"allocation_manager",name:"Allocation Manager",xrasRole:"Allocation Manager"},{role:"user",name:"User",xrasRole:"User"}],gx={};for(let e of $l)gx[e.role]=e;const Zu={};for(let{role:e,xrasRole:t}of $l)Zu[e]=t;const Ju=["info","success","secondary","warning","danger"];function ed(e,t="total"){const n=e.exchangeRates[e.requested<=e.allocated?"base":"current"].unitCost;let r=(e.requested-e.allocated)*n;return t!="total"?r:r+e.allocated*e.exchangeRates.base.unitCost}function Ff(e){e&&(te.routes={...te.routes,...e})}const td={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},$c={};function vx(e,t=3){let n=0;for(;e/Math.pow(1e3,n)>1e3;)n+=1;const r=e.toString().length,o=Math.pow(10,r-t);return(Math.round(e/o)*o/Math.pow(1e3,n)).toString()+["","K","M","B","T"][n]}async function RC(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function NC(e){if($c[e])return $c[e];const t=document.location,n=`${t.protocol}//${t.host}${t.pathname}`,o=await(await fetch(`${n}/${e}`)).json();return $c[e]=o,o}function kC(e){const t=[...e.creditLines.features.map(r=>r.properties.credits)],n=[...e.rpPoints.features.map(r=>r.properties.rpCredits),...e.userPoints.features.map(r=>r.properties.userCredits)];return{lines:im(t),points:im(n)}}function sm({activeOrg:e,basemapStyle:t,creditLevels:n,creditType:r,geoJSON:o,organizationType:s}){const i={},l=[];if(o&&n){const u=s==="user"?"rp":"user",d=o[`${s}Points`],f=o[`${u}Points`],p=`${s}Credits`,y=`${u}Credits`;i.organizations={type:"geojson",data:d};const m={user:[],rp:[]},h=[];n.points.forEach((v,g)=>{Object.keys(td).forEach(b=>{m[b].push(v[1],td[b].colors[g])}),h.push(v[1],5*(g+1))});const x=[];if(n.lines.forEach((v,g)=>{x.push(v[1],1*(g+1))}),l.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",p],...h],"circle-color":["interpolate",["linear"],["get",p],...m[s]],"circle-opacity":e?["match",["id"],e.id,1,.3]:1,"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),e&&r!=="allocated"){i.opp={type:"geojson",data:f};const v=["get",e.id.toString(),["get",`${y}Map`]];l.push({id:"opp",type:"circle",source:"opp",filter:["has",e.id.toString(),["get",`${y}Map`]],paint:{"circle-radius":["interpolate",["linear"],v,...h],"circle-color":["interpolate",["linear"],v,...m[u]],"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),i.credits={type:"geojson",data:o.creditLines},l.push({id:"credits",type:"line",source:"credits",filter:["==",["get",`${s}_organization_id`],e.id],paint:{"line-color":"#444444","line-opacity":.4,"line-width":["interpolate",["linear"],["get","credits"],...x]}})}}const c=t||{version:8,sources:{},layers:[]};return{...c,sources:{...c.sources,...i},layers:[...c.layers.filter(u=>u.id!=="Marine waterbody/label/2x large"),...l]}}function TC(e,t,n,r,o=20){return[...Array(o+1).keys()].map(s=>s/o).map(s=>{let i=s*(n-e)+e,l=s*(r-t)+t+Math.abs(Math.sin(s*Math.PI)*(n-e)*.1);return[i,l]})}function OC(e,t,n){const r={};return e.features.forEach(s=>r[s.id]={type:s.type,geometry:s.geometry,id:s.id,properties:{name:s.properties.name,abbr:s.properties.abbr,userCredits:0,userCreditsMap:{},rpCredits:0,rpCreditsMap:{}}},{}),{creditLines:{type:"FeatureCollection",features:t.result.filter(s=>r[s.user_organization_id]!==void 0&&(n==="allocated"||r[s.rp_organization_id]!==void 0)).map(s=>{const i=r[s.user_organization_id],l=r[s.rp_organization_id];if(i.properties.userCredits+=s.credits,l&&(l.properties.rpCredits+=s.credits),i.properties.userCreditsMap[s.rp_organization_id]=(i.properties.userCreditsMap[s.rp_organization_id]||0)+s.credits,l&&(l.properties.rpCreditsMap[s.user_organization_id]=(l.properties.rpCreditsMap[s.user_organization_id]||0)+s.credits),n!=="allocated")return{type:"Feature",geometry:{type:"LineString",coordinates:TC(...r[s.user_organization_id].geometry.coordinates,...r[s.rp_organization_id].geometry.coordinates)},properties:s}}).filter(s=>s!==void 0)},userPoints:{type:"FeatureCollection",features:Object.values(r).filter(s=>s.properties.userCredits>0).sort((s,i)=>s.properties.userCredits>i.properties.userCredits?-1:1)},rpPoints:{type:"FeatureCollection",features:Object.values(r).filter(s=>s.properties.rpCredits>0).sort((s,i)=>s.properties.rpCredits>i.properties.rpCredits?-1:1)}}}function im(e,t=[0,.3,.6,.9]){return t.map((n,r)=>{const o=PC(e,n),s=r===t.length-1?"+":"";return[`${vx(Math.round(o))}${s}`,o]})}function PC(e,t){e.sort((s,i)=>s-i);const n=(e.length-1)*t,r=Math.floor(n),o=n-r;return e[r+1]!==void 0?e[r]+o*(e[r+1]-e[r]):e[r]}const $C="_fullscreen_1iid9_6",IC="_map_1iid9_14",Ti={"allocations-map":"_allocations-map_1iid9_1",fullscreen:$C,map:IC},AC="_group_11k83_1",MC="_button_11k83_6",DC="_icon_11k83_16",Ic={group:AC,button:MC,icon:DC};function am({choices:e,disabledValues:t=[],label:n,value:r,setValue:o}){const s=[];return e.forEach(([i,l])=>s.push(a.jsx("input",{type:"radio",className:"btn-check",name:i,id:i,autoComplete:"off",checked:r===i,onChange:()=>o(i),disabled:t.includes(i)},i),a.jsxs("label",{className:`btn btn-outline-primary ${Ic.button}`,htmlFor:i,disabled:t.includes(i),children:[r===i?a.jsx("i",{className:`bi bi-check ${Ic.icon}`}):null," ",l]},`${i}-label`))),a.jsx("div",{className:"mb-2",children:a.jsx("div",{className:`btn-group ${Ic.group}`,role:"group","aria-label":n,children:s})})}const FC="_controls_1be4t_1",LC={controls:FC};function UC({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:LC.controls,children:[a.jsx("h2",{children:"ACCESS Allocations"}),a.jsx(am,{choices:[["allocated","Allocations"],["exchanged","Exchanges"],["used","Usage"]],label:"Credit Type",value:e,setValue:n}),a.jsx(am,{choices:[["user","By Research Institution"],["rp","By Resource Provider"]],disabledValues:e==="allocated"?["rp"]:[],label:"Organization Type",value:t,setValue:r})]})}const VC="_legend_odgg9_1",BC="_symbols_odgg9_17",zC="_symbol_odgg9_17",ea={legend:VC,symbols:BC,symbol:zC};function qC(e,t){const n=2*e+2;return a.jsx("svg",{viewBox:`0 0 ${n} ${n}`,xmlns:"http://www.w3.org/2000/svg",stroke:"white",strokeWidth:"1",height:n,width:n,children:a.jsx("circle",{fill:t,cx:e+1,cy:e+1,r:e})})}function HC({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:ea.symbol,children:[qC(5*(s+1),td[n].colors[s]),a.jsx("br",{}),a.jsx("span",{className:"label",children:o[0]})]},o[0]));return a.jsxs("div",{className:ea.legend,children:[a.jsxs("h2",{className:"fs-6 mt-0 mb-0",children:["ACCESS Credits ",a.jsx("small",{children:"or credit equivalents"})]}),a.jsx("div",{className:ea.symbols,children:r})]})}const WC="_info_oxxoh_1",KC="_user_oxxoh_7",GC="_rp_oxxoh_10",YC="_credits_oxxoh_15",ta={info:WC,user:KC,rp:GC,credits:YC};function lm(e,t,n){e.sort((o,s)=>s[1]-o[1]);const r=e.slice(0,3).map(o=>o[0]);return e.length>3&&(r[2]=`${e.length-2} other ${n}s`),r.reduce((o,s,i,l)=>[o,a.jsx("span",{className:`name ${ta[t]}`,children:s},s),[""," and ",", "][l.length-i-1]],[])}function QC({activeOrg:e,creditType:t,organizationMap:n,organizationType:r}){if(!e||!n)return;const o=e.properties,s=o[`${r}Credits`],i=r==="rp"?"user":"rp",l=JSON.parse(o[`${r}CreditsMap`]),c={user:[],rp:[]};return c[r].push([o.name,s]),Object.keys(l).forEach(u=>c[i].push([n[u],l[u]])),a.jsx("div",{className:`${ea.legend} ${ta.info}`,children:a.jsxs("p",{className:ta[r],children:["Researchers at ",lm(c.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",a.jsxs("span",{className:ta.credits,children:[vx(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",lm(c.rp,"rp","resource provider")]}):"","."]})})}function XC(){const e=w.useRef(null),t=w.useRef(null),[n,r]=w.useState(null),[o,s]=w.useState(null),[i,l]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(null),[p,y]=w.useState(null),[m,h]=w.useState(null),[x,v]=w.useState("user"),[g,b]=w.useState("exchanged");return w.useEffect(()=>{(async()=>s(await RC()))()},[]),w.useEffect(()=>{(async S=>{const[_,j]=await Promise.all(["organizations",`credits_${S}`].map(NC));if(!m){const E={};_.features.forEach(N=>E[N.id.toString()]=N.properties.name),h(E)}const C=OC(_,j,g);f(C),S==="exchanged"&&!i&&l(kC(C))})(g)},[g]),w.useEffect(()=>{p&&p.setStyle(sm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:g,geoJSON:d,organizationType:x}))},[n,d,p,x]),w.useEffect(()=>{p&&(p.on("mousemove","organizations",S=>r(S.features.length?S.features[0]:null)),p.on("mouseleave","organizations",()=>r(null)))},[p]),w.useEffect(()=>{p&&p.resize()},[c]),w.useEffect(()=>{g==="allocated"&&v("user")},[g]),w.useLayoutEffect(()=>y(new maplibregl.Map({container:t.current,style:sm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:g,geoJSON:d,organizationType:x}),center:[-111.01,38.88],zoom:3.4,hash:!0})),[]),w.useLayoutEffect(()=>e.current.addEventListener("keydown",S=>{S.key==="Escape"&&u(!1)}),[]),a.jsxs("section",{className:`${Ti["allocations-map"]} ${c?Ti.fullscreen:"border border-3 border-primary"}`,ref:e,children:[a.jsx("div",{className:Ti.map,ref:t}),a.jsx(UC,{creditType:g,fullscreen:c,organizationType:x,setCreditType:b,setFullscreen:u,setOrganizationType:v}),a.jsx(HC,{activeOrg:n,creditLevels:i,organizationType:x}),a.jsx(QC,{activeOrg:n,creditType:g,organizationMap:m,organizationType:x}),a.jsx("button",{title:`${c?"Exit":"Enter"} Fullscreen`,className:Ti.fullscreen,onClick:()=>u(!c),children:a.jsx("i",{className:`bi ${c?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const ZC=async(e,t)=>{try{const n=await fetch(`${e}/resources`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({resources:t.map((o,s)=>({resource_id:o.resource_id,relative_order:s+1}))})});if(!n.ok){const o=await n.json();throw new Error(o.error||"Failed to update resource order")}const r=await n.json();console.log(r.message)}catch(n){console.error("Error updating resource order:",n)}},cm=e=>[...e].sort((t,n)=>t.relative_order===null&&n.relative_order===null?t.display_resource_name.localeCompare(n.display_resource_name):t.relative_order===null?1:n.relative_order===null?-1:t.relative_order-n.relative_order),um=(e,t)=>{t.current||(t.current=setInterval(()=>{window.scrollBy(0,e*10)},16))},Ac=e=>{e.current&&(clearInterval(e.current),e.current=null)},JC="_dragging_1vb1t_45",zt={"resources-container":"_resources-container_1vb1t_1","drag-instruction":"_drag-instruction_1vb1t_6","resources-list":"_resources-list_1vb1t_12","resources-header":"_resources-header_1vb1t_18","resources-item":"_resources-item_1vb1t_28",dragging:JC,"drag-handle":"_drag-handle_1vb1t_52","resource-name":"_resource-name_1vb1t_61","resource-repo":"_resource-repo_1vb1t_65","resource-link":"_resource-link_1vb1t_71"};var yx={exports:{}},eE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",tE=eE,nE=tE;function xx(){}function bx(){}bx.resetWarningCache=xx;var rE=function(){function e(r,o,s,i,l,c){if(c!==nE){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:bx,resetWarningCache:xx};return n.PropTypes=n,n};yx.exports=rE();var oE=yx.exports;const q=Xs(oE),sE=(e,t)=>{switch(t.type){case"SET_RESOURCE_DATA":return{...e,resourceData:t.payload,loading:!1};case"SET_LOADING":return{...e,loading:t.payload};case"SET_SUCCESS_MESSAGE":return{...e,successMessage:t.payload};case"SET_ERRORS":return{...e,errors:Array.isArray(t.payload)?t.payload:[t.payload],loading:!1};case"UPDATE_RESOURCE_FIELD":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,[t.field]:t.value}}};case"UPDATE_ALLOCATION":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,allocation_types:e.resourceData.resource_details.allocation_types.map(n=>n.allocation_type_id===t.payload.allocationTypeId?{...n,...t.payload.updates}:n)}}};case"UPDATE_BASE_RATE":return console.log("Reducer: Updating base rate to:",t.payload),{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,base_rate:t.payload}}}};case"UPDATE_EXCHANGE_RATE":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:e.resourceData.resource_details.exchange_rates.discount_rates.map(n=>n.id===t.payload.rateId?{...n,...t.payload.changes}:n)}}}};case"ADD_EXCHANGE_RATE":return console.log("Reducer: Adding new discount rate:",t.payload),{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:[...e.resourceData.resource_details.exchange_rates.discount_rates||[],t.payload]}}}};case"DELETE_EXCHANGE_RATE":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:e.resourceData.resource_details.exchange_rates.discount_rates.filter(n=>n.id!==t.payload)}}}};default:return e}},nd=e=>({type:"SET_RESOURCE_DATA",payload:e}),iE=e=>({type:"SET_LOADING",payload:e}),dm=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Zo=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),Mc=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),aE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),lE=async(e,t,n,r)=>(console.log("update resource",n),await fetch(`${t}/resources/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({resource:n,required_resources:r})})),cE=(e,t)=>{const[n,r]=w.useReducer(sE,{resourceData:null,loading:!0,errors:[],successMessage:{message:"",color:""}}),o=w.useCallback(async(i,l)=>{let c=[l];try{const u=await i.json();u.errors?c=u.errors:u.message&&(c=[u.message])}catch(u){console.error("Error parsing error response:",u)}r({type:"SET_ERRORS",payload:c})},[]),s=w.useCallback(async()=>{r(iE(!0));try{const i=await aE(e,t);r(nd(i))}catch(i){console.error("Failed to fetch resource data:",i),r({type:"SET_ERRORS",payload:"Failed to fetch resource data. Please try again later."})}},[e,t]);return w.useEffect(()=>{s()},[s]),{state:n,dispatch:r,handleError:o,fetchData:s}},Lf=e=>{var t,n,r;return{allowedActionsOptions:((t=e==null?void 0:e.resource_state_types_available)==null?void 0:t.map(o=>({value:o.resource_state_type_id,label:o.display_resource_state_type,additionalInfo:o.action_types.map(s=>s.display_action_type).join(", ")})))||[],resourceTypesOptions:((n=e==null?void 0:e.resource_types_available)==null?void 0:n.map(o=>({value:o.resource_type_id,label:o.display_resource_type})))||[],unitTypesOptions:((r=e==null?void 0:e.unit_types_available)==null?void 0:r.map(o=>({value:o.unit_type_id,label:o.display_unit_type})))||[],availableResources:(e==null?void 0:e.required_resources_available)||[],availableAllocationTypes:(e==null?void 0:e.unassigned_allocation_types)||[]}},uE=(e,t,n,r,o,s,i)=>{const c=(()=>{var p;if(!e)return[];const f=new Set;return(p=e.allocation_types)==null||p.forEach(y=>{var m;(m=y.required_resources)==null||m.forEach(h=>{f.add(h.resource_name)})}),Array.from(f).sort((y,m)=>y.localeCompare(m)).map(y=>({key:y,name:`Require ${y}`,width:150,type:"checkbox"}))})();return{allocationColumns:[{key:"display_name",name:"Allocation Type",width:200},{key:"allowed_actions",name:"Allowed Actions",width:200,type:"select"},{key:"comment",name:"Descriptive Text",width:200,type:"input",tooltip:"Appears below the resource name and allocations description in the form when making a new request"},...c],allocationRows:e!=null&&e.allocation_types?e.allocation_types.map(f=>{var p;return{display_name:f.display_name,allocation_type_id:f.allocation_type_id,allowed_actions:{options:r,value:((p=f.allowed_action)==null?void 0:p.resource_state_type_id)||"",onChange:y=>o(f.allocation_type_id,y)},comment:{value:f.comment||"",onChange:y=>s(f.allocation_type_id,y)},...Object.fromEntries(c.map(y=>{var m;return[y.key,{checked:((m=f.required_resources)==null?void 0:m.some(h=>h.resource_name===y.key))||!1,onChange:h=>i(f.allocation_type_id,y.key,h,f)}]}))}}):[],requiredResourcesColumns:c}},dE=(e,t,n)=>{const{availableResources:r,availableAllocationTypes:o,allowedActionsOptions:s}=Lf(e),[i,l]=w.useState(!1),[c,u]=w.useState(!1),[d,f]=w.useState([]),[p,y]=w.useState(""),m=w.useCallback((_,j)=>{n(Mc(_,{allowed_action:{resource_state_type_id:j}}))},[n]),h=w.useCallback((_,j)=>{n(Mc(_,{comment:j}))},[n]),x=w.useCallback((_,j,C,E)=>{const N=C?[...E.required_resources||[],{resource_name:j,required_resource_id:e.required_resources_available.find(R=>R.resource_name===j).resource_id}]:(E.required_resources||[]).filter(R=>R.resource_name!==j);n(Mc(_,{required_resources:N}))},[e,n]);w.useEffect(()=>{if(i&&t){const _=t.allocation_types.flatMap(j=>j.required_resources||[]).map(j=>j.required_resource_id);f(_)}},[i,t]);const v=w.useCallback((_,j)=>{f(C=>j?[...C,_]:C.filter(E=>E!==_))},[]),g=w.useCallback(()=>{const _=t.allocation_types.flatMap(N=>N.required_resources||[]).map(N=>N.required_resource_id),j=d.filter(N=>!_.includes(N)),C=_.filter(N=>!d.includes(N)),E=t.allocation_types.map(N=>{const R=N.required_resources||[],T=j.map(P=>{const D=r.find(F=>F.resource_id===P);return{resource_name:D.resource_name,required_resource_id:D.resource_id}}),k=R.filter(P=>!C.includes(P.required_resource_id)).concat(T.filter(P=>!R.some(D=>D.required_resource_id===P.required_resource_id)));return{...N,required_resources:k}});n(nd({...e,resource_details:{...t,allocation_types:E}})),f([]),l(!1)},[d,r,t,e,n]),b=w.useCallback(_=>{const j=_.target.value;y(j)},[]),S=w.useCallback(()=>{var C,E;if(!p)return;const _=o.find(N=>N.allocation_type_id.toString()===p),j=(C=t.allocation_types)==null?void 0:C.some(N=>N.allocation_type_id===_.allocation_type_id);if(_&&!j){const N=(E=s[0])==null?void 0:E.value,R=[...t.allocation_types||[],{allocation_type_id:_.allocation_type_id,display_name:_.display_name,allowed_action:{resource_state_type_id:N},comment:"",required_resources:[]}];n(nd({...e,resource_details:{...t,allocation_types:R}})),u(!1)}},[p,o,t,e,n,s]);return{showAddResourceModal:i,setShowAddResourceModal:l,showAddAllocationTypeModal:c,setShowAddAllocationTypeModal:u,selectedNewResource:d,handleSelectNewResource:v,handleSaveResources:g,selectedNewAllocationType:p,handleSelectNewAllocationType:b,handleSaveAllocationType:S,handleAllowedActionChange:m,handleCommentChange:h,handleRequiredResourceChange:x}},fE=(e,t,n,r,o,s)=>w.useCallback(async()=>{var c,u,d;if(!e)return;const i={resource_name:e.resource_name,description:e.description,resource_type_id:e.resource_type_id,unit_type_id:e.unit_type_id,dollar_value:e.dollar_value,allocation_types:e.allocation_types.map(f=>{var p;return{allocation_type_id:f.allocation_type_id,allowed_action:{resource_state_type_id:(p=f.allowed_action)==null?void 0:p.resource_state_type_id},comment:f.comment||""}}),exchange_rates:{base_rate:(c=e.exchange_rates)==null?void 0:c.base_rate,discount_rates:(d=(u=e.exchange_rates)==null?void 0:u.discount_rates)==null?void 0:d.map(f=>({id:f.id,exchange_rate:f.exchange_rate,begin_date:f.begin_date,end_date:f.end_date}))}},l={};e.allocation_types.forEach(f=>{f.required_resources.forEach(p=>{l[p.required_resource_id]||(l[p.required_resource_id]=[]),l[p.required_resource_id].push(f.allocation_type_id)})});try{const f=await lE(t,n,i,l);if(f.ok){const p=await f.json();return s(dm(p.message||"Resource updated successfully!","success")),await r(),!0}else return await o(f,"Failed to update resource"),!1}catch{return s(dm("Error updating resource. Please try again later.","danger")),!1}},[e,t,n,r,o]),pE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},hE={"form-wrapper":"_form-wrapper_mu0yh_1"},Ka=({show:e,onClose:t,title:n,children:r,onSave:o,buttonText:s,cancelText:i="Cancel",canSave:l=!0})=>e?a.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",display:"flex",alignItems:"center",zIndex:1050},children:a.jsx("div",{className:"modal fade in",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{width:"90%",maxWidth:"600px",maxHeight:"90%",overflow:"auto",backgroundColor:"white",position:"relative"},children:a.jsx("div",{className:"modal-dialog",role:"document",children:a.jsxs("div",{className:"modal-content",children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("button",{type:"button",className:"close","data-dismiss":"modal",onClick:t,"aria-label":"Close",children:a.jsx("h3",{"aria-hidden":"true",className:"text-danger",children:"×"})}),a.jsx("h3",{className:"modal-title",children:n})]}),a.jsx("div",{className:"modal-body",children:r}),a.jsxs("div",{className:"modal-footer",style:{padding:"15px",textAlign:"right",borderTop:"1px solid #e5e5e5",backgroundColor:"#f8f9fa"},children:[a.jsx("button",{className:"btn btn-danger",onClick:t,children:i}),a.jsx("button",{className:"btn btn-success",onClick:o,disabled:!l,children:s})]})]})})})}):null;Ka.propTypes={show:q.bool.isRequired,onClose:q.func.isRequired,title:q.string.isRequired,children:q.node.isRequired,onSave:q.func.isRequired,buttonText:q.string,cancelText:q.string,canSave:q.bool};const be=({children:e,color:t,dismissable:n=!1})=>a.jsxs("div",{className:`alert alert-${t} mt-3 alert-dismissible show`,role:"alert",children:[e,n&&a.jsx("button",{type:"button",className:"close","data-dismiss":"alert","aria-label":"Close",children:a.jsx("span",{"aria-hidden":"true",children:"×"})})]}),Co=({label:e,options:t,value:n,onChange:r,...o})=>a.jsxs("div",{className:"form-group",children:[e&&a.jsx("label",{children:e}),a.jsx("select",{className:"form-control",value:n,onChange:r,...o,children:t.map(s=>a.jsxs("option",{value:s.value,children:[s.label,s.additionalInfo&&` - ${s.additionalInfo}`]},s.value))})]});Co.propTypes={label:q.string,options:q.arrayOf(q.shape({value:q.oneOfType([q.string,q.number]).isRequired,label:q.string.isRequired,additionalInfo:q.string})).isRequired,value:q.oneOfType([q.string,q.number]),onChange:q.func.isRequired};function us({label:e,type:t="text",value:n,onChange:r,disabled:o=!1,infoText:s="",style:i,inputClassName:l,inputAddon:c}){return a.jsxs(a.Fragment,{children:[e&&a.jsx("label",{children:e}),s&&a.jsx("small",{className:"form-text help-block",children:s}),t==="textarea"?a.jsx("textarea",{className:`form-control ${l||""}`,value:n,onChange:r,disabled:o,rows:"6"}):c?a.jsxs("div",{className:"input-prepend",children:[a.jsx("span",{className:"add-on",children:c}),a.jsx("input",{type:t,className:`form-control ${l||""}`,style:i,value:n,onChange:r,disabled:o})]}):a.jsx("input",{type:t,className:`form-control ${l||""}`,style:i,value:n,onChange:r,disabled:o})]})}const mE="_blurred_16xcy_16",yn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:mE,"warning-banner":"_warning-banner_16xcy_21","alt-warning-banner":"_alt-warning-banner_16xcy_40 _warning-banner_16xcy_21"},Uf=({headerText:e,header:t,children:n,isEditing:r=!1,onEditingChange:o,warningMessage:s=""})=>{const i=e&&e.type==="label";return a.jsxs("div",{className:yn["advanced-settings"],children:[(e||t)&&a.jsxs("div",{className:yn["header-wrapper"],children:[e,t&&a.jsx("div",{className:`${yn["header-buttons-container"]} ${r?"":yn.blurred}`,children:t})]}),a.jsxs("div",{style:{width:"100%"},children:[!r&&a.jsxs("div",{className:i?`${yn["alt-warning-banner"]}`:yn["warning-banner"],children:[a.jsxs("span",{className:yn["warning-text"],children:[a.jsx("strong",{children:"CAUTION! "})," ",s]}),a.jsx("button",{className:"btn btn-danger",onClick:()=>o(!0),children:"I understand the risks"})]}),a.jsx("div",{className:`${yn["content-container"]} ${r?"":yn.blurred}`,children:n})]})]})};Uf.propTypes={headerText:q.node,header:q.node,children:q.node.isRequired,isEditing:q.bool,onEditingChange:q.func.isRequired,warningMessage:q.string};const Vf=_e.memo(function({resourceDetails:t,resourceTypesOptions:n,unitTypesOptions:r,dispatch:o,isDollarValueEditing:s,onDollarValueEditingChange:i,showDollarValue:l=!0,showResourceId:c=!0,useAdvancedSettings:u=!0}){const d="Dollar Value per SUs",f=l?a.jsx(us,{label:u?null:d,value:t.dollar_value,onChange:p=>o(Zo("dollar_value",p.target.value)),type:"number",inputAddon:"$",inputClassName:"span4"}):null;return a.jsxs(a.Fragment,{children:[a.jsx(us,{label:"Resource Name",value:t.resource_name,onChange:p=>o(Zo("resource_name",p.target.value)),inputClassName:"span8"}),c&&a.jsx(us,{label:"Resource Repository Key",value:t.resource_repository_key,disabled:!0,inputClassName:"span8"}),u&&l?a.jsx(Uf,{headerText:a.jsx("label",{children:d}),isEditing:s,onEditingChange:i,warningMessage:"Dollar value is for reporting and should only be modified if the SU rate changes.",children:f}):f,a.jsx(us,{label:"Allocations Description",type:"textarea",value:t.description,infoText:"Appears below the resource name in the form when making a new request, as well as under the header Allocations Description in resource catalogs",onChange:p=>o(Zo("description",p.target.value)),inputClassName:"span8"}),a.jsx(Co,{label:"Resource Type",options:n,value:t.resource_type_id,onChange:p=>o(Zo("resource_type_id",p.target.value)),className:"span8"}),a.jsx(Co,{label:"Unit Type",options:r,value:t.unit_type_id,onChange:p=>o(Zo("unit_type_id",p.target.value)),className:"span8"})]})});Vf.propTypes={resourceDetails:q.object.isRequired,resourceTypesOptions:q.array.isRequired,unitTypesOptions:q.array.isRequired,dispatch:q.func.isRequired,isDollarValueEditing:q.bool,onDollarValueEditingChange:q.func,showDollarValue:q.bool,showResourceId:q.bool,useAdvancedSettings:q.bool};function wx({onClose:e}){const[t,n]=w.useState(!0),[r,o]=w.useState([]),[s,i]=w.useState(null),[l,c]=w.useState(-1),[u,d]=w.useState(null),f=Lf(u);f.resourceTypesOptions.unshift({value:0,label:"Select a resource type..."}),f.unitTypesOptions.unshift({value:0,label:"Select a unit type..."}),w.useEffect(()=>{(async()=>{const g=await fetch("/resources/addable.json");n(!1),g.status==200?o(await g.json()):i("Error retrieving resource list.")})()},[]),w.useEffect(()=>{if(l===-1)return d(null);(async()=>{const g=await fetch(`/resources/addable/${l}.json`);g.status==200?d(await g.json()):i("Error retrieving resource details.")})()},[l]);let p=null;t?p=a.jsx("p",{children:"Loading…"}):s!==null?p=a.jsx(be,{color:"danger",children:s}):r.length==0&&(p=a.jsx(be,{children:"There are currently no resources available to add."}));const y=[{value:-1,label:"Select a resource..."}].concat(r.map(g=>({value:g.xras_cider_resource_id,label:g.resource_descriptive_name}))),m=u?u.resource_details:null,h=!s&&m&&m.resource_name.length>0&&m.resource_type_id>0&&m.unit_type_id>0,x=g=>{g.type=="UPDATE_RESOURCE_FIELD"&&d({...u,resource_details:{...u.resource_details,[g.field]:g.value}})},v=()=>{(async()=>{const g=await fetch("/resources",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({...m,resource_repository_key:l})});if(g.status==200){const b=await g.json();window.location=`/resources/${b.resource_id}`}else i("Error saving resource.")})()};return p===null&&(p=a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Select a Resource to Add"}),a.jsx(Co,{options:y,onChange:g=>c(parseInt(g.target.value))}),!u&&l!==-1?a.jsx("p",{children:"Loading…"}):null,u&&a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Resource Properties"}),a.jsx("p",{style:{fontStyle:"italic",fontWeight:"bold"},children:"Any modifications to these resource properties will be applied globally and impact resources on other all allocations process"}),a.jsx("div",{className:hE["form-wrapper"],children:a.jsx(Vf,{resourceDetails:m,resourceTypesOptions:f.resourceTypesOptions,unitTypesOptions:f.unitTypesOptions,showResourceId:!1,showDollarValue:!1,dispatch:x})})]})]})),a.jsx(Ka,{show:!0,onClose:e,title:"Add a Resource from CIDeR",onSave:v,buttonText:"Save",canSave:h,children:p})}wx.propTypes={onClose:q.func.isRequired};function gE({availableResources:e,unavailableResources:t=[],canAdd:n=!1,relativeUrlRoot:r}){const o=w.useMemo(()=>cm(e),[e]),s=w.useMemo(()=>cm(t),[t]),[i,l]=w.useState(o),[c,u]=w.useState(!1),d=w.useRef(null),f=w.useRef(null),p="Active",y="Inactive",[m,h]=w.useState(p),x=_=>{h(_),console.log(_),_==p?l(o):l(s)};function v(_,j){j.preventDefault(),h(_),x(_)}w.useEffect(()=>{l(o)},[o]);const g=(_,j)=>{d.current=j},b=(_,j)=>{if(_.preventDefault(),d.current===j)return;const C=[...i],E=C[d.current];C.splice(d.current,1),C.splice(j,0,E),d.current=j,l(C);const{clientY:N}=_,R=130;N<R?um(-1,f):window.innerHeight-N<R?um(1,f):Ac(f)},S=()=>{d.current=null,Ac(f),ZC(r,i)};return w.useEffect(()=>()=>Ac(f),[]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:zt["resources-container"],children:[n&&a.jsx("button",{className:"btn btn-primary pull-right",onClick:()=>u(!0),children:"Add a Resource from CIDeR"}),a.jsx("h2",{children:"Select a resource from the list to modify"}),a.jsx("p",{className:zt["drag-instruction"],children:"Drag items to reorder the list."}),a.jsxs("div",{className:"w-full max-w-md mx-auto p-4",children:[a.jsxs("ul",{className:"nav nav-tabs",children:[a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${m===p?"active":""}`,"data-toggle":m===p?"tab":void 0,style:{cursor:"default",...m===p?{border:"1px solid #ddd",borderBottomColor:"transparent",color:"#555",backgroundColor:"#fff"}:{}},onClick:_=>v(p,_),children:p})}),a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${m===y?"active":""}`,"data-toggle":m===y?"tab":void 0,style:{cursor:"default"},onClick:_=>v(y,_),children:y})})]}),a.jsxs("div",{className:zt["resources-list"],children:[a.jsxs("div",{className:zt["resources-header"],children:[a.jsx("span",{className:zt["header-name"],children:"Resource Name"}),a.jsx("span",{className:zt["header-repo"],children:"Repository Key"})]}),i.map((_,j)=>a.jsxs("div",{className:`${zt["resources-item"]}`,draggable:!0,onDragStart:C=>g(C,j),onDragOver:C=>b(C,j),onDrop:S,children:[a.jsx("span",{className:zt["drag-handle"]}),a.jsx("span",{className:zt["resource-name"],children:a.jsx("a",{href:`${r}/resources/${_.resource_id}`,className:zt["resource-link"],children:_.display_resource_name})}),a.jsx("span",{className:zt["resource-repo"],children:_.resource_repository_key||"N/A"})]},_.resource_id))]})]})]}),c&&a.jsx(wx,{onClose:()=>u(!1)})]})}function Do(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const vE="_grid_afccc_1",yE="_important_afccc_30",xE="_input_afccc_34",bE="_edited_afccc_38",wE="_disabled_afccc_46",SE="_scroll_afccc_59",Cr={grid:vE,important:yE,input:xE,edited:bE,disabled:wE,scroll:SE};function _E({column:e,row:t,style:n={}}){const r=e.format?e.format(t[e.key],t):t[e.key],o=["cell"];return e.class&&o.push(e.class),e.rowClass&&o.push(e.rowClass(t)),a.jsx("td",{className:o.join(" "),style:n,children:r})}const Bf=({title:e,placement:t,children:n})=>(w.useEffect(()=>($('[data-toggle="tooltip"]').tooltip(),()=>{$('[data-toggle="tooltip"]').tooltip("destroy")}),[]),a.jsx("span",{"data-toggle":"tooltip","data-placement":t,title:e,style:{margin:"10px"},children:n}));Bf.propTypes={title:q.string.isRequired,placement:q.oneOf(["top","bottom","left","right"]),children:q.node.isRequired};Bf.defaultProps={placement:"top"};const jE="_datepicker_19wnv_1",CE="_error_19wnv_1",fm={datepicker:jE,error:CE},EE=({value:e,onChange:t,disabled:n=!1,style:r,className:o="",minDate:s="",maxDate:i="",error:l=""})=>{const c=l;return a.jsx("div",{className:`w-full ${o}`,children:a.jsx("input",{type:"date",style:r,className:`${fm.datepicker} ${c?fm.error:""}`,value:e||"",onChange:u=>t(u.target.value),disabled:n,min:s||"1900-01-01",max:i||"2100-12-31"})})},Jo=(e,t,n)=>{if(t.onChange){t.onChange(n,e);return}const r=e[t.key];r!=null&&r.onChange&&r.onChange(n)},RE={text:_E,select:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(Co,{label:"",options:t[e.key].options,value:t[e.key].value,onChange:r=>Jo(t,e,r.target.value),style:{width:"100%",margin:0}})}),input:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(us,{label:"",type:"text",disabled:t[e.key].disabled,value:t[e.key].value,onChange:r=>Jo(t,e,r.target.value),style:{width:"92%",margin:0}})}),checkbox:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx("input",{type:"checkbox",checked:t[e.key].checked,onChange:r=>Jo(t,e,r.target.checked)})}),date:({column:e,row:t,style:n})=>{const r=t[e.key];return!(r!=null&&r.value)&&typeof r!="object"?a.jsx("td",{style:n,children:r||""}):a.jsx("td",{style:n,children:a.jsx(EE,{value:r.value,onChange:o=>Jo(t,e,o),disabled:r.disabled,style:{width:"92%",margin:0},minDate:e.minDate,maxDate:e.maxDate,error:r.error})})},action:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:t.rate_type==="Discount"&&a.jsx("button",{className:"btn btn-link text-danger",onClick:()=>{var r;return Jo(t,e,(r=t[e.key])==null?void 0:r.id)},children:a.jsx("i",{className:"fa fa-trash"})})})};function Ln({columns:e,rows:t,classes:n,frozenColumns:r=0,minWidth:o,rowClasses:s=[],scroll:i=!0,scrollBehavior:l="smooth",scrollRowIndex:c=0}){const u=w.useRef();w.useLayoutEffect(()=>{if(!i||!u.current)return;const h=u.current.querySelector(`tbody tr:nth-child(${c+1})`);h&&h.scrollIntoView({behavior:l,block:"nearest",inline:"nearest"})},[i,c,l]);const d=[0];for(let h=0;h<r;h++)d[h+1]=d[h]+(e[h].width||100);const f=(h,x)=>h<r?{position:"sticky",left:`${d[h]}px`,minWidth:`${e[h].width||100}px`,width:`${e[h].width||100}px`,zIndex:x||1}:{},p=e.map((h,x)=>a.jsxs("th",{className:h.headerClass||h.class||"",style:f(x,100),children:[h.formatHeader?h.formatHeader(h.name,h):h.name,h.tooltip&&a.jsx(Bf,{title:h.tooltip,placement:"bottom",children:a.jsx("i",{className:"icon-info-sign"})})]},h.key)),y=t.map((h,x)=>{const v=e.map((g,b)=>{const S=RE[g.type||"text"];return a.jsx(S,{column:g,row:h,style:f(b)},g.key)});return a.jsx("tr",{className:s[x]||"",children:v},x)}),m={};return o&&(m.minWidth=o),a.jsx("div",{className:`${Cr.grid} ${i?Cr.scroll:""} ${n||""}`,ref:u,children:a.jsxs("table",{className:"table table-bordered",style:m,children:[a.jsx("thead",{children:a.jsx("tr",{children:p})}),a.jsx("tbody",{children:y})]})})}const rd={"header-buttons":"_header-buttons_15oxx_1","allocation-types-grid":"_allocation-types-grid_15oxx_6","vertical-align-center":"_vertical-align-center_15oxx_10"},Sx=({onAddAllocationType:e,onAddRequiredResource:t})=>a.jsxs("div",{className:rd["header-buttons"],children:[a.jsxs("button",{className:"btn btn-primary",onClick:e,children:[a.jsx("i",{className:"fa fa-plus"})," Add Allocation Type"]}),a.jsxs("button",{className:"btn btn-primary",onClick:t,children:[a.jsx("i",{className:"fa fa-plus"})," Add Required Resource"]})]});Sx.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const _x=_e.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:rd["allocation-types-grid"],children:[a.jsx(Ln,{columns:t,rows:n,rowClasses:Array(n.length).fill(rd["vertical-align-center"]),scroll:!1}),a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Note: You may need to contact your Allocations Coordinator if you have added this resource to an allocation type."})]})});_x.propTypes={columns:q.array.isRequired,rows:q.array.isRequired};const qr={"exchange-rates-grid":"_exchange-rates-grid_5qkd5_1","header-container":"_header-container_5qkd5_5","header-buttons":"_header-buttons_5qkd5_11","vertical-align-center":"_vertical-align-center_5qkd5_18","error-summary":"_error-summary_5qkd5_35"},jx=_e.memo(function({columns:t,rows:n,onAddDiscountRate:r,dateErrors:o=[]}){return a.jsxs("div",{className:qr["exchange-rates-grid"],children:[a.jsxs("div",{className:qr["header-container"],children:[a.jsx("h2",{className:qr["header-title"],children:"Exchange Rates"}),a.jsx("div",{className:qr["header-buttons"],children:a.jsxs("button",{className:"btn btn-primary",onClick:r,children:[a.jsx("i",{className:"fa fa-plus"})," Add Discount Rate"]})})]}),a.jsx(Ln,{columns:t,rows:n,rowClasses:Array(n.length).fill(qr["vertical-align-center"]),scroll:!1}),o.length>0&&a.jsx("div",{className:qr["error-summary"],children:a.jsx("ul",{children:o.map((s,i)=>a.jsx("li",{children:s},i))})})]})});jx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired,onAddDiscountRate:q.func.isRequired,dateErrors:q.array};const NE=(e,t)=>{const n=w.useCallback(y=>{var h,x;t({type:"DELETE_EXCHANGE_RATE",payload:y}),(((x=(h=e==null?void 0:e.resource_details)==null?void 0:h.exchange_rates)==null?void 0:x.discount_rates.filter(v=>v.id!==y))||[]).forEach(v=>{v.begin_date&&v.end_date&&t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:v.id,changes:{start_date_error:"",end_date_error:""}}})})},[t,e]),r=[{key:"rate_type",name:"Rate Type",width:150},{key:"rate",name:"Exchange Rate",width:100,type:"input",tooltip:"Exchange rate is the cost in ACCESS Credits of one resource unit. ACCESS Credits / exchange rate = resource units"},{key:"conversion",name:"Resource Units per ACCESS Credit",width:150},{key:"start_date",name:"Start Date",width:150,type:"date",minDate:new Date().toISOString().split("T")[0]},{key:"end_date",name:"End Date",width:150,type:"date",minDate:new Date().toISOString().split("T")[0]},{key:"actions",name:"",width:80,type:"action",onChange:n}],o=y=>{t({type:"UPDATE_BASE_RATE",payload:y})},s=(y,m)=>{const h={exchange_rate:m},x={};m?x.rate_error="":x.rate_error="Exchange Rate cannot be empty",t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...h,...x}}})},i=()=>{var h,x;const y=[];return(((x=(h=e==null?void 0:e.resource_details)==null?void 0:h.exchange_rates)==null?void 0:x.discount_rates)||[]).forEach(v=>{v.start_date_error&&y.push(v.start_date_error),v.end_date_error&&y.push(v.end_date_error),v.rate_error&&y.push(v.rate_error)}),y.filter((v,g)=>v&&v!==""&&(!v.includes("overlaps")||y.indexOf(v)===g))},l=y=>{const m=new Date(y);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(m)},c=(y,m,h,x)=>{const v=new Date(y).getTime(),g=new Date(m).getTime(),b=new Date(h).getTime(),S=new Date(x).getTime();return v<=S&&b<=g},u=(y,m)=>{let h="";if(y.begin_date&&y.end_date){const x=m.filter(v=>v.id!==y.id);for(const v of x)if(v.begin_date&&v.end_date&&c(y.begin_date,y.end_date,v.begin_date,v.end_date)){h=`The selected date range (${l(y.begin_date)} to ${l(y.end_date)}) overlaps with an existing discount rate (${l(v.begin_date)} to ${l(v.end_date)})`;break}}return h},d=(y,m,h)=>{var R,T;const x={start_date:"begin_date",end_date:"end_date"},v=k=>{const P=new Date(k);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(P)},g=((T=(R=e==null?void 0:e.resource_details)==null?void 0:R.exchange_rates)==null?void 0:T.discount_rates)||[],b=g.find(k=>k.id===y);if(!b)return;const S={[x[m]]:h},_={},j=m==="end_date",C=()=>{if(!h)return _[`${m}_error`]="Date cannot be empty or invalid",!1;const k=r.find(V=>V.key===m),P=(k==null?void 0:k.minDate)||"1900-01-01",D=(k==null?void 0:k.maxDate)||"2100-12-31",F=j&&b.begin_date?b.begin_date:P;return h<F?(_[`${m}_error`]=`${m.replace("_"," ")} ${v(h)} cannot be before ${v(F)}`,!1):h>D?(_[`${m}_error`]=`${m.replace("_"," ")} cannot be after ${v(D)}`,!1):(_[`${m}_error`]="",!0)},E=()=>{const k=m==="end_date"?h:b.end_date;if(m==="start_date"&&k){if(h>k)return _.end_date_error=`end date ${v(k)} cannot be before ${v(h)}`,!1;_.end_date_error=_.end_date_error||""}return!0},N=()=>{console.log("validating overlaps");const k=m==="start_date"?h:b.begin_date,P=m==="end_date"?h:b.end_date;if(k&&P){const D=u({...b,begin_date:k,end_date:P},g);return _.start_date_error=D,_.end_date_error=D,!D}return!0};if(!C()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...S,..._}}});return}E(),N(),j&&!b.begin_date?_.start_date_error="Date cannot be empty or invalid":!j&&!b.end_date&&(_.end_date_error="Date cannot be empty or invalid"),t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...S,..._}}})},f=()=>{var _,j;const y=((j=(_=e==null?void 0:e.resource_details)==null?void 0:_.exchange_rates)==null?void 0:j.discount_rates)||[];let h=new Date;y.forEach(C=>{if(C.end_date){const E=new Date(C.end_date);E>h&&(h=E)}});const x=new Date(h);x.setDate(x.getDate()+1);const v=x.toISOString().split("T")[0],g=new Date(x);g.setDate(g.getDate()+15);const b=g.toISOString().split("T")[0],S={id:Date.now(),exchange_rate:"1.0",begin_date:v,end_date:b,is_new:!0};t({type:"ADD_EXCHANGE_RATE",payload:S})};return{exchangeRateColumns:r,exchangeRateRows:(()=>{var b,S;const y=(b=e==null?void 0:e.resource_details)==null?void 0:b.exchange_rates,m=(y==null?void 0:y.base_rate)??"",h=(y==null?void 0:y.discount_rates)||[],x=new Date().toISOString().split("T")[0],v=((S=e==null?void 0:e.resource_details)==null?void 0:S.unit_type)||"Resource Units",g=_=>!_||Number(_)===0?"-":`${(1/Number(_)).toFixed(2)} ${v}`;return[{rate_type:"Base Rate",rate:{value:m.toString(),onChange:_=>o(_)},conversion:g(m)},...h.map(_=>{var N;const j=_.is_new||_.begin_date>x,C=j||_.begin_date==="",E=_.is_new||_.end_date>=x||_.end_date==="";return{rate_type:"Discount",rate:{value:((N=_.exchange_rate)==null?void 0:N.toString())||"",onChange:j?R=>s(_.id,R):null,disabled:!j},conversion:g(_.exchange_rate),start_date:{value:_.begin_date||"",onChange:R=>d(_.id,"start_date",R),error:_.start_date_error,disabled:!C},end_date:{value:_.end_date||"",onChange:R=>d(_.id,"end_date",R),error:_.end_date_error,disabled:!E},actions:{id:_.id}}})]})(),handleAddDiscountRate:f,handleDeleteRate:n,dateErrors:i()}};function Cx({resourceId:e,relativeUrlRoot:t,setExternalSubmit:n}){const{state:r,dispatch:o,handleError:s,fetchData:i}=cE(e,t),{isEditing:l,handleEditingChange:c}=pE(),{resourceData:u,loading:d,errors:f,successMessage:p}=r,y=u==null?void 0:u.resource_details,m=u==null?void 0:u.uses_exchange_rates,{allowedActionsOptions:h,resourceTypesOptions:x,unitTypesOptions:v,availableResources:g,availableAllocationTypes:b}=Lf(u),{showAddResourceModal:S,setShowAddResourceModal:_,showAddAllocationTypeModal:j,setShowAddAllocationTypeModal:C,selectedNewResource:E,handleSelectNewResource:N,handleSaveResources:R,selectedNewAllocationType:T,handleSelectNewAllocationType:k,handleSaveAllocationType:P,handleAllowedActionChange:D,handleCommentChange:F,handleRequiredResourceChange:V}=dE(u,y,o),{exchangeRateColumns:Q,exchangeRateRows:O,handleAddDiscountRate:L,dateErrors:A}=NE(u,o),W=fE(y,e,t,i,s,o);w.useEffect(()=>{n&&A.length==0?n(W):n(null)},[W,n,A]);const{allocationColumns:U,allocationRows:Y}=uE(y,g,E,h,D,F,V),[Z,J]=w.useState(!1);return d?a.jsx(Do,{}):f.length>0?a.jsx("div",{children:f.map((X,se)=>a.jsx(be,{color:"danger",dismissable:!0,children:X},se))}):u?a.jsxs("div",{className:"edit-resource",children:[p.message&&a.jsx(be,{color:p.color,dismissable:!0,children:p.message}),a.jsxs("div",{children:[a.jsx("h2",{children:"Resource Propeties"}),a.jsx("div",{style:{marginBottom:"0.75rem"},children:a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Any modifications to these resource properties will be applied globally and impact resources on other all allocations process"})}),a.jsx(Vf,{resourceDetails:y,resourceTypesOptions:x,unitTypesOptions:v,dispatch:o,isDollarValueEditing:Z,onDollarValueEditingChange:J})]}),m&&a.jsx(jx,{columns:Q,rows:O,onAddDiscountRate:L,dateErrors:A}),a.jsx(Uf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(Sx,{onAddAllocationType:()=>l&&C(!0),onAddRequiredResource:()=>l&&_(!0)}),isEditing:l,onEditingChange:c,warningMessage:`Incorrect allocations
52
+ `),L}qa(()=>{X.current=void 0,W.current=void 0,H.current=Se});const Ae=ae.useMemo(()=>ae.createElement(x,{...Se,ref:N}),[N,x,Se]);return ae.useMemo(()=>m?ae.createElement(T.Provider,{value:A},Ae):Ae,[T,Ae,A])}const j=ae.memo(S);if(j.WrappedComponent=x,j.displayName=S.displayName=g,c){const E=ae.forwardRef(function(R,T){return ae.createElement(j,{...R,reactReduxForwardedRef:T})});return E.displayName=g,E.WrappedComponent=x,Qu(E,x)}return Qu(j,x)}}var tn=xC;function bC({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=ae.useMemo(()=>{const u=lx(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),l=ae.useMemo(()=>e.getState(),[e]);qa(()=>{const{subscription:u}=i;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),l!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[i,l]);const c=t||Mn;return ae.createElement(c.Provider,{value:i},n)}var Ur=bC;function dx(e=Mn){const t=e===Mn?ox:Of(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var wC=dx();function SC(e=Mn){const t=e===Mn?wC:dx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var it=SC();Tj(Nj.useSyncExternalStoreWithSelector);pC(w.useSyncExternalStore);const rn="https://allocations.access-ci.org",ne={creditAlertThreshold:1e3,resourceTypeIcons:{credit:"cash-coin",compute:"cpu-fill",storage:"hdd-fill",program:"person-square"},routes:{edit_request_action_path:(e,t)=>`/requests/${e}/actions/${t}/edit`,edit_request_path:e=>`/requests/${e}/edit`,how_to_path:()=>"/how-to",get_your_first_project_path:()=>`${rn}/get-your-first-project`,profile_path:()=>`${rn}/profile`,project_types_path:()=>`${rn}/project-types`,projects_path:()=>`${rn}/projects`,projects_save_users_path:()=>"/projects/save_users",renew_request_path:e=>`${rn}/requests/${e}/renew`,request_action_path:(e,t)=>`${rn}/requests/${e}/actions/${t}`,request_actions_path:e=>`${rn}/requests/${e}/actions`,request_path:e=>`${rn}/requests/${e}`,resources_path:()=>`${rn}/resources`,search_people_path:()=>`${rn}/search/people`,usage_detail_path:(e,t)=>`/usage/${e}/${t}`},roleIcons:{PI:"person-fill-check","Co-PI":"person-fill-add","Allocation Manager":"person-fill-gear",User:"people-fill"}},po=(e,t,n="round")=>{const r=Math.pow(10,t||0);return Math[n](e*r)/r},_C=e=>new Date(`${e}T00:00:00`),jC={year:"numeric",month:"short",day:"numeric"},ho=(e,t)=>_C(e).toLocaleString("en-us",t||jC),nt=(e,{abbreviate:t=!1,decimalPlaces:n=void 0}={})=>{if(t){let r=0;for(;Math.abs(e)/Math.pow(1e3,r)>=1e3;)r+=1;const o=["","K","M","B","T","Q"][r];return`${(e/Math.pow(1e3,r)).toLocaleString("en-US",{maximumSignificantDigits:3})}${o}`}return e.toLocaleString("en-US",{maximumFractionDigits:n,minimumFractionDigits:n})},$f=(e,t)=>{if(e.startDate&&e.endDate){const o=ho(e.startDate,t),s=ho(e.endDate,t);return`${e.allocationType}: ${o} to ${s}`}const n=ho(e.entryDate,t),r=e.status=="Incomplete"?"Started":"Submitted";return`${e.allocationType}: ${r} ${n}`},kn=e=>a.jsx("i",{className:`bi bi-${e}`}),Ol=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},nm=e=>{const t=Ol(e.name);return t.short||t.full},Ha=(e,t)=>e.isCredit>t.isCredit||e.isActive>t.isActive||nm(e)<nm(t)?-1:1,rm=(...e)=>{for(let t of e)if(t!=null)return t;return null},fx=(e,t="and",n=", ")=>e.reduce((r,o,s)=>a.jsxs(a.Fragment,{children:[r,e.length-1>s?n:` ${t} `,o]})),Af=e=>e?a.jsxs(a.Fragment,{children:[kn("check-circle")," Yes"]}):a.jsxs(a.Fragment,{children:[kn("x-circle")," No"]}),Mf=e=>fx(e.users.filter(({role:t})=>["pi","co_pi","allocation_manager"].includes(t)).map(t=>`${t.firstName} ${t.lastName}`),"or"),om=(e,t)=>t==1&&e.endsWith("s")?e.slice(0,-1):e,CC=(e,t,n)=>`${nt(t)} ${om(n,t)} / ${om(e,1)}`,px=e=>{let t=0,n=0;for(let r of e.resources){if(r.isBoolean)continue;let{unitCost:o}=r.exchangeRates.base;t+=r.allocated*o,n+=Math.min(r.used,r.allocated)*o}return t>0?n/t:0},Pl=[{role:"pi",name:"PI",xrasRole:"PI"},{role:"co_pi",name:"Co-PI",xrasRole:"CoPI"},{role:"allocation_manager",name:"Allocation Manager",xrasRole:"Allocation Manager"},{role:"user",name:"User",xrasRole:"User"}],hx={};for(let e of Pl)hx[e.role]=e;const Xu={};for(let{role:e,xrasRole:t}of Pl)Xu[e]=t;const Zu=["info","success","secondary","warning","danger"];function Ju(e,t="total"){const n=e.exchangeRates[e.requested<=e.allocated?"base":"current"].unitCost;let r=(e.requested-e.allocated)*n;return t!="total"?r:r+e.allocated*e.exchangeRates.base.unitCost}function Df(e){e&&(ne.routes={...ne.routes,...e})}const ed={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Pc={};function mx(e,t=3){let n=0;for(;e/Math.pow(1e3,n)>1e3;)n+=1;const r=e.toString().length,o=Math.pow(10,r-t);return(Math.round(e/o)*o/Math.pow(1e3,n)).toString()+["","K","M","B","T"][n]}async function EC(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function RC(e){if(Pc[e])return Pc[e];const t=document.location,n=`${t.protocol}//${t.host}${t.pathname}`,o=await(await fetch(`${n}/${e}`)).json();return Pc[e]=o,o}function NC(e){const t=[...e.creditLines.features.map(r=>r.properties.credits)],n=[...e.rpPoints.features.map(r=>r.properties.rpCredits),...e.userPoints.features.map(r=>r.properties.userCredits)];return{lines:im(t),points:im(n)}}function sm({activeOrg:e,basemapStyle:t,creditLevels:n,creditType:r,geoJSON:o,organizationType:s}){const i={},l=[];if(o&&n){const u=s==="user"?"rp":"user",d=o[`${s}Points`],f=o[`${u}Points`],p=`${s}Credits`,y=`${u}Credits`;i.organizations={type:"geojson",data:d};const m={user:[],rp:[]},h=[];n.points.forEach((v,g)=>{Object.keys(ed).forEach(b=>{m[b].push(v[1],ed[b].colors[g])}),h.push(v[1],5*(g+1))});const x=[];if(n.lines.forEach((v,g)=>{x.push(v[1],1*(g+1))}),l.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",p],...h],"circle-color":["interpolate",["linear"],["get",p],...m[s]],"circle-opacity":e?["match",["id"],e.id,1,.3]:1,"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),e&&r!=="allocated"){i.opp={type:"geojson",data:f};const v=["get",e.id.toString(),["get",`${y}Map`]];l.push({id:"opp",type:"circle",source:"opp",filter:["has",e.id.toString(),["get",`${y}Map`]],paint:{"circle-radius":["interpolate",["linear"],v,...h],"circle-color":["interpolate",["linear"],v,...m[u]],"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),i.credits={type:"geojson",data:o.creditLines},l.push({id:"credits",type:"line",source:"credits",filter:["==",["get",`${s}_organization_id`],e.id],paint:{"line-color":"#444444","line-opacity":.4,"line-width":["interpolate",["linear"],["get","credits"],...x]}})}}const c=t||{version:8,sources:{},layers:[]};return{...c,sources:{...c.sources,...i},layers:[...c.layers.filter(u=>u.id!=="Marine waterbody/label/2x large"),...l]}}function kC(e,t,n,r,o=20){return[...Array(o+1).keys()].map(s=>s/o).map(s=>{let i=s*(n-e)+e,l=s*(r-t)+t+Math.abs(Math.sin(s*Math.PI)*(n-e)*.1);return[i,l]})}function TC(e,t,n){const r={};return e.features.forEach(s=>r[s.id]={type:s.type,geometry:s.geometry,id:s.id,properties:{name:s.properties.name,abbr:s.properties.abbr,userCredits:0,userCreditsMap:{},rpCredits:0,rpCreditsMap:{}}},{}),{creditLines:{type:"FeatureCollection",features:t.result.filter(s=>r[s.user_organization_id]!==void 0&&(n==="allocated"||r[s.rp_organization_id]!==void 0)).map(s=>{const i=r[s.user_organization_id],l=r[s.rp_organization_id];if(i.properties.userCredits+=s.credits,l&&(l.properties.rpCredits+=s.credits),i.properties.userCreditsMap[s.rp_organization_id]=(i.properties.userCreditsMap[s.rp_organization_id]||0)+s.credits,l&&(l.properties.rpCreditsMap[s.user_organization_id]=(l.properties.rpCreditsMap[s.user_organization_id]||0)+s.credits),n!=="allocated")return{type:"Feature",geometry:{type:"LineString",coordinates:kC(...r[s.user_organization_id].geometry.coordinates,...r[s.rp_organization_id].geometry.coordinates)},properties:s}}).filter(s=>s!==void 0)},userPoints:{type:"FeatureCollection",features:Object.values(r).filter(s=>s.properties.userCredits>0).sort((s,i)=>s.properties.userCredits>i.properties.userCredits?-1:1)},rpPoints:{type:"FeatureCollection",features:Object.values(r).filter(s=>s.properties.rpCredits>0).sort((s,i)=>s.properties.rpCredits>i.properties.rpCredits?-1:1)}}}function im(e,t=[0,.3,.6,.9]){return t.map((n,r)=>{const o=OC(e,n),s=r===t.length-1?"+":"";return[`${mx(Math.round(o))}${s}`,o]})}function OC(e,t){e.sort((s,i)=>s-i);const n=(e.length-1)*t,r=Math.floor(n),o=n-r;return e[r+1]!==void 0?e[r]+o*(e[r+1]-e[r]):e[r]}const PC="_fullscreen_1iid9_6",IC="_map_1iid9_14",Ti={"allocations-map":"_allocations-map_1iid9_1",fullscreen:PC,map:IC},$C="_group_11k83_1",AC="_button_11k83_6",MC="_icon_11k83_16",Ic={group:$C,button:AC,icon:MC};function am({choices:e,disabledValues:t=[],label:n,value:r,setValue:o}){const s=[];return e.forEach(([i,l])=>s.push(a.jsx("input",{type:"radio",className:"btn-check",name:i,id:i,autoComplete:"off",checked:r===i,onChange:()=>o(i),disabled:t.includes(i)},i),a.jsxs("label",{className:`btn btn-outline-primary ${Ic.button}`,htmlFor:i,disabled:t.includes(i),children:[r===i?a.jsx("i",{className:`bi bi-check ${Ic.icon}`}):null," ",l]},`${i}-label`))),a.jsx("div",{className:"mb-2",children:a.jsx("div",{className:`btn-group ${Ic.group}`,role:"group","aria-label":n,children:s})})}const DC="_controls_1be4t_1",FC={controls:DC};function LC({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:FC.controls,children:[a.jsx("h2",{children:"ACCESS Allocations"}),a.jsx(am,{choices:[["allocated","Allocations"],["exchanged","Exchanges"],["used","Usage"]],label:"Credit Type",value:e,setValue:n}),a.jsx(am,{choices:[["user","By Research Institution"],["rp","By Resource Provider"]],disabledValues:e==="allocated"?["rp"]:[],label:"Organization Type",value:t,setValue:r})]})}const UC="_legend_odgg9_1",VC="_symbols_odgg9_17",BC="_symbol_odgg9_17",ea={legend:UC,symbols:VC,symbol:BC};function zC(e,t){const n=2*e+2;return a.jsx("svg",{viewBox:`0 0 ${n} ${n}`,xmlns:"http://www.w3.org/2000/svg",stroke:"white",strokeWidth:"1",height:n,width:n,children:a.jsx("circle",{fill:t,cx:e+1,cy:e+1,r:e})})}function qC({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:ea.symbol,children:[zC(5*(s+1),ed[n].colors[s]),a.jsx("br",{}),a.jsx("span",{className:"label",children:o[0]})]},o[0]));return a.jsxs("div",{className:ea.legend,children:[a.jsxs("h2",{className:"fs-6 mt-0 mb-0",children:["ACCESS Credits ",a.jsx("small",{children:"or credit equivalents"})]}),a.jsx("div",{className:ea.symbols,children:r})]})}const HC="_info_oxxoh_1",WC="_user_oxxoh_7",KC="_rp_oxxoh_10",GC="_credits_oxxoh_15",ta={info:HC,user:WC,rp:KC,credits:GC};function lm(e,t,n){e.sort((o,s)=>s[1]-o[1]);const r=e.slice(0,3).map(o=>o[0]);return e.length>3&&(r[2]=`${e.length-2} other ${n}s`),r.reduce((o,s,i,l)=>[o,a.jsx("span",{className:`name ${ta[t]}`,children:s},s),[""," and ",", "][l.length-i-1]],[])}function YC({activeOrg:e,creditType:t,organizationMap:n,organizationType:r}){if(!e||!n)return;const o=e.properties,s=o[`${r}Credits`],i=r==="rp"?"user":"rp",l=JSON.parse(o[`${r}CreditsMap`]),c={user:[],rp:[]};return c[r].push([o.name,s]),Object.keys(l).forEach(u=>c[i].push([n[u],l[u]])),a.jsx("div",{className:`${ea.legend} ${ta.info}`,children:a.jsxs("p",{className:ta[r],children:["Researchers at ",lm(c.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",a.jsxs("span",{className:ta.credits,children:[mx(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",lm(c.rp,"rp","resource provider")]}):"","."]})})}function QC(){const e=w.useRef(null),t=w.useRef(null),[n,r]=w.useState(null),[o,s]=w.useState(null),[i,l]=w.useState(null),[c,u]=w.useState(!1),[d,f]=w.useState(null),[p,y]=w.useState(null),[m,h]=w.useState(null),[x,v]=w.useState("user"),[g,b]=w.useState("exchanged");return w.useEffect(()=>{(async()=>s(await EC()))()},[]),w.useEffect(()=>{(async S=>{const[_,j]=await Promise.all(["organizations",`credits_${S}`].map(RC));if(!m){const E={};_.features.forEach(N=>E[N.id.toString()]=N.properties.name),h(E)}const C=TC(_,j,g);f(C),S==="exchanged"&&!i&&l(NC(C))})(g)},[g]),w.useEffect(()=>{p&&p.setStyle(sm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:g,geoJSON:d,organizationType:x}))},[n,d,p,x]),w.useEffect(()=>{p&&(p.on("mousemove","organizations",S=>r(S.features.length?S.features[0]:null)),p.on("mouseleave","organizations",()=>r(null)))},[p]),w.useEffect(()=>{p&&p.resize()},[c]),w.useEffect(()=>{g==="allocated"&&v("user")},[g]),w.useLayoutEffect(()=>y(new maplibregl.Map({container:t.current,style:sm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:g,geoJSON:d,organizationType:x}),center:[-111.01,38.88],zoom:3.4,hash:!0})),[]),w.useLayoutEffect(()=>e.current.addEventListener("keydown",S=>{S.key==="Escape"&&u(!1)}),[]),a.jsxs("section",{className:`${Ti["allocations-map"]} ${c?Ti.fullscreen:"border border-3 border-primary"}`,ref:e,children:[a.jsx("div",{className:Ti.map,ref:t}),a.jsx(LC,{creditType:g,fullscreen:c,organizationType:x,setCreditType:b,setFullscreen:u,setOrganizationType:v}),a.jsx(qC,{activeOrg:n,creditLevels:i,organizationType:x}),a.jsx(YC,{activeOrg:n,creditType:g,organizationMap:m,organizationType:x}),a.jsx("button",{title:`${c?"Exit":"Enter"} Fullscreen`,className:Ti.fullscreen,onClick:()=>u(!c),children:a.jsx("i",{className:`bi ${c?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const XC=async(e,t)=>{try{const n=await fetch(`${e}/resources`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({resources:t.map((o,s)=>({resource_id:o.resource_id,relative_order:s+1}))})});if(!n.ok){const o=await n.json();throw new Error(o.error||"Failed to update resource order")}const r=await n.json();console.log(r.message)}catch(n){console.error("Error updating resource order:",n)}},cm=e=>[...e].sort((t,n)=>t.relative_order===null&&n.relative_order===null?t.display_resource_name.localeCompare(n.display_resource_name):t.relative_order===null?1:n.relative_order===null?-1:t.relative_order-n.relative_order),um=(e,t)=>{t.current||(t.current=setInterval(()=>{window.scrollBy(0,e*10)},16))},$c=e=>{e.current&&(clearInterval(e.current),e.current=null)},ZC="_dragging_1vb1t_45",Ht={"resources-container":"_resources-container_1vb1t_1","drag-instruction":"_drag-instruction_1vb1t_6","resources-list":"_resources-list_1vb1t_12","resources-header":"_resources-header_1vb1t_18","resources-item":"_resources-item_1vb1t_28",dragging:ZC,"drag-handle":"_drag-handle_1vb1t_52","resource-name":"_resource-name_1vb1t_61","resource-repo":"_resource-repo_1vb1t_65","resource-link":"_resource-link_1vb1t_71"};var gx={exports:{}},JC="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",eE=JC,tE=eE;function vx(){}function yx(){}yx.resetWarningCache=vx;var nE=function(){function e(r,o,s,i,l,c){if(c!==tE){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:yx,resetWarningCache:vx};return n.PropTypes=n,n};gx.exports=nE();var rE=gx.exports;const q=Xs(rE),oE=(e,t)=>{switch(t.type){case"SET_RESOURCE_DATA":return{...e,resourceData:t.payload,loading:!1};case"SET_LOADING":return{...e,loading:t.payload};case"SET_SUCCESS_MESSAGE":return{...e,successMessage:t.payload};case"SET_ERRORS":return{...e,errors:Array.isArray(t.payload)?t.payload:[t.payload],loading:!1};case"UPDATE_RESOURCE_FIELD":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,[t.field]:t.value}}};case"UPDATE_ALLOCATION":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,allocation_types:e.resourceData.resource_details.allocation_types.map(n=>n.allocation_type_id===t.payload.allocationTypeId?{...n,...t.payload.updates}:n)}}};case"UPDATE_BASE_RATE":return console.log("Reducer: Updating base rate to:",t.payload),{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,base_rate:t.payload}}}};case"UPDATE_EXCHANGE_RATE":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:e.resourceData.resource_details.exchange_rates.discount_rates.map(n=>n.id===t.payload.rateId?{...n,...t.payload.changes}:n)}}}};case"ADD_EXCHANGE_RATE":return console.log("Reducer: Adding new discount rate:",t.payload),{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:[...e.resourceData.resource_details.exchange_rates.discount_rates||[],t.payload]}}}};case"DELETE_EXCHANGE_RATE":return{...e,resourceData:{...e.resourceData,resource_details:{...e.resourceData.resource_details,exchange_rates:{...e.resourceData.resource_details.exchange_rates,discount_rates:e.resourceData.resource_details.exchange_rates.discount_rates.filter(n=>n.id!==t.payload)}}}};default:return e}},td=e=>({type:"SET_RESOURCE_DATA",payload:e}),sE=e=>({type:"SET_LOADING",payload:e}),dm=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Zo=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),Ac=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),iE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),aE=async(e,t,n,r)=>(console.log("update resource",n),await fetch(`${t}/resources/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({resource:n,required_resources:r})})),lE=(e,t)=>{const[n,r]=w.useReducer(oE,{resourceData:null,loading:!0,errors:[],successMessage:{message:"",color:""}}),o=w.useCallback(async(i,l)=>{let c=[l];try{const u=await i.json();u.errors?c=u.errors:u.message&&(c=[u.message])}catch(u){console.error("Error parsing error response:",u)}r({type:"SET_ERRORS",payload:c})},[]),s=w.useCallback(async()=>{r(sE(!0));try{const i=await iE(e,t);r(td(i))}catch(i){console.error("Failed to fetch resource data:",i),r({type:"SET_ERRORS",payload:"Failed to fetch resource data. Please try again later."})}},[e,t]);return w.useEffect(()=>{s()},[s]),{state:n,dispatch:r,handleError:o,fetchData:s}},Ff=e=>{var t,n,r;return{allowedActionsOptions:((t=e==null?void 0:e.resource_state_types_available)==null?void 0:t.map(o=>({value:o.resource_state_type_id,label:o.display_resource_state_type,additionalInfo:o.action_types.map(s=>s.display_action_type).join(", ")})))||[],resourceTypesOptions:((n=e==null?void 0:e.resource_types_available)==null?void 0:n.map(o=>({value:o.resource_type_id,label:o.display_resource_type})))||[],unitTypesOptions:((r=e==null?void 0:e.unit_types_available)==null?void 0:r.map(o=>({value:o.unit_type_id,label:o.display_unit_type})))||[],availableResources:(e==null?void 0:e.required_resources_available)||[],availableAllocationTypes:(e==null?void 0:e.unassigned_allocation_types)||[]}},cE=(e,t,n,r,o,s,i)=>{const c=(()=>{var p;if(!e)return[];const f=new Set;return(p=e.allocation_types)==null||p.forEach(y=>{var m;(m=y.required_resources)==null||m.forEach(h=>{f.add(h.resource_name)})}),Array.from(f).sort((y,m)=>y.localeCompare(m)).map(y=>({key:y,name:`Require ${y}`,width:150,type:"checkbox"}))})();return{allocationColumns:[{key:"display_name",name:"Allocation Type",width:200},{key:"allowed_actions",name:"Allowed Actions",width:200,type:"select"},{key:"comment",name:"Descriptive Text",width:200,type:"input",tooltip:"Appears below the resource name and allocations description in the form when making a new request"},...c],allocationRows:e!=null&&e.allocation_types?e.allocation_types.map(f=>{var p;return{display_name:f.display_name,allocation_type_id:f.allocation_type_id,allowed_actions:{options:r,value:((p=f.allowed_action)==null?void 0:p.resource_state_type_id)||"",onChange:y=>o(f.allocation_type_id,y)},comment:{value:f.comment||"",onChange:y=>s(f.allocation_type_id,y)},...Object.fromEntries(c.map(y=>{var m;return[y.key,{checked:((m=f.required_resources)==null?void 0:m.some(h=>h.resource_name===y.key))||!1,onChange:h=>i(f.allocation_type_id,y.key,h,f)}]}))}}):[],requiredResourcesColumns:c}},uE=(e,t,n)=>{const{availableResources:r,availableAllocationTypes:o,allowedActionsOptions:s}=Ff(e),[i,l]=w.useState(!1),[c,u]=w.useState(!1),[d,f]=w.useState([]),[p,y]=w.useState(""),m=w.useCallback((_,j)=>{n(Ac(_,{allowed_action:{resource_state_type_id:j}}))},[n]),h=w.useCallback((_,j)=>{n(Ac(_,{comment:j}))},[n]),x=w.useCallback((_,j,C,E)=>{const N=C?[...E.required_resources||[],{resource_name:j,required_resource_id:e.required_resources_available.find(R=>R.resource_name===j).resource_id}]:(E.required_resources||[]).filter(R=>R.resource_name!==j);n(Ac(_,{required_resources:N}))},[e,n]);w.useEffect(()=>{if(i&&t){const _=t.allocation_types.flatMap(j=>j.required_resources||[]).map(j=>j.required_resource_id);f(_)}},[i,t]);const v=w.useCallback((_,j)=>{f(C=>j?[...C,_]:C.filter(E=>E!==_))},[]),g=w.useCallback(()=>{const _=t.allocation_types.flatMap(N=>N.required_resources||[]).map(N=>N.required_resource_id),j=d.filter(N=>!_.includes(N)),C=_.filter(N=>!d.includes(N)),E=t.allocation_types.map(N=>{const R=N.required_resources||[],T=j.map(P=>{const M=r.find(D=>D.resource_id===P);return{resource_name:M.resource_name,required_resource_id:M.resource_id}}),k=R.filter(P=>!C.includes(P.required_resource_id)).concat(T.filter(P=>!R.some(M=>M.required_resource_id===P.required_resource_id)));return{...N,required_resources:k}});n(td({...e,resource_details:{...t,allocation_types:E}})),f([]),l(!1)},[d,r,t,e,n]),b=w.useCallback(_=>{const j=_.target.value;y(j)},[]),S=w.useCallback(()=>{var C,E;if(!p)return;const _=o.find(N=>N.allocation_type_id.toString()===p),j=(C=t.allocation_types)==null?void 0:C.some(N=>N.allocation_type_id===_.allocation_type_id);if(_&&!j){const N=(E=s[0])==null?void 0:E.value,R=[...t.allocation_types||[],{allocation_type_id:_.allocation_type_id,display_name:_.display_name,allowed_action:{resource_state_type_id:N},comment:"",required_resources:[]}];n(td({...e,resource_details:{...t,allocation_types:R}})),u(!1)}},[p,o,t,e,n,s]);return{showAddResourceModal:i,setShowAddResourceModal:l,showAddAllocationTypeModal:c,setShowAddAllocationTypeModal:u,selectedNewResource:d,handleSelectNewResource:v,handleSaveResources:g,selectedNewAllocationType:p,handleSelectNewAllocationType:b,handleSaveAllocationType:S,handleAllowedActionChange:m,handleCommentChange:h,handleRequiredResourceChange:x}},dE=(e,t,n,r,o,s)=>w.useCallback(async()=>{var c,u,d;if(!e)return;const i={resource_name:e.resource_name,description:e.description,resource_type_id:e.resource_type_id,unit_type_id:e.unit_type_id,dollar_value:e.dollar_value,allocation_types:e.allocation_types.map(f=>{var p;return{allocation_type_id:f.allocation_type_id,allowed_action:{resource_state_type_id:(p=f.allowed_action)==null?void 0:p.resource_state_type_id},comment:f.comment||""}}),exchange_rates:{base_rate:(c=e.exchange_rates)==null?void 0:c.base_rate,discount_rates:(d=(u=e.exchange_rates)==null?void 0:u.discount_rates)==null?void 0:d.map(f=>({id:f.id,exchange_rate:f.exchange_rate,begin_date:f.begin_date,end_date:f.end_date}))}},l={};e.allocation_types.forEach(f=>{f.required_resources.forEach(p=>{l[p.required_resource_id]||(l[p.required_resource_id]=[]),l[p.required_resource_id].push(f.allocation_type_id)})});try{const f=await aE(t,n,i,l);if(f.ok){const p=await f.json();return s(dm(p.message||"Resource updated successfully!","success")),await r(),!0}else return await o(f,"Failed to update resource"),!1}catch{return s(dm("Error updating resource. Please try again later.","danger")),!1}},[e,t,n,r,o]),fE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},pE={"form-wrapper":"_form-wrapper_mu0yh_1"},Wa=({show:e,onClose:t,title:n,children:r,onSave:o,buttonText:s,cancelText:i="Cancel",canSave:l=!0})=>e?a.jsx("div",{style:{position:"fixed",top:0,left:0,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.8)",display:"flex",alignItems:"center",zIndex:1050},children:a.jsx("div",{className:"modal fade in",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{width:"90%",maxWidth:"600px",maxHeight:"90%",overflow:"auto",backgroundColor:"white",position:"relative"},children:a.jsx("div",{className:"modal-dialog",role:"document",children:a.jsxs("div",{className:"modal-content",children:[a.jsxs("div",{className:"modal-header",children:[a.jsx("button",{type:"button",className:"close","data-dismiss":"modal",onClick:t,"aria-label":"Close",children:a.jsx("h3",{"aria-hidden":"true",className:"text-danger",children:"×"})}),a.jsx("h3",{className:"modal-title",children:n})]}),a.jsx("div",{className:"modal-body",children:r}),a.jsxs("div",{className:"modal-footer",style:{padding:"15px",textAlign:"right",borderTop:"1px solid #e5e5e5",backgroundColor:"#f8f9fa"},children:[a.jsx("button",{className:"btn btn-danger",onClick:t,children:i}),a.jsx("button",{className:"btn btn-success",onClick:o,disabled:!l,children:s})]})]})})})}):null;Wa.propTypes={show:q.bool.isRequired,onClose:q.func.isRequired,title:q.string.isRequired,children:q.node.isRequired,onSave:q.func.isRequired,buttonText:q.string,cancelText:q.string,canSave:q.bool};const be=({children:e,color:t,dismissable:n=!1})=>a.jsxs("div",{className:`alert alert-${t} mt-3 alert-dismissible show`,role:"alert",children:[e,n&&a.jsx("button",{type:"button",className:"close","data-dismiss":"alert","aria-label":"Close",children:a.jsx("span",{"aria-hidden":"true",children:"×"})})]}),Co=({label:e,options:t,value:n,onChange:r,...o})=>a.jsxs("div",{className:"form-group",children:[e&&a.jsx("label",{children:e}),a.jsx("select",{className:"form-control",value:n,onChange:r,...o,children:t.map(s=>a.jsxs("option",{value:s.value,children:[s.label,s.additionalInfo&&` - ${s.additionalInfo}`]},s.value))})]});Co.propTypes={label:q.string,options:q.arrayOf(q.shape({value:q.oneOfType([q.string,q.number]).isRequired,label:q.string.isRequired,additionalInfo:q.string})).isRequired,value:q.oneOfType([q.string,q.number]),onChange:q.func.isRequired};function us({label:e,type:t="text",value:n,onChange:r,disabled:o=!1,infoText:s="",style:i,inputClassName:l,inputAddon:c}){return a.jsxs(a.Fragment,{children:[e&&a.jsx("label",{children:e}),s&&a.jsx("small",{className:"form-text help-block",children:s}),t==="textarea"?a.jsx("textarea",{className:`form-control ${l||""}`,value:n,onChange:r,disabled:o,rows:"6"}):c?a.jsxs("div",{className:"input-prepend",children:[a.jsx("span",{className:"add-on",children:c}),a.jsx("input",{type:t,className:`form-control ${l||""}`,style:i,value:n,onChange:r,disabled:o})]}):a.jsx("input",{type:t,className:`form-control ${l||""}`,style:i,value:n,onChange:r,disabled:o})]})}const hE="_blurred_16xcy_16",yn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:hE,"warning-banner":"_warning-banner_16xcy_21","alt-warning-banner":"_alt-warning-banner_16xcy_40 _warning-banner_16xcy_21"},Lf=({headerText:e,header:t,children:n,isEditing:r=!1,onEditingChange:o,warningMessage:s=""})=>{const i=e&&e.type==="label";return a.jsxs("div",{className:yn["advanced-settings"],children:[(e||t)&&a.jsxs("div",{className:yn["header-wrapper"],children:[e,t&&a.jsx("div",{className:`${yn["header-buttons-container"]} ${r?"":yn.blurred}`,children:t})]}),a.jsxs("div",{style:{width:"100%"},children:[!r&&a.jsxs("div",{className:i?`${yn["alt-warning-banner"]}`:yn["warning-banner"],children:[a.jsxs("span",{className:yn["warning-text"],children:[a.jsx("strong",{children:"CAUTION! "})," ",s]}),a.jsx("button",{className:"btn btn-danger",onClick:()=>o(!0),children:"I understand the risks"})]}),a.jsx("div",{className:`${yn["content-container"]} ${r?"":yn.blurred}`,children:n})]})]})};Lf.propTypes={headerText:q.node,header:q.node,children:q.node.isRequired,isEditing:q.bool,onEditingChange:q.func.isRequired,warningMessage:q.string};const Uf=je.memo(function({resourceDetails:t,resourceTypesOptions:n,unitTypesOptions:r,dispatch:o,isDollarValueEditing:s,onDollarValueEditingChange:i,showDollarValue:l=!0,showResourceId:c=!0,useAdvancedSettings:u=!0}){const d="Dollar Value per SUs",f=l?a.jsx(us,{label:u?null:d,value:t.dollar_value,onChange:p=>o(Zo("dollar_value",p.target.value)),type:"number",inputAddon:"$",inputClassName:"span4"}):null;return a.jsxs(a.Fragment,{children:[a.jsx(us,{label:"Resource Name",value:t.resource_name,onChange:p=>o(Zo("resource_name",p.target.value)),inputClassName:"span8"}),c&&a.jsx(us,{label:"Resource Repository Key",value:t.resource_repository_key,disabled:!0,inputClassName:"span8"}),u&&l?a.jsx(Lf,{headerText:a.jsx("label",{children:d}),isEditing:s,onEditingChange:i,warningMessage:"Dollar value is for reporting and should only be modified if the SU rate changes.",children:f}):f,a.jsx(us,{label:"Allocations Description",type:"textarea",value:t.description,infoText:"Appears below the resource name in the form when making a new request, as well as under the header Allocations Description in resource catalogs",onChange:p=>o(Zo("description",p.target.value)),inputClassName:"span8"}),a.jsx(Co,{label:"Resource Type",options:n,value:t.resource_type_id,onChange:p=>o(Zo("resource_type_id",p.target.value)),className:"span8"}),a.jsx(Co,{label:"Unit Type",options:r,value:t.unit_type_id,onChange:p=>o(Zo("unit_type_id",p.target.value)),className:"span8"})]})});Uf.propTypes={resourceDetails:q.object.isRequired,resourceTypesOptions:q.array.isRequired,unitTypesOptions:q.array.isRequired,dispatch:q.func.isRequired,isDollarValueEditing:q.bool,onDollarValueEditingChange:q.func,showDollarValue:q.bool,showResourceId:q.bool,useAdvancedSettings:q.bool};function xx({onClose:e}){const[t,n]=w.useState(!0),[r,o]=w.useState([]),[s,i]=w.useState(null),[l,c]=w.useState(-1),[u,d]=w.useState(null),f=Ff(u);f.resourceTypesOptions.unshift({value:0,label:"Select a resource type..."}),f.unitTypesOptions.unshift({value:0,label:"Select a unit type..."}),w.useEffect(()=>{(async()=>{const g=await fetch("/resources/addable.json");n(!1),g.status==200?o(await g.json()):i("Error retrieving resource list.")})()},[]),w.useEffect(()=>{if(l===-1)return d(null);(async()=>{const g=await fetch(`/resources/addable/${l}.json`);g.status==200?d(await g.json()):i("Error retrieving resource details.")})()},[l]);let p=null;t?p=a.jsx("p",{children:"Loading…"}):s!==null?p=a.jsx(be,{color:"danger",children:s}):r.length==0&&(p=a.jsx(be,{children:"There are currently no resources available to add."}));const y=[{value:-1,label:"Select a resource..."}].concat(r.map(g=>({value:g.xras_cider_resource_id,label:g.resource_descriptive_name}))),m=u?u.resource_details:null,h=!s&&m&&m.resource_name.length>0&&m.resource_type_id>0&&m.unit_type_id>0,x=g=>{g.type=="UPDATE_RESOURCE_FIELD"&&d({...u,resource_details:{...u.resource_details,[g.field]:g.value}})},v=()=>{(async()=>{const g=await fetch("/resources",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({...m,resource_repository_key:l})});if(g.status==200){const b=await g.json();window.location=`/resources/${b.resource_id}`}else i("Error saving resource.")})()};return p===null&&(p=a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Select a Resource to Add"}),a.jsx(Co,{options:y,onChange:g=>c(parseInt(g.target.value))}),!u&&l!==-1?a.jsx("p",{children:"Loading…"}):null,u&&a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Resource Properties"}),a.jsx("p",{style:{fontStyle:"italic",fontWeight:"bold"},children:"Any modifications to these resource properties will be applied globally and impact resources on other all allocations process"}),a.jsx("div",{className:pE["form-wrapper"],children:a.jsx(Uf,{resourceDetails:m,resourceTypesOptions:f.resourceTypesOptions,unitTypesOptions:f.unitTypesOptions,showResourceId:!1,showDollarValue:!1,dispatch:x})})]})]})),a.jsx(Wa,{show:!0,onClose:e,title:"Add a Resource from CIDeR",onSave:v,buttonText:"Save",canSave:h,children:p})}xx.propTypes={onClose:q.func.isRequired};function mE({availableResources:e,unavailableResources:t=[],canAdd:n=!1,relativeUrlRoot:r}){const o=w.useMemo(()=>cm(e),[e]),s=w.useMemo(()=>cm(t),[t]),[i,l]=w.useState(o),[c,u]=w.useState(!1),d=w.useRef(null),f=w.useRef(null),p="Active",y="Inactive",[m,h]=w.useState(p),x=_=>{h(_),console.log(_),_==p?l(o):l(s)};function v(_,j){j.preventDefault(),h(_),x(_)}w.useEffect(()=>{l(o)},[o]);const g=(_,j)=>{d.current=j},b=(_,j)=>{if(_.preventDefault(),d.current===j)return;const C=[...i],E=C[d.current];C.splice(d.current,1),C.splice(j,0,E),d.current=j,l(C);const{clientY:N}=_,R=130;N<R?um(-1,f):window.innerHeight-N<R?um(1,f):$c(f)},S=()=>{d.current=null,$c(f),XC(r,i)};return w.useEffect(()=>()=>$c(f),[]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Ht["resources-container"],children:[n&&a.jsx("button",{className:"btn btn-primary pull-right",onClick:()=>u(!0),children:"Add a Resource from CIDeR"}),a.jsx("h2",{children:"Select a resource from the list to modify"}),a.jsx("p",{className:Ht["drag-instruction"],children:"Drag items to reorder the list."}),a.jsxs("div",{className:"w-full max-w-md mx-auto p-4",children:[a.jsxs("ul",{className:"nav nav-tabs",children:[a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${m===p?"active":""}`,"data-toggle":m===p?"tab":void 0,style:{cursor:"default",...m===p?{border:"1px solid #ddd",borderBottomColor:"transparent",color:"#555",backgroundColor:"#fff"}:{}},onClick:_=>v(p,_),children:p})}),a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${m===y?"active":""}`,"data-toggle":m===y?"tab":void 0,style:{cursor:"default"},onClick:_=>v(y,_),children:y})})]}),a.jsxs("div",{className:Ht["resources-list"],children:[a.jsxs("div",{className:Ht["resources-header"],children:[a.jsx("span",{className:Ht["header-name"],children:"Resource Name"}),a.jsx("span",{className:Ht["header-repo"],children:"Repository Key"})]}),i.map((_,j)=>a.jsxs("div",{className:`${Ht["resources-item"]}`,draggable:!0,onDragStart:C=>g(C,j),onDragOver:C=>b(C,j),onDrop:S,children:[a.jsx("span",{className:Ht["drag-handle"]}),a.jsx("span",{className:Ht["resource-name"],children:a.jsx("a",{href:`${r}/resources/${_.resource_id}`,className:Ht["resource-link"],children:_.display_resource_name})}),a.jsx("span",{className:Ht["resource-repo"],children:_.resource_repository_key||"N/A"})]},_.resource_id))]})]})]}),c&&a.jsx(xx,{onClose:()=>u(!1)})]})}function Do(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const gE="_grid_afccc_1",vE="_important_afccc_30",yE="_input_afccc_34",xE="_edited_afccc_38",bE="_disabled_afccc_46",wE="_scroll_afccc_59",Cr={grid:gE,important:vE,input:yE,edited:xE,disabled:bE,scroll:wE};function SE({column:e,row:t,style:n={}}){const r=e.format?e.format(t[e.key],t):t[e.key],o=["cell"];return e.class&&o.push(e.class),e.rowClass&&o.push(e.rowClass(t)),a.jsx("td",{className:o.join(" "),style:n,children:r})}const Vf=({title:e,placement:t,children:n})=>(w.useEffect(()=>($('[data-toggle="tooltip"]').tooltip(),()=>{$('[data-toggle="tooltip"]').tooltip("destroy")}),[]),a.jsx("span",{"data-toggle":"tooltip","data-placement":t,title:e,style:{margin:"10px"},children:n}));Vf.propTypes={title:q.string.isRequired,placement:q.oneOf(["top","bottom","left","right"]),children:q.node.isRequired};Vf.defaultProps={placement:"top"};const _E="_datepicker_19wnv_1",jE="_error_19wnv_1",fm={datepicker:_E,error:jE},CE=({value:e,onChange:t,disabled:n=!1,style:r,className:o="",minDate:s="",maxDate:i="",error:l=""})=>{const c=l;return a.jsx("div",{className:`w-full ${o}`,children:a.jsx("input",{type:"date",style:r,className:`${fm.datepicker} ${c?fm.error:""}`,value:e||"",onChange:u=>t(u.target.value),disabled:n,min:s||"1900-01-01",max:i||"2100-12-31"})})},Jo=(e,t,n)=>{if(t.onChange){t.onChange(n,e);return}const r=e[t.key];r!=null&&r.onChange&&r.onChange(n)},EE={text:SE,select:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(Co,{label:"",options:t[e.key].options,value:t[e.key].value,onChange:r=>Jo(t,e,r.target.value),style:{width:"100%",margin:0}})}),input:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(us,{label:"",type:"text",disabled:t[e.key].disabled,value:t[e.key].value,onChange:r=>Jo(t,e,r.target.value),style:{width:"92%",margin:0}})}),checkbox:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx("input",{type:"checkbox",checked:t[e.key].checked,onChange:r=>Jo(t,e,r.target.checked)})}),date:({column:e,row:t,style:n})=>{const r=t[e.key];return!(r!=null&&r.value)&&typeof r!="object"?a.jsx("td",{style:n,children:r||""}):a.jsx("td",{style:n,children:a.jsx(CE,{value:r.value,onChange:o=>Jo(t,e,o),disabled:r.disabled,style:{width:"92%",margin:0},minDate:e.minDate,maxDate:e.maxDate,error:r.error})})},action:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:t.rate_type==="Discount"&&a.jsx("button",{className:"btn btn-link text-danger",onClick:()=>{var r;return Jo(t,e,(r=t[e.key])==null?void 0:r.id)},children:a.jsx("i",{className:"fa fa-trash"})})})};function Un({columns:e,rows:t,classes:n,frozenColumns:r=0,minWidth:o,rowClasses:s=[],scroll:i=!0,scrollBehavior:l="smooth",scrollRowIndex:c=0}){const u=w.useRef();w.useLayoutEffect(()=>{if(!i||!u.current)return;const h=u.current.querySelector(`tbody tr:nth-child(${c+1})`);h&&h.scrollIntoView({behavior:l,block:"nearest",inline:"nearest"})},[i,c,l]);const d=[0];for(let h=0;h<r;h++)d[h+1]=d[h]+(e[h].width||100);const f=(h,x)=>h<r?{position:"sticky",left:`${d[h]}px`,minWidth:`${e[h].width||100}px`,width:`${e[h].width||100}px`,zIndex:x||1}:{},p=e.map((h,x)=>a.jsxs("th",{className:h.headerClass||h.class||"",style:f(x,100),children:[h.formatHeader?h.formatHeader(h.name,h):h.name,h.tooltip&&a.jsx(Vf,{title:h.tooltip,placement:"bottom",children:a.jsx("i",{className:"icon-info-sign"})})]},h.key)),y=t.map((h,x)=>{const v=e.map((g,b)=>{const S=EE[g.type||"text"];return a.jsx(S,{column:g,row:h,style:f(b)},g.key)});return a.jsx("tr",{className:s[x]||"",children:v},x)}),m={};return o&&(m.minWidth=o),a.jsx("div",{className:`${Cr.grid} ${i?Cr.scroll:""} ${n||""}`,ref:u,children:a.jsxs("table",{className:"table table-bordered",style:m,children:[a.jsx("thead",{children:a.jsx("tr",{children:p})}),a.jsx("tbody",{children:y})]})})}const nd={"header-buttons":"_header-buttons_15oxx_1","allocation-types-grid":"_allocation-types-grid_15oxx_6","vertical-align-center":"_vertical-align-center_15oxx_10"},bx=({onAddAllocationType:e,onAddRequiredResource:t})=>a.jsxs("div",{className:nd["header-buttons"],children:[a.jsxs("button",{className:"btn btn-primary",onClick:e,children:[a.jsx("i",{className:"fa fa-plus"})," Add Allocation Type"]}),a.jsxs("button",{className:"btn btn-primary",onClick:t,children:[a.jsx("i",{className:"fa fa-plus"})," Add Required Resource"]})]});bx.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const wx=je.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:nd["allocation-types-grid"],children:[a.jsx(Un,{columns:t,rows:n,rowClasses:Array(n.length).fill(nd["vertical-align-center"]),scroll:!1}),a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Note: You may need to contact your Allocations Coordinator if you have added this resource to an allocation type."})]})});wx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired};const zr={"exchange-rates-grid":"_exchange-rates-grid_5qkd5_1","header-container":"_header-container_5qkd5_5","header-buttons":"_header-buttons_5qkd5_11","vertical-align-center":"_vertical-align-center_5qkd5_18","error-summary":"_error-summary_5qkd5_35"},Sx=je.memo(function({columns:t,rows:n,onAddDiscountRate:r,dateErrors:o=[]}){return a.jsxs("div",{className:zr["exchange-rates-grid"],children:[a.jsxs("div",{className:zr["header-container"],children:[a.jsx("h2",{className:zr["header-title"],children:"Exchange Rates"}),a.jsx("div",{className:zr["header-buttons"],children:a.jsxs("button",{className:"btn btn-primary",onClick:r,children:[a.jsx("i",{className:"fa fa-plus"})," Add Discount Rate"]})})]}),a.jsx(Un,{columns:t,rows:n,rowClasses:Array(n.length).fill(zr["vertical-align-center"]),scroll:!1}),o.length>0&&a.jsx("div",{className:zr["error-summary"],children:a.jsx("ul",{children:o.map((s,i)=>a.jsx("li",{children:s},i))})})]})});Sx.propTypes={columns:q.array.isRequired,rows:q.array.isRequired,onAddDiscountRate:q.func.isRequired,dateErrors:q.array};const RE=(e,t)=>{const n=w.useCallback(y=>{var h,x;t({type:"DELETE_EXCHANGE_RATE",payload:y}),(((x=(h=e==null?void 0:e.resource_details)==null?void 0:h.exchange_rates)==null?void 0:x.discount_rates.filter(v=>v.id!==y))||[]).forEach(v=>{v.begin_date&&v.end_date&&t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:v.id,changes:{start_date_error:"",end_date_error:""}}})})},[t,e]),r=[{key:"rate_type",name:"Rate Type",width:150},{key:"rate",name:"Exchange Rate",width:100,type:"input",tooltip:"Exchange rate is the cost in ACCESS Credits of one resource unit. ACCESS Credits / exchange rate = resource units"},{key:"conversion",name:"Resource Units per ACCESS Credit",width:150},{key:"start_date",name:"Start Date",width:150,type:"date",minDate:new Date().toISOString().split("T")[0]},{key:"end_date",name:"End Date",width:150,type:"date",minDate:new Date().toISOString().split("T")[0]},{key:"actions",name:"",width:80,type:"action",onChange:n}],o=y=>{t({type:"UPDATE_BASE_RATE",payload:y})},s=(y,m)=>{const h={exchange_rate:m},x={};m?x.rate_error="":x.rate_error="Exchange Rate cannot be empty",t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...h,...x}}})},i=()=>{var h,x;const y=[];return(((x=(h=e==null?void 0:e.resource_details)==null?void 0:h.exchange_rates)==null?void 0:x.discount_rates)||[]).forEach(v=>{v.start_date_error&&y.push(v.start_date_error),v.end_date_error&&y.push(v.end_date_error),v.rate_error&&y.push(v.rate_error)}),y.filter((v,g)=>v&&v!==""&&(!v.includes("overlaps")||y.indexOf(v)===g))},l=y=>{const m=new Date(y);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(m)},c=(y,m,h,x)=>{const v=new Date(y).getTime(),g=new Date(m).getTime(),b=new Date(h).getTime(),S=new Date(x).getTime();return v<=S&&b<=g},u=(y,m)=>{let h="";if(y.begin_date&&y.end_date){const x=m.filter(v=>v.id!==y.id);for(const v of x)if(v.begin_date&&v.end_date&&c(y.begin_date,y.end_date,v.begin_date,v.end_date)){h=`The selected date range (${l(y.begin_date)} to ${l(y.end_date)}) overlaps with an existing discount rate (${l(v.begin_date)} to ${l(v.end_date)})`;break}}return h},d=(y,m,h)=>{var R,T;const x={start_date:"begin_date",end_date:"end_date"},v=k=>{const P=new Date(k);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(P)},g=((T=(R=e==null?void 0:e.resource_details)==null?void 0:R.exchange_rates)==null?void 0:T.discount_rates)||[],b=g.find(k=>k.id===y);if(!b)return;const S={[x[m]]:h},_={},j=m==="end_date",C=()=>{if(!h)return _[`${m}_error`]="Date cannot be empty or invalid",!1;const k=r.find(V=>V.key===m),P=(k==null?void 0:k.minDate)||"1900-01-01",M=(k==null?void 0:k.maxDate)||"2100-12-31",D=j&&b.begin_date?b.begin_date:P;return h<D?(_[`${m}_error`]=`${m.replace("_"," ")} ${v(h)} cannot be before ${v(D)}`,!1):h>M?(_[`${m}_error`]=`${m.replace("_"," ")} cannot be after ${v(M)}`,!1):(_[`${m}_error`]="",!0)},E=()=>{const k=m==="end_date"?h:b.end_date;if(m==="start_date"&&k){if(h>k)return _.end_date_error=`end date ${v(k)} cannot be before ${v(h)}`,!1;_.end_date_error=_.end_date_error||""}return!0},N=()=>{console.log("validating overlaps");const k=m==="start_date"?h:b.begin_date,P=m==="end_date"?h:b.end_date;if(k&&P){const M=u({...b,begin_date:k,end_date:P},g);return _.start_date_error=M,_.end_date_error=M,!M}return!0};if(!C()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...S,..._}}});return}E(),N(),j&&!b.begin_date?_.start_date_error="Date cannot be empty or invalid":!j&&!b.end_date&&(_.end_date_error="Date cannot be empty or invalid"),t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:y,changes:{...S,..._}}})},f=()=>{var _,j;const y=((j=(_=e==null?void 0:e.resource_details)==null?void 0:_.exchange_rates)==null?void 0:j.discount_rates)||[];let h=new Date;y.forEach(C=>{if(C.end_date){const E=new Date(C.end_date);E>h&&(h=E)}});const x=new Date(h);x.setDate(x.getDate()+1);const v=x.toISOString().split("T")[0],g=new Date(x);g.setDate(g.getDate()+15);const b=g.toISOString().split("T")[0],S={id:Date.now(),exchange_rate:"1.0",begin_date:v,end_date:b,is_new:!0};t({type:"ADD_EXCHANGE_RATE",payload:S})};return{exchangeRateColumns:r,exchangeRateRows:(()=>{var b,S;const y=(b=e==null?void 0:e.resource_details)==null?void 0:b.exchange_rates,m=(y==null?void 0:y.base_rate)??"",h=(y==null?void 0:y.discount_rates)||[],x=new Date().toISOString().split("T")[0],v=((S=e==null?void 0:e.resource_details)==null?void 0:S.unit_type)||"Resource Units",g=_=>!_||Number(_)===0?"-":`${(1/Number(_)).toFixed(2)} ${v}`;return[{rate_type:"Base Rate",rate:{value:m.toString(),onChange:_=>o(_)},conversion:g(m)},...h.map(_=>{var N;const j=_.is_new||_.begin_date>x,C=j||_.begin_date==="",E=_.is_new||_.end_date>=x||_.end_date==="";return{rate_type:"Discount",rate:{value:((N=_.exchange_rate)==null?void 0:N.toString())||"",onChange:j?R=>s(_.id,R):null,disabled:!j},conversion:g(_.exchange_rate),start_date:{value:_.begin_date||"",onChange:R=>d(_.id,"start_date",R),error:_.start_date_error,disabled:!C},end_date:{value:_.end_date||"",onChange:R=>d(_.id,"end_date",R),error:_.end_date_error,disabled:!E},actions:{id:_.id}}})]})(),handleAddDiscountRate:f,handleDeleteRate:n,dateErrors:i()}};function _x({resourceId:e,relativeUrlRoot:t,setExternalSubmit:n}){const{state:r,dispatch:o,handleError:s,fetchData:i}=lE(e,t),{isEditing:l,handleEditingChange:c}=fE(),{resourceData:u,loading:d,errors:f,successMessage:p}=r,y=u==null?void 0:u.resource_details,m=u==null?void 0:u.uses_exchange_rates,{allowedActionsOptions:h,resourceTypesOptions:x,unitTypesOptions:v,availableResources:g,availableAllocationTypes:b}=Ff(u),{showAddResourceModal:S,setShowAddResourceModal:_,showAddAllocationTypeModal:j,setShowAddAllocationTypeModal:C,selectedNewResource:E,handleSelectNewResource:N,handleSaveResources:R,selectedNewAllocationType:T,handleSelectNewAllocationType:k,handleSaveAllocationType:P,handleAllowedActionChange:M,handleCommentChange:D,handleRequiredResourceChange:V}=uE(u,y,o),{exchangeRateColumns:Q,exchangeRateRows:O,handleAddDiscountRate:U,dateErrors:A}=RE(u,o),H=dE(y,e,t,i,s,o);w.useEffect(()=>{n&&A.length==0?n(H):n(null)},[H,n,A]);const{allocationColumns:B,allocationRows:W}=cE(y,g,E,h,M,D,V),[Z,ee]=w.useState(!1);return d?a.jsx(Do,{}):f.length>0?a.jsx("div",{children:f.map((X,ie)=>a.jsx(be,{color:"danger",dismissable:!0,children:X},ie))}):u?a.jsxs("div",{className:"edit-resource",children:[p.message&&a.jsx(be,{color:p.color,dismissable:!0,children:p.message}),a.jsxs("div",{children:[a.jsx("h2",{children:"Resource Propeties"}),a.jsx("div",{style:{marginBottom:"0.75rem"},children:a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Any modifications to these resource properties will be applied globally and impact resources on other all allocations process"})}),a.jsx(Uf,{resourceDetails:y,resourceTypesOptions:x,unitTypesOptions:v,dispatch:o,isDollarValueEditing:Z,onDollarValueEditingChange:ee})]}),m&&a.jsx(Sx,{columns:Q,rows:O,onAddDiscountRate:U,dateErrors:A}),a.jsx(Lf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(bx,{onAddAllocationType:()=>l&&C(!0),onAddRequiredResource:()=>l&&_(!0)}),isEditing:l,onEditingChange:c,warningMessage:`Incorrect allocations
53
53
  process settings can make a resource unavailable for allocation.
54
- Please proceed with caution.`,children:a.jsx(_x,{columns:U,rows:Y})}),a.jsx(Ka,{show:S,onClose:()=>_(!1),title:"Add Required Resource",onSave:R,buttonText:"Save",children:a.jsx("div",{children:g.map(X=>a.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[a.jsx("input",{type:"checkbox",style:{margin:0},checked:E.includes(X.resource_id),onChange:se=>N(X.resource_id,se.target.checked)}),X.resource_name]},X.resource_id))})}),a.jsx(Ka,{show:j,onClose:()=>C(!1),title:"Add Allocation Type",onSave:P,buttonText:"Save",children:a.jsx(Co,{label:"Select Allocation Type",options:[{value:"",label:"Select an allocation type to add",disabled:!0},...b.map(X=>({value:X.allocation_type_id,label:X.display_name}))],value:T,onChange:k})})]}):a.jsx("div",{children:"No resource data available."})}Cx.propTypes={resourceId:q.number.isRequired,relativeUrlRoot:q.string.isRequired,setExternalSubmit:q.func};const Le={error:"error",pending:"pending",success:"success"},Ga=e=>e.endDate||e.startDate||(e.actions[0]||{}).entryDate,pm=e=>`${{pi:"01",co_pi:"02",allocation_manager:"03"}[e.role]||"04"} ${e.lastName}, ${e.firstName}`,kE=(e,{grantNumber:t,projectManager:n,requestMasterId:r,requests:o,title:s,users:i},l)=>{t=t||r,o.sort((d,f)=>Ga(d)>Ga(f)?-1:1);const c=o.find(d=>d.timeStatus=="current"),u=c?c.requestId:null;e.projects[t]={currentRequestId:u,grantNumber:t,isManager:n,requestsList:o.map(d=>{const{actions:f,allocationType:p,endDate:y,requestId:m,startDate:h,status:x}=d,v=f.map(({entryDate:g})=>g).sort()[0].split("T")[0];return TE(e,d,{entryDate:v,grantNumber:t}),{allocationType:p,endDate:y,entryDate:v,requestId:m,startDate:h,status:x}}),selectedRequestId:u||o[0].requestId,status:l,tab:"overview",title:s,users:i.map(({eligibleReason:d,email:f,firstName:p,isEligible:y,lastName:m,organization:h,resources:x,role:v,username:g})=>{const b=x.filter(E=>E.userAccountState=="active"&&E.unitType!="ACCESS Credits"),S=b.map(E=>E.xrasResourceId),_=b.filter(E=>E.resourceProviderState=="pending-active").map(E=>E.xrasResourceId),j=x.filter(E=>E.userAccountState!="active").map(E=>E.xrasResourceId),C={};for(let E of b)C[E.xrasResourceId]=E.resourceUsername;return{eligibility:y,eligibilityReason:d,email:f,firstName:p,initialResourceIds:[...S],initialRole:v,lastName:m,organization:h,resourceAccountPendingIds:_,resourceAccountInactiveIds:j,resourceIds:S,resourceUsernames:C,role:v,username:g}}).sort((d,f)=>pm(d)<pm(f)?-1:1),usersNewRowIndex:0,usersStatus:null},e.projects[t].currentUser=e.projects[t].users.find(({username:d})=>d==e.username)},TE=(e,{actions:t,allocationType:n,allowedActions:r,endDate:o,requestId:s,requestType:i,resources:l,startDate:c,status:u,timeStatus:d},{entryDate:f,grantNumber:p})=>{l=l||[];const y={actions:t.map(({actionId:x,actionStatusType:v,actionType:g,allowedOperations:b,approvedStartDate:S,detailAvailable:_,entryDate:j,isRequest:C,requestedStartDate:E,resources:N})=>({actionId:x,allowedOperations:b,detailAvailable:_,date:(j||S||E).split("T")[0],deleteStatus:null,isRequest:C,resources:N.map(od).sort(Ha),showDeleteModal:!1,status:v,type:g})),allocationType:n,allowedActions:OE(r),endDate:o,entryDate:f,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:p,isMaximize:n=="Maximize",requestId:s,resources:l.map(od).filter(x=>x.isCredit||x.allocated>0).sort(Ha),resourcesReason:"",returnedForCorrections:!!t.find(x=>x.returnedForCorrections),returnedForCorrectionsNotes:t.map(x=>x.adminComments).join(","),showActionsModal:!1,showConfirmModal:!1,showResourcesModal:!1,startDate:c,status:u,timeStatus:d,type:i,usageDetail:null,usageDetailStatus:null,usesCredits:["Explore","Discover","Accelerate"].includes(n)};let m={};for(let x of y.actions)if(["Exchange","Transfer"].includes(x.type)&&["Submitted","Under Review","Incomplete"].includes(x.status)){y.exchangeActionId=x.actionId,y.exchangeActionEditable=x.status==="Incomplete";for(let v of x.resources)m[v.resourceId]=v;for(let v of y.resources)v.resourceId in m&&(v.requested+=m[v.resourceId].requested,delete m[v.resourceId]);y.resources.push(...Object.values(m).map(v=>({...v,isNew:!0})));break}const h=y.allowedActions.Exchange||y.allowedActions.Transfer;if(h){m={};for(let x of h.resources)m[x.resourceId]=x;for(let x of y.resources)x.resourceId in m&&(x.questions=m[x.resourceId].questions||[],x.requires=m[x.resourceId].requires||[])}y.resources.length&&!y.resources.find(x=>x.isCredit)&&y.resources.push(h&&h.resources.find(x=>x.isCredit)||{allocated:0,decimalPlaces:0,exchangeRates:{base:{type:"base",unitCost:1},current:{type:"base",unitCost:1}},icon:"credit",isActive:!0,isBoolean:!1,isCredit:!0,isFake:!0,name:"Credit Equivalents",requested:0,requires:[],resourceId:0,unit:"Credit Equivalents",used:0}),e.requests[s]=y},OE=e=>{const t={};for(let{actionType:n,allowedResources:r,opportunityId:o,opportunityName:s}of e){let i={name:n,resources:r.map(od).sort(Ha),opportunityId:o,opportunityName:s};n in t?(Array.isArray(t[n])||(t[n]=[t[n]]),t[n].push(i)):t[n]=i}return"Transfer"in t&&!("Exchange"in t)&&(t.Exchange=t.Transfer),t},hm=(e,t)=>e.relativeOrder<t.relativeOrder?-1:1,od=({allocationState:e,amountAllocated:t,amountApproved:n,amountRequested:r,amountUsed:o,attributeSets:s,baseExchangeRate:i,currentExchangeRate:l,currentExchangeRateEndDate:c,currentExchangeRateType:u,dependentResourceXrasIds:d,displayResourceName:f,endDate:p,exchangeRate:y,organizationId:m,organizationFaviconUrl:h,organizationName:x,resourceRepositoryKey:v,resourceType:g,startDate:b,unitType:S,userGuideUrl:_,xrasResourceId:j})=>{const C=S=="[Yes = 1, No = 0]",E=S=="ACCESS Credits";return{allocated:ho(om(t,n)||0,0,"floor"),decimalPlaces:0,endDate:p,exchangeRates:{base:{type:"base",unitCost:C?0:i||y},current:{endDate:c,type:(u||"base").toLowerCase(),unitCost:C?0:l||y}},icon:E?"credit":g.toLowerCase(),isActive:e=="active",isBoolean:C,isCredit:E,isFake:!1,isUnderReview:!1,isNew:!1,name:f.trim(),questions:(s||[]).filter(({isActive:N})=>N).sort(hm).map(N=>({attributeSetId:N.attributeSetId,attributes:N.attributes.sort(hm).map(R=>({required:R.isRequired,resourceAttributeId:R.resourceAttributeId,label:R.attributeName})),fieldType:N.attributeSetRelationType,label:N.attributeSetName,resourceId:j,values:[]})),resourceProvider:{organizationId:m,name:x,favicon:h},requested:ho(om(r,t)||0,0,"floor"),requires:d||[],resourceId:j,resourceRepositoryKey:v,startDate:b,type:g,unit:S,used:ho(o||0,0,"ceil"),userGuideUrl:_}},mm=(e,t)=>{const n=t.allowedActions.Exchange;if(!n)return;const r={};for(let c of n.resources)r[c.resourceId]=c;const o=t.resources.map(c=>c.resourceId),s=r[e].requires||[];let i=!s.some(c=>o.includes(c));const l=[e,...i?s:[]].filter(c=>c in r&&!o.includes(c));t.resources.push(...l.map(c=>({...r[c],allocated:0,isNew:!0,used:0,requested:0})))},Ex=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Oi=(e,t)=>{const n=Fe(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},on=(e,t)=>e.projects[t.payload.grantNumber],Fe=(e,t)=>e.requests[t.payload.requestId],PE=(e,t)=>on(e,t).users.find(({username:n})=>n==t.payload.username),sd=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,gm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!Ex(e.resourceIds,e.initialResourceIds),Rx=()=>document.querySelector("meta[name=csrf-token]").content,$E=async e=>{const t=new URLSearchParams({q:e});return(await(await fetch(`${te.routes.search_people_path()}?${t}`)).json()).map(({eligible_reason:r,email:o,first_name:s,is_eligible:i,last_name:l,username:c,organization:u})=>({eligibility:i,eligibilityReason:r,email:o,firstName:s,lastName:l,username:c,organization:u}))},na=Qe("api/fetchProjectsList",async(e,{rejectWithValue:t})=>{const n=await fetch(`${te.routes.projects_path()}.json`);return n.status==200?{username:e,projectsList:(await n.json()).result}:t({})}),Nx=Qe("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),kx=Qe("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),ra=Qe("api/fetchUsageDetail",async({grantNumber:e,requestId:t,resourceRepositoryKey:n},{rejectWithValue:r})=>{const o=await fetch(`${te.routes.usage_detail_path(e,n)}.json`);return o.status==200?{grantNumber:e,requestId:t,resourceRepositoryKey:n,usageDetail:(await o.json()).usage}:r({grantNumber:e,requestId:t,resourceRepositoryKey:n})}),oa=Qe("api/deleteAction",async({actionId:e,requestId:t},{getState:n,rejectWithValue:r})=>{const o=n().api.requests[t],s=o.actions.find(u=>u.actionId==e);if(!s||!s.allowedOperations||!s.allowedOperations.includes("Delete"))return r({actionId:e,requestId:t});const i=te.routes.request_action_path(o.requestId,s.actionId),l={_method:"delete",authenticity_token:Rx()};return(await fetch(i,{body:Object.keys(l).map(u=>`${encodeURIComponent(u)}=${encodeURIComponent(l[u])}`).join("&"),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},method:"POST"})).status==200?{actionId:e,requestId:t}:r({actionId:e,requestId:t})}),sa=Qe("api/saveResources",async({requestId:e},{getState:t,rejectWithValue:n})=>{const r=t().api.requests[e],o={},s={};for(let{allocated:f,isFake:p,questions:y,requested:m,resourceId:h}of r.resources)if(m!=f&&!p){o[h]={resource_id:h,requested:1,amount:m-f};for(let{attributes:x,values:v,fieldType:g}of y)if(v.length){let b=x[0].resourceAttributeId,S=["drop_down","single_sel","multi_sel"].includes(g),j={resource_attribute_id:g=="multi_sel"?v:S?v[0]:b};S||(j.attribute_value=v[0]),s[b]=j}}const i={authenticity_token:Rx(),request_action:{action_type:r.allowedActions.Exchange.name,user_comments:r.resourcesReason,resource_attributes:s},requested_resources:o},l=r.exchangeActionId?te.routes.request_action_path(r.requestId,r.exchangeActionId):te.routes.request_actions_path(r.requestId),c=await fetch(`${l}.json`,{body:JSON.stringify(i),headers:{"Content-Type":"application/json"},method:r.exchangeActionId?"PUT":"POST"});let u,d;try{const f=await c.json();u=f.errors,d=f.actionId}catch{u=["Unable to save exchange"],d=null}return c.status==200?{requestId:e,exchangeActionId:d}:n({requestId:e,exchangeActionId:d,errors:u})}),ia=Qe("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!Ex(u.resourceIds,u.initialResourceIds)||u.isNew).length==0?[]:o.map(u=>({username:u.username,resources:u.resourceIds})),i=o.filter(u=>u.role!=u.initialRole).map(u=>({username:u.username,role:Zu[u.role],initialRole:Zu[u.initialRole]})),l={grantNumber:e,resourceChanges:s,roleChanges:i,authenticity_token:document.querySelector("meta[name=csrf-token]").content};return(await fetch(te.routes.projects_save_users_path(),{method:"POST",body:JSON.stringify(l),headers:{"Content-Type":"application/json"}})).status==200?{grantNumber:e}:n({grantNumber:e})}),Tx=ri({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null},reducers:{addResource:(e,t)=>{const{resourceId:n}=t.payload,r=Fe(e,t);mm(n,r)},addUser:(e,t)=>{const n=on(e,t),r=e.requests[n.currentRequestId],{user:o}=t.payload;n.users.map(({username:s})=>s).includes(o.username)||(n.users.push({...o,resourceIds:r.resources.filter(sd).map(s=>s.resourceId),role:"user",initialResourceIds:[],initialRole:"user",hasChanges:!0,isNew:!0}),n.usersNewRowIndex=n.users.length-1)},closeUsageDetailModal:(e,t)=>{const n=Fe(e,t);n.usageDetail=null,n.usageDetailStatus=null},resetResources:(e,t)=>{const n=Fe(e,t);n.resourcesReason="",n.resources=n.resources.filter(r=>r.isCredit||r.allocated).map(r=>({...r,requested:r.allocated}))},resetUsers:(e,t)=>{const n=on(e,t);n.users=n.users.filter(({isNew:r})=>!r).map(r=>({...r,resourceIds:[...r.initialResourceIds],role:r.initialRole,hasChanges:!1}))},setRequest:(e,t)=>{const n=on(e,t);n&&(n.selectedRequestId=t.payload.requestId,n.tab=="users"&&n.currentRequestId!=n.selectedRequestId&&(n.tab="overview"))},setResourceQuestionValues:(e,t)=>{const{attributeSetId:n,resourceId:r,values:o}=t.payload,s=Fe(e,t);for(let i of s.resources)if(i.resourceId==r){for(let l of i.questions)if(l.attributeSetId==n){l.values=o;break}break}},setResourceRequest:(e,t)=>{const{resourceId:n,requested:r}=t.payload,o=Fe(e,t);let s,i=0;for(let l of o.resources)l.resourceId==n&&(l.requested=r,l.requested!=l.allocated&&mm(l.resourceId,o)),l.isCredit?(s=l,i+=l.allocated*l.exchangeRates.base.unitCost):i-=ed(l,"difference");s&&(s.requested=ho(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=Fe(e,t);n.resourcesReason=t.payload.reason},setTab:(e,t)=>{const n=on(e,t);n&&(n.tab=t.payload.tab)},setUserRole:(e,t)=>{const n=PE(e,t);n.role=t.payload.role,gm(n)},toggleActionsModal:(e,t)=>{const n=Fe(e,t);n.showActionsModal=!n.showActionsModal},toggleConfirmModal:(e,t)=>{const n=Fe(e,t);n.showConfirmModal=!n.showConfirmModal},toggleDeleteModal:(e,t)=>{const n=Oi(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=Fe(e,t);n.showResourcesModal=!n.showResourcesModal},toggleUsersResources:(e,t)=>{const n=on(e,t),r=e.requests[n.currentRequestId],{username:o,resourceId:s,checked:i}=t.payload,l=o?[n.users.find(c=>c.username==o)]:n.users;for(let c of l){if(s){let u=c.resourceIds.indexOf(s);i&&u==-1?c.resourceIds.push(s):!i&&u>=0&&c.resourceIds.splice(u,1)}else c.resourceIds=i?r.resources.filter(sd).map(({resourceId:u})=>u):[];gm(c)}}},extraReducers:e=>{e.addCase(na.pending,t=>{t.projectListLoading=!0}).addCase(na.fulfilled,(t,n)=>{n.payload.projectsList.sort((r,o)=>Ga(r.requests[0])>Ga(o.requests[0])?-1:1),t.username=n.payload.username,t.projectsList=n.payload.projectsList.map(r=>{const{grantNumber:o,requestMasterId:s,requests:i,status:l,title:c}=r,d=r.requests.filter(f=>f.actions.filter(p=>p.returnedForCorrections).length>0).length>0?"Returned for Corrections":l||i&&(i.find(({timeStatus:f})=>f=="current")?"Active":i[0].timeStatus=="past"?"Inactive":i[0].status);return i&&kE(t,r,d),{grantNumber:o||s,status:d,title:c}}),t.projectListLoading=!1}).addCase(na.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(Nx.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase(kx.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(ra.pending,(t,n)=>{const r=Fe(t,{payload:n.meta.arg});r.usageDetailStatus=Le.pending}).addCase(ra.fulfilled,(t,n)=>{const r=Fe(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Le.success}).addCase(ra.rejected,(t,n)=>{const r=Fe(t,n);r.usageDetailStatus=Le.error}).addCase(oa.pending,(t,n)=>{const r=Oi(t,{payload:n.meta.arg});r.deleteStatus=Le.pending}).addCase(oa.fulfilled,(t,n)=>{const r=Fe(t,n),o=Oi(t,n);o.isRequest?(r.error="This request has been deleted.",o.allowedOperations=[]):r.actions=r.actions.filter(s=>s.actionId!=o.actionId),o.deleteStatus=Le.success,o.showDeleteModal=!1}).addCase(oa.rejected,(t,n)=>{const r=Oi(t,n);r.deleteStatus=Le.error}).addCase(sa.pending,(t,n)=>{const r=Fe(t,{payload:n.meta.arg});r.exchangeStatus=Le.pending,r.showResourcesModal=!1}).addCase(sa.fulfilled,(t,n)=>{const r=Fe(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Le.success}).addCase(sa.rejected,(t,n)=>{const r=Fe(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!0,r.exchangeErrors=n.payload.errors,r.exchangeStatus=Le.error}).addCase(ia.pending,(t,n)=>{const r=on(t,{payload:n.meta.arg});r.usersStatus=Le.pending}).addCase(ia.fulfilled,(t,n)=>{const r=on(t,n);r.users=r.users.map(o=>({...o,initialResourceIds:[...o.resourceIds],initialRole:o.role,hasChanges:!1,isNew:!1})),r.usersStatus=Le.success}).addCase(ia.rejected,(t,n)=>{const r=on(t,n);r.usersStatus=Le.error})}}),IE=e=>e.api.error,AE=e=>e.api.projectsList,ME=e=>e.api.projectListLoading,DE=(e,t)=>on(e.api,{payload:{grantNumber:t}}),FE=(e,t)=>Fe(e.api,{payload:{requestId:t}}),LE=e=>e.api.username,{addResource:UE,addUser:VE,closeUsageDetailModal:BE,hideAlert:hD,resetResources:zE,resetUsers:qE,setRequest:HE,setResourceQuestionValues:WE,setResourceRequest:KE,setResourcesReason:GE,setTab:YE,setUserRole:QE,toggleActionsModal:XE,toggleConfirmModal:ZE,toggleDeleteModal:JE,toggleResourcesModal:eR,toggleUsersResources:tR}=Tx.actions,nR=Tx.reducer,rR=e=>{const t=fe(IE),n=fe(ME),r=fe(AE),o=it();return w.useEffect(()=>{o(na(e))},[]),{error:t,loading:n,projects:r}},Et=(e,t)=>{const n=fe(s=>DE(s,e)),r=fe(LE),o=it();return w.useEffect(()=>{!n&&!t&&o(Nx({grantNumber:e}))},[t]),{project:n,addUser:s=>o(VE({grantNumber:e,user:s})),resetUsers:()=>o(qE({grantNumber:e})),saveUsers:()=>o(ia({grantNumber:e})),setRequest:s=>o(HE({grantNumber:e,requestId:s})),setTab:s=>o(YE({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(QE({grantNumber:e,username:s,role:i})),statuses:Le,toggleUsersResources:(s,i,l)=>o(tR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},at=(e,t)=>{const n=fe(o=>FE(o,e)),r=it();return w.useEffect(()=>{n||r(kx({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(UE({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(BE({requestId:e})),deleteAction:o=>r(oa({actionId:o,requestId:e})),openUsageDetailModal:o=>r(ra({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(zE({requestId:e})),saveResources:()=>r(sa({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(WE({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(KE({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(GE({requestId:e,reason:o})),statuses:Le,toggleActionsModal:()=>r(XE({requestId:e})),toggleConfirmModal:()=>r(ZE({requestId:e})),toggleDeleteModal:o=>r(JE({requestId:e,actionId:o})),toggleResourcesModal:()=>r(eR({requestId:e}))}},oR="_project_qqnbz_1",sR="_expand_qqnbz_5",vm={project:oR,expand:sR},iR="_returnedForCorrectionsNotes_jujbd_1",aR={returnedForCorrectionsNotes:iR};function Ox(e,t,n){const r=w.useRef(e!==void 0),[o,s]=w.useState(t),i=e!==void 0,l=r.current;return r.current=i,!i&&l&&o!==t&&s(t),[i?e:o,w.useCallback((...c)=>{const[u,...d]=c;let f=n==null?void 0:n(u,...d);return s(u),f},[n])]}const Ya={prefix:String(Math.round(Math.random()*1e10)),current:0},Px=_e.createContext(Ya),lR=_e.createContext(!1);let cR=!!(typeof window<"u"&&window.document&&window.document.createElement),Dc=new WeakMap;function uR(e=!1){let t=w.useContext(Px),n=w.useRef(null);if(n.current===null&&!e){var r,o;let s=(o=_e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let i=Dc.get(s);i==null?Dc.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==i.state&&(t.current=i.id,Dc.delete(s))}n.current=++t.current}return n.current}function dR(e){let t=w.useContext(Px);t===Ya&&!cR&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=uR(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function fR(e){let t=_e.useId(),[n]=w.useState(gR()),r=n?"react-aria":`react-aria${Ya.prefix}`;return e||`${r}-${t}`}const $x=typeof _e.useId=="function"?fR:dR;function pR(){return!1}function hR(){return!0}function mR(e){return()=>{}}function gR(){return typeof _e.useSyncExternalStore=="function"?_e.useSyncExternalStore(mR,pR,hR):w.useContext(lR)}const vR=w.createContext(null),Fo=vR,yR=w.createContext(null),Mr=(e,t=null)=>e!=null?String(e):t||null,Mn=yR;function xR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function ke(e){const t=xR(e);return w.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const ym=e=>!e||typeof e=="function"?e:t=>{e.current=t};function bR(e,t){const n=ym(e),r=ym(t);return o=>{n&&n(o),r&&r(o)}}function hn(e,t){return w.useMemo(()=>bR(e,t),[e,t])}function zf({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=w.useRef(null),i=w.useRef(t),l=ke(n);w.useEffect(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=hn(s,e.ref),u=w.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const wR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],SR=["activeKey","getControlledId","getControllerId"],_R=["as"];function id(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ix(e){let{active:t,eventKey:n,mountOnEnter:r,transition:o,unmountOnExit:s,role:i="tabpanel",onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}=e,y=id(e,wR);const m=w.useContext(Fo);if(!m)return[Object.assign({},y,{role:i}),{eventKey:n,isActive:t,mountOnEnter:r,transition:o,unmountOnExit:s,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}];const{activeKey:h,getControlledId:x,getControllerId:v}=m,g=id(m,SR),b=Mr(n);return[Object.assign({},y,{role:i,id:x(n),"aria-labelledby":v(n)}),{eventKey:n,isActive:t==null&&b!=null?Mr(h)===b:t,transition:o||g.transition,mountOnEnter:r??g.mountOnEnter,unmountOnExit:s??g.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}]}const Ax=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=id(e,_R);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:y,transition:m=zf}]=Ix(r);return a.jsx(Fo.Provider,{value:null,children:a.jsx(Mn.Provider,{value:null,children:a.jsx(m,{in:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:y,children:a.jsx(n,Object.assign({},o,{ref:t,hidden:!s,"aria-hidden":!s}))})})})});Ax.displayName="TabPanel";const Mx=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=Ox(o,s,r),p=$x(t),y=w.useMemo(()=>n||((h,x)=>p?`${p}-${x}-${h}`:null),[p,n]),m=w.useMemo(()=>({onSelect:f,activeKey:d,transition:i,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:h=>y(h,"tabpane"),getControllerId:h=>y(h,"tab")}),[f,d,i,l,c,y]);return a.jsx(Fo.Provider,{value:m,children:a.jsx(Mn.Provider,{value:f||null,children:u})})};Mx.Panel=Ax;const Dx=Mx;var Fx={exports:{}};/*!
54
+ Please proceed with caution.`,children:a.jsx(wx,{columns:B,rows:W})}),a.jsx(Wa,{show:S,onClose:()=>_(!1),title:"Add Required Resource",onSave:R,buttonText:"Save",children:a.jsx("div",{children:g.map(X=>a.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[a.jsx("input",{type:"checkbox",style:{margin:0},checked:E.includes(X.resource_id),onChange:ie=>N(X.resource_id,ie.target.checked)}),X.resource_name]},X.resource_id))})}),a.jsx(Wa,{show:j,onClose:()=>C(!1),title:"Add Allocation Type",onSave:P,buttonText:"Save",children:a.jsx(Co,{label:"Select Allocation Type",options:[{value:"",label:"Select an allocation type to add",disabled:!0},...b.map(X=>({value:X.allocation_type_id,label:X.display_name}))],value:T,onChange:k})})]}):a.jsx("div",{children:"No resource data available."})}_x.propTypes={resourceId:q.number.isRequired,relativeUrlRoot:q.string.isRequired,setExternalSubmit:q.func};const Le={error:"error",pending:"pending",success:"success"},Ka=e=>e.endDate||e.startDate||(e.actions[0]||{}).entryDate,pm=e=>`${{pi:"01",co_pi:"02",allocation_manager:"03"}[e.role]||"04"} ${e.lastName}, ${e.firstName}`,NE=(e,{grantNumber:t,projectManager:n,requestMasterId:r,requests:o,title:s,users:i},l)=>{t=t||r,o.sort((d,f)=>Ka(d)>Ka(f)?-1:1);const c=o.find(d=>d.timeStatus=="current"),u=c?c.requestId:null;e.projects[t]={currentRequestId:u,grantNumber:t,isManager:n,requestsList:o.map(d=>{const{actions:f,allocationType:p,endDate:y,requestId:m,startDate:h,status:x}=d,v=f.map(({entryDate:g})=>g).sort()[0].split("T")[0];return kE(e,d,{entryDate:v,grantNumber:t}),{allocationType:p,endDate:y,entryDate:v,requestId:m,startDate:h,status:x}}),selectedRequestId:u||o[0].requestId,status:l,tab:"overview",title:s,users:i.map(({eligibleReason:d,email:f,firstName:p,isEligible:y,lastName:m,organization:h,resources:x,role:v,username:g})=>{const b=x.filter(E=>E.userAccountState=="active"&&E.unitType!="ACCESS Credits"),S=b.map(E=>E.xrasResourceId),_=b.filter(E=>E.resourceProviderState=="pending-active").map(E=>E.xrasResourceId),j=x.filter(E=>E.userAccountState!="active").map(E=>E.xrasResourceId),C={};for(let E of b)C[E.xrasResourceId]=E.resourceUsername;return{eligibility:y,eligibilityReason:d,email:f,firstName:p,initialResourceIds:[...S],initialRole:v,lastName:m,organization:h,resourceAccountPendingIds:_,resourceAccountInactiveIds:j,resourceIds:S,resourceUsernames:C,role:v,username:g}}).sort((d,f)=>pm(d)<pm(f)?-1:1),usersNewRowIndex:0,usersStatus:null},e.projects[t].currentUser=e.projects[t].users.find(({username:d})=>d==e.username)},kE=(e,{actions:t,allocationType:n,allowedActions:r,endDate:o,requestId:s,requestType:i,resources:l,startDate:c,status:u,timeStatus:d},{entryDate:f,grantNumber:p})=>{l=l||[];const y={actions:t.map(({actionId:x,actionStatusType:v,actionType:g,allowedOperations:b,approvedStartDate:S,detailAvailable:_,entryDate:j,isRequest:C,requestedStartDate:E,resources:N})=>({actionId:x,allowedOperations:b,detailAvailable:_,date:(j||S||E).split("T")[0],deleteStatus:null,isRequest:C,resources:N.map(rd).sort(Ha),showDeleteModal:!1,status:v,type:g})),allocationType:n,allowedActions:TE(r),endDate:o,entryDate:f,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:p,isMaximize:n=="Maximize",requestId:s,resources:l.map(rd).filter(x=>x.isCredit||x.allocated>0).sort(Ha),resourcesReason:"",returnedForCorrections:!!t.find(x=>x.returnedForCorrections),returnedForCorrectionsNotes:t.map(x=>x.adminComments).join(","),showActionsModal:!1,showConfirmModal:!1,showResourcesModal:!1,startDate:c,status:u,timeStatus:d,type:i,usageDetail:null,usageDetailStatus:null,usesCredits:["Explore","Discover","Accelerate"].includes(n)};let m={};for(let x of y.actions)if(["Exchange","Transfer"].includes(x.type)&&["Submitted","Under Review","Incomplete"].includes(x.status)){y.exchangeActionId=x.actionId,y.exchangeActionEditable=x.status==="Incomplete";for(let v of x.resources)m[v.resourceId]=v;for(let v of y.resources)v.resourceId in m&&(v.requested+=m[v.resourceId].requested,delete m[v.resourceId]);y.resources.push(...Object.values(m).map(v=>({...v,isNew:!0})));break}const h=y.allowedActions.Exchange||y.allowedActions.Transfer;if(h){m={};for(let x of h.resources)m[x.resourceId]=x;for(let x of y.resources)x.resourceId in m&&(x.questions=m[x.resourceId].questions||[],x.requires=m[x.resourceId].requires||[])}y.resources.length&&!y.resources.find(x=>x.isCredit)&&y.resources.push(h&&h.resources.find(x=>x.isCredit)||{allocated:0,decimalPlaces:0,exchangeRates:{base:{type:"base",unitCost:1},current:{type:"base",unitCost:1}},icon:"credit",isActive:!0,isBoolean:!1,isCredit:!0,isFake:!0,name:"Credit Equivalents",requested:0,requires:[],resourceId:0,unit:"Credit Equivalents",used:0}),e.requests[s]=y},TE=e=>{const t={};for(let{actionType:n,allowedResources:r,opportunityId:o,opportunityName:s}of e){let i={name:n,resources:r.map(rd).sort(Ha),opportunityId:o,opportunityName:s};n in t?(Array.isArray(t[n])||(t[n]=[t[n]]),t[n].push(i)):t[n]=i}return"Transfer"in t&&!("Exchange"in t)&&(t.Exchange=t.Transfer),t},hm=(e,t)=>e.relativeOrder<t.relativeOrder?-1:1,rd=({allocationState:e,amountAllocated:t,amountApproved:n,amountRequested:r,amountUsed:o,attributeSets:s,baseExchangeRate:i,currentExchangeRate:l,currentExchangeRateEndDate:c,currentExchangeRateType:u,dependentResourceXrasIds:d,displayResourceName:f,endDate:p,exchangeRate:y,organizationId:m,organizationFaviconUrl:h,organizationName:x,resourceRepositoryKey:v,resourceType:g,startDate:b,unitType:S,userGuideUrl:_,xrasResourceId:j})=>{const C=S=="Yes / No",E=S=="ACCESS Credits";return{allocated:po(rm(t,n)||0,0,"floor"),decimalPlaces:0,endDate:p,exchangeRates:{base:{type:"base",unitCost:C?0:i||y},current:{endDate:c,type:(u||"base").toLowerCase(),unitCost:C?0:l||y}},icon:E?"credit":g.toLowerCase(),isActive:e=="active",isBoolean:C,isCredit:E,isFake:!1,isUnderReview:!1,isNew:!1,name:f.trim(),questions:(s||[]).filter(({isActive:N})=>N).sort(hm).map(N=>({attributeSetId:N.attributeSetId,attributes:N.attributes.sort(hm).map(R=>({required:R.isRequired,resourceAttributeId:R.resourceAttributeId,label:R.attributeName})),fieldType:N.attributeSetRelationType,label:N.attributeSetName,resourceId:j,values:[]})),resourceProvider:{organizationId:m,name:x,favicon:h},requested:po(rm(r,t)||0,0,"floor"),requires:d||[],resourceId:j,resourceRepositoryKey:v,startDate:b,type:g,unit:S,used:po(o||0,0,"ceil"),userGuideUrl:_}},mm=(e,t)=>{const n=t.allowedActions.Exchange;if(!n)return;const r={};for(let c of n.resources)r[c.resourceId]=c;const o=t.resources.map(c=>c.resourceId),s=r[e].requires||[];let i=!s.some(c=>o.includes(c));const l=[e,...i?s:[]].filter(c=>c in r&&!o.includes(c));t.resources.push(...l.map(c=>({...r[c],allocated:0,isNew:!0,used:0,requested:0})))},jx=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Oi=(e,t)=>{const n=Fe(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},sn=(e,t)=>e.projects[t.payload.grantNumber],Fe=(e,t)=>e.requests[t.payload.requestId],OE=(e,t)=>sn(e,t).users.find(({username:n})=>n==t.payload.username),od=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,gm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!jx(e.resourceIds,e.initialResourceIds),Cx=()=>document.querySelector("meta[name=csrf-token]").content,PE=async e=>{const t=new URLSearchParams({q:e});return(await(await fetch(`${ne.routes.search_people_path()}?${t}`)).json()).map(({eligible_reason:r,email:o,first_name:s,is_eligible:i,last_name:l,username:c,organization:u})=>({eligibility:i,eligibilityReason:r,email:o,firstName:s,lastName:l,username:c,organization:u}))},na=Ye("api/fetchProjectsList",async(e,{rejectWithValue:t})=>{const n=await fetch(`${ne.routes.projects_path()}.json`);return n.status==200?{username:e,projectsList:(await n.json()).result}:t({})}),Ex=Ye("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),Rx=Ye("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),ra=Ye("api/fetchUsageDetail",async({grantNumber:e,requestId:t,resourceRepositoryKey:n},{rejectWithValue:r})=>{const o=await fetch(`${ne.routes.usage_detail_path(e,n)}.json`);return o.status==200?{grantNumber:e,requestId:t,resourceRepositoryKey:n,usageDetail:(await o.json()).usage}:r({grantNumber:e,requestId:t,resourceRepositoryKey:n})}),oa=Ye("api/deleteAction",async({actionId:e,requestId:t},{getState:n,rejectWithValue:r})=>{const o=n().api.requests[t],s=o.actions.find(u=>u.actionId==e);if(!s||!s.allowedOperations||!s.allowedOperations.includes("Delete"))return r({actionId:e,requestId:t});const i=ne.routes.request_action_path(o.requestId,s.actionId),l={_method:"delete",authenticity_token:Cx()};return(await fetch(i,{body:Object.keys(l).map(u=>`${encodeURIComponent(u)}=${encodeURIComponent(l[u])}`).join("&"),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},method:"POST"})).status==200?{actionId:e,requestId:t}:r({actionId:e,requestId:t})}),sa=Ye("api/saveResources",async({requestId:e},{getState:t,rejectWithValue:n})=>{const r=t().api.requests[e],o={},s={};for(let{allocated:f,isFake:p,questions:y,requested:m,resourceId:h}of r.resources)if(m!=f&&!p){o[h]={resource_id:h,requested:1,amount:m-f};for(let{attributes:x,values:v,fieldType:g}of y)if(v.length){let b=x[0].resourceAttributeId,S=["drop_down","single_sel","multi_sel"].includes(g),j={resource_attribute_id:g=="multi_sel"?v:S?v[0]:b};S||(j.attribute_value=v[0]),s[b]=j}}const i={authenticity_token:Cx(),request_action:{action_type:r.allowedActions.Exchange.name,user_comments:r.resourcesReason,resource_attributes:s},requested_resources:o},l=r.exchangeActionId?ne.routes.request_action_path(r.requestId,r.exchangeActionId):ne.routes.request_actions_path(r.requestId),c=await fetch(`${l}.json`,{body:JSON.stringify(i),headers:{"Content-Type":"application/json"},method:r.exchangeActionId?"PUT":"POST"});let u,d;try{const f=await c.json();u=f.errors,d=f.actionId}catch{u=["Unable to save exchange"],d=null}return c.status==200?{requestId:e,exchangeActionId:d}:n({requestId:e,exchangeActionId:d,errors:u})}),ia=Ye("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!jx(u.resourceIds,u.initialResourceIds)||u.isNew).length==0?[]:o.map(u=>({username:u.username,resources:u.resourceIds})),i=o.filter(u=>u.role!=u.initialRole).map(u=>({username:u.username,role:Xu[u.role],initialRole:Xu[u.initialRole]})),l={grantNumber:e,resourceChanges:s,roleChanges:i,authenticity_token:document.querySelector("meta[name=csrf-token]").content};return(await fetch(ne.routes.projects_save_users_path(),{method:"POST",body:JSON.stringify(l),headers:{"Content-Type":"application/json"}})).status==200?{grantNumber:e}:n({grantNumber:e})}),Nx=ri({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null},reducers:{addResource:(e,t)=>{const{resourceId:n}=t.payload,r=Fe(e,t);mm(n,r)},addUser:(e,t)=>{const n=sn(e,t),r=e.requests[n.currentRequestId],{user:o}=t.payload;n.users.map(({username:s})=>s).includes(o.username)||(n.users.push({...o,resourceIds:r.resources.filter(od).map(s=>s.resourceId),role:"user",initialResourceIds:[],initialRole:"user",hasChanges:!0,isNew:!0}),n.usersNewRowIndex=n.users.length-1)},closeUsageDetailModal:(e,t)=>{const n=Fe(e,t);n.usageDetail=null,n.usageDetailStatus=null},resetResources:(e,t)=>{const n=Fe(e,t);n.resourcesReason="",n.resources=n.resources.filter(r=>r.isCredit||r.allocated).map(r=>({...r,requested:r.allocated}))},resetUsers:(e,t)=>{const n=sn(e,t);n.users=n.users.filter(({isNew:r})=>!r).map(r=>({...r,resourceIds:[...r.initialResourceIds],role:r.initialRole,hasChanges:!1}))},setRequest:(e,t)=>{const n=sn(e,t);n&&(n.selectedRequestId=t.payload.requestId,n.tab=="users"&&n.currentRequestId!=n.selectedRequestId&&(n.tab="overview"))},setResourceQuestionValues:(e,t)=>{const{attributeSetId:n,resourceId:r,values:o}=t.payload,s=Fe(e,t);for(let i of s.resources)if(i.resourceId==r){for(let l of i.questions)if(l.attributeSetId==n){l.values=o;break}break}},setResourceRequest:(e,t)=>{const{resourceId:n,requested:r}=t.payload,o=Fe(e,t);let s,i=0;for(let l of o.resources)l.resourceId==n&&(l.requested=r,l.requested!=l.allocated&&mm(l.resourceId,o)),l.isCredit?(s=l,i+=l.allocated*l.exchangeRates.base.unitCost):i-=Ju(l,"difference");s&&(s.requested=po(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=Fe(e,t);n.resourcesReason=t.payload.reason},setTab:(e,t)=>{const n=sn(e,t);n&&(n.tab=t.payload.tab)},setUserRole:(e,t)=>{const n=OE(e,t);n.role=t.payload.role,gm(n)},toggleActionsModal:(e,t)=>{const n=Fe(e,t);n.showActionsModal=!n.showActionsModal},toggleConfirmModal:(e,t)=>{const n=Fe(e,t);n.showConfirmModal=!n.showConfirmModal},toggleDeleteModal:(e,t)=>{const n=Oi(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=Fe(e,t);n.showResourcesModal=!n.showResourcesModal},toggleUsersResources:(e,t)=>{const n=sn(e,t),r=e.requests[n.currentRequestId],{username:o,resourceId:s,checked:i}=t.payload,l=o?[n.users.find(c=>c.username==o)]:n.users;for(let c of l){if(s){let u=c.resourceIds.indexOf(s);i&&u==-1?c.resourceIds.push(s):!i&&u>=0&&c.resourceIds.splice(u,1)}else c.resourceIds=i?r.resources.filter(od).map(({resourceId:u})=>u):[];gm(c)}}},extraReducers:e=>{e.addCase(na.pending,t=>{t.projectListLoading=!0}).addCase(na.fulfilled,(t,n)=>{n.payload.projectsList.sort((r,o)=>Ka(r.requests[0])>Ka(o.requests[0])?-1:1),t.username=n.payload.username,t.projectsList=n.payload.projectsList.map(r=>{const{grantNumber:o,requestMasterId:s,requests:i,status:l,title:c}=r,d=r.requests.filter(f=>f.actions.filter(p=>p.returnedForCorrections).length>0).length>0?"Returned for Corrections":l||i&&(i.find(({timeStatus:f})=>f=="current")?"Active":i[0].timeStatus=="past"?"Inactive":i[0].status);return i&&NE(t,r,d),{grantNumber:o||s,status:d,title:c}}),t.projectListLoading=!1}).addCase(na.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(Ex.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase(Rx.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(ra.pending,(t,n)=>{const r=Fe(t,{payload:n.meta.arg});r.usageDetailStatus=Le.pending}).addCase(ra.fulfilled,(t,n)=>{const r=Fe(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Le.success}).addCase(ra.rejected,(t,n)=>{const r=Fe(t,n);r.usageDetailStatus=Le.error}).addCase(oa.pending,(t,n)=>{const r=Oi(t,{payload:n.meta.arg});r.deleteStatus=Le.pending}).addCase(oa.fulfilled,(t,n)=>{const r=Fe(t,n),o=Oi(t,n);o.isRequest?(r.error="This request has been deleted.",o.allowedOperations=[]):r.actions=r.actions.filter(s=>s.actionId!=o.actionId),o.deleteStatus=Le.success,o.showDeleteModal=!1}).addCase(oa.rejected,(t,n)=>{const r=Oi(t,n);r.deleteStatus=Le.error}).addCase(sa.pending,(t,n)=>{const r=Fe(t,{payload:n.meta.arg});r.exchangeStatus=Le.pending,r.showResourcesModal=!1}).addCase(sa.fulfilled,(t,n)=>{const r=Fe(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Le.success}).addCase(sa.rejected,(t,n)=>{const r=Fe(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!0,r.exchangeErrors=n.payload.errors,r.exchangeStatus=Le.error}).addCase(ia.pending,(t,n)=>{const r=sn(t,{payload:n.meta.arg});r.usersStatus=Le.pending}).addCase(ia.fulfilled,(t,n)=>{const r=sn(t,n);r.users=r.users.map(o=>({...o,initialResourceIds:[...o.resourceIds],initialRole:o.role,hasChanges:!1,isNew:!1})),r.usersStatus=Le.success}).addCase(ia.rejected,(t,n)=>{const r=sn(t,n);r.usersStatus=Le.error})}}),IE=e=>e.api.error,$E=e=>e.api.projectsList,AE=e=>e.api.projectListLoading,ME=(e,t)=>sn(e.api,{payload:{grantNumber:t}}),DE=(e,t)=>Fe(e.api,{payload:{requestId:t}}),FE=e=>e.api.username,{addResource:LE,addUser:UE,closeUsageDetailModal:VE,hideAlert:dD,resetResources:BE,resetUsers:zE,setRequest:qE,setResourceQuestionValues:HE,setResourceRequest:WE,setResourcesReason:KE,setTab:GE,setUserRole:YE,toggleActionsModal:QE,toggleConfirmModal:XE,toggleDeleteModal:ZE,toggleResourcesModal:JE,toggleUsersResources:eR}=Nx.actions,tR=Nx.reducer,nR=e=>{const t=pe(IE),n=pe(AE),r=pe($E),o=it();return w.useEffect(()=>{o(na(e))},[]),{error:t,loading:n,projects:r}},Rt=(e,t)=>{const n=pe(s=>ME(s,e)),r=pe(FE),o=it();return w.useEffect(()=>{!n&&!t&&o(Ex({grantNumber:e}))},[t]),{project:n,addUser:s=>o(UE({grantNumber:e,user:s})),resetUsers:()=>o(zE({grantNumber:e})),saveUsers:()=>o(ia({grantNumber:e})),setRequest:s=>o(qE({grantNumber:e,requestId:s})),setTab:s=>o(GE({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(YE({grantNumber:e,username:s,role:i})),statuses:Le,toggleUsersResources:(s,i,l)=>o(eR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},at=(e,t)=>{const n=pe(o=>DE(o,e)),r=it();return w.useEffect(()=>{n||r(Rx({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(LE({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(VE({requestId:e})),deleteAction:o=>r(oa({actionId:o,requestId:e})),openUsageDetailModal:o=>r(ra({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(BE({requestId:e})),saveResources:()=>r(sa({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(HE({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(WE({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(KE({requestId:e,reason:o})),statuses:Le,toggleActionsModal:()=>r(QE({requestId:e})),toggleConfirmModal:()=>r(XE({requestId:e})),toggleDeleteModal:o=>r(ZE({requestId:e,actionId:o})),toggleResourcesModal:()=>r(JE({requestId:e}))}},rR="_project_qqnbz_1",oR="_expand_qqnbz_5",vm={project:rR,expand:oR},sR="_returnedForCorrectionsNotes_jujbd_1",iR={returnedForCorrectionsNotes:sR};function kx(e,t,n){const r=w.useRef(e!==void 0),[o,s]=w.useState(t),i=e!==void 0,l=r.current;return r.current=i,!i&&l&&o!==t&&s(t),[i?e:o,w.useCallback((...c)=>{const[u,...d]=c;let f=n==null?void 0:n(u,...d);return s(u),f},[n])]}const Ga={prefix:String(Math.round(Math.random()*1e10)),current:0},Tx=je.createContext(Ga),aR=je.createContext(!1);let lR=!!(typeof window<"u"&&window.document&&window.document.createElement),Mc=new WeakMap;function cR(e=!1){let t=w.useContext(Tx),n=w.useRef(null);if(n.current===null&&!e){var r,o;let s=(o=je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(s){let i=Mc.get(s);i==null?Mc.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==i.state&&(t.current=i.id,Mc.delete(s))}n.current=++t.current}return n.current}function uR(e){let t=w.useContext(Tx);t===Ga&&!lR&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=cR(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function dR(e){let t=je.useId(),[n]=w.useState(mR()),r=n?"react-aria":`react-aria${Ga.prefix}`;return e||`${r}-${t}`}const Ox=typeof je.useId=="function"?dR:uR;function fR(){return!1}function pR(){return!0}function hR(e){return()=>{}}function mR(){return typeof je.useSyncExternalStore=="function"?je.useSyncExternalStore(hR,fR,pR):w.useContext(aR)}const gR=w.createContext(null),Fo=gR,vR=w.createContext(null),Ar=(e,t=null)=>e!=null?String(e):t||null,Dn=vR;function yR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function Te(e){const t=yR(e);return w.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const ym=e=>!e||typeof e=="function"?e:t=>{e.current=t};function xR(e,t){const n=ym(e),r=ym(t);return o=>{n&&n(o),r&&r(o)}}function mn(e,t){return w.useMemo(()=>xR(e,t),[e,t])}function Bf({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:o}){const s=w.useRef(null),i=w.useRef(t),l=Te(n);w.useEffect(()=>{t?i.current=!0:l(s.current)},[t,l]);const c=mn(s,e.ref),u=w.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const bR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],wR=["activeKey","getControlledId","getControllerId"],SR=["as"];function sd(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Px(e){let{active:t,eventKey:n,mountOnEnter:r,transition:o,unmountOnExit:s,role:i="tabpanel",onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}=e,y=sd(e,bR);const m=w.useContext(Fo);if(!m)return[Object.assign({},y,{role:i}),{eventKey:n,isActive:t,mountOnEnter:r,transition:o,unmountOnExit:s,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}];const{activeKey:h,getControlledId:x,getControllerId:v}=m,g=sd(m,wR),b=Ar(n);return[Object.assign({},y,{role:i,id:x(n),"aria-labelledby":v(n)}),{eventKey:n,isActive:t==null&&b!=null?Ar(h)===b:t,transition:o||g.transition,mountOnEnter:r??g.mountOnEnter,unmountOnExit:s??g.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}]}const Ix=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=sd(e,SR);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:y,transition:m=Bf}]=Px(r);return a.jsx(Fo.Provider,{value:null,children:a.jsx(Dn.Provider,{value:null,children:a.jsx(m,{in:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:y,children:a.jsx(n,Object.assign({},o,{ref:t,hidden:!s,"aria-hidden":!s}))})})})});Ix.displayName="TabPanel";const $x=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=kx(o,s,r),p=Ox(t),y=w.useMemo(()=>n||((h,x)=>p?`${p}-${x}-${h}`:null),[p,n]),m=w.useMemo(()=>({onSelect:f,activeKey:d,transition:i,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:h=>y(h,"tabpane"),getControllerId:h=>y(h,"tab")}),[f,d,i,l,c,y]);return a.jsx(Fo.Provider,{value:m,children:a.jsx(Dn.Provider,{value:f||null,children:u})})};$x.Panel=Ix;const Ax=$x;var Mx={exports:{}};/*!
55
55
  Copyright (c) 2018 Jed Watson.
56
56
  Licensed under the MIT License (MIT), see
57
57
  http://jedwatson.github.io/classnames
58
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(s=o(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var l in s)t.call(s,l)&&s[l]&&(i=o(i,l));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fx);var jR=Fx.exports;const ne=Xs(jR);function qf(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Qa(e,t){return Qa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Qa(e,t)}function CR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qa(e,t)}const xm={disabled:!1},Lx=_e.createContext(null);var ER=function(t){return t.scrollTop},ds="unmounted",Wn="exited",Sn="entering",Yn="entered",Xa="exiting",Un=function(e){CR(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=Wn,s.appearStatus=Sn):c=Yn:r.unmountOnExit||r.mountOnEnter?c=ds:c=Wn,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===ds?{status:Wn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==Sn&&i!==Yn&&(s=Sn):(i===Sn||i===Yn)&&(s=Xa)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===Sn){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:wr.findDOMNode(this);i&&ER(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Wn&&this.setState({status:ds})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[wr.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),p=l?f.appear:f.enter;if(!o&&!i||xm.disabled){this.safeSetState({status:Yn},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Sn},function(){s.props.onEntering(u,d),s.onTransitionEnd(p,function(){s.safeSetState({status:Yn},function(){s.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:wr.findDOMNode(this);if(!s||xm.disabled){this.safeSetState({status:Wn},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Xa},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Wn},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:wr.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===ds)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=qf(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return _e.createElement(Lx.Provider,{value:null},typeof i=="function"?i(o,l):_e.cloneElement(_e.Children.only(i),l))},t}(_e.Component);Un.contextType=Lx;Un.propTypes={};function Hr(){}Un.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Hr,onEntering:Hr,onEntered:Hr,onExit:Hr,onExiting:Hr,onExited:Hr};Un.UNMOUNTED=ds;Un.EXITED=Wn;Un.ENTERING=Sn;Un.ENTERED=Yn;Un.EXITING=Xa;const RR=Un;function Lo(e){return e&&e.ownerDocument||document}function NR(e){var t=Lo(e);return t&&t.defaultView||window}function kR(e,t){return NR(e).getComputedStyle(e,t)}var TR=/([A-Z])/g;function OR(e){return e.replace(TR,"-$1").toLowerCase()}var PR=/^ms-/;function Pi(e){return OR(e).replace(PR,"-ms-")}var $R=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function IR(e){return!!(e&&$R.test(e))}function kn(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Pi(t))||kR(e).getPropertyValue(Pi(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Pi(o)):IR(o)?r+=o+"("+s+") ":n+=Pi(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const Uo=!!(typeof window<"u"&&window.document&&window.document.createElement);var ad=!1,ld=!1;try{var Fc={get passive(){return ad=!0},get once(){return ld=ad=!0}};Uo&&(window.addEventListener("test",Fc,Fc),window.removeEventListener("test",Fc,!0))}catch{}function Hf(e,t,n,r){if(r&&typeof r!="boolean"&&!ld){var o=r.once,s=r.capture,i=n;!ld&&o&&(i=n.__once||function l(c){this.removeEventListener(t,l,s),n.call(this,c)},n.__once=i),e.addEventListener(t,i,ad?r:s)}e.addEventListener(t,n,r)}function cd(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function En(e,t,n,r){return Hf(e,t,n,r),function(){cd(e,t,n,r)}}function AR(e,t,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function MR(e){var t=kn(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function DR(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||AR(e,"transitionend",!0)},t+n),s=En(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Ux(e,t,n,r){n==null&&(n=MR(e)||0);var o=DR(e,n,r),s=En(e,"transitionend",t);return function(){o(),s()}}function bm(e,t){const n=kn(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Vx(e,t){const n=bm(e,"transitionDuration"),r=bm(e,"transitionDelay"),o=Ux(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Bx(e){e.offsetHeight}function Za(e){return e&&"setState"in e?wr.findDOMNode(e):e??null}const FR=_e.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:s,addEndListener:i,children:l,childRef:c,...u},d)=>{const f=w.useRef(null),p=hn(f,c),y=j=>{p(Za(j))},m=j=>C=>{j&&f.current&&j(f.current,C)},h=w.useCallback(m(e),[e]),x=w.useCallback(m(t),[t]),v=w.useCallback(m(n),[n]),g=w.useCallback(m(r),[r]),b=w.useCallback(m(o),[o]),S=w.useCallback(m(s),[s]),_=w.useCallback(m(i),[i]);return a.jsx(RR,{ref:d,...u,onEnter:h,onEntered:v,onEntering:x,onExit:g,onExited:S,onExiting:b,addEndListener:_,nodeRef:f,children:typeof l=="function"?(j,C)=>l(j,{...C,ref:y}):_e.cloneElement(l,{ref:y})})}),zx=FR,LR={[Sn]:"show",[Yn]:"show"},qx=w.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},s)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},l=w.useCallback((c,u)=>{Bx(c),r==null||r(c,u)},[r]);return a.jsx(zx,{ref:s,addEndListener:Vx,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:ne("fade",e,t.props.className,LR[c],n[c])})})});qx.displayName="Fade";const Eo=qx;function Wf(e){return typeof e=="boolean"?e?Eo:zf:e}const Hx=({transition:e,...t})=>a.jsx(Dx,{...t,transition:Wf(e)});Hx.displayName="TabContainer";const UR=Hx,VR=["xxl","xl","lg","md","sm","xs"],BR="xs",Wx=w.createContext({prefixes:{},breakpoints:VR,minBreakpoint:BR});function de(e,t){const{prefixes:n}=w.useContext(Wx);return e||n[t]||t}function Il(){const{dir:e}=w.useContext(Wx);return e==="rtl"}const Kx=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=de(t,"tab-content"),a.jsx(n,{ref:o,className:ne(e,t),...r})));Kx.displayName="TabContent";const Gx=Kx,Yx=w.forwardRef(({bsPrefix:e,transition:t,...n},r)=>{const[{className:o,as:s="div",...i},{isActive:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:y,mountOnEnter:m,unmountOnExit:h,transition:x=Eo}]=Ix({...n,transition:Wf(t)}),v=de(e,"tab-pane");return a.jsx(Fo.Provider,{value:null,children:a.jsx(Mn.Provider,{value:null,children:a.jsx(x,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:y,mountOnEnter:m,unmountOnExit:h,children:a.jsx(s,{...i,ref:r,className:ne(o,v,l&&"active")})})})})});Yx.displayName="TabPane";const Qx=Yx,zR={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},Xx=()=>{throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")};Xx.propTypes=zR;const $i=Object.assign(Xx,{Container:UR,Content:Gx,Pane:Qx});function G(){return G=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G.apply(this,arguments)}function wm(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function qR(e){var t=HR(e,"string");return typeof t=="symbol"?t:String(t)}function HR(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zx(e,t,n){var r=w.useRef(e!==void 0),o=w.useState(t),s=o[0],i=o[1],l=e!==void 0,c=r.current;return r.current=l,!l&&c&&s!==t&&i(t),[l?e:s,w.useCallback(function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];n&&n.apply(void 0,[u].concat(f)),i(u)},[n])]}function Al(e,t){return Object.keys(t).reduce(function(n,r){var o,s=n,i=s[wm(r)],l=s[r],c=qf(s,[wm(r),r].map(qR)),u=t[r],d=Zx(l,i,e[u]),f=d[0],p=d[1];return G({},c,(o={},o[r]=f,o[u]=p,o))},e)}var Sm={exports:{}},ud={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){function o(i,l,c,u,d,f){var p=u||"<<anonymous>>",y=f||c;if(l[c]==null)return i?new Error("Required "+d+" `"+y+"` was not specified "+("in `"+p+"`.")):null;for(var m=arguments.length,h=Array(m>6?m-6:0),x=6;x<m;x++)h[x-6]=arguments[x];return r.apply(void 0,[l,c,p,d,y].concat(h))}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}e.exports=t.default})(ud,ud.exports);var WR=ud.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=WR,r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(){for(var i=arguments.length,l=Array(i),c=0;c<i;c++)l[c]=arguments[c];function u(){for(var d=arguments.length,f=Array(d),p=0;p<d;p++)f[p]=arguments[p];var y=null;return l.forEach(function(m){if(y==null){var h=m.apply(void 0,f);h!=null&&(y=h)}}),y}return(0,r.default)(u)}e.exports=t.default})(Sm,Sm.exports);var KR=Function.prototype.bind.call(Function.prototype.call,[].slice);function _n(e,t){return KR(e.querySelectorAll(t))}function Jx(){const[,e]=w.useReducer(t=>!t,!1);return e}const e0=w.createContext(null);e0.displayName="NavContext";const Kf=e0,GR="data-rr-ui-",YR="rrUi";function Vo(e){return`${GR}${e}`}function QR(e){return`${YR}${e}`}const XR=["as","disabled"];function ZR(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function JR(e){return!e||e.trim()==="#"}function Gf({tagName:e,disabled:t,href:n,target:r,rel:o,role:s,onClick:i,tabIndex:l=0,type:c}){e||(n!=null||r!=null||o!=null?e="a":e="button");const u={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},u];const d=p=>{if((t||e==="a"&&JR(n))&&p.preventDefault(),t){p.stopPropagation();return}i==null||i(p)},f=p=>{p.key===" "&&(p.preventDefault(),d(p))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:s??"button",disabled:void 0,tabIndex:t?void 0:l,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?o:void 0,onClick:d,onKeyDown:f},u]}const Yf=w.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=ZR(e,XR);const[s,{tagName:i}]=Gf(Object.assign({tagName:n,disabled:r},o));return a.jsx(i,Object.assign({},o,s,{ref:t}))});Yf.displayName="Button";const eN=["as","active","eventKey"];function tN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function t0({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=w.useContext(Mn),l=w.useContext(Kf),c=w.useContext(Fo);let u=n;const d={role:o};if(l){!o&&l.role==="tablist"&&(d.role="tab");const f=l.getControllerId(e??null),p=l.getControlledId(e??null);d[Vo("event-key")]=e,d.id=f||r,u=n==null&&e!=null?l.activeKey===e:n,(u||!(c!=null&&c.unmountOnExit)&&!(c!=null&&c.mountOnEnter))&&(d["aria-controls"]=p)}return d.role==="tab"&&(d["aria-selected"]=u,u||(d.tabIndex=-1),s&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=ke(f=>{s||(t==null||t(f),e!=null&&i&&!f.isPropagationStopped()&&i(e,f))}),[d,{isActive:u}]}const n0=w.forwardRef((e,t)=>{let{as:n=Yf,active:r,eventKey:o}=e,s=tN(e,eN);const[i,l]=t0(Object.assign({key:Mr(o,s.href),active:r},s));return i[Vo("active")]=l.isActive,a.jsx(n,Object.assign({},s,i,{ref:t}))});n0.displayName="NavItem";const nN=n0,rN=["as","onSelect","activeKey","role","onKeyDown"];function oN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const _m=()=>{},jm=Vo("event-key"),r0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=oN(e,rN);const c=Jx(),u=w.useRef(!1),d=w.useContext(Mn),f=w.useContext(Fo);let p,y;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,y=f.getControllerId);const m=w.useRef(null),h=b=>{const S=m.current;if(!S)return null;const _=_n(S,`[${jm}]:not([aria-disabled=true])`),j=S.querySelector("[aria-selected=true]");if(!j||j!==document.activeElement)return null;const C=_.indexOf(j);if(C===-1)return null;let E=C+b;return E>=_.length&&(E=0),E<0&&(E=_.length-1),_[E]},x=(b,S)=>{b!=null&&(r==null||r(b,S),d==null||d(b,S))},v=b=>{if(i==null||i(b),!f)return;let S;switch(b.key){case"ArrowLeft":case"ArrowUp":S=h(-1);break;case"ArrowRight":case"ArrowDown":S=h(1);break;default:return}S&&(b.preventDefault(),x(S.dataset[QR("EventKey")]||null,b),u.current=!0,c())};w.useEffect(()=>{if(m.current&&u.current){const b=m.current.querySelector(`[${jm}][aria-selected=true]`);b==null||b.focus()}u.current=!1});const g=hn(t,m);return a.jsx(Mn.Provider,{value:x,children:a.jsx(Kf.Provider,{value:{role:s,activeKey:Mr(o),getControlledId:p||_m,getControllerId:y||_m},children:a.jsx(n,Object.assign({},l,{onKeyDown:v,ref:g,role:s}))})})});r0.displayName="Nav";const sN=Object.assign(r0,{Item:nN}),o0=w.createContext(null);o0.displayName="NavbarContext";const s0=o0,i0=w.createContext(null);i0.displayName="CardHeaderContext";const iN=i0,a0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=de(t,"nav-item"),a.jsx(n,{ref:o,className:ne(e,t),...r})));a0.displayName="NavItem";const l0=a0;function Ja(){return w.useState(null)}function aN(e,t,n,r=!1){const o=ke(n);w.useEffect(()=>{const s=typeof e=="function"?e():e;return s.addEventListener(t,o,r),()=>s.removeEventListener(t,o,r)},[e])}function Qf(){const e=w.useRef(!0),t=w.useRef(()=>e.current);return w.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function c0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const lN=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",cN=typeof document<"u",el=cN||lN?w.useLayoutEffect:w.useEffect,uN=["onKeyDown"];function dN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function fN(e){return!e||e.trim()==="#"}const u0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=dN(e,uN);const[o]=Gf(Object.assign({tagName:"a"},r)),s=ke(i=>{o.onKeyDown(i),n==null||n(i)});return fN(r.href)||r.role==="button"?a.jsx("a",Object.assign({ref:t},r,o,{onKeyDown:s})):a.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});u0.displayName="Anchor";const d0=u0,f0=w.forwardRef(({bsPrefix:e,className:t,as:n=d0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=de(e,"nav-link");const[c,u]=t0({key:Mr(o,i.href),active:r,disabled:s,...i});return a.jsx(n,{...i,...c,ref:l,disabled:s,className:ne(t,e,s&&"disabled",u.isActive&&"active")})});f0.displayName="NavLink";const p0=f0,h0=w.forwardRef((e,t)=>{const{as:n="div",bsPrefix:r,variant:o,fill:s=!1,justify:i=!1,navbar:l,navbarScroll:c,className:u,activeKey:d,...f}=Al(e,{activeKey:"onSelect"}),p=de(r,"nav");let y,m,h=!1;const x=w.useContext(s0),v=w.useContext(iN);return x?(y=x.bsPrefix,h=l??!0):v&&({cardHeaderBsPrefix:m}=v),a.jsx(sN,{as:n,ref:t,activeKey:d,className:ne(u,{[p]:!h,[`${y}-nav`]:h,[`${y}-nav-scroll`]:h&&c,[`${m}-${o}`]:!!m,[`${p}-${o}`]:!!o,[`${p}-fill`]:s,[`${p}-justified`]:i}),...f})});h0.displayName="Nav";const pN=Object.assign(h0,{Item:l0,Link:p0});function Cm(e,t){let n=0;return w.Children.map(e,r=>w.isValidElement(r)?t(r,n++):r)}function hN(e,t){let n=0;w.Children.forEach(e,r=>{w.isValidElement(r)&&t(r,n++)})}function mN(e){let t;return hN(e,n=>{t==null&&(t=n.props.eventKey)}),t}function gN(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(l0,{as:"li",role:"presentation",children:a.jsx(p0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const m0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=mN(l),...u}=Al(e,{activeKey:"onSelect"});return a.jsxs(Dx,{id:t,activeKey:c,onSelect:n,transition:Wf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(pN,{...u,role:"tablist",as:"ul",variant:i,children:Cm(l,gN)}),a.jsx(Gx,{children:Cm(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(Qx,{...f})})})]})};m0.displayName="Tabs";const vN=m0,yN=w.createContext(null),Ml=yN;var Em=Object.prototype.hasOwnProperty;function Rm(e,t,n){for(n of e.keys())if(ws(n,t))return n}function ws(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ws(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=Rm(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=Rm(t,o),!o)||!ws(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Em.call(e,n)&&++r&&!Em.call(t,n)||!(n in t)||!ws(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function xN(e){const t=Qf();return[e[0],w.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var mt="top",Ut="bottom",Vt="right",gt="left",Xf="auto",si=[mt,Ut,Vt,gt],Ro="start",qs="end",bN="clippingParents",g0="viewport",es="popper",wN="reference",Nm=si.reduce(function(e,t){return e.concat([t+"-"+Ro,t+"-"+qs])},[]),v0=[].concat(si,[Xf]).reduce(function(e,t){return e.concat([t,t+"-"+Ro,t+"-"+qs])},[]),SN="beforeRead",_N="read",jN="afterRead",CN="beforeMain",EN="main",RN="afterMain",NN="beforeWrite",kN="write",TN="afterWrite",ON=[SN,_N,jN,CN,EN,RN,NN,kN,TN];function dn(e){return e.split("-")[0]}function Rt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Dr(e){var t=Rt(e).Element;return e instanceof t||e instanceof Element}function fn(e){var t=Rt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Zf(e){if(typeof ShadowRoot>"u")return!1;var t=Rt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Er=Math.max,tl=Math.min,No=Math.round;function dd(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function y0(){return!/^((?!chrome|android).)*safari/i.test(dd())}function ko(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&fn(e)&&(o=e.offsetWidth>0&&No(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&No(r.height)/e.offsetHeight||1);var i=Dr(e)?Rt(e):window,l=i.visualViewport,c=!y0()&&n,u=(r.left+(c&&l?l.offsetLeft:0))/o,d=(r.top+(c&&l?l.offsetTop:0))/s,f=r.width/o,p=r.height/s;return{width:f,height:p,top:d,right:u+f,bottom:d+p,left:u,x:u,y:d}}function Jf(e){var t=ko(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function x0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ur(e){return e?(e.nodeName||"").toLowerCase():null}function Dn(e){return Rt(e).getComputedStyle(e)}function PN(e){return["table","td","th"].indexOf(ur(e))>=0}function hr(e){return((Dr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Dl(e){return ur(e)==="html"?e:e.assignedSlot||e.parentNode||(Zf(e)?e.host:null)||hr(e)}function km(e){return!fn(e)||Dn(e).position==="fixed"?null:e.offsetParent}function $N(e){var t=/firefox/i.test(dd()),n=/Trident/i.test(dd());if(n&&fn(e)){var r=Dn(e);if(r.position==="fixed")return null}var o=Dl(e);for(Zf(o)&&(o=o.host);fn(o)&&["html","body"].indexOf(ur(o))<0;){var s=Dn(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function ii(e){for(var t=Rt(e),n=km(e);n&&PN(n)&&Dn(n).position==="static";)n=km(n);return n&&(ur(n)==="html"||ur(n)==="body"&&Dn(n).position==="static")?t:n||$N(e)||t}function ep(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ss(e,t,n){return Er(e,tl(t,n))}function IN(e,t,n){var r=Ss(e,t,n);return r>n?n:r}function b0(){return{top:0,right:0,bottom:0,left:0}}function w0(e){return Object.assign({},b0(),e)}function S0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var AN=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,w0(typeof t!="number"?t:S0(t,si))};function MN(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=dn(n.placement),c=ep(l),u=[gt,Vt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=AN(o.padding,n),p=Jf(s),y=c==="y"?mt:gt,m=c==="y"?Ut:Vt,h=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],x=i[c]-n.rects.reference[c],v=ii(s),g=v?c==="y"?v.clientHeight||0:v.clientWidth||0:0,b=h/2-x/2,S=f[y],_=g-p[d]-f[m],j=g/2-p[d]/2+b,C=Ss(S,j,_),E=c;n.modifiersData[r]=(t={},t[E]=C,t.centerOffset=C-j,t)}}function DN(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||x0(t.elements.popper,o)&&(t.elements.arrow=o))}const FN={name:"arrow",enabled:!0,phase:"main",fn:MN,effect:DN,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function To(e){return e.split("-")[1]}var LN={top:"auto",right:"auto",bottom:"auto",left:"auto"};function UN(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:No(n*o)/o||0,y:No(r*o)/o||0}}function Tm(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=i.x,y=p===void 0?0:p,m=i.y,h=m===void 0?0:m,x=typeof d=="function"?d({x:y,y:h}):{x:y,y:h};y=x.x,h=x.y;var v=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=gt,S=mt,_=window;if(u){var j=ii(n),C="clientHeight",E="clientWidth";if(j===Rt(n)&&(j=hr(n),Dn(j).position!=="static"&&l==="absolute"&&(C="scrollHeight",E="scrollWidth")),j=j,o===mt||(o===gt||o===Vt)&&s===qs){S=Ut;var N=f&&j===_&&_.visualViewport?_.visualViewport.height:j[C];h-=N-r.height,h*=c?1:-1}if(o===gt||(o===mt||o===Ut)&&s===qs){b=Vt;var R=f&&j===_&&_.visualViewport?_.visualViewport.width:j[E];y-=R-r.width,y*=c?1:-1}}var T=Object.assign({position:l},u&&LN),k=d===!0?UN({x:y,y:h},Rt(n)):{x:y,y:h};if(y=k.x,h=k.y,c){var P;return Object.assign({},T,(P={},P[S]=g?"0":"",P[b]=v?"0":"",P.transform=(_.devicePixelRatio||1)<=1?"translate("+y+"px, "+h+"px)":"translate3d("+y+"px, "+h+"px, 0)",P))}return Object.assign({},T,(t={},t[S]=g?h+"px":"",t[b]=v?y+"px":"",t.transform="",t))}function VN(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,l=n.roundOffsets,c=l===void 0?!0:l,u={placement:dn(t.placement),variation:To(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Tm(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Tm(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const BN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:VN,data:{}};var Ii={passive:!0};function zN(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,l=i===void 0?!0:i,c=Rt(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,Ii)}),l&&c.addEventListener("resize",n.update,Ii),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Ii)}),l&&c.removeEventListener("resize",n.update,Ii)}}const qN={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:zN,data:{}};var HN={left:"right",right:"left",bottom:"top",top:"bottom"};function aa(e){return e.replace(/left|right|bottom|top/g,function(t){return HN[t]})}var WN={start:"end",end:"start"};function Om(e){return e.replace(/start|end/g,function(t){return WN[t]})}function tp(e){var t=Rt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function np(e){return ko(hr(e)).left+tp(e).scrollLeft}function KN(e,t){var n=Rt(e),r=hr(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;var u=y0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+np(e),y:c}}function GN(e){var t,n=hr(e),r=tp(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Er(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Er(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+np(e),c=-r.scrollTop;return Dn(o||n).direction==="rtl"&&(l+=Er(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function rp(e){var t=Dn(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function _0(e){return["html","body","#document"].indexOf(ur(e))>=0?e.ownerDocument.body:fn(e)&&rp(e)?e:_0(Dl(e))}function _s(e,t){var n;t===void 0&&(t=[]);var r=_0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Rt(r),i=o?[s].concat(s.visualViewport||[],rp(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(_s(Dl(i)))}function fd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function YN(e,t){var n=ko(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Pm(e,t,n){return t===g0?fd(KN(e,n)):Dr(t)?YN(t,n):fd(GN(hr(e)))}function QN(e){var t=_s(Dl(e)),n=["absolute","fixed"].indexOf(Dn(e).position)>=0,r=n&&fn(e)?ii(e):e;return Dr(r)?t.filter(function(o){return Dr(o)&&x0(o,r)&&ur(o)!=="body"}):[]}function XN(e,t,n,r){var o=t==="clippingParents"?QN(e):[].concat(t),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(c,u){var d=Pm(e,u,r);return c.top=Er(d.top,c.top),c.right=tl(d.right,c.right),c.bottom=tl(d.bottom,c.bottom),c.left=Er(d.left,c.left),c},Pm(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function j0(e){var t=e.reference,n=e.element,r=e.placement,o=r?dn(r):null,s=r?To(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case mt:c={x:i,y:t.y-n.height};break;case Ut:c={x:i,y:t.y+t.height};break;case Vt:c={x:t.x+t.width,y:l};break;case gt:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=o?ep(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case Ro:c[u]=c[u]-(t[d]/2-n[d]/2);break;case qs:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Hs(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,l=n.boundary,c=l===void 0?bN:l,u=n.rootBoundary,d=u===void 0?g0:u,f=n.elementContext,p=f===void 0?es:f,y=n.altBoundary,m=y===void 0?!1:y,h=n.padding,x=h===void 0?0:h,v=w0(typeof x!="number"?x:S0(x,si)),g=p===es?wN:es,b=e.rects.popper,S=e.elements[m?g:p],_=XN(Dr(S)?S:S.contextElement||hr(e.elements.popper),c,d,i),j=ko(e.elements.reference),C=j0({reference:j,element:b,strategy:"absolute",placement:o}),E=fd(Object.assign({},b,C)),N=p===es?E:j,R={top:_.top-N.top+v.top,bottom:N.bottom-_.bottom+v.bottom,left:_.left-N.left+v.left,right:N.right-_.right+v.right},T=e.modifiersData.offset;if(p===es&&T){var k=T[o];Object.keys(R).forEach(function(P){var D=[Vt,Ut].indexOf(P)>=0?1:-1,F=[mt,Ut].indexOf(P)>=0?"y":"x";R[P]+=k[F]*D})}return R}function ZN(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?v0:c,d=To(r),f=d?l?Nm:Nm.filter(function(m){return To(m)===d}):si,p=f.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=f);var y=p.reduce(function(m,h){return m[h]=Hs(e,{placement:h,boundary:o,rootBoundary:s,padding:i})[dn(h)],m},{});return Object.keys(y).sort(function(m,h){return y[m]-y[h]})}function JN(e){if(dn(e)===Xf)return[];var t=aa(e);return[Om(e),t,Om(t)]}function ek(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,y=n.flipVariations,m=y===void 0?!0:y,h=n.allowedAutoPlacements,x=t.options.placement,v=dn(x),g=v===x,b=c||(g||!m?[aa(x)]:JN(x)),S=[x].concat(b).reduce(function(Z,J){return Z.concat(dn(J)===Xf?ZN(t,{placement:J,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:h}):J)},[]),_=t.rects.reference,j=t.rects.popper,C=new Map,E=!0,N=S[0],R=0;R<S.length;R++){var T=S[R],k=dn(T),P=To(T)===Ro,D=[mt,Ut].indexOf(k)>=0,F=D?"width":"height",V=Hs(t,{placement:T,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),Q=D?P?Vt:gt:P?Ut:mt;_[F]>j[F]&&(Q=aa(Q));var O=aa(Q),L=[];if(s&&L.push(V[k]<=0),l&&L.push(V[Q]<=0,V[O]<=0),L.every(function(Z){return Z})){N=T,E=!1;break}C.set(T,L)}if(E)for(var A=m?3:1,W=function(J){var X=S.find(function(se){var pe=C.get(se);if(pe)return pe.slice(0,J).every(function(M){return M})});if(X)return N=X,"break"},U=A;U>0;U--){var Y=W(U);if(Y==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}const tk={name:"flip",enabled:!0,phase:"main",fn:ek,requiresIfExists:["offset"],data:{_skip:!1}};function $m(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Im(e){return[mt,Vt,Ut,gt].some(function(t){return e[t]>=0})}function nk(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Hs(t,{elementContext:"reference"}),l=Hs(t,{altBoundary:!0}),c=$m(i,r),u=$m(l,o,s),d=Im(c),f=Im(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const rk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:nk};function ok(e,t,n){var r=dn(e),o=[gt,mt].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[gt,Vt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function sk(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=v0.reduce(function(d,f){return d[f]=ok(f,t.rects,s),d},{}),l=i[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}const ik={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:sk};function ak(e){var t=e.state,n=e.name;t.modifiersData[n]=j0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const lk={name:"popperOffsets",enabled:!0,phase:"read",fn:ak,data:{}};function ck(e){return e==="x"?"y":"x"}function uk(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,y=p===void 0?!0:p,m=n.tetherOffset,h=m===void 0?0:m,x=Hs(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),v=dn(t.placement),g=To(t.placement),b=!g,S=ep(v),_=ck(S),j=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,N=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(j){if(s){var P,D=S==="y"?mt:gt,F=S==="y"?Ut:Vt,V=S==="y"?"height":"width",Q=j[S],O=Q+x[D],L=Q-x[F],A=y?-E[V]/2:0,W=g===Ro?C[V]:E[V],U=g===Ro?-E[V]:-C[V],Y=t.elements.arrow,Z=y&&Y?Jf(Y):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:b0(),X=J[D],se=J[F],pe=Ss(0,C[V],Z[V]),M=b?C[V]/2-A-pe-X-R.mainAxis:W-pe-X-R.mainAxis,z=b?-C[V]/2+A+pe+se+R.mainAxis:U+pe+se+R.mainAxis,ve=t.elements.arrow&&ii(t.elements.arrow),ee=ve?S==="y"?ve.clientTop||0:ve.clientLeft||0:0,Oe=(P=T==null?void 0:T[S])!=null?P:0,De=Q+M-Oe-ee,ie=Q+z-Oe,Ot=Ss(y?tl(O,De):O,Q,y?Er(L,ie):L);j[S]=Ot,k[S]=Ot-Q}if(l){var lt,gn=S==="x"?mt:gt,en=S==="x"?Ut:Vt,je=j[_],Vn=_==="y"?"height":"width",Bn=je+x[gn],ci=je-x[en],Br=[mt,gt].indexOf(v)!==-1,ui=(lt=T==null?void 0:T[_])!=null?lt:0,ae=Br?Bn:je-C[Vn]-E[Vn]-ui+R.altAxis,vn=Br?je+C[Vn]+E[Vn]-ui-R.altAxis:ci,zo=y&&Br?IN(ae,je,vn):Ss(y?ae:Bn,je,y?vn:ci);j[_]=zo,k[_]=zo-je}t.modifiersData[r]=k}}const dk={name:"preventOverflow",enabled:!0,phase:"main",fn:uk,requiresIfExists:["offset"]};function fk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function pk(e){return e===Rt(e)||!fn(e)?tp(e):fk(e)}function hk(e){var t=e.getBoundingClientRect(),n=No(t.width)/e.offsetWidth||1,r=No(t.height)/e.offsetHeight||1;return n!==1||r!==1}function mk(e,t,n){n===void 0&&(n=!1);var r=fn(t),o=fn(t)&&hk(t),s=hr(t),i=ko(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((ur(t)!=="body"||rp(s))&&(l=pk(t)),fn(t)?(c=ko(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=np(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function gk(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&o(c)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function vk(e){var t=gk(e);return ON.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function yk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function xk(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Am={placement:"bottom",modifiers:[],strategy:"absolute"};function Mm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function bk(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?Am:o;return function(l,c,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Am,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],p=!1,y={state:d,setOptions:function(v){var g=typeof v=="function"?v(d.options):v;h(),d.options=Object.assign({},s,d.options,g),d.scrollParents={reference:Dr(l)?_s(l):l.contextElement?_s(l.contextElement):[],popper:_s(c)};var b=vk(xk([].concat(r,d.options.modifiers)));return d.orderedModifiers=b.filter(function(S){return S.enabled}),m(),y.update()},forceUpdate:function(){if(!p){var v=d.elements,g=v.reference,b=v.popper;if(Mm(g,b)){d.rects={reference:mk(g,ii(b),d.options.strategy==="fixed"),popper:Jf(b)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(R){return d.modifiersData[R.name]=Object.assign({},R.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var _=d.orderedModifiers[S],j=_.fn,C=_.options,E=C===void 0?{}:C,N=_.name;typeof j=="function"&&(d=j({state:d,options:E,name:N,instance:y})||d)}}}},update:yk(function(){return new Promise(function(x){y.forceUpdate(),x(d)})}),destroy:function(){h(),p=!0}};if(!Mm(l,c))return y;y.setOptions(u).then(function(x){!p&&u.onFirstUpdate&&u.onFirstUpdate(x)});function m(){d.orderedModifiers.forEach(function(x){var v=x.name,g=x.options,b=g===void 0?{}:g,S=x.effect;if(typeof S=="function"){var _=S({state:d,name:v,instance:y,options:b}),j=function(){};f.push(_||j)}})}function h(){f.forEach(function(x){return x()}),f=[]}return y}}const wk=bk({defaultModifiers:[rk,lk,BN,qN,ik,tk,dk,FN]}),Sk=["enabled","placement","strategy","modifiers"];function _k(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const jk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Ck={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&o==="tooltip"&&"setAttribute"in r){const s=r.getAttribute("aria-describedby");if(s&&s.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",s?`${s},${n.id}`:n.id)}}},Ek=[];function C0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=Ek}=n,l=_k(n,Sk);const c=w.useRef(i),u=w.useRef(),d=w.useCallback(()=>{var x;(x=u.current)==null||x.update()},[]),f=w.useCallback(()=>{var x;(x=u.current)==null||x.forceUpdate()},[]),[p,y]=xN(w.useState({placement:o,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),m=w.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:x})=>{const v={},g={};Object.keys(x.elements).forEach(b=>{v[b]=x.styles[b],g[b]=x.attributes[b]}),y({state:x,styles:v,attributes:g,update:d,forceUpdate:f,placement:x.placement})}}),[d,f,y]),h=w.useMemo(()=>(ws(c.current,i)||(c.current=i),c.current),[i]);return w.useEffect(()=>{!u.current||!r||u.current.setOptions({placement:o,strategy:s,modifiers:[...h,m,jk]})},[s,o,m,r,h]),w.useEffect(()=>{if(!(!r||e==null||t==null))return u.current=wk(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...h,Ck,m]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,y(x=>Object.assign({},x,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function Ws(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Rk=function(){},Nk=Rk;const kk=Xs(Nk),Dm=()=>{};function Tk(e){return e.button===0}function Ok(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const la=e=>e&&("current"in e?e.current:e),Fm={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function E0(e,t=Dm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=la(e);kk(!!d,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),o.current=!d||Ok(u)||!Tk(u)||!!Ws(d,u.target)||s.current,s.current=!1},[e]),l=ke(u=>{const d=la(e);d&&Ws(d,u.target)&&(s.current=!0)}),c=ke(u=>{o.current||t(u)});w.useEffect(()=>{var u,d;if(n||e==null)return;const f=Lo(la(e)),p=f.defaultView||window;let y=(u=p.event)!=null?u:(d=p.parent)==null?void 0:d.event,m=null;Fm[r]&&(m=En(f,Fm[r],l,!0));const h=En(f,r,i,!0),x=En(f,r,g=>{if(g===y){y=void 0;return}c(g)});let v=[];return"ontouchstart"in f.documentElement&&(v=[].slice.call(f.body.children).map(g=>En(g,"mousemove",Dm))),()=>{m==null||m(),h(),x(),v.forEach(g=>g())}},[e,n,r,i,l,c])}function Pk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function $k(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function R0({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:s,containerPadding:i,arrowElement:l,popperConfig:c={}}){var u,d,f,p,y;const m=Pk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:$k(Object.assign({},m,{eventListeners:{enabled:t,options:(u=m.eventListeners)==null?void 0:u.options},preventOverflow:Object.assign({},m.preventOverflow,{options:i?Object.assign({padding:i},(d=m.preventOverflow)==null?void 0:d.options):(f=m.preventOverflow)==null?void 0:f.options}),offset:{options:Object.assign({offset:o},(p=m.offset)==null?void 0:p.options)},arrow:Object.assign({},m.arrow,{enabled:!!l,options:Object.assign({},(y=m.arrow)==null?void 0:y.options,{element:l})}),flip:Object.assign({enabled:!!r},m.flip)}))})}const Ik=["children"];function Ak(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Mk=()=>{};function N0(e={}){const t=w.useContext(Ml),[n,r]=Ja(),o=w.useRef(!1),{flip:s,offset:i,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:f=!0,usePopper:p=!!t}=e,y=(t==null?void 0:t.show)==null?!!e.show:t.show;y&&!o.current&&(o.current=!0);const m=j=>{t==null||t.toggle(!1,j)},{placement:h,setMenu:x,menuElement:v,toggleElement:g}=t||{},b=C0(g,v,R0({placement:u||h||"bottom-start",enabled:p,enableEvents:f??y,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),S=Object.assign({ref:x||Mk,"aria-labelledby":g==null?void 0:g.id},b.attributes.popper,{style:b.styles.popper}),_={show:y,placement:h,hasShown:o.current,toggle:t==null?void 0:t.toggle,popper:p?b:null,arrowProps:p?Object.assign({ref:r},b.attributes.arrow,{style:b.styles.arrow}):{}};return E0(v,m,{clickTrigger:l,disabled:!y}),[S,_]}const Dk={usePopper:!0};function op(e){let{children:t}=e,n=Ak(e,Ik);const[r,o]=N0(n);return a.jsx(a.Fragment,{children:t(r,o)})}op.displayName="DropdownMenu";op.defaultProps=Dk;const k0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Lm=()=>{};function T0(){const e=$x(),{show:t=!1,toggle:n=Lm,setToggle:r,menuElement:o}=w.useContext(Ml)||{},s=w.useCallback(l=>{n(!t,l)},[t,n]),i={id:e,ref:r||Lm,onClick:s,"aria-expanded":!!t};return o&&k0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function O0({children:e}){const[t,n]=T0();return a.jsx(a.Fragment,{children:e(t,n)})}O0.displayName="DropdownToggle";const Fk=["eventKey","disabled","onClick","active","as"];function Lk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function P0({key:e,href:t,active:n,disabled:r,onClick:o}){const s=w.useContext(Mn),i=w.useContext(Kf),{activeKey:l}=i||{},c=Mr(e,t),u=n==null&&e!=null?Mr(l)===c:n;return[{onClick:ke(f=>{r||(o==null||o(f),s&&!f.isPropagationStopped()&&s(c,f))}),"aria-disabled":r||void 0,"aria-selected":u,[Vo("dropdown-item")]:""},{isActive:u}]}const $0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Yf}=e,l=Lk(e,Fk);const[c]=P0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});$0.displayName="DropdownItem";const I0=w.createContext(Uo?window:void 0);I0.Provider;function Fl(){return w.useContext(I0)}function Um(){const e=Jx(),t=w.useRef(null),n=w.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function ai({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${Vo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Fl(),[u,d]=Ox(t,e,r),[f,p]=Um(),y=f.current,[m,h]=Um(),x=m.current,v=c0(u),g=w.useRef(null),b=w.useRef(!1),S=w.useContext(Mn),_=w.useCallback((T,k,P=k==null?void 0:k.type)=>{d(T,{originalEvent:k,source:P})},[d]),j=ke((T,k)=>{n==null||n(T,k),_(!1,k,"select"),k.isPropagationStopped()||S==null||S(T,k)}),C=w.useMemo(()=>({toggle:_,placement:i,show:u,menuElement:y,toggleElement:x,setMenu:p,setToggle:h}),[_,i,u,y,x,p,h]);y&&v&&!u&&(b.current=y.contains(y.ownerDocument.activeElement));const E=ke(()=>{x&&x.focus&&x.focus()}),N=ke(()=>{const T=g.current;let k=s;if(k==null&&(k=f.current&&k0(f.current)?"keyboard":!1),k===!1||k==="keyboard"&&!/^key.+$/.test(T))return;const P=_n(f.current,o)[0];P&&P.focus&&P.focus()});w.useEffect(()=>{u?N():b.current&&(b.current=!1,E())},[u,b,E,N]),w.useEffect(()=>{g.current=null});const R=(T,k)=>{if(!f.current)return null;const P=_n(f.current,o);let D=P.indexOf(T)+k;return D=Math.max(0,Math.min(D,P.length)),P[D]};return aN(w.useCallback(()=>c.document,[c]),"keydown",T=>{var k,P;const{key:D}=T,F=T.target,V=(k=f.current)==null?void 0:k.contains(F),Q=(P=m.current)==null?void 0:P.contains(F);if(/input|textarea/i.test(F.tagName)&&(D===" "||D!=="Escape"&&V||D==="Escape"&&F.type==="search")||!V&&!Q||D==="Tab"&&(!f.current||!u))return;g.current=T.type;const L={originalEvent:T,source:T.type};switch(D){case"ArrowUp":{const A=R(F,-1);A&&A.focus&&A.focus(),T.preventDefault();return}case"ArrowDown":if(T.preventDefault(),!u)d(!0,L);else{const A=R(F,1);A&&A.focus&&A.focus()}return;case"Tab":Hf(F.ownerDocument,"keyup",A=>{var W;(A.key==="Tab"&&!A.target||!((W=f.current)!=null&&W.contains(A.target)))&&d(!1,L)},{once:!0});break;case"Escape":D==="Escape"&&(T.preventDefault(),T.stopPropagation()),d(!1,L);break}}),a.jsx(Mn.Provider,{value:j,children:a.jsx(Ml.Provider,{value:C,children:l})})}ai.displayName="Dropdown";ai.Menu=op;ai.Toggle=O0;ai.Item=$0;const A0=w.createContext({});A0.displayName="DropdownContext";const M0=A0,D0=w.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},s)=>(t=de(t,"dropdown-divider"),a.jsx(n,{ref:s,className:ne(e,t),role:r,...o})));D0.displayName="DropdownDivider";const Uk=D0,F0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},s)=>(t=de(t,"dropdown-header"),a.jsx(n,{ref:s,className:ne(e,t),role:r,...o})));F0.displayName="DropdownHeader";const Vk=F0,L0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=d0,...l},c)=>{const u=de(e,"dropdown-item"),[d,f]=P0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,{...l,...d,ref:c,className:ne(t,u,f.isActive&&"active",r&&"disabled")})});L0.displayName="DropdownItem";const Bk=L0,U0=w.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=de(t,"dropdown-item-text"),a.jsx(n,{ref:o,className:ne(e,t),...r})));U0.displayName="DropdownItemText";const zk=U0,V0=w.createContext(null);V0.displayName="InputGroupContext";const B0=V0;function z0(e,t){return e}function q0(e,t,n){const r=n?"top-end":"top-start",o=n?"top-start":"top-end",s=n?"bottom-end":"bottom-start",i=n?"bottom-start":"bottom-end",l=n?"right-start":"left-start",c=n?"right-end":"left-end",u=n?"left-start":"right-start",d=n?"left-end":"right-end";let f=e?i:s;return t==="up"?f=e?o:r:t==="end"?f=e?d:u:t==="start"?f=e?c:l:t==="down-centered"?f="bottom":t==="up-centered"&&(f="top"),f}const H0=w.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:o=!0,show:s,renderOnMount:i,as:l="div",popperConfig:c,variant:u,...d},f)=>{let p=!1;const y=w.useContext(s0),m=de(e,"dropdown-menu"),{align:h,drop:x,isRTL:v}=w.useContext(M0);n=n||h;const g=w.useContext(B0),b=[];if(n)if(typeof n=="object"){const T=Object.keys(n);if(T.length){const k=T[0],P=n[k];p=P==="start",b.push(`${m}-${k}-${P}`)}}else n==="end"&&(p=!0);const S=q0(p,x,v),[_,{hasShown:j,popper:C,show:E,toggle:N}]=N0({flip:o,rootCloseEvent:r,show:s,usePopper:!y&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(_.ref=hn(z0(f),_.ref),el(()=>{E&&(C==null||C.update())},[E]),!j&&!i&&!g)return null;typeof l!="string"&&(_.show=E,_.close=()=>N==null?void 0:N(!1),_.align=n);let R=d.style;return C!=null&&C.placement&&(R={...d.style,..._.style},d["x-placement"]=C.placement),a.jsx(l,{...d,..._,style:R,...(b.length||y)&&{"data-bs-popper":"static"},className:ne(t,m,E&&"show",p&&`${m}-end`,u&&`${m}-${u}`,...b)})});H0.displayName="DropdownMenu";const qk=H0,W0=w.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:s=!1,className:i,...l},c)=>{const u=de(t,"btn"),[d,{tagName:f}]=Gf({tagName:e,disabled:s,...l}),p=f;return a.jsx(p,{...d,...l,ref:c,disabled:s,className:ne(i,u,o&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&s&&"disabled")})});W0.displayName="Button";const Hk=W0,K0=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=Hk,...s},i)=>{const l=de(e,"dropdown-toggle"),c=w.useContext(Ml);r!==void 0&&(s.bsPrefix=r);const[u]=T0();return u.ref=hn(u.ref,z0(i)),a.jsx(o,{className:ne(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});K0.displayName="DropdownToggle";const Wk=K0,G0=w.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:o,className:s,align:i="start",onSelect:l,onToggle:c,focusFirstItemOnShow:u,as:d="div",navbar:f,autoClose:p=!0,...y}=Al(e,{show:"onToggle"}),m=w.useContext(B0),h=de(n,"dropdown"),x=Il(),v=C=>p===!1?C==="click":p==="inside"?C!=="rootClose":p==="outside"?C!=="select":!0,g=ke((C,E)=>{var N,R;!((N=E.originalEvent)==null||(R=N.target)==null)&&R.classList.contains("dropdown-toggle")&&E.source==="mousedown"||(E.originalEvent.currentTarget===document&&(E.source!=="keydown"||E.originalEvent.key==="Escape")&&(E.source="rootClose"),v(E.source)&&(c==null||c(C,E)))}),S=q0(i==="end",r,x),_=w.useMemo(()=>({align:i,drop:r,isRTL:x}),[i,r,x]),j={down:h,"down-centered":`${h}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return a.jsx(M0.Provider,{value:_,children:a.jsx(ai,{placement:S,show:o,onSelect:l,onToggle:g,focusFirstItemOnShow:u,itemSelector:`.${h}-item:not(.disabled):not(:disabled)`,children:m?y.children:a.jsx(d,{...y,ref:t,className:ne(s,o&&"show",j[r])})})})});G0.displayName="Dropdown";const Ai=Object.assign(G0,{Toggle:Wk,Menu:qk,Item:Bk,ItemText:zk,Divider:Uk,Header:Vk});var Mi;function Vm(e){if((!Mi&&Mi!==0||e)&&Uo){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Mi=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Mi}function Kk(e){const t=w.useRef(e);return t.current=e,t}function sp(e){const t=Kk(e);w.useEffect(()=>()=>t.current(),[])}function Lc(e){e===void 0&&(e=Lo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function Gk(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Bm=Vo("modal-open");class Yk{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return Gk(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(kn(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Bm,""),kn(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Bm),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const ip=Yk,Uc=(e,t)=>Uo?e==null?(t||Lo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function pd(e,t){const n=Fl(),[r,o]=w.useState(()=>Uc(e,n==null?void 0:n.document));if(!r){const s=Uc(e);s&&o(s)}return w.useEffect(()=>{t&&r&&t(r)},[t,r]),w.useEffect(()=>{const s=Uc(e);s!==r&&o(s)},[e,r]),r}function Qk({in:e,onTransition:t}){const n=w.useRef(null),r=w.useRef(!0),o=ke(t);return el(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),el(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function Xk({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=Qk({in:!!t,onTransition:u=>{const d=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(i(!0),n==null||n(u.element)))};Promise.resolve(o(u)).then(d,f=>{throw u.in||i(!0),f})}}),c=hn(l,e.ref);return s&&!t?null:w.cloneElement(e,{ref:c})}function hd(e,t,n){return e?a.jsx(e,Object.assign({},n)):t?a.jsx(Xk,Object.assign({},n,{transition:t})):a.jsx(zf,Object.assign({},n))}function Y0(e){return e.code==="Escape"||e.keyCode===27}const Zk=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Jk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}let Vc;function eT(e){return Vc||(Vc=new ip({ownerDocument:e==null?void 0:e.document})),Vc}function tT(e){const t=Fl(),n=e||eT(t),r=w.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:w.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:w.useCallback(o=>{r.current.backdrop=o},[])})}const Q0=w.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:f,runTransition:p,backdropTransition:y,runBackdropTransition:m,autoFocus:h=!0,enforceFocus:x=!0,restoreFocus:v=!0,restoreFocusOptions:g,renderDialog:b,renderBackdrop:S=ie=>a.jsx("div",Object.assign({},ie)),manager:_,container:j,onShow:C,onHide:E=()=>{},onExit:N,onExited:R,onExiting:T,onEnter:k,onEntering:P,onEntered:D}=e,F=Jk(e,Zk);const V=Fl(),Q=pd(j),O=tT(_),L=Qf(),A=c0(n),[W,U]=w.useState(!n),Y=w.useRef(null);w.useImperativeHandle(t,()=>O,[O]),Uo&&!A&&n&&(Y.current=Lc(V==null?void 0:V.document)),n&&W&&U(!1);const Z=ke(()=>{if(O.add(),z.current=En(document,"keydown",pe),M.current=En(document,"focus",()=>setTimeout(X),!0),C&&C(),h){var ie,Ot;const lt=Lc((ie=(Ot=O.dialog)==null?void 0:Ot.ownerDocument)!=null?ie:V==null?void 0:V.document);O.dialog&&lt&&!Ws(O.dialog,lt)&&(Y.current=lt,O.dialog.focus())}}),J=ke(()=>{if(O.remove(),z.current==null||z.current(),M.current==null||M.current(),v){var ie;(ie=Y.current)==null||ie.focus==null||ie.focus(g),Y.current=null}});w.useEffect(()=>{!n||!Q||Z()},[n,Q,Z]),w.useEffect(()=>{W&&J()},[W,J]),sp(()=>{J()});const X=ke(()=>{if(!x||!L()||!O.isTopModal())return;const ie=Lc(V==null?void 0:V.document);O.dialog&&ie&&!Ws(O.dialog,ie)&&O.dialog.focus()}),se=ke(ie=>{ie.target===ie.currentTarget&&(u==null||u(ie),l===!0&&E())}),pe=ke(ie=>{c&&Y0(ie)&&O.isTopModal()&&(d==null||d(ie),ie.defaultPrevented||E())}),M=w.useRef(),z=w.useRef(),ve=(...ie)=>{U(!0),R==null||R(...ie)};if(!Q)return null;const ee=Object.assign({role:r,ref:O.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},F,{style:s,className:o,tabIndex:-1});let Oe=b?b(ee):a.jsx("div",Object.assign({},ee,{children:w.cloneElement(i,{role:"document"})}));Oe=hd(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:N,onExiting:T,onExited:ve,onEnter:k,onEntering:P,onEntered:D,children:Oe});let De=null;return l&&(De=S({ref:O.setBackdropRef,onClick:se}),De=hd(y,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:De})),a.jsx(a.Fragment,{children:wr.createPortal(a.jsxs(a.Fragment,{children:[De,Oe]}),Q)})});Q0.displayName="Modal";const nT=Object.assign(Q0,{Manager:ip});function md(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function rT(e,t){e.classList?e.classList.add(t):md(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function zm(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function oT(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=zm(e.className,t):e.setAttribute("class",zm(e.className&&e.className.baseVal||"",t))}const Wr={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class sT extends ip{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,kn(n,{[t]:`${parseFloat(kn(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],kn(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(rT(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";_n(n,Wr.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),_n(n,Wr.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),_n(n,Wr.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();oT(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";_n(n,Wr.FIXED_CONTENT).forEach(s=>this.restore(r,s)),_n(n,Wr.STICKY_CONTENT).forEach(s=>this.restore(o,s)),_n(n,Wr.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Bc;function iT(e){return Bc||(Bc=new sT(e)),Bc}const X0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=de(t,"modal-body"),a.jsx(n,{ref:o,className:ne(e,t),...r})));X0.displayName="ModalBody";const aT=X0,lT=w.createContext({onHide(){}}),Z0=lT,J0=w.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=de(e,"modal");const d=`${e}-dialog`,f=typeof s=="string"?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return a.jsx("div",{...c,ref:u,className:ne(d,t,o&&`${e}-${o}`,r&&`${d}-centered`,l&&`${d}-scrollable`,s&&f),children:a.jsx("div",{className:ne(`${e}-content`,n),children:i})})});J0.displayName="ModalDialog";const eb=J0,tb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=de(t,"modal-footer"),a.jsx(n,{ref:o,className:ne(e,t),...r})));tb.displayName="ModalFooter";const cT=tb,uT={"aria-label":q.string,onClick:q.func,variant:q.oneOf(["white"])},ap=w.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>a.jsx("button",{ref:o,type:"button",className:ne("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));ap.displayName="CloseButton";ap.propTypes=uT;const dT=ap,fT=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(Z0),c=ke(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(dT,{"aria-label":e,variant:t,onClick:c})]})}),pT=fT,nb=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=de(e,"modal-header"),a.jsx(pT,{ref:s,...o,className:ne(t,e),closeLabel:n,closeButton:r})));nb.displayName="ModalHeader";const hT=nb,mT=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:ne(t.className,e)})),gT=mT("h4"),rb=w.forwardRef(({className:e,bsPrefix:t,as:n=gT,...r},o)=>(t=de(t,"modal-title"),a.jsx(n,{ref:o,className:ne(e,t),...r})));rb.displayName="ModalTitle";const vT=rb;function yT(e){return a.jsx(Eo,{...e,timeout:null})}function xT(e){return a.jsx(Eo,{...e,timeout:null})}const ob=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=eb,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":d,show:f=!1,animation:p=!0,backdrop:y=!0,keyboard:m=!0,onEscapeKeyDown:h,onShow:x,onHide:v,container:g,autoFocus:b=!0,enforceFocus:S=!0,restoreFocus:_=!0,restoreFocusOptions:j,onEntered:C,onExit:E,onExiting:N,onEnter:R,onEntering:T,onExited:k,backdropClassName:P,manager:D,...F},V)=>{const[Q,O]=w.useState({}),[L,A]=w.useState(!1),W=w.useRef(!1),U=w.useRef(!1),Y=w.useRef(null),[Z,J]=Ja(),X=hn(V,J),se=ke(v),pe=Il();e=de(e,"modal");const M=w.useMemo(()=>({onHide:se}),[se]);function z(){return D||iT({isRTL:pe})}function ve(ae){if(!Uo)return;const vn=z().getScrollbarWidth()>0,zo=ae.scrollHeight>Lo(ae).documentElement.clientHeight;O({paddingRight:vn&&!zo?Vm():void 0,paddingLeft:!vn&&zo?Vm():void 0})}const ee=ke(()=>{Z&&ve(Z.dialog)});sp(()=>{cd(window,"resize",ee),Y.current==null||Y.current()});const Oe=()=>{W.current=!0},De=ae=>{W.current&&Z&&ae.target===Z.dialog&&(U.current=!0),W.current=!1},ie=()=>{A(!0),Y.current=Ux(Z.dialog,()=>{A(!1)})},Ot=ae=>{ae.target===ae.currentTarget&&ie()},lt=ae=>{if(y==="static"){Ot(ae);return}if(U.current||ae.target!==ae.currentTarget){U.current=!1;return}v==null||v()},gn=ae=>{m?h==null||h(ae):(ae.preventDefault(),y==="static"&&ie())},en=(ae,vn)=>{ae&&ve(ae),R==null||R(ae,vn)},je=ae=>{Y.current==null||Y.current(),E==null||E(ae)},Vn=(ae,vn)=>{T==null||T(ae,vn),Hf(window,"resize",ee)},Bn=ae=>{ae&&(ae.style.display=""),k==null||k(ae),cd(window,"resize",ee)},ci=w.useCallback(ae=>a.jsx("div",{...ae,className:ne(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),Br={...n,...Q};Br.display="block";const ui=ae=>a.jsx("div",{role:"dialog",...ae,style:Br,className:ne(t,e,L&&`${e}-static`,!p&&"show"),onClick:y?lt:void 0,onMouseUp:De,"data-bs-theme":l,"aria-label":d,"aria-labelledby":c,"aria-describedby":u,children:a.jsx(i,{...F,onMouseDown:Oe,className:r,contentClassName:o,children:s})});return a.jsx(Z0.Provider,{value:M,children:a.jsx(nT,{show:f,ref:X,backdrop:y,container:g,keyboard:!0,autoFocus:b,enforceFocus:S,restoreFocus:_,restoreFocusOptions:j,onEscapeKeyDown:gn,onShow:x,onHide:v,onEnter:en,onEntering:Vn,onEntered:C,onExit:je,onExiting:N,onExited:Bn,manager:z(),transition:p?yT:void 0,backdropTransition:p?xT:void 0,renderBackdrop:ci,renderDialog:ui})})});ob.displayName="Modal";const ge=Object.assign(ob,{Body:aT,Header:hT,Title:vT,Footer:cT,Dialog:eb,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),bT=_e.forwardRef(({children:e,onClick:t},n)=>a.jsx("a",{className:"btn btn-secondary d-flex flex-column justify-content-center flex-grow-1",href:"",ref:n,onClick:r=>{r.preventDefault(),t(r)},children:a.jsx("span",{className:"dropdown-toggle",children:e})}));function wT({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r}=at(e,t),{project:o}=Et(t||n.grantNumber);if(!n||!o||n.error||o.error)return;const s=te.routes.request_action_path(e,"new"),i=n.allowedActions.Renewal?Array.isArray(n.allowedActions.Renewal)?[...n.allowedActions.Renewal]:[n.allowedActions.Renewal]:[];i.sort((u,d)=>u.opportunityId<d.opportunityId?-1:1);const l=[{id:"extension",action:`${s}?action_type=Extension`,isEnabled:"Extension"in n.allowedActions,button:"Request an Extension",enabled:n.usesCredits?a.jsx("p",{children:"Need more time to use your current credits and allocations? You can extend your project's end date up to six months past your funding end date, or up to 12 months at a time for projects not supported by a funding award."}):a.jsx("p",{children:"Need more time to use your current allocations? A one-time extension can extend your project end date by up to six months."}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for an extension of its end date.",n.usesCredits?a.jsxs(a.Fragment,{children:[" ","Extensions can be requested starting 90 days before your project's current end date."]}):null]})},{id:"supplement",action:`${s}?action_type=Supplement`,isEnabled:"Supplement"in n.allowedActions,button:"Request a Supplement",enabled:n.usesCredits?a.jsxs("p",{children:["Need more credits to complete your project? Great news! Your"," ",n.allocationType," project is eligible for a supplement of"," ",{Explore:"200,000",Discover:"750,000",Accelerate:"1,500,000"}[n.allocationType]," ","additional ACCESS credits."]}):a.jsxs("p",{children:["Need more units to complete your research? Great news! Your"," ",n.allocationType," project is eligible for a supplement of additional units."]}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for a supplement of additional"," ",n.usesCredits?"ACCESS Credits":"units","."]})},{id:"renewal",action:i.map(u=>[u.opportunityName,`${te.routes.renew_request_path(e)}?opportunity_id=${u.opportunityId}`,"post"]),isEnabled:"Renewal"in n.allowedActions,button:"Request a Renewal",enabled:a.jsxs("p",{children:["Your ",n.allocationType," project can be renewed! The requirements for renewing your project depend on the"," ",a.jsx("a",{href:te.routes.project_types_path(),target:"_blank",children:"new project type you select"}),"."]}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for renewal.",n.usesCredits&&a.jsxs(a.Fragment,{children:[" ","Renewals are available starting 30 days before the project's current end date."]}),n.isMaximize&&a.jsxs(a.Fragment,{children:[" ","You can submit a renewal request to the Maximize ACCESS opportunity closest to your project's current end date."]})]})},{id:"help",action:[["Learn How to Manage Allocations",te.routes.how_to_path(),"get"],["Open a Help Ticket","https://support.access-ci.org/open-a-ticket","get"]],isEnabled:!0,button:"Request Help",enabled:a.jsxs("p",{children:["Need to change something else about your project or expecting another option? Submit a help ticket that includes"," ",a.jsxs("em",{children:["grant number ",o.grantNumber]})," and a detailed description of the problem."]})}];l.sort((u,d)=>u.isEnabled<d.isEnabled?1:-1);const c=l.map(({id:u,action:d,isEnabled:f,button:p,enabled:y,disabled:m})=>a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-4 mb-2 d-grid",children:Array.isArray(d)&&d.length?a.jsxs(Ai,{className:"d-flex flex-column",children:[a.jsx(Ai.Toggle,{as:bT,children:p}),a.jsx(Ai.Menu,{children:d.map(([h,x,v])=>a.jsx(Ai.Item,{href:x,onClick:g=>{v!=="get"&&(g.preventDefault(),g.target.dataset.method=v,$&&$.rails&&$.rails.handleMethod($(g.target)))},children:h},x))})]}):a.jsx("a",{className:`btn btn-secondary d-flex flex-column justify-content-center ${f?"":"disabled"}`,href:f?d:"",children:a.jsx("span",{children:p})})}),a.jsx("div",{className:"col-sm-8 mb-2",children:f?y:m})]},u));return a.jsxs(ge,{size:"lg",show:n.showActionsModal,onHide:r,children:[a.jsx(ge.Header,{closeButton:!0,children:a.jsx(ge.Title,{children:"Manage Your Project"})}),a.jsxs(ge.Body,{children:[a.jsxs("p",{children:["Please select an action to manage your project"," ",a.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),c]})]})}function ST({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleConfirmModal:o}=at(e,t),{project:s}=Et(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=n.usesCredits?"credits":"units",l=(1-mx(n))*100;return a.jsxs(ge,{size:"lg",show:n.showConfirmModal,onHide:o,scrollable:!0,children:[a.jsx(ge.Header,{closeButton:!0,children:a.jsx(ge.Title,{children:"Consider Requesting an Exchange"})}),a.jsx(ge.Body,{children:a.jsxs("p",{children:[a.jsxs("strong",{children:[Math.round(l),"% of your allocation is unused."]})," ","Are you sure you want to request more ",i,"? You can exchange"," ",n.usesCredits?"credits for resources or ":""," one resource for another by changing the ",a.jsx("strong",{children:"balance"})," numbers in the table on the previous screen."]})}),a.jsx(ge.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Return to Exchange"}),a.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{o(),r()},children:["Request More ",i]})]})})]})}function _T({requestId:e,grantNumber:t,actionId:n}){const{deleteAction:r,request:o,toggleDeleteModal:s}=at(e,t);if(!o||o.error)return;const i=o.actions.find(p=>p.actionId==n);if(!i)return;const{deleteStatus:l,isRequest:c}=i,u=l==Le.pending,d=l==Le.error,f=()=>s(n);return a.jsxs(ge,{show:i.showDeleteModal,onHide:f,scrollable:!0,children:[a.jsx(ge.Header,{closeButton:!0,children:a.jsx(ge.Title,{children:"Confirm Deletion"})}),a.jsxs(ge.Body,{children:[d&&a.jsxs(be,{color:"danger",children:["Deletion of the ",c?"request":"action"," failed."]}),a.jsxs("p",{children:["Are you sure you want to delete"," ",!c&&a.jsxs(a.Fragment,{children:["action"," ",a.jsxs("strong",{children:[i.type,": ",jr(i.date)]})," ","on"," "]}),"request ",a.jsx("strong",{children:Af(o)}),"? Deletions cannot be undone."]})]}),a.jsx(ge.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:f,disabled:u,children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>r(n),disabled:u,children:u?"Deleting...":"Delete"})]})})]})}function nl({color:e="primary",href:t,icon:n,onClick:r,target:o,title:s}){const i=a.jsx("i",{className:`bi bi-${n}`}),l={className:`btn btn-sm ms-1 text-${e}`,href:t,onClick:r,style:{"--bs-btn-padding-x":"0.1rem","--bs-btn-padding-y":"0.1rem","--bs-btn-line-height":"1"},target:o,title:s};return t?a.jsx("a",{...l,children:i}):a.jsx("button",{...l,children:i})}function sb({action:e,request:t,toggleDeleteModal:n}){const r=e.allowedOperations||[],o=["Exchange","Transfer"].includes(e.type),s=[];r.includes("Edit")&&!o&&s.push(a.jsx(nl,{href:e.isRequest?te.routes.edit_request_path(t.requestId):te.routes.edit_request_action_path(t.requestId,e.actionId),icon:"pencil",title:"Edit action"},"edit")),r.includes("Delete")&&!o&&s.push(a.jsx(nl,{color:"danger",icon:"trash",onClick:()=>n(e.actionId),title:"Edit action"},"delete"));const i=`${e.type}: ${jr(e.date)}`;return a.jsxs(a.Fragment,{children:[e.detailAvailable&&!o?a.jsx("a",{href:te.routes.request_action_path(t.requestId,e.actionId),children:i}):i,s]})}function Rr({resource:e,userGuide:t=!0}){const{full:n,short:r}=Pl(e.name),o=r?a.jsx("abbr",{title:n,children:r}):n;return a.jsxs(a.Fragment,{children:[cr(te.resourceTypeIcons[e.icon])," ",o,!e.isCredit&&e.userGuideUrl&&t?a.jsx(nl,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function Oo({status:e,title:t}){const n={Active:"primary",Approved:"primary",New:"secondary",Pending:"secondary","Under Review":"secondary","Returned for Corrections":"secondary"}[e]||"dark";return a.jsx("span",{className:`badge text-bg-${n} align-self-center`,title:t,children:e})}const jT=e=>a.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function CT({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=at(e,t),{project:o,setRequest:s}=Et(t||n.grantNumber);if(!n||!o)return;const i=o.requestsList;let l=0;for(;l<i.length&&i[l].requestId!==e;)l++;const c=i[l+1],u=i[l-1],d=(h,x)=>h?a.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>s(h.requestId),children:[x=="prev"?a.jsx("i",{className:"bi bi-chevron-left"}):null,Af(h),x=="next"?a.jsx("i",{className:"bi bi-chevron-right"}):null]}):a.jsx("span",{}),f=new Set,p=[];for(let h of n.actions)for(let x of h.resources)f.has(x.resourceId)||(f.add(x.resourceId),p.push(x));p.sort(Ha);const y=[{key:"action",name:"Action Details",format:(h,x)=>a.jsx(sb,{action:x,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:h=>a.jsx(Oo,{status:h})},...p.map(h=>({key:`resource${h.resourceId}`,name:h.name,icon:h.icon,class:"text-end",format:h.isBoolean?x=>x?Mf(x):null:jT,formatHeader:(x,v)=>a.jsx(Rr,{resource:v,userGuide:!1})}))],m=n.actions.map(h=>{const x={...h};for(let{resourceId:v}of p)x[`resource${v}`]=0;for(let{resourceId:v,approved:g,requested:b}of h.resources)x[`resource${v}`]=g||b||0;return x});return a.jsxs("div",{className:"history",children:[a.jsx(Ln,{columns:y,rows:m}),a.jsxs("div",{className:"buttons d-flex justify-content-between",children:[d(c,"prev"),d(u,"next")]})]})}function ET({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=at(e,t);if(!n)return;const o=[{key:"type",name:"Action Details",format:(s,i)=>a.jsx(sb,{action:i,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:s=>a.jsx(Oo,{status:s})}];if(n.actions&&n.actions.length)return a.jsx(Ln,{rows:n.actions,columns:o})}function ts(...e){return e.filter(t=>t!=null).reduce((t,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return t===null?n:function(...o){t.apply(this,o),n.apply(this,o)}},null)}const RT={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function NT(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=RT[e];return r+parseInt(kn(t,o[0]),10)+parseInt(kn(t,o[1]),10)}const kT={[Wn]:"collapse",[Xa]:"collapsing",[Sn]:"collapsing",[Yn]:"collapse show"},TT=_e.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,className:s,children:i,dimension:l="height",in:c=!1,timeout:u=300,mountOnEnter:d=!1,unmountOnExit:f=!1,appear:p=!1,getDimensionValue:y=NT,...m},h)=>{const x=typeof l=="function"?l():l,v=w.useMemo(()=>ts(j=>{j.style[x]="0"},e),[x,e]),g=w.useMemo(()=>ts(j=>{const C=`scroll${x[0].toUpperCase()}${x.slice(1)}`;j.style[x]=`${j[C]}px`},t),[x,t]),b=w.useMemo(()=>ts(j=>{j.style[x]=null},n),[x,n]),S=w.useMemo(()=>ts(j=>{j.style[x]=`${y(x,j)}px`,Bx(j)},r),[r,y,x]),_=w.useMemo(()=>ts(j=>{j.style[x]=null},o),[x,o]);return a.jsx(zx,{ref:h,addEndListener:Vx,...m,"aria-expanded":m.role?c:null,onEnter:v,onEntering:g,onEntered:b,onExit:S,onExiting:_,childRef:i.ref,in:c,timeout:u,mountOnEnter:d,unmountOnExit:f,appear:p,children:(j,C)=>_e.cloneElement(i,{...C,className:ne(s,i.props.className,kT[j],x==="width"&&"collapse-horizontal")})})}),OT=TT;function ib(e,t){return Array.isArray(e)?e.includes(t):e===t}const ab=w.createContext({});ab.displayName="AccordionContext";const Ll=ab,lb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(Ll);return t=de(t,"accordion-collapse"),a.jsx(OT,{ref:i,in:ib(l,o),...s,className:ne(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});lb.displayName="AccordionCollapse";const cb=lb,ub=w.createContext({eventKey:""});ub.displayName="AccordionItemContext";const lp=ub,db=w.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,...u},d)=>{t=de(t,"accordion-body");const{eventKey:f}=w.useContext(lp);return a.jsx(cb,{eventKey:f,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,children:a.jsx(e,{ref:d,...u,className:ne(n,t)})})});db.displayName="AccordionBody";const PT=db;function $T(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:o}=w.useContext(Ll);return s=>{let i=e===n?null:e;o&&(Array.isArray(n)?n.includes(e)?i=n.filter(l=>l!==e):i=[...n,e]:i=[e]),r==null||r(i,s),t==null||t(s)}}const fb=w.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...o},s)=>{t=de(t,"accordion-button");const{eventKey:i}=w.useContext(lp),l=$T(i,r),{activeEventKey:c}=w.useContext(Ll);return e==="button"&&(o.type="button"),a.jsx(e,{ref:s,onClick:l,...o,"aria-expanded":Array.isArray(c)?c.includes(i):i===c,className:ne(n,t,!ib(c,i)&&"collapsed")})});fb.displayName="AccordionButton";const pb=fb,hb=w.forwardRef(({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...s},i)=>(t=de(t,"accordion-header"),a.jsx(e,{ref:i,...s,className:ne(n,t),children:a.jsx(pb,{onClick:o,children:r})})));hb.displayName="AccordionHeader";const IT=hb,mb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...o},s)=>{t=de(t,"accordion-item");const i=w.useMemo(()=>({eventKey:r}),[r]);return a.jsx(lp.Provider,{value:i,children:a.jsx(e,{ref:s,...o,className:ne(n,t)})})});mb.displayName="AccordionItem";const AT=mb,gb=w.forwardRef((e,t)=>{const{as:n="div",activeKey:r,bsPrefix:o,className:s,onSelect:i,flush:l,alwaysOpen:c,...u}=Al(e,{activeKey:"onSelect"}),d=de(o,"accordion"),f=w.useMemo(()=>({activeEventKey:r,onSelect:i,alwaysOpen:c}),[r,i,c]);return a.jsx(Ll.Provider,{value:f,children:a.jsx(n,{ref:t,...u,className:ne(s,d,l&&`${d}-flush`)})})});gb.displayName="Accordion";const Wt=Object.assign(gb,{Button:pb,Collapse:cb,Item:AT,Header:IT,Body:PT}),gd=2**31-1;function vb(e,t,n){const r=n-Date.now();e.current=r<=gd?setTimeout(t,r):setTimeout(()=>vb(e,t,n),gd)}function MT(){const e=Qf(),t=w.useRef();return sp(()=>clearTimeout(t.current)),w.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(o,s=0){e()&&(n(),s<=gd?t.current=setTimeout(o,s):vb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const DT=()=>{};function FT(e,t,{disabled:n,clickTrigger:r}={}){const o=t||DT;E0(e,o,{disabled:n,clickTrigger:r});const s=ke(i=>{Y0(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=Lo(la(e));let l=(i.defaultView||window).event;const c=En(i,"keyup",u=>{if(u===l){l=void 0;return}s(u)});return()=>{c()}},[e,n,s])}const yb=w.forwardRef((e,t)=>{const{flip:n,offset:r,placement:o,containerPadding:s,popperConfig:i={},transition:l,runTransition:c}=e,[u,d]=Ja(),[f,p]=Ja(),y=hn(d,t),m=pd(e.container),h=pd(e.target),[x,v]=w.useState(!e.show),g=C0(h,u,R0({placement:o,enableEvents:!!e.show,containerPadding:s||5,flip:n,offset:r,arrowElement:f,popperConfig:i}));e.show&&x&&v(!1);const b=(...T)=>{v(!0),e.onExited&&e.onExited(...T)},S=e.show||!x;if(FT(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:_,onExiting:j,onEnter:C,onEntering:E,onEntered:N}=e;let R=e.children(Object.assign({},g.attributes.popper,{style:g.styles.popper,ref:y}),{popper:g,placement:o,show:!!e.show,arrowProps:Object.assign({},g.attributes.arrow,{style:g.styles.arrow,ref:p})});return R=hd(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:_,onExiting:j,onExited:b,onEnter:C,onEntering:E,onEntered:N}),m?wr.createPortal(R,m):null});yb.displayName="Overlay";const LT=yb,xb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=de(t,"popover-header"),a.jsx(n,{ref:o,className:ne(e,t),...r})));xb.displayName="PopoverHeader";const UT=xb,bb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=de(t,"popover-body"),a.jsx(n,{ref:o,className:ne(e,t),...r})));bb.displayName="PopoverBody";const wb=bb;function Sb(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function _b(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const VT=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,body:s,arrowProps:i,hasDoneInitialMeasure:l,popper:c,show:u,...d},f)=>{const p=de(e,"popover"),y=Il(),[m]=(t==null?void 0:t.split("-"))||[],h=Sb(m,y);let x=r;return u&&!l&&(x={...r,..._b(c==null?void 0:c.strategy)}),a.jsxs("div",{ref:f,role:"tooltip",style:x,"x-placement":m,className:ne(n,p,m&&`bs-popover-${h}`),...d,children:[a.jsx("div",{className:"popover-arrow",...i}),s?a.jsx(wb,{children:o}):o]})}),BT=Object.assign(VT,{Header:UT,Body:wb,POPPER_OFFSET:[0,8]}),jb=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=de(e,"tooltip");const f=Il(),[p]=(t==null?void 0:t.split("-"))||[],y=Sb(p,f);let m=r;return c&&!i&&(m={...r,..._b(l==null?void 0:l.strategy)}),a.jsxs("div",{ref:d,style:m,role:"tooltip","x-placement":p,className:ne(n,e,`bs-tooltip-${y}`),...u,children:[a.jsx("div",{className:"tooltip-arrow",...s}),a.jsx("div",{className:`${e}-inner`,children:o})]})});jb.displayName="Tooltip";const Ul=Object.assign(jb,{TOOLTIP_OFFSET:[0,6]});function zT(e){const t=w.useRef(null),n=de(void 0,"popover"),r=de(void 0,"tooltip"),o=w.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(md(t.current,n))return BT.POPPER_OFFSET;if(md(t.current,r))return Ul.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function qT(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=o=>n(Za(o))),t.ref=r.__wrapped||(r.__wrapped=o=>r(Za(o)))}const Cb=w.forwardRef(({children:e,transition:t=Eo,popperConfig:n={},rootClose:r=!1,placement:o="top",show:s=!1,...i},l)=>{const c=w.useRef({}),[u,d]=w.useState(null),[f,p]=zT(i.offset),y=hn(l,f),m=t===!0?Eo:t||void 0,h=ke(x=>{d(x),n==null||n.onFirstUpdate==null||n.onFirstUpdate(x)});return el(()=>{u&&i.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[u,i.target]),w.useEffect(()=>{s||d(null)},[s]),a.jsx(LT,{...i,ref:y,popperConfig:{...n,modifiers:p.concat(n.modifiers||[]),onFirstUpdate:h},transition:m,rootClose:r,placement:o,show:s,children:(x,{arrowProps:v,popper:g,show:b})=>{var S,_;qT(x,v);const j=g==null?void 0:g.placement,C=Object.assign(c.current,{state:g==null?void 0:g.state,scheduleUpdate:g==null?void 0:g.update,placement:j,outOfBoundaries:(g==null||(S=g.state)==null||(_=S.modifiersData.hide)==null?void 0:_.isReferenceHidden)||!1,strategy:n.strategy}),E=!!u;return typeof e=="function"?e({...x,placement:j,show:b,...!t&&b&&{className:"show"},popper:C,arrowProps:v,hasDoneInitialMeasure:E}):w.cloneElement(e,{...x,placement:j,arrowProps:v,popper:C,hasDoneInitialMeasure:E,className:ne(e.props.className,!t&&b&&"show"),style:{...e.props.style,...x.style}})}})});Cb.displayName="Overlay";const Eb=Cb;function HT(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function qm(e,t,n){const[r]=t,o=r.currentTarget,s=r.relatedTarget||r.nativeEvent[n];(!s||s!==o)&&!Ws(o,s)&&e(...t)}q.oneOf(["click","hover","focus"]);const WT=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:o,defaultShow:s=!1,onToggle:i,delay:l,placement:c,flip:u=c&&c.indexOf("auto")!==-1,...d})=>{const f=w.useRef(null),p=hn(f,n.ref),y=MT(),m=w.useRef(""),[h,x]=Zx(o,s,i),v=HT(l),{onFocus:g,onBlur:b,onClick:S}=typeof n!="function"?w.Children.only(n).props:{},_=F=>{p(Za(F))},j=w.useCallback(()=>{if(y.clear(),m.current="show",!v.show){x(!0);return}y.set(()=>{m.current==="show"&&x(!0)},v.show)},[v.show,x,y]),C=w.useCallback(()=>{if(y.clear(),m.current="hide",!v.hide){x(!1);return}y.set(()=>{m.current==="hide"&&x(!1)},v.hide)},[v.hide,x,y]),E=w.useCallback((...F)=>{j(),g==null||g(...F)},[j,g]),N=w.useCallback((...F)=>{C(),b==null||b(...F)},[C,b]),R=w.useCallback((...F)=>{x(!h),S==null||S(...F)},[S,x,h]),T=w.useCallback((...F)=>{qm(j,F,"fromElement")},[j]),k=w.useCallback((...F)=>{qm(C,F,"toElement")},[C]),P=e==null?[]:[].concat(e),D={ref:_};return P.indexOf("click")!==-1&&(D.onClick=R),P.indexOf("focus")!==-1&&(D.onFocus=E,D.onBlur=N),P.indexOf("hover")!==-1&&(D.onMouseOver=T,D.onMouseOut=k),a.jsxs(a.Fragment,{children:[typeof n=="function"?n(D):w.cloneElement(n,D),a.jsx(Eb,{...d,show:h,onHide:C,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},cp=WT;function KT({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r}=Et(t||n.grantNumber),{setTab:o}=Et(t||n.grantNumber);if(!n||!r)return;let s;const i={};for(let p of r.users||[])for(let y of p.resourceIds)i[y]=i[y]||0,i[y]+=1;const l=(n.resources||[]).filter(p=>p.isCredit?(s=p,!1):p.allocated>0).map((p,y)=>({...p,userCount:i[p.resourceId]||0,color:Ju[y%Ju.length]})),c=s?s.allocated:0,u="Exchange"in n.allowedActions,d=n.exchangeActionId!==null,f=[{key:"name",name:"Resource",format:(p,y)=>a.jsx(Rr,{resource:y})},{key:"isActive",name:"Status",format:p=>a.jsx(Oo,{status:p?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(p,y)=>{if(y.isBoolean)return Mf(y.allocated);const m=y.allocated-p,h=Math.max(m,0)*100/y.allocated;return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`usage bg-${y.color}`,style:{width:`${Math.min(h,100)}%`}}),Ke(m,{abbreviate:!0})," of"," ",Ke(y.allocated,{abbreviate:!0})," ",y.unit," ","remaining (",Math.round(h),"%)"]})}},{key:"endDate",name:"End Date",format:p=>jr(p)}];return r.isManager&&f.push({key:"userCount",name:"Users",class:"text-end",format:Ke}),r.currentUser&&f.push({key:"resourceUsername",name:"My Username",format:(p,y)=>{const m=r.currentUser.resourceUsernames[y.resourceId];if(m)return m;if(r.currentUser.resourceAccountPendingIds.includes(y.resourceId))return a.jsx(Oo,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(r.currentUser.resourceIds.includes(y.resourceId)||!y.isActive)return a.jsx(a.Fragment,{children:"—"});if(r.isManager)return a.jsx("a",{href:"#",onClick:x=>{x.preventDefault(),o("users")},children:"Grant access"});const h=a.jsxs(Ul,{children:["Please contact ",Df(r)," to request access to this resource."]});return a.jsx(cp,{overlay:h,children:a.jsx("a",{href:"#",onClick:x=>{x.preventDefault()},children:"Request access"})})}}),a.jsxs("div",{className:"overview",children:[u&&!d&&c>te.creditAlertThreshold?a.jsxs("button",{onClick:()=>o("resources"),className:"alert alert-info d-flex justify-content-between align-items-center w-100",children:[a.jsxs("span",{children:[a.jsxs("span",{className:"fs-3",children:[cr(te.resourceTypeIcons[s.icon])," ",Ke(c)]})," ",s.unit," available"]}),a.jsxs("span",{className:"align-middle d-flex align-items-center",children:["Exchange credits for resources!"," ",a.jsx("span",{className:"fs-3",children:cr("chevron-right")})]})]}):null,l.length?a.jsx(Ln,{columns:f,rows:l}):null]})}const GT=[{key:"role",name:"Role",format:e=>a.jsxs(a.Fragment,{children:[cr(te.roleIcons[e])," ",e]})},{key:"users",name:"Users",format:e=>{const t=e.slice(0,3);return e.length>4&&(t[2]=`${Ke(e.length-3)} others`),t.map((n,r)=>{const o=t.length-r;return`${n}${o>2?",":o==2&&t.length>1?" and":""}`}).join(" ")}}],YT=({requestId:e,grantNumber:t})=>{const{project:n}=Et(t);if(!n)return;const r=$l.map(({role:o,name:s})=>({role:s,users:(n.users||[]).filter(i=>i.role===o).map(i=>`${i.firstName} ${i.lastName}`)})).filter(o=>o.users.length>0);return r.length?a.jsx(Ln,{rows:r,columns:GT}):null};function QT({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r,username:o}=Et(t||n.grantNumber);if(!(!n||!r||n.error||r.error)&&n)return a.jsxs("div",{className:"overview",children:[a.jsx(KT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(YT,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(ET,{requestId:e})})]}):null]})}function Fr(e){"@babel/helpers - typeof";return Fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fr(e)}function XT(e,t){if(Fr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Fr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rb(e){var t=XT(e,"string");return Fr(t)=="symbol"?t:String(t)}function io(e,t,n){return t=Rb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hm(Object(n),!0).forEach(function(r){io(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZT(e){if(Array.isArray(e))return e}function JT(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,i,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function vd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Nb(e,t){if(e){if(typeof e=="string")return vd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vd(e,t)}}function eO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
59
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){return ZT(e)||JT(e,t)||Nb(e,t)||eO()}function mn(e,t){if(e==null)return{};var n=qf(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var tO=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function kb(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,i=s===void 0?null:s,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,y=e.value,m=mn(e,tO),h=w.useState(l!==void 0?l:n),x=Ue(h,2),v=x[0],g=x[1],b=w.useState(c!==void 0?c:o),S=Ue(b,2),_=S[0],j=S[1],C=w.useState(y!==void 0?y:i),E=Ue(C,2),N=E[0],R=E[1],T=w.useCallback(function(O,L){typeof u=="function"&&u(O,L),R(O)},[u]),k=w.useCallback(function(O,L){var A;typeof d=="function"&&(A=d(O,L)),g(A!==void 0?A:O)},[d]),P=w.useCallback(function(){typeof p=="function"&&p(),j(!0)},[p]),D=w.useCallback(function(){typeof f=="function"&&f(),j(!1)},[f]),F=l!==void 0?l:v,V=c!==void 0?c:_,Q=y!==void 0?y:N;return H(H({},m),{},{inputValue:F,menuIsOpen:V,onChange:T,onInputChange:k,onMenuClose:D,onMenuOpen:P,value:Q})}function nO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rb(r.key),r)}}function rO(e,t,n){return t&&Wm(e.prototype,t),n&&Wm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function oO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qa(e,t)}function rl(e){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},rl(e)}function Tb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Tb=function(){return!!e})()}function sO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iO(e,t){if(t&&(Fr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sO(e)}function aO(e){var t=Tb();return function(){var r=rl(e),o;if(t){var s=rl(this).constructor;o=Reflect.construct(r,arguments,s)}else o=r.apply(this,arguments);return iO(this,o)}}function lO(e){if(Array.isArray(e))return vd(e)}function cO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
60
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function up(e){return lO(e)||cO(e)||Nb(e)||uO()}function dO(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function fO(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var pO=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(fO(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=dO(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Je="-ms-",ol="-moz-",ce="-webkit-",Ob="comm",dp="rule",fp="decl",hO="@import",Pb="@keyframes",mO="@layer",gO=Math.abs,Vl=String.fromCharCode,vO=Object.assign;function yO(e,t){return We(e,0)^45?(((t<<2^We(e,0))<<2^We(e,1))<<2^We(e,2))<<2^We(e,3):0}function $b(e){return e.trim()}function xO(e,t){return(e=t.exec(e))?e[0]:e}function ue(e,t,n){return e.replace(t,n)}function yd(e,t){return e.indexOf(t)}function We(e,t){return e.charCodeAt(t)|0}function Ks(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function pp(e){return e.length}function Di(e,t){return t.push(e),e}function bO(e,t){return e.map(t).join("")}var Bl=1,Po=1,Ib=0,vt=0,$e=0,Bo="";function zl(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Bl,column:Po,length:i,return:""}}function ns(e,t){return vO(zl("",null,null,"",null,null,0),e,{length:-e.length},t)}function wO(){return $e}function SO(){return $e=vt>0?We(Bo,--vt):0,Po--,$e===10&&(Po=1,Bl--),$e}function wt(){return $e=vt<Ib?We(Bo,vt++):0,Po++,$e===10&&(Po=1,Bl++),$e}function pn(){return We(Bo,vt)}function ca(){return vt}function li(e,t){return Ks(Bo,e,t)}function Gs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ab(e){return Bl=Po=1,Ib=sn(Bo=e),vt=0,[]}function Mb(e){return Bo="",e}function ua(e){return $b(li(vt-1,xd(e===91?e+2:e===40?e+1:e)))}function _O(e){for(;($e=pn())&&$e<33;)wt();return Gs(e)>2||Gs($e)>3?"":" "}function jO(e,t){for(;--t&&wt()&&!($e<48||$e>102||$e>57&&$e<65||$e>70&&$e<97););return li(e,ca()+(t<6&&pn()==32&&wt()==32))}function xd(e){for(;wt();)switch($e){case e:return vt;case 34:case 39:e!==34&&e!==39&&xd($e);break;case 40:e===41&&xd(e);break;case 92:wt();break}return vt}function CO(e,t){for(;wt()&&e+$e!==57;)if(e+$e===84&&pn()===47)break;return"/*"+li(t,vt-1)+"*"+Vl(e===47?e:wt())}function EO(e){for(;!Gs(pn());)wt();return li(e,vt)}function RO(e){return Mb(da("",null,null,null,[""],e=Ab(e),0,[0],e))}function da(e,t,n,r,o,s,i,l,c){for(var u=0,d=0,f=i,p=0,y=0,m=0,h=1,x=1,v=1,g=0,b="",S=o,_=s,j=r,C=b;x;)switch(m=g,g=wt()){case 40:if(m!=108&&We(C,f-1)==58){yd(C+=ue(ua(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:C+=ua(g);break;case 9:case 10:case 13:case 32:C+=_O(m);break;case 92:C+=jO(ca()-1,7);continue;case 47:switch(pn()){case 42:case 47:Di(NO(CO(wt(),ca()),t,n),c);break;default:C+="/"}break;case 123*h:l[u++]=sn(C)*v;case 125*h:case 59:case 0:switch(g){case 0:case 125:x=0;case 59+d:v==-1&&(C=ue(C,/\f/g,"")),y>0&&sn(C)-f&&Di(y>32?Gm(C+";",r,n,f-1):Gm(ue(C," ","")+";",r,n,f-2),c);break;case 59:C+=";";default:if(Di(j=Km(C,t,n,u,d,o,l,b,S=[],_=[],f),s),g===123)if(d===0)da(C,t,j,j,S,s,f,l,_);else switch(p===99&&We(C,3)===110?100:p){case 100:case 108:case 109:case 115:da(e,j,j,r&&Di(Km(e,j,j,0,0,o,l,b,o,S=[],f),_),o,_,f,l,r?S:_);break;default:da(C,j,j,j,[""],_,0,l,_)}}u=d=y=0,h=v=1,b=C="",f=i;break;case 58:f=1+sn(C),y=m;default:if(h<1){if(g==123)--h;else if(g==125&&h++==0&&SO()==125)continue}switch(C+=Vl(g),g*h){case 38:v=d>0?1:(C+="\f",-1);break;case 44:l[u++]=(sn(C)-1)*v,v=1;break;case 64:pn()===45&&(C+=ua(wt())),p=pn(),d=f=sn(b=C+=EO(ca())),g++;break;case 45:m===45&&sn(C)==2&&(h=0)}}return s}function Km(e,t,n,r,o,s,i,l,c,u,d){for(var f=o-1,p=o===0?s:[""],y=pp(p),m=0,h=0,x=0;m<r;++m)for(var v=0,g=Ks(e,f+1,f=gO(h=i[m])),b=e;v<y;++v)(b=$b(h>0?p[v]+" "+g:ue(g,/&\f/g,p[v])))&&(c[x++]=b);return zl(e,t,n,o===0?dp:l,c,u,d)}function NO(e,t,n){return zl(e,t,n,Ob,Vl(wO()),Ks(e,2,-2),0)}function Gm(e,t,n,r){return zl(e,t,n,fp,Ks(e,0,r),Ks(e,r+1,-1),r)}function mo(e,t){for(var n="",r=pp(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function kO(e,t,n,r){switch(e.type){case mO:if(e.children.length)break;case hO:case fp:return e.return=e.return||e.value;case Ob:return"";case Pb:return e.return=e.value+"{"+mo(e.children,r)+"}";case dp:e.value=e.props.join(",")}return sn(n=mo(e.children,r))?e.return=e.value+"{"+n+"}":""}function TO(e){var t=pp(e);return function(n,r,o,s){for(var i="",l=0;l<t;l++)i+=e[l](n,r,o,s)||"";return i}}function OO(e){return function(t){t.root||(t=t.return)&&e(t)}}function PO(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var $O=function(t,n,r){for(var o=0,s=0;o=s,s=pn(),o===38&&s===12&&(n[r]=1),!Gs(s);)wt();return li(t,vt)},IO=function(t,n){var r=-1,o=44;do switch(Gs(o)){case 0:o===38&&pn()===12&&(n[r]=1),t[r]+=$O(vt-1,n,r);break;case 2:t[r]+=ua(o);break;case 4:if(o===44){t[++r]=pn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Vl(o)}while(o=wt());return t},AO=function(t,n){return Mb(IO(Ab(t),n))},Ym=new WeakMap,MO=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Ym.get(r))&&!o){Ym.set(t,!0);for(var s=[],i=AO(n,s),l=r.props,c=0,u=0;c<i.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,l[d]):l[d]+" "+i[c]}}},DO=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Db(e,t){switch(yO(e,t)){case 5103:return ce+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ce+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ce+e+ol+e+Je+e+e;case 6828:case 4268:return ce+e+Je+e+e;case 6165:return ce+e+Je+"flex-"+e+e;case 5187:return ce+e+ue(e,/(\w+).+(:[^]+)/,ce+"box-$1$2"+Je+"flex-$1$2")+e;case 5443:return ce+e+Je+"flex-item-"+ue(e,/flex-|-self/,"")+e;case 4675:return ce+e+Je+"flex-line-pack"+ue(e,/align-content|flex-|-self/,"")+e;case 5548:return ce+e+Je+ue(e,"shrink","negative")+e;case 5292:return ce+e+Je+ue(e,"basis","preferred-size")+e;case 6060:return ce+"box-"+ue(e,"-grow","")+ce+e+Je+ue(e,"grow","positive")+e;case 4554:return ce+ue(e,/([^-])(transform)/g,"$1"+ce+"$2")+e;case 6187:return ue(ue(ue(e,/(zoom-|grab)/,ce+"$1"),/(image-set)/,ce+"$1"),e,"")+e;case 5495:case 3959:return ue(e,/(image-set\([^]*)/,ce+"$1$`$1");case 4968:return ue(ue(e,/(.+:)(flex-)?(.*)/,ce+"box-pack:$3"+Je+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ce+e+e;case 4095:case 3583:case 4068:case 2532:return ue(e,/(.+)-inline(.+)/,ce+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(sn(e)-1-t>6)switch(We(e,t+1)){case 109:if(We(e,t+4)!==45)break;case 102:return ue(e,/(.+:)(.+)-([^]+)/,"$1"+ce+"$2-$3$1"+ol+(We(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~yd(e,"stretch")?Db(ue(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(We(e,t+1)!==115)break;case 6444:switch(We(e,sn(e)-3-(~yd(e,"!important")&&10))){case 107:return ue(e,":",":"+ce)+e;case 101:return ue(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ce+(We(e,14)===45?"inline-":"")+"box$3$1"+ce+"$2$3$1"+Je+"$2box$3")+e}break;case 5936:switch(We(e,t+11)){case 114:return ce+e+Je+ue(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ce+e+Je+ue(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ce+e+Je+ue(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ce+e+Je+e+e}return e}var FO=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case fp:t.return=Db(t.value,t.length);break;case Pb:return mo([ns(t,{value:ue(t.value,"@","@"+ce)})],o);case dp:if(t.length)return bO(t.props,function(s){switch(xO(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mo([ns(t,{props:[ue(s,/:(read-\w+)/,":"+ol+"$1")]})],o);case"::placeholder":return mo([ns(t,{props:[ue(s,/:(plac\w+)/,":"+ce+"input-$1")]}),ns(t,{props:[ue(s,/:(plac\w+)/,":"+ol+"$1")]}),ns(t,{props:[ue(s,/:(plac\w+)/,Je+"input-$1")]})],o)}return""})}},LO=[FO],UO=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var x=h.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||LO,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var x=h.getAttribute("data-emotion").split(" "),v=1;v<x.length;v++)s[x[v]]=!0;l.push(h)});var c,u=[MO,DO];{var d,f=[kO,OO(function(h){d.insert(h)})],p=TO(u.concat(o,f)),y=function(x){return mo(RO(x),p)};c=function(x,v,g,b){d=g,y(x?x+"{"+v.styles+"}":v.styles),b&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new pO({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(l),m},Fb={exports:{}},me={};/** @license React v16.13.1
58
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",i=0;i<arguments.length;i++){var l=arguments[i];l&&(s=o(s,r(l)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var i="";for(var l in s)t.call(s,l)&&s[l]&&(i=o(i,l));return i}function o(s,i){return i?s?s+" "+i:s+i:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Mx);var _R=Mx.exports;const oe=Xs(_R);function zf(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Ya(e,t){return Ya=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Ya(e,t)}function jR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ya(e,t)}const xm={disabled:!1},Dx=je.createContext(null);var CR=function(t){return t.scrollTop},ds="unmounted",Kn="exited",Sn="entering",Qn="entered",Qa="exiting",Vn=function(e){jR(t,e);function t(r,o){var s;s=e.call(this,r,o)||this;var i=o,l=i&&!i.isMounting?r.enter:r.appear,c;return s.appearStatus=null,r.in?l?(c=Kn,s.appearStatus=Sn):c=Qn:r.unmountOnExit||r.mountOnEnter?c=ds:c=Kn,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===ds?{status:Kn}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var s=null;if(o!==this.props){var i=this.state.status;this.props.in?i!==Sn&&i!==Qn&&(s=Sn):(i===Sn||i===Qn)&&(s=Qa)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,s,i,l;return s=i=l=o,o!=null&&typeof o!="number"&&(s=o.exit,i=o.enter,l=o.appear!==void 0?o.appear:i),{exit:s,enter:i,appear:l}},n.updateStatus=function(o,s){if(o===void 0&&(o=!1),s!==null)if(this.cancelNextCallback(),s===Sn){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Sr.findDOMNode(this);i&&CR(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Kn&&this.setState({status:ds})},n.performEnter=function(o){var s=this,i=this.props.enter,l=this.context?this.context.isMounting:o,c=this.props.nodeRef?[l]:[Sr.findDOMNode(this),l],u=c[0],d=c[1],f=this.getTimeouts(),p=l?f.appear:f.enter;if(!o&&!i||xm.disabled){this.safeSetState({status:Qn},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:Sn},function(){s.props.onEntering(u,d),s.onTransitionEnd(p,function(){s.safeSetState({status:Qn},function(){s.props.onEntered(u,d)})})})},n.performExit=function(){var o=this,s=this.props.exit,i=this.getTimeouts(),l=this.props.nodeRef?void 0:Sr.findDOMNode(this);if(!s||xm.disabled){this.safeSetState({status:Kn},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:Qa},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Kn},function(){o.props.onExited(l)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,s){s=this.setNextCallback(s),this.setState(o,s)},n.setNextCallback=function(o){var s=this,i=!0;return this.nextCallback=function(l){i&&(i=!1,s.nextCallback=null,o(l))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},n.onTransitionEnd=function(o,s){this.setNextCallback(s);var i=this.props.nodeRef?this.props.nodeRef.current:Sr.findDOMNode(this),l=o==null&&!this.props.addEndListener;if(!i||l){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],u=c[0],d=c[1];this.props.addEndListener(u,d)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===ds)return null;var s=this.props,i=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var l=zf(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return je.createElement(Dx.Provider,{value:null},typeof i=="function"?i(o,l):je.cloneElement(je.Children.only(i),l))},t}(je.Component);Vn.contextType=Dx;Vn.propTypes={};function qr(){}Vn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:qr,onEntering:qr,onEntered:qr,onExit:qr,onExiting:qr,onExited:qr};Vn.UNMOUNTED=ds;Vn.EXITED=Kn;Vn.ENTERING=Sn;Vn.ENTERED=Qn;Vn.EXITING=Qa;const ER=Vn;function Lo(e){return e&&e.ownerDocument||document}function RR(e){var t=Lo(e);return t&&t.defaultView||window}function NR(e,t){return RR(e).getComputedStyle(e,t)}var kR=/([A-Z])/g;function TR(e){return e.replace(kR,"-$1").toLowerCase()}var OR=/^ms-/;function Pi(e){return TR(e).replace(OR,"-ms-")}var PR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function IR(e){return!!(e&&PR.test(e))}function Tn(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Pi(t))||NR(e).getPropertyValue(Pi(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Pi(o)):IR(o)?r+=o+"("+s+") ":n+=Pi(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const Uo=!!(typeof window<"u"&&window.document&&window.document.createElement);var id=!1,ad=!1;try{var Dc={get passive(){return id=!0},get once(){return ad=id=!0}};Uo&&(window.addEventListener("test",Dc,Dc),window.removeEventListener("test",Dc,!0))}catch{}function qf(e,t,n,r){if(r&&typeof r!="boolean"&&!ad){var o=r.once,s=r.capture,i=n;!ad&&o&&(i=n.__once||function l(c){this.removeEventListener(t,l,s),n.call(this,c)},n.__once=i),e.addEventListener(t,i,id?r:s)}e.addEventListener(t,n,r)}function ld(e,t,n,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,o),n.__once&&e.removeEventListener(t,n.__once,o)}function En(e,t,n,r){return qf(e,t,n,r),function(){ld(e,t,n,r)}}function $R(e,t,n,r){if(n===void 0&&(n=!1),r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,n,r),e.dispatchEvent(o)}}function AR(e){var t=Tn(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function MR(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||$R(e,"transitionend",!0)},t+n),s=En(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Fx(e,t,n,r){n==null&&(n=AR(e)||0);var o=MR(e,n,r),s=En(e,"transitionend",t);return function(){o(),s()}}function bm(e,t){const n=Tn(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Lx(e,t){const n=bm(e,"transitionDuration"),r=bm(e,"transitionDelay"),o=Fx(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Ux(e){e.offsetHeight}function Xa(e){return e&&"setState"in e?Sr.findDOMNode(e):e??null}const DR=je.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,onExited:s,addEndListener:i,children:l,childRef:c,...u},d)=>{const f=w.useRef(null),p=mn(f,c),y=j=>{p(Xa(j))},m=j=>C=>{j&&f.current&&j(f.current,C)},h=w.useCallback(m(e),[e]),x=w.useCallback(m(t),[t]),v=w.useCallback(m(n),[n]),g=w.useCallback(m(r),[r]),b=w.useCallback(m(o),[o]),S=w.useCallback(m(s),[s]),_=w.useCallback(m(i),[i]);return a.jsx(ER,{ref:d,...u,onEnter:h,onEntered:v,onEntering:x,onExit:g,onExited:S,onExiting:b,addEndListener:_,nodeRef:f,children:typeof l=="function"?(j,C)=>l(j,{...C,ref:y}):je.cloneElement(l,{ref:y})})}),Vx=DR,FR={[Sn]:"show",[Qn]:"show"},Bx=w.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...o},s)=>{const i={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},l=w.useCallback((c,u)=>{Ux(c),r==null||r(c,u)},[r]);return a.jsx(Vx,{ref:s,addEndListener:Lx,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:oe("fade",e,t.props.className,FR[c],n[c])})})});Bx.displayName="Fade";const Eo=Bx;function Hf(e){return typeof e=="boolean"?e?Eo:Bf:e}const zx=({transition:e,...t})=>a.jsx(Ax,{...t,transition:Hf(e)});zx.displayName="TabContainer";const LR=zx,UR=["xxl","xl","lg","md","sm","xs"],VR="xs",qx=w.createContext({prefixes:{},breakpoints:UR,minBreakpoint:VR});function fe(e,t){const{prefixes:n}=w.useContext(qx);return e||n[t]||t}function Il(){const{dir:e}=w.useContext(qx);return e==="rtl"}const Hx=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"tab-content"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Hx.displayName="TabContent";const Wx=Hx,Kx=w.forwardRef(({bsPrefix:e,transition:t,...n},r)=>{const[{className:o,as:s="div",...i},{isActive:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:y,mountOnEnter:m,unmountOnExit:h,transition:x=Eo}]=Px({...n,transition:Hf(t)}),v=fe(e,"tab-pane");return a.jsx(Fo.Provider,{value:null,children:a.jsx(Dn.Provider,{value:null,children:a.jsx(x,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:y,mountOnEnter:m,unmountOnExit:h,children:a.jsx(s,{...i,ref:r,className:oe(o,v,l&&"active")})})})})});Kx.displayName="TabPane";const Gx=Kx,BR={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},Yx=()=>{throw new Error("ReactBootstrap: The `Tab` component is not meant to be rendered! It's an abstract component that is only valid as a direct Child of the `Tabs` Component. For custom tabs components use TabPane and TabsContainer directly")};Yx.propTypes=BR;const Ii=Object.assign(Yx,{Container:LR,Content:Wx,Pane:Gx});function Y(){return Y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Y.apply(this,arguments)}function wm(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function zR(e){var t=qR(e,"string");return typeof t=="symbol"?t:String(t)}function qR(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qx(e,t,n){var r=w.useRef(e!==void 0),o=w.useState(t),s=o[0],i=o[1],l=e!==void 0,c=r.current;return r.current=l,!l&&c&&s!==t&&i(t),[l?e:s,w.useCallback(function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];n&&n.apply(void 0,[u].concat(f)),i(u)},[n])]}function $l(e,t){return Object.keys(t).reduce(function(n,r){var o,s=n,i=s[wm(r)],l=s[r],c=zf(s,[wm(r),r].map(zR)),u=t[r],d=Qx(l,i,e[u]),f=d[0],p=d[1];return Y({},c,(o={},o[r]=f,o[u]=p,o))},e)}var Sm={exports:{}},cd={exports:{}};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;function n(r){function o(i,l,c,u,d,f){var p=u||"<<anonymous>>",y=f||c;if(l[c]==null)return i?new Error("Required "+d+" `"+y+"` was not specified "+("in `"+p+"`.")):null;for(var m=arguments.length,h=Array(m>6?m-6:0),x=6;x<m;x++)h[x-6]=arguments[x];return r.apply(void 0,[l,c,p,d,y].concat(h))}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}e.exports=t.default})(cd,cd.exports);var HR=cd.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=HR,r=o(n);function o(i){return i&&i.__esModule?i:{default:i}}function s(){for(var i=arguments.length,l=Array(i),c=0;c<i;c++)l[c]=arguments[c];function u(){for(var d=arguments.length,f=Array(d),p=0;p<d;p++)f[p]=arguments[p];var y=null;return l.forEach(function(m){if(y==null){var h=m.apply(void 0,f);h!=null&&(y=h)}}),y}return(0,r.default)(u)}e.exports=t.default})(Sm,Sm.exports);var WR=Function.prototype.bind.call(Function.prototype.call,[].slice);function _n(e,t){return WR(e.querySelectorAll(t))}function Xx(){const[,e]=w.useReducer(t=>!t,!1);return e}const Zx=w.createContext(null);Zx.displayName="NavContext";const Wf=Zx,KR="data-rr-ui-",GR="rrUi";function Vo(e){return`${KR}${e}`}function YR(e){return`${GR}${e}`}const QR=["as","disabled"];function XR(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function ZR(e){return!e||e.trim()==="#"}function Kf({tagName:e,disabled:t,href:n,target:r,rel:o,role:s,onClick:i,tabIndex:l=0,type:c}){e||(n!=null||r!=null||o!=null?e="a":e="button");const u={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},u];const d=p=>{if((t||e==="a"&&ZR(n))&&p.preventDefault(),t){p.stopPropagation();return}i==null||i(p)},f=p=>{p.key===" "&&(p.preventDefault(),d(p))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:s??"button",disabled:void 0,tabIndex:t?void 0:l,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?o:void 0,onClick:d,onKeyDown:f},u]}const Gf=w.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=XR(e,QR);const[s,{tagName:i}]=Kf(Object.assign({tagName:n,disabled:r},o));return a.jsx(i,Object.assign({},o,s,{ref:t}))});Gf.displayName="Button";const JR=["as","active","eventKey"];function eN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Jx({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=w.useContext(Dn),l=w.useContext(Wf),c=w.useContext(Fo);let u=n;const d={role:o};if(l){!o&&l.role==="tablist"&&(d.role="tab");const f=l.getControllerId(e??null),p=l.getControlledId(e??null);d[Vo("event-key")]=e,d.id=f||r,u=n==null&&e!=null?l.activeKey===e:n,(u||!(c!=null&&c.unmountOnExit)&&!(c!=null&&c.mountOnEnter))&&(d["aria-controls"]=p)}return d.role==="tab"&&(d["aria-selected"]=u,u||(d.tabIndex=-1),s&&(d.tabIndex=-1,d["aria-disabled"]=!0)),d.onClick=Te(f=>{s||(t==null||t(f),e!=null&&i&&!f.isPropagationStopped()&&i(e,f))}),[d,{isActive:u}]}const e0=w.forwardRef((e,t)=>{let{as:n=Gf,active:r,eventKey:o}=e,s=eN(e,JR);const[i,l]=Jx(Object.assign({key:Ar(o,s.href),active:r},s));return i[Vo("active")]=l.isActive,a.jsx(n,Object.assign({},s,i,{ref:t}))});e0.displayName="NavItem";const tN=e0,nN=["as","onSelect","activeKey","role","onKeyDown"];function rN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const _m=()=>{},jm=Vo("event-key"),t0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=rN(e,nN);const c=Xx(),u=w.useRef(!1),d=w.useContext(Dn),f=w.useContext(Fo);let p,y;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,y=f.getControllerId);const m=w.useRef(null),h=b=>{const S=m.current;if(!S)return null;const _=_n(S,`[${jm}]:not([aria-disabled=true])`),j=S.querySelector("[aria-selected=true]");if(!j||j!==document.activeElement)return null;const C=_.indexOf(j);if(C===-1)return null;let E=C+b;return E>=_.length&&(E=0),E<0&&(E=_.length-1),_[E]},x=(b,S)=>{b!=null&&(r==null||r(b,S),d==null||d(b,S))},v=b=>{if(i==null||i(b),!f)return;let S;switch(b.key){case"ArrowLeft":case"ArrowUp":S=h(-1);break;case"ArrowRight":case"ArrowDown":S=h(1);break;default:return}S&&(b.preventDefault(),x(S.dataset[YR("EventKey")]||null,b),u.current=!0,c())};w.useEffect(()=>{if(m.current&&u.current){const b=m.current.querySelector(`[${jm}][aria-selected=true]`);b==null||b.focus()}u.current=!1});const g=mn(t,m);return a.jsx(Dn.Provider,{value:x,children:a.jsx(Wf.Provider,{value:{role:s,activeKey:Ar(o),getControlledId:p||_m,getControllerId:y||_m},children:a.jsx(n,Object.assign({},l,{onKeyDown:v,ref:g,role:s}))})})});t0.displayName="Nav";const oN=Object.assign(t0,{Item:tN}),n0=w.createContext(null);n0.displayName="NavbarContext";const r0=n0,o0=w.createContext(null);o0.displayName="CardHeaderContext";const sN=o0,s0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"nav-item"),a.jsx(n,{ref:o,className:oe(e,t),...r})));s0.displayName="NavItem";const i0=s0;function Za(){return w.useState(null)}function iN(e,t,n,r=!1){const o=Te(n);w.useEffect(()=>{const s=typeof e=="function"?e():e;return s.addEventListener(t,o,r),()=>s.removeEventListener(t,o,r)},[e])}function Yf(){const e=w.useRef(!0),t=w.useRef(()=>e.current);return w.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function a0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const aN=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",lN=typeof document<"u",Ja=lN||aN?w.useLayoutEffect:w.useEffect,cN=["onKeyDown"];function uN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function dN(e){return!e||e.trim()==="#"}const l0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=uN(e,cN);const[o]=Kf(Object.assign({tagName:"a"},r)),s=Te(i=>{o.onKeyDown(i),n==null||n(i)});return dN(r.href)||r.role==="button"?a.jsx("a",Object.assign({ref:t},r,o,{onKeyDown:s})):a.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});l0.displayName="Anchor";const c0=l0,u0=w.forwardRef(({bsPrefix:e,className:t,as:n=c0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=fe(e,"nav-link");const[c,u]=Jx({key:Ar(o,i.href),active:r,disabled:s,...i});return a.jsx(n,{...i,...c,ref:l,disabled:s,className:oe(t,e,s&&"disabled",u.isActive&&"active")})});u0.displayName="NavLink";const d0=u0,f0=w.forwardRef((e,t)=>{const{as:n="div",bsPrefix:r,variant:o,fill:s=!1,justify:i=!1,navbar:l,navbarScroll:c,className:u,activeKey:d,...f}=$l(e,{activeKey:"onSelect"}),p=fe(r,"nav");let y,m,h=!1;const x=w.useContext(r0),v=w.useContext(sN);return x?(y=x.bsPrefix,h=l??!0):v&&({cardHeaderBsPrefix:m}=v),a.jsx(oN,{as:n,ref:t,activeKey:d,className:oe(u,{[p]:!h,[`${y}-nav`]:h,[`${y}-nav-scroll`]:h&&c,[`${m}-${o}`]:!!m,[`${p}-${o}`]:!!o,[`${p}-fill`]:s,[`${p}-justified`]:i}),...f})});f0.displayName="Nav";const fN=Object.assign(f0,{Item:i0,Link:d0});function Cm(e,t){let n=0;return w.Children.map(e,r=>w.isValidElement(r)?t(r,n++):r)}function pN(e,t){let n=0;w.Children.forEach(e,r=>{w.isValidElement(r)&&t(r,n++)})}function hN(e){let t;return pN(e,n=>{t==null&&(t=n.props.eventKey)}),t}function mN(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(i0,{as:"li",role:"presentation",children:a.jsx(d0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const p0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=hN(l),...u}=$l(e,{activeKey:"onSelect"});return a.jsxs(Ax,{id:t,activeKey:c,onSelect:n,transition:Hf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(fN,{...u,role:"tablist",as:"ul",variant:i,children:Cm(l,mN)}),a.jsx(Wx,{children:Cm(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(Gx,{...f})})})]})};p0.displayName="Tabs";const gN=p0,vN=w.createContext(null),Al=vN;var Em=Object.prototype.hasOwnProperty;function Rm(e,t,n){for(n of e.keys())if(ws(n,t))return n}function ws(e,t){var n,r,o;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&ws(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(o=r,o&&typeof o=="object"&&(o=Rm(t,o),!o)||!t.has(o))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(o=r[0],o&&typeof o=="object"&&(o=Rm(t,o),!o)||!ws(r[1],t.get(o)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e=="object"){r=0;for(n in e)if(Em.call(e,n)&&++r&&!Em.call(t,n)||!(n in t)||!ws(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function yN(e){const t=Yf();return[e[0],w.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var gt="top",Bt="bottom",zt="right",vt="left",Qf="auto",si=[gt,Bt,zt,vt],Ro="start",qs="end",xN="clippingParents",h0="viewport",es="popper",bN="reference",Nm=si.reduce(function(e,t){return e.concat([t+"-"+Ro,t+"-"+qs])},[]),m0=[].concat(si,[Qf]).reduce(function(e,t){return e.concat([t,t+"-"+Ro,t+"-"+qs])},[]),wN="beforeRead",SN="read",_N="afterRead",jN="beforeMain",CN="main",EN="afterMain",RN="beforeWrite",NN="write",kN="afterWrite",TN=[wN,SN,_N,jN,CN,EN,RN,NN,kN];function fn(e){return e.split("-")[0]}function Nt(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Mr(e){var t=Nt(e).Element;return e instanceof t||e instanceof Element}function pn(e){var t=Nt(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Xf(e){if(typeof ShadowRoot>"u")return!1;var t=Nt(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Er=Math.max,el=Math.min,No=Math.round;function ud(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function g0(){return!/^((?!chrome|android).)*safari/i.test(ud())}function ko(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&pn(e)&&(o=e.offsetWidth>0&&No(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&No(r.height)/e.offsetHeight||1);var i=Mr(e)?Nt(e):window,l=i.visualViewport,c=!g0()&&n,u=(r.left+(c&&l?l.offsetLeft:0))/o,d=(r.top+(c&&l?l.offsetTop:0))/s,f=r.width/o,p=r.height/s;return{width:f,height:p,top:d,right:u+f,bottom:d+p,left:u,x:u,y:d}}function Zf(e){var t=ko(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function v0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Xf(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function dr(e){return e?(e.nodeName||"").toLowerCase():null}function Fn(e){return Nt(e).getComputedStyle(e)}function ON(e){return["table","td","th"].indexOf(dr(e))>=0}function mr(e){return((Mr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ml(e){return dr(e)==="html"?e:e.assignedSlot||e.parentNode||(Xf(e)?e.host:null)||mr(e)}function km(e){return!pn(e)||Fn(e).position==="fixed"?null:e.offsetParent}function PN(e){var t=/firefox/i.test(ud()),n=/Trident/i.test(ud());if(n&&pn(e)){var r=Fn(e);if(r.position==="fixed")return null}var o=Ml(e);for(Xf(o)&&(o=o.host);pn(o)&&["html","body"].indexOf(dr(o))<0;){var s=Fn(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function ii(e){for(var t=Nt(e),n=km(e);n&&ON(n)&&Fn(n).position==="static";)n=km(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Fn(n).position==="static")?t:n||PN(e)||t}function Jf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ss(e,t,n){return Er(e,el(t,n))}function IN(e,t,n){var r=Ss(e,t,n);return r>n?n:r}function y0(){return{top:0,right:0,bottom:0,left:0}}function x0(e){return Object.assign({},y0(),e)}function b0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var $N=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,x0(typeof t!="number"?t:b0(t,si))};function AN(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=fn(n.placement),c=Jf(l),u=[vt,zt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=$N(o.padding,n),p=Zf(s),y=c==="y"?gt:vt,m=c==="y"?Bt:zt,h=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],x=i[c]-n.rects.reference[c],v=ii(s),g=v?c==="y"?v.clientHeight||0:v.clientWidth||0:0,b=h/2-x/2,S=f[y],_=g-p[d]-f[m],j=g/2-p[d]/2+b,C=Ss(S,j,_),E=c;n.modifiersData[r]=(t={},t[E]=C,t.centerOffset=C-j,t)}}function MN(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||v0(t.elements.popper,o)&&(t.elements.arrow=o))}const DN={name:"arrow",enabled:!0,phase:"main",fn:AN,effect:MN,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function To(e){return e.split("-")[1]}var FN={top:"auto",right:"auto",bottom:"auto",left:"auto"};function LN(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:No(n*o)/o||0,y:No(r*o)/o||0}}function Tm(e){var t,n=e.popper,r=e.popperRect,o=e.placement,s=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,f=e.isFixed,p=i.x,y=p===void 0?0:p,m=i.y,h=m===void 0?0:m,x=typeof d=="function"?d({x:y,y:h}):{x:y,y:h};y=x.x,h=x.y;var v=i.hasOwnProperty("x"),g=i.hasOwnProperty("y"),b=vt,S=gt,_=window;if(u){var j=ii(n),C="clientHeight",E="clientWidth";if(j===Nt(n)&&(j=mr(n),Fn(j).position!=="static"&&l==="absolute"&&(C="scrollHeight",E="scrollWidth")),j=j,o===gt||(o===vt||o===zt)&&s===qs){S=Bt;var N=f&&j===_&&_.visualViewport?_.visualViewport.height:j[C];h-=N-r.height,h*=c?1:-1}if(o===vt||(o===gt||o===Bt)&&s===qs){b=zt;var R=f&&j===_&&_.visualViewport?_.visualViewport.width:j[E];y-=R-r.width,y*=c?1:-1}}var T=Object.assign({position:l},u&&FN),k=d===!0?LN({x:y,y:h},Nt(n)):{x:y,y:h};if(y=k.x,h=k.y,c){var P;return Object.assign({},T,(P={},P[S]=g?"0":"",P[b]=v?"0":"",P.transform=(_.devicePixelRatio||1)<=1?"translate("+y+"px, "+h+"px)":"translate3d("+y+"px, "+h+"px, 0)",P))}return Object.assign({},T,(t={},t[S]=g?h+"px":"",t[b]=v?y+"px":"",t.transform="",t))}function UN(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,s=n.adaptive,i=s===void 0?!0:s,l=n.roundOffsets,c=l===void 0?!0:l,u={placement:fn(t.placement),variation:To(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Tm(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Tm(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const VN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:UN,data:{}};var $i={passive:!0};function BN(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,l=i===void 0?!0:i,c=Nt(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,$i)}),l&&c.addEventListener("resize",n.update,$i),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,$i)}),l&&c.removeEventListener("resize",n.update,$i)}}const zN={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:BN,data:{}};var qN={left:"right",right:"left",bottom:"top",top:"bottom"};function aa(e){return e.replace(/left|right|bottom|top/g,function(t){return qN[t]})}var HN={start:"end",end:"start"};function Om(e){return e.replace(/start|end/g,function(t){return HN[t]})}function ep(e){var t=Nt(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function tp(e){return ko(mr(e)).left+ep(e).scrollLeft}function WN(e,t){var n=Nt(e),r=mr(e),o=n.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,c=0;if(o){s=o.width,i=o.height;var u=g0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+tp(e),y:c}}function KN(e){var t,n=mr(e),r=ep(e),o=(t=e.ownerDocument)==null?void 0:t.body,s=Er(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Er(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+tp(e),c=-r.scrollTop;return Fn(o||n).direction==="rtl"&&(l+=Er(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function np(e){var t=Fn(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function w0(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:pn(e)&&np(e)?e:w0(Ml(e))}function _s(e,t){var n;t===void 0&&(t=[]);var r=w0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Nt(r),i=o?[s].concat(s.visualViewport||[],np(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(_s(Ml(i)))}function dd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function GN(e,t){var n=ko(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Pm(e,t,n){return t===h0?dd(WN(e,n)):Mr(t)?GN(t,n):dd(KN(mr(e)))}function YN(e){var t=_s(Ml(e)),n=["absolute","fixed"].indexOf(Fn(e).position)>=0,r=n&&pn(e)?ii(e):e;return Mr(r)?t.filter(function(o){return Mr(o)&&v0(o,r)&&dr(o)!=="body"}):[]}function QN(e,t,n,r){var o=t==="clippingParents"?YN(e):[].concat(t),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(c,u){var d=Pm(e,u,r);return c.top=Er(d.top,c.top),c.right=el(d.right,c.right),c.bottom=el(d.bottom,c.bottom),c.left=Er(d.left,c.left),c},Pm(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function S0(e){var t=e.reference,n=e.element,r=e.placement,o=r?fn(r):null,s=r?To(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case gt:c={x:i,y:t.y-n.height};break;case Bt:c={x:i,y:t.y+t.height};break;case zt:c={x:t.x+t.width,y:l};break;case vt:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=o?Jf(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case Ro:c[u]=c[u]-(t[d]/2-n[d]/2);break;case qs:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Hs(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,s=n.strategy,i=s===void 0?e.strategy:s,l=n.boundary,c=l===void 0?xN:l,u=n.rootBoundary,d=u===void 0?h0:u,f=n.elementContext,p=f===void 0?es:f,y=n.altBoundary,m=y===void 0?!1:y,h=n.padding,x=h===void 0?0:h,v=x0(typeof x!="number"?x:b0(x,si)),g=p===es?bN:es,b=e.rects.popper,S=e.elements[m?g:p],_=QN(Mr(S)?S:S.contextElement||mr(e.elements.popper),c,d,i),j=ko(e.elements.reference),C=S0({reference:j,element:b,strategy:"absolute",placement:o}),E=dd(Object.assign({},b,C)),N=p===es?E:j,R={top:_.top-N.top+v.top,bottom:N.bottom-_.bottom+v.bottom,left:_.left-N.left+v.left,right:N.right-_.right+v.right},T=e.modifiersData.offset;if(p===es&&T){var k=T[o];Object.keys(R).forEach(function(P){var M=[zt,Bt].indexOf(P)>=0?1:-1,D=[gt,Bt].indexOf(P)>=0?"y":"x";R[P]+=k[D]*M})}return R}function XN(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,s=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?m0:c,d=To(r),f=d?l?Nm:Nm.filter(function(m){return To(m)===d}):si,p=f.filter(function(m){return u.indexOf(m)>=0});p.length===0&&(p=f);var y=p.reduce(function(m,h){return m[h]=Hs(e,{placement:h,boundary:o,rootBoundary:s,padding:i})[fn(h)],m},{});return Object.keys(y).sort(function(m,h){return y[m]-y[h]})}function ZN(e){if(fn(e)===Qf)return[];var t=aa(e);return[Om(e),t,Om(t)]}function JN(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,u=n.padding,d=n.boundary,f=n.rootBoundary,p=n.altBoundary,y=n.flipVariations,m=y===void 0?!0:y,h=n.allowedAutoPlacements,x=t.options.placement,v=fn(x),g=v===x,b=c||(g||!m?[aa(x)]:ZN(x)),S=[x].concat(b).reduce(function(Z,ee){return Z.concat(fn(ee)===Qf?XN(t,{placement:ee,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:h}):ee)},[]),_=t.rects.reference,j=t.rects.popper,C=new Map,E=!0,N=S[0],R=0;R<S.length;R++){var T=S[R],k=fn(T),P=To(T)===Ro,M=[gt,Bt].indexOf(k)>=0,D=M?"width":"height",V=Hs(t,{placement:T,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),Q=M?P?zt:vt:P?Bt:gt;_[D]>j[D]&&(Q=aa(Q));var O=aa(Q),U=[];if(s&&U.push(V[k]<=0),l&&U.push(V[Q]<=0,V[O]<=0),U.every(function(Z){return Z})){N=T,E=!1;break}C.set(T,U)}if(E)for(var A=m?3:1,H=function(ee){var X=S.find(function(ie){var ge=C.get(ie);if(ge)return ge.slice(0,ee).every(function(Se){return Se})});if(X)return N=X,"break"},B=A;B>0;B--){var W=H(B);if(W==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}const ek={name:"flip",enabled:!0,phase:"main",fn:JN,requiresIfExists:["offset"],data:{_skip:!1}};function Im(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function $m(e){return[gt,zt,Bt,vt].some(function(t){return e[t]>=0})}function tk(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Hs(t,{elementContext:"reference"}),l=Hs(t,{altBoundary:!0}),c=Im(i,r),u=Im(l,o,s),d=$m(c),f=$m(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const nk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:tk};function rk(e,t,n){var r=fn(e),o=[vt,gt].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[vt,zt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function ok(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=m0.reduce(function(d,f){return d[f]=rk(f,t.rects,s),d},{}),l=i[t.placement],c=l.x,u=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=i}const sk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:ok};function ik(e){var t=e.state,n=e.name;t.modifiersData[n]=S0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const ak={name:"popperOffsets",enabled:!0,phase:"read",fn:ik,data:{}};function lk(e){return e==="x"?"y":"x"}function ck(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,s=o===void 0?!0:o,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.padding,p=n.tether,y=p===void 0?!0:p,m=n.tetherOffset,h=m===void 0?0:m,x=Hs(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),v=fn(t.placement),g=To(t.placement),b=!g,S=Jf(v),_=lk(S),j=t.modifiersData.popperOffsets,C=t.rects.reference,E=t.rects.popper,N=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(j){if(s){var P,M=S==="y"?gt:vt,D=S==="y"?Bt:zt,V=S==="y"?"height":"width",Q=j[S],O=Q+x[M],U=Q-x[D],A=y?-E[V]/2:0,H=g===Ro?C[V]:E[V],B=g===Ro?-E[V]:-C[V],W=t.elements.arrow,Z=y&&W?Zf(W):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:y0(),X=ee[M],ie=ee[D],ge=Ss(0,C[V],Z[V]),Se=b?C[V]/2-A-ge-X-R.mainAxis:H-ge-X-R.mainAxis,Ae=b?-C[V]/2+A+ge+ie+R.mainAxis:B+ge+ie+R.mainAxis,F=t.elements.arrow&&ii(t.elements.arrow),L=F?S==="y"?F.clientTop||0:F.clientLeft||0:0,te=(P=T==null?void 0:T[S])!=null?P:0,J=Q+Se-te-L,re=Q+Ae-te,lt=Ss(y?el(O,J):O,Q,y?Er(U,re):U);j[S]=lt,k[S]=lt-Q}if(l){var Pt,It=S==="x"?gt:vt,ct=S==="x"?Bt:zt,Ce=j[_],Bn=_==="y"?"height":"width",zn=Ce+x[It],ci=Ce-x[ct],Vr=[gt,vt].indexOf(v)!==-1,ui=(Pt=T==null?void 0:T[_])!=null?Pt:0,le=Vr?zn:Ce-C[Bn]-E[Bn]-ui+R.altAxis,vn=Vr?Ce+C[Bn]+E[Bn]-ui-R.altAxis:ci,zo=y&&Vr?IN(le,Ce,vn):Ss(y?le:zn,Ce,y?vn:ci);j[_]=zo,k[_]=zo-Ce}t.modifiersData[r]=k}}const uk={name:"preventOverflow",enabled:!0,phase:"main",fn:ck,requiresIfExists:["offset"]};function dk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function fk(e){return e===Nt(e)||!pn(e)?ep(e):dk(e)}function pk(e){var t=e.getBoundingClientRect(),n=No(t.width)/e.offsetWidth||1,r=No(t.height)/e.offsetHeight||1;return n!==1||r!==1}function hk(e,t,n){n===void 0&&(n=!1);var r=pn(t),o=pn(t)&&pk(t),s=mr(t),i=ko(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((dr(t)!=="body"||np(s))&&(l=fk(t)),pn(t)?(c=ko(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=tp(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function mk(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function o(s){n.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&o(c)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||o(s)}),r}function gk(e){var t=mk(e);return TN.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function vk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function yk(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Am={placement:"bottom",modifiers:[],strategy:"absolute"};function Mm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function xk(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?Am:o;return function(l,c,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Am,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],p=!1,y={state:d,setOptions:function(v){var g=typeof v=="function"?v(d.options):v;h(),d.options=Object.assign({},s,d.options,g),d.scrollParents={reference:Mr(l)?_s(l):l.contextElement?_s(l.contextElement):[],popper:_s(c)};var b=gk(yk([].concat(r,d.options.modifiers)));return d.orderedModifiers=b.filter(function(S){return S.enabled}),m(),y.update()},forceUpdate:function(){if(!p){var v=d.elements,g=v.reference,b=v.popper;if(Mm(g,b)){d.rects={reference:hk(g,ii(b),d.options.strategy==="fixed"),popper:Zf(b)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(R){return d.modifiersData[R.name]=Object.assign({},R.data)});for(var S=0;S<d.orderedModifiers.length;S++){if(d.reset===!0){d.reset=!1,S=-1;continue}var _=d.orderedModifiers[S],j=_.fn,C=_.options,E=C===void 0?{}:C,N=_.name;typeof j=="function"&&(d=j({state:d,options:E,name:N,instance:y})||d)}}}},update:vk(function(){return new Promise(function(x){y.forceUpdate(),x(d)})}),destroy:function(){h(),p=!0}};if(!Mm(l,c))return y;y.setOptions(u).then(function(x){!p&&u.onFirstUpdate&&u.onFirstUpdate(x)});function m(){d.orderedModifiers.forEach(function(x){var v=x.name,g=x.options,b=g===void 0?{}:g,S=x.effect;if(typeof S=="function"){var _=S({state:d,name:v,instance:y,options:b}),j=function(){};f.push(_||j)}})}function h(){f.forEach(function(x){return x()}),f=[]}return y}}const bk=xk({defaultModifiers:[nk,ak,VN,zN,sk,ek,uk,DN]}),wk=["enabled","placement","strategy","modifiers"];function Sk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const _k={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},jk={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&o==="tooltip"&&"setAttribute"in r){const s=r.getAttribute("aria-describedby");if(s&&s.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",s?`${s},${n.id}`:n.id)}}},Ck=[];function _0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=Ck}=n,l=Sk(n,wk);const c=w.useRef(i),u=w.useRef(),d=w.useCallback(()=>{var x;(x=u.current)==null||x.update()},[]),f=w.useCallback(()=>{var x;(x=u.current)==null||x.forceUpdate()},[]),[p,y]=yN(w.useState({placement:o,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),m=w.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:x})=>{const v={},g={};Object.keys(x.elements).forEach(b=>{v[b]=x.styles[b],g[b]=x.attributes[b]}),y({state:x,styles:v,attributes:g,update:d,forceUpdate:f,placement:x.placement})}}),[d,f,y]),h=w.useMemo(()=>(ws(c.current,i)||(c.current=i),c.current),[i]);return w.useEffect(()=>{!u.current||!r||u.current.setOptions({placement:o,strategy:s,modifiers:[...h,m,_k]})},[s,o,m,r,h]),w.useEffect(()=>{if(!(!r||e==null||t==null))return u.current=bk(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...h,jk,m]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,y(x=>Object.assign({},x,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function Ws(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Ek=function(){},Rk=Ek;const Nk=Xs(Rk),Dm=()=>{};function kk(e){return e.button===0}function Tk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const la=e=>e&&("current"in e?e.current:e),Fm={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function j0(e,t=Dm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=la(e);Nk(!!d,"ClickOutside captured a close event but does not have a ref to compare it to. useClickOutside(), should be passed a ref that resolves to a DOM node"),o.current=!d||Tk(u)||!kk(u)||!!Ws(d,u.target)||s.current,s.current=!1},[e]),l=Te(u=>{const d=la(e);d&&Ws(d,u.target)&&(s.current=!0)}),c=Te(u=>{o.current||t(u)});w.useEffect(()=>{var u,d;if(n||e==null)return;const f=Lo(la(e)),p=f.defaultView||window;let y=(u=p.event)!=null?u:(d=p.parent)==null?void 0:d.event,m=null;Fm[r]&&(m=En(f,Fm[r],l,!0));const h=En(f,r,i,!0),x=En(f,r,g=>{if(g===y){y=void 0;return}c(g)});let v=[];return"ontouchstart"in f.documentElement&&(v=[].slice.call(f.body.children).map(g=>En(g,"mousemove",Dm))),()=>{m==null||m(),h(),x(),v.forEach(g=>g())}},[e,n,r,i,l,c])}function Ok(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function Pk(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function C0({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:s,containerPadding:i,arrowElement:l,popperConfig:c={}}){var u,d,f,p,y;const m=Ok(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:Pk(Object.assign({},m,{eventListeners:{enabled:t,options:(u=m.eventListeners)==null?void 0:u.options},preventOverflow:Object.assign({},m.preventOverflow,{options:i?Object.assign({padding:i},(d=m.preventOverflow)==null?void 0:d.options):(f=m.preventOverflow)==null?void 0:f.options}),offset:{options:Object.assign({offset:o},(p=m.offset)==null?void 0:p.options)},arrow:Object.assign({},m.arrow,{enabled:!!l,options:Object.assign({},(y=m.arrow)==null?void 0:y.options,{element:l})}),flip:Object.assign({enabled:!!r},m.flip)}))})}const Ik=["children"];function $k(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Ak=()=>{};function E0(e={}){const t=w.useContext(Al),[n,r]=Za(),o=w.useRef(!1),{flip:s,offset:i,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:f=!0,usePopper:p=!!t}=e,y=(t==null?void 0:t.show)==null?!!e.show:t.show;y&&!o.current&&(o.current=!0);const m=j=>{t==null||t.toggle(!1,j)},{placement:h,setMenu:x,menuElement:v,toggleElement:g}=t||{},b=_0(g,v,C0({placement:u||h||"bottom-start",enabled:p,enableEvents:f??y,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),S=Object.assign({ref:x||Ak,"aria-labelledby":g==null?void 0:g.id},b.attributes.popper,{style:b.styles.popper}),_={show:y,placement:h,hasShown:o.current,toggle:t==null?void 0:t.toggle,popper:p?b:null,arrowProps:p?Object.assign({ref:r},b.attributes.arrow,{style:b.styles.arrow}):{}};return j0(v,m,{clickTrigger:l,disabled:!y}),[S,_]}const Mk={usePopper:!0};function rp(e){let{children:t}=e,n=$k(e,Ik);const[r,o]=E0(n);return a.jsx(a.Fragment,{children:t(r,o)})}rp.displayName="DropdownMenu";rp.defaultProps=Mk;const R0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Lm=()=>{};function N0(){const e=Ox(),{show:t=!1,toggle:n=Lm,setToggle:r,menuElement:o}=w.useContext(Al)||{},s=w.useCallback(l=>{n(!t,l)},[t,n]),i={id:e,ref:r||Lm,onClick:s,"aria-expanded":!!t};return o&&R0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function k0({children:e}){const[t,n]=N0();return a.jsx(a.Fragment,{children:e(t,n)})}k0.displayName="DropdownToggle";const Dk=["eventKey","disabled","onClick","active","as"];function Fk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function T0({key:e,href:t,active:n,disabled:r,onClick:o}){const s=w.useContext(Dn),i=w.useContext(Wf),{activeKey:l}=i||{},c=Ar(e,t),u=n==null&&e!=null?Ar(l)===c:n;return[{onClick:Te(f=>{r||(o==null||o(f),s&&!f.isPropagationStopped()&&s(c,f))}),"aria-disabled":r||void 0,"aria-selected":u,[Vo("dropdown-item")]:""},{isActive:u}]}const O0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Gf}=e,l=Fk(e,Dk);const[c]=T0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});O0.displayName="DropdownItem";const P0=w.createContext(Uo?window:void 0);P0.Provider;function Dl(){return w.useContext(P0)}function Um(){const e=Xx(),t=w.useRef(null),n=w.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function ai({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${Vo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Dl(),[u,d]=kx(t,e,r),[f,p]=Um(),y=f.current,[m,h]=Um(),x=m.current,v=a0(u),g=w.useRef(null),b=w.useRef(!1),S=w.useContext(Dn),_=w.useCallback((T,k,P=k==null?void 0:k.type)=>{d(T,{originalEvent:k,source:P})},[d]),j=Te((T,k)=>{n==null||n(T,k),_(!1,k,"select"),k.isPropagationStopped()||S==null||S(T,k)}),C=w.useMemo(()=>({toggle:_,placement:i,show:u,menuElement:y,toggleElement:x,setMenu:p,setToggle:h}),[_,i,u,y,x,p,h]);y&&v&&!u&&(b.current=y.contains(y.ownerDocument.activeElement));const E=Te(()=>{x&&x.focus&&x.focus()}),N=Te(()=>{const T=g.current;let k=s;if(k==null&&(k=f.current&&R0(f.current)?"keyboard":!1),k===!1||k==="keyboard"&&!/^key.+$/.test(T))return;const P=_n(f.current,o)[0];P&&P.focus&&P.focus()});w.useEffect(()=>{u?N():b.current&&(b.current=!1,E())},[u,b,E,N]),w.useEffect(()=>{g.current=null});const R=(T,k)=>{if(!f.current)return null;const P=_n(f.current,o);let M=P.indexOf(T)+k;return M=Math.max(0,Math.min(M,P.length)),P[M]};return iN(w.useCallback(()=>c.document,[c]),"keydown",T=>{var k,P;const{key:M}=T,D=T.target,V=(k=f.current)==null?void 0:k.contains(D),Q=(P=m.current)==null?void 0:P.contains(D);if(/input|textarea/i.test(D.tagName)&&(M===" "||M!=="Escape"&&V||M==="Escape"&&D.type==="search")||!V&&!Q||M==="Tab"&&(!f.current||!u))return;g.current=T.type;const U={originalEvent:T,source:T.type};switch(M){case"ArrowUp":{const A=R(D,-1);A&&A.focus&&A.focus(),T.preventDefault();return}case"ArrowDown":if(T.preventDefault(),!u)d(!0,U);else{const A=R(D,1);A&&A.focus&&A.focus()}return;case"Tab":qf(D.ownerDocument,"keyup",A=>{var H;(A.key==="Tab"&&!A.target||!((H=f.current)!=null&&H.contains(A.target)))&&d(!1,U)},{once:!0});break;case"Escape":M==="Escape"&&(T.preventDefault(),T.stopPropagation()),d(!1,U);break}}),a.jsx(Dn.Provider,{value:j,children:a.jsx(Al.Provider,{value:C,children:l})})}ai.displayName="Dropdown";ai.Menu=rp;ai.Toggle=k0;ai.Item=O0;const I0=w.createContext({});I0.displayName="DropdownContext";const $0=I0,A0=w.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},s)=>(t=fe(t,"dropdown-divider"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));A0.displayName="DropdownDivider";const Lk=A0,M0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},s)=>(t=fe(t,"dropdown-header"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));M0.displayName="DropdownHeader";const Uk=M0,D0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=c0,...l},c)=>{const u=fe(e,"dropdown-item"),[d,f]=T0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,{...l,...d,ref:c,className:oe(t,u,f.isActive&&"active",r&&"disabled")})});D0.displayName="DropdownItem";const Vk=D0,F0=w.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=fe(t,"dropdown-item-text"),a.jsx(n,{ref:o,className:oe(e,t),...r})));F0.displayName="DropdownItemText";const Bk=F0,L0=w.createContext(null);L0.displayName="InputGroupContext";const U0=L0;function V0(e,t){return e}function B0(e,t,n){const r=n?"top-end":"top-start",o=n?"top-start":"top-end",s=n?"bottom-end":"bottom-start",i=n?"bottom-start":"bottom-end",l=n?"right-start":"left-start",c=n?"right-end":"left-end",u=n?"left-start":"right-start",d=n?"left-end":"right-end";let f=e?i:s;return t==="up"?f=e?o:r:t==="end"?f=e?d:u:t==="start"?f=e?c:l:t==="down-centered"?f="bottom":t==="up-centered"&&(f="top"),f}const z0=w.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:o=!0,show:s,renderOnMount:i,as:l="div",popperConfig:c,variant:u,...d},f)=>{let p=!1;const y=w.useContext(r0),m=fe(e,"dropdown-menu"),{align:h,drop:x,isRTL:v}=w.useContext($0);n=n||h;const g=w.useContext(U0),b=[];if(n)if(typeof n=="object"){const T=Object.keys(n);if(T.length){const k=T[0],P=n[k];p=P==="start",b.push(`${m}-${k}-${P}`)}}else n==="end"&&(p=!0);const S=B0(p,x,v),[_,{hasShown:j,popper:C,show:E,toggle:N}]=E0({flip:o,rootCloseEvent:r,show:s,usePopper:!y&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(_.ref=mn(V0(f),_.ref),Ja(()=>{E&&(C==null||C.update())},[E]),!j&&!i&&!g)return null;typeof l!="string"&&(_.show=E,_.close=()=>N==null?void 0:N(!1),_.align=n);let R=d.style;return C!=null&&C.placement&&(R={...d.style,..._.style},d["x-placement"]=C.placement),a.jsx(l,{...d,..._,style:R,...(b.length||y)&&{"data-bs-popper":"static"},className:oe(t,m,E&&"show",p&&`${m}-end`,u&&`${m}-${u}`,...b)})});z0.displayName="DropdownMenu";const zk=z0,q0=w.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:s=!1,className:i,...l},c)=>{const u=fe(t,"btn"),[d,{tagName:f}]=Kf({tagName:e,disabled:s,...l}),p=f;return a.jsx(p,{...d,...l,ref:c,disabled:s,className:oe(i,u,o&&"active",n&&`${u}-${n}`,r&&`${u}-${r}`,l.href&&s&&"disabled")})});q0.displayName="Button";const qk=q0,H0=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=qk,...s},i)=>{const l=fe(e,"dropdown-toggle"),c=w.useContext(Al);r!==void 0&&(s.bsPrefix=r);const[u]=N0();return u.ref=mn(u.ref,V0(i)),a.jsx(o,{className:oe(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});H0.displayName="DropdownToggle";const Hk=H0,W0=w.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:o,className:s,align:i="start",onSelect:l,onToggle:c,focusFirstItemOnShow:u,as:d="div",navbar:f,autoClose:p=!0,...y}=$l(e,{show:"onToggle"}),m=w.useContext(U0),h=fe(n,"dropdown"),x=Il(),v=C=>p===!1?C==="click":p==="inside"?C!=="rootClose":p==="outside"?C!=="select":!0,g=Te((C,E)=>{var N,R;!((N=E.originalEvent)==null||(R=N.target)==null)&&R.classList.contains("dropdown-toggle")&&E.source==="mousedown"||(E.originalEvent.currentTarget===document&&(E.source!=="keydown"||E.originalEvent.key==="Escape")&&(E.source="rootClose"),v(E.source)&&(c==null||c(C,E)))}),S=B0(i==="end",r,x),_=w.useMemo(()=>({align:i,drop:r,isRTL:x}),[i,r,x]),j={down:h,"down-centered":`${h}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return a.jsx($0.Provider,{value:_,children:a.jsx(ai,{placement:S,show:o,onSelect:l,onToggle:g,focusFirstItemOnShow:u,itemSelector:`.${h}-item:not(.disabled):not(:disabled)`,children:m?y.children:a.jsx(d,{...y,ref:t,className:oe(s,o&&"show",j[r])})})})});W0.displayName="Dropdown";const Ai=Object.assign(W0,{Toggle:Hk,Menu:zk,Item:Vk,ItemText:Bk,Divider:Lk,Header:Uk});var Mi;function Vm(e){if((!Mi&&Mi!==0||e)&&Uo){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),Mi=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Mi}function Wk(e){const t=w.useRef(e);return t.current=e,t}function op(e){const t=Wk(e);w.useEffect(()=>()=>t.current(),[])}function Fc(e){e===void 0&&(e=Lo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function Kk(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Bm=Vo("modal-open");class Gk{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return Kk(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[r]:o.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(Tn(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Bm,""),Tn(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Bm),Object.assign(n.style,t.style)}add(t){let n=this.modals.indexOf(t);return n!==-1||(n=this.modals.length,this.modals.push(t),this.setModalAttributes(t),n!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),n}remove(t){const n=this.modals.indexOf(t);n!==-1&&(this.modals.splice(n,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(t))}isTopModal(t){return!!this.modals.length&&this.modals[this.modals.length-1]===t}}const sp=Gk,Lc=(e,t)=>Uo?e==null?(t||Lo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function fd(e,t){const n=Dl(),[r,o]=w.useState(()=>Lc(e,n==null?void 0:n.document));if(!r){const s=Lc(e);s&&o(s)}return w.useEffect(()=>{t&&r&&t(r)},[t,r]),w.useEffect(()=>{const s=Lc(e);s!==r&&o(s)},[e,r]),r}function Yk({in:e,onTransition:t}){const n=w.useRef(null),r=w.useRef(!0),o=Te(t);return Ja(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),Ja(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function Qk({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=Yk({in:!!t,onTransition:u=>{const d=()=>{u.isStale()||(u.in?r==null||r(u.element,u.initial):(i(!0),n==null||n(u.element)))};Promise.resolve(o(u)).then(d,f=>{throw u.in||i(!0),f})}}),c=mn(l,e.ref);return s&&!t?null:w.cloneElement(e,{ref:c})}function pd(e,t,n){return e?a.jsx(e,Object.assign({},n)):t?a.jsx(Qk,Object.assign({},n,{transition:t})):a.jsx(Bf,Object.assign({},n))}function K0(e){return e.code==="Escape"||e.keyCode===27}const Xk=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Zk(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}let Uc;function Jk(e){return Uc||(Uc=new sp({ownerDocument:e==null?void 0:e.document})),Uc}function eT(e){const t=Dl(),n=e||Jk(t),r=w.useRef({dialog:null,backdrop:null});return Object.assign(r.current,{add:()=>n.add(r.current),remove:()=>n.remove(r.current),isTopModal:()=>n.isTopModal(r.current),setDialogRef:w.useCallback(o=>{r.current.dialog=o},[]),setBackdropRef:w.useCallback(o=>{r.current.backdrop=o},[])})}const G0=w.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:o,style:s,children:i,backdrop:l=!0,keyboard:c=!0,onBackdropClick:u,onEscapeKeyDown:d,transition:f,runTransition:p,backdropTransition:y,runBackdropTransition:m,autoFocus:h=!0,enforceFocus:x=!0,restoreFocus:v=!0,restoreFocusOptions:g,renderDialog:b,renderBackdrop:S=re=>a.jsx("div",Object.assign({},re)),manager:_,container:j,onShow:C,onHide:E=()=>{},onExit:N,onExited:R,onExiting:T,onEnter:k,onEntering:P,onEntered:M}=e,D=Zk(e,Xk);const V=Dl(),Q=fd(j),O=eT(_),U=Yf(),A=a0(n),[H,B]=w.useState(!n),W=w.useRef(null);w.useImperativeHandle(t,()=>O,[O]),Uo&&!A&&n&&(W.current=Fc(V==null?void 0:V.document)),n&&H&&B(!1);const Z=Te(()=>{if(O.add(),Ae.current=En(document,"keydown",ge),Se.current=En(document,"focus",()=>setTimeout(X),!0),C&&C(),h){var re,lt;const Pt=Fc((re=(lt=O.dialog)==null?void 0:lt.ownerDocument)!=null?re:V==null?void 0:V.document);O.dialog&&Pt&&!Ws(O.dialog,Pt)&&(W.current=Pt,O.dialog.focus())}}),ee=Te(()=>{if(O.remove(),Ae.current==null||Ae.current(),Se.current==null||Se.current(),v){var re;(re=W.current)==null||re.focus==null||re.focus(g),W.current=null}});w.useEffect(()=>{!n||!Q||Z()},[n,Q,Z]),w.useEffect(()=>{H&&ee()},[H,ee]),op(()=>{ee()});const X=Te(()=>{if(!x||!U()||!O.isTopModal())return;const re=Fc(V==null?void 0:V.document);O.dialog&&re&&!Ws(O.dialog,re)&&O.dialog.focus()}),ie=Te(re=>{re.target===re.currentTarget&&(u==null||u(re),l===!0&&E())}),ge=Te(re=>{c&&K0(re)&&O.isTopModal()&&(d==null||d(re),re.defaultPrevented||E())}),Se=w.useRef(),Ae=w.useRef(),F=(...re)=>{B(!0),R==null||R(...re)};if(!Q)return null;const L=Object.assign({role:r,ref:O.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},D,{style:s,className:o,tabIndex:-1});let te=b?b(L):a.jsx("div",Object.assign({},L,{children:w.cloneElement(i,{role:"document"})}));te=pd(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:N,onExiting:T,onExited:F,onEnter:k,onEntering:P,onEntered:M,children:te});let J=null;return l&&(J=S({ref:O.setBackdropRef,onClick:ie}),J=pd(y,m,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:J})),a.jsx(a.Fragment,{children:Sr.createPortal(a.jsxs(a.Fragment,{children:[J,te]}),Q)})});G0.displayName="Modal";const tT=Object.assign(G0,{Manager:sp});function hd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function nT(e,t){e.classList?e.classList.add(t):hd(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function zm(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function rT(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=zm(e.className,t):e.setAttribute("class",zm(e.className&&e.className.baseVal||"",t))}const Hr={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class oT extends sp{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,Tn(n,{[t]:`${parseFloat(Tn(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],Tn(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(nT(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";_n(n,Hr.FIXED_CONTENT).forEach(s=>this.adjustAndStore(r,s,t.scrollBarWidth)),_n(n,Hr.STICKY_CONTENT).forEach(s=>this.adjustAndStore(o,s,-t.scrollBarWidth)),_n(n,Hr.NAVBAR_TOGGLER).forEach(s=>this.adjustAndStore(o,s,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();rT(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";_n(n,Hr.FIXED_CONTENT).forEach(s=>this.restore(r,s)),_n(n,Hr.STICKY_CONTENT).forEach(s=>this.restore(o,s)),_n(n,Hr.NAVBAR_TOGGLER).forEach(s=>this.restore(o,s))}}let Vc;function sT(e){return Vc||(Vc=new oT(e)),Vc}const Y0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"modal-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Y0.displayName="ModalBody";const iT=Y0,aT=w.createContext({onHide(){}}),Q0=aT,X0=w.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=fe(e,"modal");const d=`${e}-dialog`,f=typeof s=="string"?`${e}-fullscreen-${s}`:`${e}-fullscreen`;return a.jsx("div",{...c,ref:u,className:oe(d,t,o&&`${e}-${o}`,r&&`${d}-centered`,l&&`${d}-scrollable`,s&&f),children:a.jsx("div",{className:oe(`${e}-content`,n),children:i})})});X0.displayName="ModalDialog";const Z0=X0,J0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"modal-footer"),a.jsx(n,{ref:o,className:oe(e,t),...r})));J0.displayName="ModalFooter";const lT=J0,cT={"aria-label":q.string,onClick:q.func,variant:q.oneOf(["white"])},ip=w.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},o)=>a.jsx("button",{ref:o,type:"button",className:oe("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));ip.displayName="CloseButton";ip.propTypes=cT;const uT=ip,dT=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(Q0),c=Te(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(uT,{"aria-label":e,variant:t,onClick:c})]})}),fT=dT,eb=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=fe(e,"modal-header"),a.jsx(fT,{ref:s,...o,className:oe(t,e),closeLabel:n,closeButton:r})));eb.displayName="ModalHeader";const pT=eb,hT=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:oe(t.className,e)})),mT=hT("h4"),tb=w.forwardRef(({className:e,bsPrefix:t,as:n=mT,...r},o)=>(t=fe(t,"modal-title"),a.jsx(n,{ref:o,className:oe(e,t),...r})));tb.displayName="ModalTitle";const gT=tb;function vT(e){return a.jsx(Eo,{...e,timeout:null})}function yT(e){return a.jsx(Eo,{...e,timeout:null})}const nb=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=Z0,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":d,show:f=!1,animation:p=!0,backdrop:y=!0,keyboard:m=!0,onEscapeKeyDown:h,onShow:x,onHide:v,container:g,autoFocus:b=!0,enforceFocus:S=!0,restoreFocus:_=!0,restoreFocusOptions:j,onEntered:C,onExit:E,onExiting:N,onEnter:R,onEntering:T,onExited:k,backdropClassName:P,manager:M,...D},V)=>{const[Q,O]=w.useState({}),[U,A]=w.useState(!1),H=w.useRef(!1),B=w.useRef(!1),W=w.useRef(null),[Z,ee]=Za(),X=mn(V,ee),ie=Te(v),ge=Il();e=fe(e,"modal");const Se=w.useMemo(()=>({onHide:ie}),[ie]);function Ae(){return M||sT({isRTL:ge})}function F(le){if(!Uo)return;const vn=Ae().getScrollbarWidth()>0,zo=le.scrollHeight>Lo(le).documentElement.clientHeight;O({paddingRight:vn&&!zo?Vm():void 0,paddingLeft:!vn&&zo?Vm():void 0})}const L=Te(()=>{Z&&F(Z.dialog)});op(()=>{ld(window,"resize",L),W.current==null||W.current()});const te=()=>{H.current=!0},J=le=>{H.current&&Z&&le.target===Z.dialog&&(B.current=!0),H.current=!1},re=()=>{A(!0),W.current=Fx(Z.dialog,()=>{A(!1)})},lt=le=>{le.target===le.currentTarget&&re()},Pt=le=>{if(y==="static"){lt(le);return}if(B.current||le.target!==le.currentTarget){B.current=!1;return}v==null||v()},It=le=>{m?h==null||h(le):(le.preventDefault(),y==="static"&&re())},ct=(le,vn)=>{le&&F(le),R==null||R(le,vn)},Ce=le=>{W.current==null||W.current(),E==null||E(le)},Bn=(le,vn)=>{T==null||T(le,vn),qf(window,"resize",L)},zn=le=>{le&&(le.style.display=""),k==null||k(le),ld(window,"resize",L)},ci=w.useCallback(le=>a.jsx("div",{...le,className:oe(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),Vr={...n,...Q};Vr.display="block";const ui=le=>a.jsx("div",{role:"dialog",...le,style:Vr,className:oe(t,e,U&&`${e}-static`,!p&&"show"),onClick:y?Pt:void 0,onMouseUp:J,"data-bs-theme":l,"aria-label":d,"aria-labelledby":c,"aria-describedby":u,children:a.jsx(i,{...D,onMouseDown:te,className:r,contentClassName:o,children:s})});return a.jsx(Q0.Provider,{value:Se,children:a.jsx(tT,{show:f,ref:X,backdrop:y,container:g,keyboard:!0,autoFocus:b,enforceFocus:S,restoreFocus:_,restoreFocusOptions:j,onEscapeKeyDown:It,onShow:x,onHide:v,onEnter:ct,onEntering:Bn,onEntered:C,onExit:Ce,onExiting:N,onExited:zn,manager:Ae(),transition:p?vT:void 0,backdropTransition:p?yT:void 0,renderBackdrop:ci,renderDialog:ui})})});nb.displayName="Modal";const ve=Object.assign(nb,{Body:iT,Header:pT,Title:gT,Footer:lT,Dialog:Z0,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),xT=je.forwardRef(({children:e,onClick:t},n)=>a.jsx("a",{className:"btn btn-secondary d-flex flex-column justify-content-center flex-grow-1",href:"",ref:n,onClick:r=>{r.preventDefault(),t(r)},children:a.jsx("span",{className:"dropdown-toggle",children:e})}));function bT({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r}=at(e,t),{project:o}=Rt(t||n.grantNumber);if(!n||!o||n.error||o.error)return;const s=ne.routes.request_action_path(e,"new"),i=n.allowedActions.Renewal?Array.isArray(n.allowedActions.Renewal)?[...n.allowedActions.Renewal]:[n.allowedActions.Renewal]:[];i.sort((u,d)=>u.opportunityId<d.opportunityId?-1:1);const l=[{id:"extension",action:`${s}?action_type=Extension`,isEnabled:"Extension"in n.allowedActions,button:"Request an Extension",enabled:n.usesCredits?a.jsx("p",{children:"Need more time to use your current credits and allocations? You can extend your project's end date up to six months past your funding end date, or up to 12 months at a time for projects not supported by a funding award."}):a.jsx("p",{children:"Need more time to use your current allocations? A one-time extension can extend your project end date by up to six months."}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for an extension of its end date.",n.usesCredits?a.jsxs(a.Fragment,{children:[" ","Extensions can be requested starting 90 days before your project's current end date."]}):null]})},{id:"supplement",action:`${s}?action_type=Supplement`,isEnabled:"Supplement"in n.allowedActions,button:"Request a Supplement",enabled:n.usesCredits?a.jsxs("p",{children:["Need more credits to complete your project? Great news! Your"," ",n.allocationType," project is eligible for a supplement of"," ",{Explore:"200,000",Discover:"750,000",Accelerate:"1,500,000"}[n.allocationType]," ","additional ACCESS credits."]}):a.jsxs("p",{children:["Need more units to complete your research? Great news! Your"," ",n.allocationType," project is eligible for a supplement of additional units."]}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for a supplement of additional"," ",n.usesCredits?"ACCESS Credits":"units","."]})},{id:"renewal",action:i.map(u=>[u.opportunityName,`${ne.routes.renew_request_path(e)}?opportunity_id=${u.opportunityId}`,"post"]),isEnabled:"Renewal"in n.allowedActions,button:"Request a Renewal",enabled:a.jsxs("p",{children:["Your ",n.allocationType," project can be renewed! The requirements for renewing your project depend on the"," ",a.jsx("a",{href:ne.routes.project_types_path(),target:"_blank",children:"new project type you select"}),"."]}),disabled:a.jsxs("p",{children:["Your project is not currently eligible for renewal.",n.usesCredits&&a.jsxs(a.Fragment,{children:[" ","Renewals are available starting 30 days before the project's current end date."]}),n.isMaximize&&a.jsxs(a.Fragment,{children:[" ","You can submit a renewal request to the Maximize ACCESS opportunity closest to your project's current end date."]})]})},{id:"help",action:[["Learn How to Manage Allocations",ne.routes.how_to_path(),"get"],["Open a Help Ticket","https://support.access-ci.org/open-a-ticket","get"]],isEnabled:!0,button:"Request Help",enabled:a.jsxs("p",{children:["Need to change something else about your project or expecting another option? Submit a help ticket that includes"," ",a.jsxs("em",{children:["grant number ",o.grantNumber]})," and a detailed description of the problem."]})}];l.sort((u,d)=>u.isEnabled<d.isEnabled?1:-1);const c=l.map(({id:u,action:d,isEnabled:f,button:p,enabled:y,disabled:m})=>a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-4 mb-2 d-grid",children:Array.isArray(d)&&d.length?a.jsxs(Ai,{className:"d-flex flex-column",children:[a.jsx(Ai.Toggle,{as:xT,children:p}),a.jsx(Ai.Menu,{children:d.map(([h,x,v])=>a.jsx(Ai.Item,{href:x,onClick:g=>{v!=="get"&&(g.preventDefault(),g.target.dataset.method=v,$&&$.rails&&$.rails.handleMethod($(g.target)))},children:h},x))})]}):a.jsx("a",{className:`btn btn-secondary d-flex flex-column justify-content-center ${f?"":"disabled"}`,href:f?d:"",children:a.jsx("span",{children:p})})}),a.jsx("div",{className:"col-sm-8 mb-2",children:f?y:m})]},u));return a.jsxs(ve,{size:"lg",show:n.showActionsModal,onHide:r,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Manage Your Project"})}),a.jsxs(ve.Body,{children:[a.jsxs("p",{children:["Please select an action to manage your project"," ",a.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),c]})]})}function wT({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleConfirmModal:o}=at(e,t),{project:s}=Rt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=n.usesCredits?"credits":"units",l=(1-px(n))*100;return a.jsxs(ve,{size:"lg",show:n.showConfirmModal,onHide:o,scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Consider Requesting an Exchange"})}),a.jsx(ve.Body,{children:a.jsxs("p",{children:[a.jsxs("strong",{children:[Math.round(l),"% of your allocation is unused."]})," ","Are you sure you want to request more ",i,"? You can exchange"," ",n.usesCredits?"credits for resources or ":""," one resource for another by changing the ",a.jsx("strong",{children:"balance"})," numbers in the table on the previous screen."]})}),a.jsx(ve.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Return to Exchange"}),a.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{o(),r()},children:["Request More ",i]})]})})]})}function ST({requestId:e,grantNumber:t,actionId:n}){const{deleteAction:r,request:o,toggleDeleteModal:s}=at(e,t);if(!o||o.error)return;const i=o.actions.find(p=>p.actionId==n);if(!i)return;const{deleteStatus:l,isRequest:c}=i,u=l==Le.pending,d=l==Le.error,f=()=>s(n);return a.jsxs(ve,{show:i.showDeleteModal,onHide:f,scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Confirm Deletion"})}),a.jsxs(ve.Body,{children:[d&&a.jsxs(be,{color:"danger",children:["Deletion of the ",c?"request":"action"," failed."]}),a.jsxs("p",{children:["Are you sure you want to delete"," ",!c&&a.jsxs(a.Fragment,{children:["action"," ",a.jsxs("strong",{children:[i.type,": ",ho(i.date)]})," ","on"," "]}),"request ",a.jsx("strong",{children:$f(o)}),"? Deletions cannot be undone."]})]}),a.jsx(ve.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:f,disabled:u,children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>r(n),disabled:u,children:u?"Deleting...":"Delete"})]})})]})}function tl({color:e="primary",href:t,icon:n,onClick:r,target:o,title:s}){const i=a.jsx("i",{className:`bi bi-${n}`}),l={className:`btn btn-sm ms-1 text-${e}`,href:t,onClick:r,style:{"--bs-btn-padding-x":"0.1rem","--bs-btn-padding-y":"0.1rem","--bs-btn-line-height":"1"},target:o,title:s};return t?a.jsx("a",{...l,children:i}):a.jsx("button",{...l,children:i})}function rb({action:e,request:t,toggleDeleteModal:n}){const r=e.allowedOperations||[],o=["Exchange","Transfer"].includes(e.type),s=[];r.includes("Edit")&&!o&&s.push(a.jsx(tl,{href:e.isRequest?ne.routes.edit_request_path(t.requestId):ne.routes.edit_request_action_path(t.requestId,e.actionId),icon:"pencil",title:"Edit action"},"edit")),r.includes("Delete")&&!o&&s.push(a.jsx(tl,{color:"danger",icon:"trash",onClick:()=>n(e.actionId),title:"Edit action"},"delete"));const i=`${e.type}: ${ho(e.date)}`;return a.jsxs(a.Fragment,{children:[e.detailAvailable&&!o?a.jsx("a",{href:ne.routes.request_action_path(t.requestId,e.actionId),children:i}):i,s]})}function Jn({resource:e,userGuide:t=!0}){const{full:n,short:r}=Ol(e.name),o=r?a.jsx("abbr",{title:n,children:r}):n;return a.jsxs(a.Fragment,{children:[kn(ne.resourceTypeIcons[e.icon])," ",o,!e.isCredit&&e.userGuideUrl&&t?a.jsx(tl,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function Oo({status:e,title:t}){const n={Active:"primary",Approved:"primary",New:"secondary",Pending:"secondary","Under Review":"secondary","Returned for Corrections":"secondary"}[e]||"dark";return a.jsx("span",{className:`badge text-bg-${n} align-self-center`,title:t,children:e})}const _T=e=>a.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function jT({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=at(e,t),{project:o,setRequest:s}=Rt(t||n.grantNumber);if(!n||!o)return;const i=o.requestsList;let l=0;for(;l<i.length&&i[l].requestId!==e;)l++;const c=i[l+1],u=i[l-1],d=(h,x)=>h?a.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>s(h.requestId),children:[x=="prev"?a.jsx("i",{className:"bi bi-chevron-left"}):null,$f(h),x=="next"?a.jsx("i",{className:"bi bi-chevron-right"}):null]}):a.jsx("span",{}),f=new Set,p=[];for(let h of n.actions)for(let x of h.resources)f.has(x.resourceId)||(f.add(x.resourceId),p.push(x));p.sort(Ha);const y=[{key:"action",name:"Action Details",format:(h,x)=>a.jsx(rb,{action:x,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:h=>a.jsx(Oo,{status:h})},...p.map(h=>({key:`resource${h.resourceId}`,name:h.name,icon:h.icon,class:"text-end",format:h.isBoolean?x=>x?Af(x):null:_T,formatHeader:(x,v)=>a.jsx(Jn,{resource:v,userGuide:!1})}))],m=n.actions.map(h=>{const x={...h};for(let{resourceId:v}of p)x[`resource${v}`]=0;for(let{resourceId:v,approved:g,requested:b}of h.resources)x[`resource${v}`]=g||b||0;return x});return a.jsxs("div",{className:"history",children:[a.jsx(Un,{columns:y,rows:m}),a.jsxs("div",{className:"buttons d-flex justify-content-between",children:[d(c,"prev"),d(u,"next")]})]})}function CT({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=at(e,t);if(!n)return;const o=[{key:"type",name:"Action Details",format:(s,i)=>a.jsx(rb,{action:i,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:s=>a.jsx(Oo,{status:s})}];if(n.actions&&n.actions.length)return a.jsx(Un,{rows:n.actions,columns:o})}function ts(...e){return e.filter(t=>t!=null).reduce((t,n)=>{if(typeof n!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return t===null?n:function(...o){t.apply(this,o),n.apply(this,o)}},null)}const ET={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function RT(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=ET[e];return r+parseInt(Tn(t,o[0]),10)+parseInt(Tn(t,o[1]),10)}const NT={[Kn]:"collapse",[Qa]:"collapsing",[Sn]:"collapsing",[Qn]:"collapse show"},kT=je.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:o,className:s,children:i,dimension:l="height",in:c=!1,timeout:u=300,mountOnEnter:d=!1,unmountOnExit:f=!1,appear:p=!1,getDimensionValue:y=RT,...m},h)=>{const x=typeof l=="function"?l():l,v=w.useMemo(()=>ts(j=>{j.style[x]="0"},e),[x,e]),g=w.useMemo(()=>ts(j=>{const C=`scroll${x[0].toUpperCase()}${x.slice(1)}`;j.style[x]=`${j[C]}px`},t),[x,t]),b=w.useMemo(()=>ts(j=>{j.style[x]=null},n),[x,n]),S=w.useMemo(()=>ts(j=>{j.style[x]=`${y(x,j)}px`,Ux(j)},r),[r,y,x]),_=w.useMemo(()=>ts(j=>{j.style[x]=null},o),[x,o]);return a.jsx(Vx,{ref:h,addEndListener:Lx,...m,"aria-expanded":m.role?c:null,onEnter:v,onEntering:g,onEntered:b,onExit:S,onExiting:_,childRef:i.ref,in:c,timeout:u,mountOnEnter:d,unmountOnExit:f,appear:p,children:(j,C)=>je.cloneElement(i,{...C,className:oe(s,i.props.className,NT[j],x==="width"&&"collapse-horizontal")})})}),TT=kT;function ob(e,t){return Array.isArray(e)?e.includes(t):e===t}const sb=w.createContext({});sb.displayName="AccordionContext";const Fl=sb,ib=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(Fl);return t=fe(t,"accordion-collapse"),a.jsx(TT,{ref:i,in:ob(l,o),...s,className:oe(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});ib.displayName="AccordionCollapse";const ab=ib,lb=w.createContext({eventKey:""});lb.displayName="AccordionItemContext";const ap=lb,cb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,...u},d)=>{t=fe(t,"accordion-body");const{eventKey:f}=w.useContext(ap);return a.jsx(ab,{eventKey:f,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,children:a.jsx(e,{ref:d,...u,className:oe(n,t)})})});cb.displayName="AccordionBody";const OT=cb;function PT(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:o}=w.useContext(Fl);return s=>{let i=e===n?null:e;o&&(Array.isArray(n)?n.includes(e)?i=n.filter(l=>l!==e):i=[...n,e]:i=[e]),r==null||r(i,s),t==null||t(s)}}const ub=w.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...o},s)=>{t=fe(t,"accordion-button");const{eventKey:i}=w.useContext(ap),l=PT(i,r),{activeEventKey:c}=w.useContext(Fl);return e==="button"&&(o.type="button"),a.jsx(e,{ref:s,onClick:l,...o,"aria-expanded":Array.isArray(c)?c.includes(i):i===c,className:oe(n,t,!ob(c,i)&&"collapsed")})});ub.displayName="AccordionButton";const db=ub,fb=w.forwardRef(({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...s},i)=>(t=fe(t,"accordion-header"),a.jsx(e,{ref:i,...s,className:oe(n,t),children:a.jsx(db,{onClick:o,children:r})})));fb.displayName="AccordionHeader";const IT=fb,pb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...o},s)=>{t=fe(t,"accordion-item");const i=w.useMemo(()=>({eventKey:r}),[r]);return a.jsx(ap.Provider,{value:i,children:a.jsx(e,{ref:s,...o,className:oe(n,t)})})});pb.displayName="AccordionItem";const $T=pb,hb=w.forwardRef((e,t)=>{const{as:n="div",activeKey:r,bsPrefix:o,className:s,onSelect:i,flush:l,alwaysOpen:c,...u}=$l(e,{activeKey:"onSelect"}),d=fe(o,"accordion"),f=w.useMemo(()=>({activeEventKey:r,onSelect:i,alwaysOpen:c}),[r,i,c]);return a.jsx(Fl.Provider,{value:f,children:a.jsx(n,{ref:t,...u,className:oe(s,d,l&&`${d}-flush`)})})});hb.displayName="Accordion";const Gt=Object.assign(hb,{Button:db,Collapse:ab,Item:$T,Header:IT,Body:OT}),md=2**31-1;function mb(e,t,n){const r=n-Date.now();e.current=r<=md?setTimeout(t,r):setTimeout(()=>mb(e,t,n),md)}function AT(){const e=Yf(),t=w.useRef();return op(()=>clearTimeout(t.current)),w.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(o,s=0){e()&&(n(),s<=md?t.current=setTimeout(o,s):mb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const MT=()=>{};function DT(e,t,{disabled:n,clickTrigger:r}={}){const o=t||MT;j0(e,o,{disabled:n,clickTrigger:r});const s=Te(i=>{K0(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=Lo(la(e));let l=(i.defaultView||window).event;const c=En(i,"keyup",u=>{if(u===l){l=void 0;return}s(u)});return()=>{c()}},[e,n,s])}const gb=w.forwardRef((e,t)=>{const{flip:n,offset:r,placement:o,containerPadding:s,popperConfig:i={},transition:l,runTransition:c}=e,[u,d]=Za(),[f,p]=Za(),y=mn(d,t),m=fd(e.container),h=fd(e.target),[x,v]=w.useState(!e.show),g=_0(h,u,C0({placement:o,enableEvents:!!e.show,containerPadding:s||5,flip:n,offset:r,arrowElement:f,popperConfig:i}));e.show&&x&&v(!1);const b=(...T)=>{v(!0),e.onExited&&e.onExited(...T)},S=e.show||!x;if(DT(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:_,onExiting:j,onEnter:C,onEntering:E,onEntered:N}=e;let R=e.children(Object.assign({},g.attributes.popper,{style:g.styles.popper,ref:y}),{popper:g,placement:o,show:!!e.show,arrowProps:Object.assign({},g.attributes.arrow,{style:g.styles.arrow,ref:p})});return R=pd(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:_,onExiting:j,onExited:b,onEnter:C,onEntering:E,onEntered:N}),m?Sr.createPortal(R,m):null});gb.displayName="Overlay";const FT=gb,vb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"popover-header"),a.jsx(n,{ref:o,className:oe(e,t),...r})));vb.displayName="PopoverHeader";const LT=vb,yb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=fe(t,"popover-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));yb.displayName="PopoverBody";const xb=yb;function bb(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function wb(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const UT=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,body:s,arrowProps:i,hasDoneInitialMeasure:l,popper:c,show:u,...d},f)=>{const p=fe(e,"popover"),y=Il(),[m]=(t==null?void 0:t.split("-"))||[],h=bb(m,y);let x=r;return u&&!l&&(x={...r,...wb(c==null?void 0:c.strategy)}),a.jsxs("div",{ref:f,role:"tooltip",style:x,"x-placement":m,className:oe(n,p,m&&`bs-popover-${h}`),...d,children:[a.jsx("div",{className:"popover-arrow",...i}),s?a.jsx(xb,{children:o}):o]})}),VT=Object.assign(UT,{Header:LT,Body:xb,POPPER_OFFSET:[0,8]}),Sb=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=fe(e,"tooltip");const f=Il(),[p]=(t==null?void 0:t.split("-"))||[],y=bb(p,f);let m=r;return c&&!i&&(m={...r,...wb(l==null?void 0:l.strategy)}),a.jsxs("div",{ref:d,style:m,role:"tooltip","x-placement":p,className:oe(n,e,`bs-tooltip-${y}`),...u,children:[a.jsx("div",{className:"tooltip-arrow",...s}),a.jsx("div",{className:`${e}-inner`,children:o})]})});Sb.displayName="Tooltip";const Ll=Object.assign(Sb,{TOOLTIP_OFFSET:[0,6]});function BT(e){const t=w.useRef(null),n=fe(void 0,"popover"),r=fe(void 0,"tooltip"),o=w.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(hd(t.current,n))return VT.POPPER_OFFSET;if(hd(t.current,r))return Ll.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function zT(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=o=>n(Xa(o))),t.ref=r.__wrapped||(r.__wrapped=o=>r(Xa(o)))}const _b=w.forwardRef(({children:e,transition:t=Eo,popperConfig:n={},rootClose:r=!1,placement:o="top",show:s=!1,...i},l)=>{const c=w.useRef({}),[u,d]=w.useState(null),[f,p]=BT(i.offset),y=mn(l,f),m=t===!0?Eo:t||void 0,h=Te(x=>{d(x),n==null||n.onFirstUpdate==null||n.onFirstUpdate(x)});return Ja(()=>{u&&i.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[u,i.target]),w.useEffect(()=>{s||d(null)},[s]),a.jsx(FT,{...i,ref:y,popperConfig:{...n,modifiers:p.concat(n.modifiers||[]),onFirstUpdate:h},transition:m,rootClose:r,placement:o,show:s,children:(x,{arrowProps:v,popper:g,show:b})=>{var S,_;zT(x,v);const j=g==null?void 0:g.placement,C=Object.assign(c.current,{state:g==null?void 0:g.state,scheduleUpdate:g==null?void 0:g.update,placement:j,outOfBoundaries:(g==null||(S=g.state)==null||(_=S.modifiersData.hide)==null?void 0:_.isReferenceHidden)||!1,strategy:n.strategy}),E=!!u;return typeof e=="function"?e({...x,placement:j,show:b,...!t&&b&&{className:"show"},popper:C,arrowProps:v,hasDoneInitialMeasure:E}):w.cloneElement(e,{...x,placement:j,arrowProps:v,popper:C,hasDoneInitialMeasure:E,className:oe(e.props.className,!t&&b&&"show"),style:{...e.props.style,...x.style}})}})});_b.displayName="Overlay";const jb=_b;function qT(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function qm(e,t,n){const[r]=t,o=r.currentTarget,s=r.relatedTarget||r.nativeEvent[n];(!s||s!==o)&&!Ws(o,s)&&e(...t)}q.oneOf(["click","hover","focus"]);const HT=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:o,defaultShow:s=!1,onToggle:i,delay:l,placement:c,flip:u=c&&c.indexOf("auto")!==-1,...d})=>{const f=w.useRef(null),p=mn(f,n.ref),y=AT(),m=w.useRef(""),[h,x]=Qx(o,s,i),v=qT(l),{onFocus:g,onBlur:b,onClick:S}=typeof n!="function"?w.Children.only(n).props:{},_=D=>{p(Xa(D))},j=w.useCallback(()=>{if(y.clear(),m.current="show",!v.show){x(!0);return}y.set(()=>{m.current==="show"&&x(!0)},v.show)},[v.show,x,y]),C=w.useCallback(()=>{if(y.clear(),m.current="hide",!v.hide){x(!1);return}y.set(()=>{m.current==="hide"&&x(!1)},v.hide)},[v.hide,x,y]),E=w.useCallback((...D)=>{j(),g==null||g(...D)},[j,g]),N=w.useCallback((...D)=>{C(),b==null||b(...D)},[C,b]),R=w.useCallback((...D)=>{x(!h),S==null||S(...D)},[S,x,h]),T=w.useCallback((...D)=>{qm(j,D,"fromElement")},[j]),k=w.useCallback((...D)=>{qm(C,D,"toElement")},[C]),P=e==null?[]:[].concat(e),M={ref:_};return P.indexOf("click")!==-1&&(M.onClick=R),P.indexOf("focus")!==-1&&(M.onFocus=E,M.onBlur=N),P.indexOf("hover")!==-1&&(M.onMouseOver=T,M.onMouseOut=k),a.jsxs(a.Fragment,{children:[typeof n=="function"?n(M):w.cloneElement(n,M),a.jsx(jb,{...d,show:h,onHide:C,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},lp=HT;function WT({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r}=Rt(t||n.grantNumber),{setTab:o}=Rt(t||n.grantNumber);if(!n||!r)return;let s;const i={};for(let p of r.users||[])for(let y of p.resourceIds)i[y]=i[y]||0,i[y]+=1;const l=(n.resources||[]).filter(p=>p.isCredit?(s=p,!1):p.allocated>0).map((p,y)=>({...p,userCount:i[p.resourceId]||0,color:Zu[y%Zu.length]})),c=s?s.allocated:0,u="Exchange"in n.allowedActions,d=n.exchangeActionId!==null,f=[{key:"name",name:"Resource",format:(p,y)=>a.jsx(Jn,{resource:y})},{key:"isActive",name:"Status",format:p=>a.jsx(Oo,{status:p?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(p,y)=>{if(y.isBoolean)return Af(y.allocated);const m=y.allocated-p,h=Math.max(m,0)*100/y.allocated;return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`usage bg-${y.color}`,style:{width:`${Math.min(h,100)}%`}}),nt(m,{abbreviate:!0})," of"," ",nt(y.allocated,{abbreviate:!0})," ",y.unit," ","remaining (",Math.round(h),"%)"]})}},{key:"endDate",name:"End Date",format:p=>ho(p)}];return r.isManager&&f.push({key:"userCount",name:"Users",class:"text-end",format:nt}),r.currentUser&&f.push({key:"resourceUsername",name:"My Username",format:(p,y)=>{const m=r.currentUser.resourceUsernames[y.resourceId];if(m)return m;if(r.currentUser.resourceAccountPendingIds.includes(y.resourceId))return a.jsx(Oo,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(r.currentUser.resourceIds.includes(y.resourceId)||!y.isActive)return a.jsx(a.Fragment,{children:"—"});if(r.isManager)return a.jsx("a",{href:"#",onClick:x=>{x.preventDefault(),o("users")},children:"Grant access"});const h=a.jsxs(Ll,{children:["Please contact ",Mf(r)," to request access to this resource."]});return a.jsx(lp,{overlay:h,children:a.jsx("a",{href:"#",onClick:x=>{x.preventDefault()},children:"Request access"})})}}),a.jsxs("div",{className:"overview",children:[u&&!d&&c>ne.creditAlertThreshold?a.jsxs("button",{onClick:()=>o("resources"),className:"alert alert-info d-flex justify-content-between align-items-center w-100",children:[a.jsxs("span",{children:[a.jsxs("span",{className:"fs-3",children:[kn(ne.resourceTypeIcons[s.icon])," ",nt(c)]})," ",s.unit," available"]}),a.jsxs("span",{className:"align-middle d-flex align-items-center",children:["Exchange credits for resources!"," ",a.jsx("span",{className:"fs-3",children:kn("chevron-right")})]})]}):null,l.length?a.jsx(Un,{columns:f,rows:l}):null]})}const KT=[{key:"role",name:"Role",format:e=>a.jsxs(a.Fragment,{children:[kn(ne.roleIcons[e])," ",e]})},{key:"users",name:"Users",format:e=>{const t=e.slice(0,3);return e.length>4&&(t[2]=`${nt(e.length-3)} others`),t.map((n,r)=>{const o=t.length-r;return`${n}${o>2?",":o==2&&t.length>1?" and":""}`}).join(" ")}}],GT=({requestId:e,grantNumber:t})=>{const{project:n}=Rt(t);if(!n)return;const r=Pl.map(({role:o,name:s})=>({role:s,users:(n.users||[]).filter(i=>i.role===o).map(i=>`${i.firstName} ${i.lastName}`)})).filter(o=>o.users.length>0);return r.length?a.jsx(Un,{rows:r,columns:KT}):null};function YT({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r,username:o}=Rt(t||n.grantNumber);if(!(!n||!r||n.error||r.error)&&n)return a.jsxs("div",{className:"overview",children:[a.jsx(WT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(GT,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(CT,{requestId:e})})]}):null]})}function Dr(e){"@babel/helpers - typeof";return Dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dr(e)}function QT(e,t){if(Dr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Dr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cb(e){var t=QT(e,"string");return Dr(t)=="symbol"?t:String(t)}function so(e,t,n){return t=Cb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hm(Object(n),!0).forEach(function(r){so(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XT(e){if(Array.isArray(e))return e}function ZT(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,i,l=[],c=!0,u=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=s.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(d){u=!0,o=d}finally{try{if(!c&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}function gd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eb(e,t){if(e){if(typeof e=="string")return gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gd(e,t)}}function JT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
59
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ue(e,t){return XT(e)||ZT(e,t)||Eb(e,t)||JT()}function gn(e,t){if(e==null)return{};var n=zf(e,t),r,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)r=s[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var eO=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Rb(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,o=r===void 0?!1:r,s=e.defaultValue,i=s===void 0?null:s,l=e.inputValue,c=e.menuIsOpen,u=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,y=e.value,m=gn(e,eO),h=w.useState(l!==void 0?l:n),x=Ue(h,2),v=x[0],g=x[1],b=w.useState(c!==void 0?c:o),S=Ue(b,2),_=S[0],j=S[1],C=w.useState(y!==void 0?y:i),E=Ue(C,2),N=E[0],R=E[1],T=w.useCallback(function(O,U){typeof u=="function"&&u(O,U),R(O)},[u]),k=w.useCallback(function(O,U){var A;typeof d=="function"&&(A=d(O,U)),g(A!==void 0?A:O)},[d]),P=w.useCallback(function(){typeof p=="function"&&p(),j(!0)},[p]),M=w.useCallback(function(){typeof f=="function"&&f(),j(!1)},[f]),D=l!==void 0?l:v,V=c!==void 0?c:_,Q=y!==void 0?y:N;return K(K({},m),{},{inputValue:D,menuIsOpen:V,onChange:T,onInputChange:k,onMenuClose:M,onMenuOpen:P,value:Q})}function tO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Cb(r.key),r)}}function nO(e,t,n){return t&&Wm(e.prototype,t),n&&Wm(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rO(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ya(e,t)}function nl(e){return nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},nl(e)}function Nb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Nb=function(){return!!e})()}function oO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sO(e,t){if(t&&(Dr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oO(e)}function iO(e){var t=Nb();return function(){var r=nl(e),o;if(t){var s=nl(this).constructor;o=Reflect.construct(r,arguments,s)}else o=r.apply(this,arguments);return sO(this,o)}}function aO(e){if(Array.isArray(e))return gd(e)}function lO(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cO(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
60
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cp(e){return aO(e)||lO(e)||Eb(e)||cO()}function uO(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function dO(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var fO=function(){function e(n){var r=this;this._insertTag=function(o){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,s),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(dO(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=uO(o);try{s.insertRule(r,s.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),Ze="-ms-",rl="-moz-",ue="-webkit-",kb="comm",up="rule",dp="decl",pO="@import",Tb="@keyframes",hO="@layer",mO=Math.abs,Ul=String.fromCharCode,gO=Object.assign;function vO(e,t){return We(e,0)^45?(((t<<2^We(e,0))<<2^We(e,1))<<2^We(e,2))<<2^We(e,3):0}function Ob(e){return e.trim()}function yO(e,t){return(e=t.exec(e))?e[0]:e}function de(e,t,n){return e.replace(t,n)}function vd(e,t){return e.indexOf(t)}function We(e,t){return e.charCodeAt(t)|0}function Ks(e,t,n){return e.slice(t,n)}function an(e){return e.length}function fp(e){return e.length}function Di(e,t){return t.push(e),e}function xO(e,t){return e.map(t).join("")}var Vl=1,Po=1,Pb=0,yt=0,Ie=0,Bo="";function Bl(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:Vl,column:Po,length:i,return:""}}function ns(e,t){return gO(Bl("",null,null,"",null,null,0),e,{length:-e.length},t)}function bO(){return Ie}function wO(){return Ie=yt>0?We(Bo,--yt):0,Po--,Ie===10&&(Po=1,Vl--),Ie}function St(){return Ie=yt<Pb?We(Bo,yt++):0,Po++,Ie===10&&(Po=1,Vl++),Ie}function hn(){return We(Bo,yt)}function ca(){return yt}function li(e,t){return Ks(Bo,e,t)}function Gs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ib(e){return Vl=Po=1,Pb=an(Bo=e),yt=0,[]}function $b(e){return Bo="",e}function ua(e){return Ob(li(yt-1,yd(e===91?e+2:e===40?e+1:e)))}function SO(e){for(;(Ie=hn())&&Ie<33;)St();return Gs(e)>2||Gs(Ie)>3?"":" "}function _O(e,t){for(;--t&&St()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return li(e,ca()+(t<6&&hn()==32&&St()==32))}function yd(e){for(;St();)switch(Ie){case e:return yt;case 34:case 39:e!==34&&e!==39&&yd(Ie);break;case 40:e===41&&yd(e);break;case 92:St();break}return yt}function jO(e,t){for(;St()&&e+Ie!==57;)if(e+Ie===84&&hn()===47)break;return"/*"+li(t,yt-1)+"*"+Ul(e===47?e:St())}function CO(e){for(;!Gs(hn());)St();return li(e,yt)}function EO(e){return $b(da("",null,null,null,[""],e=Ib(e),0,[0],e))}function da(e,t,n,r,o,s,i,l,c){for(var u=0,d=0,f=i,p=0,y=0,m=0,h=1,x=1,v=1,g=0,b="",S=o,_=s,j=r,C=b;x;)switch(m=g,g=St()){case 40:if(m!=108&&We(C,f-1)==58){vd(C+=de(ua(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:C+=ua(g);break;case 9:case 10:case 13:case 32:C+=SO(m);break;case 92:C+=_O(ca()-1,7);continue;case 47:switch(hn()){case 42:case 47:Di(RO(jO(St(),ca()),t,n),c);break;default:C+="/"}break;case 123*h:l[u++]=an(C)*v;case 125*h:case 59:case 0:switch(g){case 0:case 125:x=0;case 59+d:v==-1&&(C=de(C,/\f/g,"")),y>0&&an(C)-f&&Di(y>32?Gm(C+";",r,n,f-1):Gm(de(C," ","")+";",r,n,f-2),c);break;case 59:C+=";";default:if(Di(j=Km(C,t,n,u,d,o,l,b,S=[],_=[],f),s),g===123)if(d===0)da(C,t,j,j,S,s,f,l,_);else switch(p===99&&We(C,3)===110?100:p){case 100:case 108:case 109:case 115:da(e,j,j,r&&Di(Km(e,j,j,0,0,o,l,b,o,S=[],f),_),o,_,f,l,r?S:_);break;default:da(C,j,j,j,[""],_,0,l,_)}}u=d=y=0,h=v=1,b=C="",f=i;break;case 58:f=1+an(C),y=m;default:if(h<1){if(g==123)--h;else if(g==125&&h++==0&&wO()==125)continue}switch(C+=Ul(g),g*h){case 38:v=d>0?1:(C+="\f",-1);break;case 44:l[u++]=(an(C)-1)*v,v=1;break;case 64:hn()===45&&(C+=ua(St())),p=hn(),d=f=an(b=C+=CO(ca())),g++;break;case 45:m===45&&an(C)==2&&(h=0)}}return s}function Km(e,t,n,r,o,s,i,l,c,u,d){for(var f=o-1,p=o===0?s:[""],y=fp(p),m=0,h=0,x=0;m<r;++m)for(var v=0,g=Ks(e,f+1,f=mO(h=i[m])),b=e;v<y;++v)(b=Ob(h>0?p[v]+" "+g:de(g,/&\f/g,p[v])))&&(c[x++]=b);return Bl(e,t,n,o===0?up:l,c,u,d)}function RO(e,t,n){return Bl(e,t,n,kb,Ul(bO()),Ks(e,2,-2),0)}function Gm(e,t,n,r){return Bl(e,t,n,dp,Ks(e,0,r),Ks(e,r+1,-1),r)}function mo(e,t){for(var n="",r=fp(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function NO(e,t,n,r){switch(e.type){case hO:if(e.children.length)break;case pO:case dp:return e.return=e.return||e.value;case kb:return"";case Tb:return e.return=e.value+"{"+mo(e.children,r)+"}";case up:e.value=e.props.join(",")}return an(n=mo(e.children,r))?e.return=e.value+"{"+n+"}":""}function kO(e){var t=fp(e);return function(n,r,o,s){for(var i="",l=0;l<t;l++)i+=e[l](n,r,o,s)||"";return i}}function TO(e){return function(t){t.root||(t=t.return)&&e(t)}}function OO(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var PO=function(t,n,r){for(var o=0,s=0;o=s,s=hn(),o===38&&s===12&&(n[r]=1),!Gs(s);)St();return li(t,yt)},IO=function(t,n){var r=-1,o=44;do switch(Gs(o)){case 0:o===38&&hn()===12&&(n[r]=1),t[r]+=PO(yt-1,n,r);break;case 2:t[r]+=ua(o);break;case 4:if(o===44){t[++r]=hn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Ul(o)}while(o=St());return t},$O=function(t,n){return $b(IO(Ib(t),n))},Ym=new WeakMap,AO=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Ym.get(r))&&!o){Ym.set(t,!0);for(var s=[],i=$O(n,s),l=r.props,c=0,u=0;c<i.length;c++)for(var d=0;d<l.length;d++,u++)t.props[u]=s[c]?i[c].replace(/&\f/g,l[d]):l[d]+" "+i[c]}}},MO=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Ab(e,t){switch(vO(e,t)){case 5103:return ue+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ue+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ue+e+rl+e+Ze+e+e;case 6828:case 4268:return ue+e+Ze+e+e;case 6165:return ue+e+Ze+"flex-"+e+e;case 5187:return ue+e+de(e,/(\w+).+(:[^]+)/,ue+"box-$1$2"+Ze+"flex-$1$2")+e;case 5443:return ue+e+Ze+"flex-item-"+de(e,/flex-|-self/,"")+e;case 4675:return ue+e+Ze+"flex-line-pack"+de(e,/align-content|flex-|-self/,"")+e;case 5548:return ue+e+Ze+de(e,"shrink","negative")+e;case 5292:return ue+e+Ze+de(e,"basis","preferred-size")+e;case 6060:return ue+"box-"+de(e,"-grow","")+ue+e+Ze+de(e,"grow","positive")+e;case 4554:return ue+de(e,/([^-])(transform)/g,"$1"+ue+"$2")+e;case 6187:return de(de(de(e,/(zoom-|grab)/,ue+"$1"),/(image-set)/,ue+"$1"),e,"")+e;case 5495:case 3959:return de(e,/(image-set\([^]*)/,ue+"$1$`$1");case 4968:return de(de(e,/(.+:)(flex-)?(.*)/,ue+"box-pack:$3"+Ze+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ue+e+e;case 4095:case 3583:case 4068:case 2532:return de(e,/(.+)-inline(.+)/,ue+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(an(e)-1-t>6)switch(We(e,t+1)){case 109:if(We(e,t+4)!==45)break;case 102:return de(e,/(.+:)(.+)-([^]+)/,"$1"+ue+"$2-$3$1"+rl+(We(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~vd(e,"stretch")?Ab(de(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(We(e,t+1)!==115)break;case 6444:switch(We(e,an(e)-3-(~vd(e,"!important")&&10))){case 107:return de(e,":",":"+ue)+e;case 101:return de(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ue+(We(e,14)===45?"inline-":"")+"box$3$1"+ue+"$2$3$1"+Ze+"$2box$3")+e}break;case 5936:switch(We(e,t+11)){case 114:return ue+e+Ze+de(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ue+e+Ze+de(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ue+e+Ze+de(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ue+e+Ze+e+e}return e}var DO=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case dp:t.return=Ab(t.value,t.length);break;case Tb:return mo([ns(t,{value:de(t.value,"@","@"+ue)})],o);case up:if(t.length)return xO(t.props,function(s){switch(yO(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mo([ns(t,{props:[de(s,/:(read-\w+)/,":"+rl+"$1")]})],o);case"::placeholder":return mo([ns(t,{props:[de(s,/:(plac\w+)/,":"+ue+"input-$1")]}),ns(t,{props:[de(s,/:(plac\w+)/,":"+rl+"$1")]}),ns(t,{props:[de(s,/:(plac\w+)/,Ze+"input-$1")]})],o)}return""})}},FO=[DO],LO=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var x=h.getAttribute("data-emotion");x.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||FO,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var x=h.getAttribute("data-emotion").split(" "),v=1;v<x.length;v++)s[x[v]]=!0;l.push(h)});var c,u=[AO,MO];{var d,f=[NO,TO(function(h){d.insert(h)})],p=kO(u.concat(o,f)),y=function(x){return mo(EO(x),p)};c=function(x,v,g,b){d=g,y(x?x+"{"+v.styles+"}":v.styles),b&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new fO({key:n,container:i,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:c};return m.sheet.hydrate(l),m},Mb={exports:{}},me={};/** @license React v16.13.1
61
61
  * react-is.production.min.js
62
62
  *
63
63
  * Copyright (c) Facebook, Inc. and its affiliates.
64
64
  *
65
65
  * This source code is licensed under the MIT license found in the
66
66
  * LICENSE file in the root directory of this source tree.
67
- */var ze=typeof Symbol=="function"&&Symbol.for,hp=ze?Symbol.for("react.element"):60103,mp=ze?Symbol.for("react.portal"):60106,ql=ze?Symbol.for("react.fragment"):60107,Hl=ze?Symbol.for("react.strict_mode"):60108,Wl=ze?Symbol.for("react.profiler"):60114,Kl=ze?Symbol.for("react.provider"):60109,Gl=ze?Symbol.for("react.context"):60110,gp=ze?Symbol.for("react.async_mode"):60111,Yl=ze?Symbol.for("react.concurrent_mode"):60111,Ql=ze?Symbol.for("react.forward_ref"):60112,Xl=ze?Symbol.for("react.suspense"):60113,VO=ze?Symbol.for("react.suspense_list"):60120,Zl=ze?Symbol.for("react.memo"):60115,Jl=ze?Symbol.for("react.lazy"):60116,BO=ze?Symbol.for("react.block"):60121,zO=ze?Symbol.for("react.fundamental"):60117,qO=ze?Symbol.for("react.responder"):60118,HO=ze?Symbol.for("react.scope"):60119;function Tt(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case hp:switch(e=e.type,e){case gp:case Yl:case ql:case Wl:case Hl:case Xl:return e;default:switch(e=e&&e.$$typeof,e){case Gl:case Ql:case Jl:case Zl:case Kl:return e;default:return t}}case mp:return t}}}function Lb(e){return Tt(e)===Yl}me.AsyncMode=gp;me.ConcurrentMode=Yl;me.ContextConsumer=Gl;me.ContextProvider=Kl;me.Element=hp;me.ForwardRef=Ql;me.Fragment=ql;me.Lazy=Jl;me.Memo=Zl;me.Portal=mp;me.Profiler=Wl;me.StrictMode=Hl;me.Suspense=Xl;me.isAsyncMode=function(e){return Lb(e)||Tt(e)===gp};me.isConcurrentMode=Lb;me.isContextConsumer=function(e){return Tt(e)===Gl};me.isContextProvider=function(e){return Tt(e)===Kl};me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===hp};me.isForwardRef=function(e){return Tt(e)===Ql};me.isFragment=function(e){return Tt(e)===ql};me.isLazy=function(e){return Tt(e)===Jl};me.isMemo=function(e){return Tt(e)===Zl};me.isPortal=function(e){return Tt(e)===mp};me.isProfiler=function(e){return Tt(e)===Wl};me.isStrictMode=function(e){return Tt(e)===Hl};me.isSuspense=function(e){return Tt(e)===Xl};me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ql||e===Yl||e===Wl||e===Hl||e===Xl||e===VO||typeof e=="object"&&e!==null&&(e.$$typeof===Jl||e.$$typeof===Zl||e.$$typeof===Kl||e.$$typeof===Gl||e.$$typeof===Ql||e.$$typeof===zO||e.$$typeof===qO||e.$$typeof===HO||e.$$typeof===BO)};me.typeOf=Tt;Fb.exports=me;var WO=Fb.exports,Ub=WO,KO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},GO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Vb={};Vb[Ub.ForwardRef]=KO;Vb[Ub.Memo]=GO;var YO=!0;function QO(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Bb=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||YO===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},XO=function(t,n,r){Bb(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function ZO(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var JO={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},eP=/[A-Z]|^ms/g,tP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,zb=function(t){return t.charCodeAt(1)===45},Qm=function(t){return t!=null&&typeof t!="boolean"},zc=PO(function(e){return zb(e)?e:e.replace(eP,"-$&").toLowerCase()}),Xm=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(tP,function(r,o,s){return an={name:o,styles:s,next:an},o})}return JO[t]!==1&&!zb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Ys(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return an={name:n.name,styles:n.styles,next:an},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)an={name:r.name,styles:r.styles,next:an},r=r.next;var o=n.styles+";";return o}return nP(e,t,n)}case"function":{if(e!==void 0){var s=an,i=n(e);return an=s,Ys(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function nP(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ys(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object")t!=null&&t[i]!==void 0?r+=s+"{"+t[i]+"}":Qm(i)&&(r+=zc(s)+":"+Xm(s,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)Qm(i[l])&&(r+=zc(s)+":"+Xm(s,i[l])+";");else{var c=Ys(e,t,i);switch(s){case"animation":case"animationName":{r+=zc(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var Zm=/label:\s*([^\s;\n{]+)\s*(;|$)/g,an,qb=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,s="";an=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,s+=Ys(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=Ys(r,n,t[l]),o&&(s+=i[l]);Zm.lastIndex=0;for(var c="",u;(u=Zm.exec(s))!==null;)c+="-"+u[1];var d=ZO(s)+c;return{name:d,styles:s,next:an}},rP=function(t){return t()},oP=ma.useInsertionEffect?ma.useInsertionEffect:!1,sP=oP||rP,vp={}.hasOwnProperty,Hb=w.createContext(typeof HTMLElement<"u"?UO({key:"css"}):null);Hb.Provider;var iP=function(t){return w.forwardRef(function(n,r){var o=w.useContext(Hb);return t(n,o,r)})},aP=w.createContext({}),bd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",lP=function(t,n){var r={};for(var o in n)vp.call(n,o)&&(r[o]=n[o]);return r[bd]=t,r},cP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Bb(n,r,o),sP(function(){return XO(n,r,o)}),null},uP=iP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[bd],s=[r],i="";typeof e.className=="string"?i=QO(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=qb(s,void 0,w.useContext(aP));i+=t.key+"-"+l.name;var c={};for(var u in e)vp.call(e,u)&&u!=="css"&&u!==bd&&(c[u]=e[u]);return c.ref=n,c.className=i,w.createElement(w.Fragment,null,w.createElement(cP,{cache:t,serialized:l,isStringTag:typeof o=="string"}),w.createElement(o,c))}),dP=uP,K=function(t,n){var r=arguments;if(n==null||!vp.call(n,"css"))return w.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=dP,s[1]=lP(t,n);for(var i=2;i<o;i++)s[i]=r[i];return w.createElement.apply(null,s)};function yp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return qb(t)}var fP=function(){var t=yp.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function pP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const hP=Math.min,mP=Math.max,sl=Math.round,Fi=Math.floor,il=e=>({x:e,y:e});function gP(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Wb(e){return Gb(e)?(e.nodeName||"").toLowerCase():"#document"}function Xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Kb(e){var t;return(t=(Gb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Gb(e){return e instanceof Node||e instanceof Xt(e).Node}function wd(e){return e instanceof Element||e instanceof Xt(e).Element}function xp(e){return e instanceof HTMLElement||e instanceof Xt(e).HTMLElement}function Jm(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xt(e).ShadowRoot}function Yb(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=bp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function vP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function yP(e){return["html","body","#document"].includes(Wb(e))}function bp(e){return Xt(e).getComputedStyle(e)}function xP(e){if(Wb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jm(e)&&e.host||Kb(e);return Jm(t)?t.host:t}function Qb(e){const t=xP(e);return yP(t)?e.ownerDocument?e.ownerDocument.body:e.body:xp(t)&&Yb(t)?t:Qb(t)}function al(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Qb(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Xt(o);return s?t.concat(i,i.visualViewport||[],Yb(o)?o:[],i.frameElement&&n?al(i.frameElement):[]):t.concat(o,al(o,[],n))}function bP(e){const t=bp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=xp(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=sl(n)!==s||sl(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function wp(e){return wd(e)?e:e.contextElement}function qc(e){const t=wp(e);if(!xp(t))return il(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=bP(t);let i=(s?sl(n.width):n.width)/r,l=(s?sl(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const wP=il(0);function SP(e){const t=Xt(e);return!vP()||!t.visualViewport?wP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _P(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Xt(e)?!1:t}function eg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=wp(e);let i=il(1);t&&(r?wd(r)&&(i=qc(r)):i=qc(e));const l=_P(s,n,r)?SP(s):il(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=Xt(s),y=r&&wd(r)?Xt(r):r;let m=p.frameElement;for(;m&&r&&y!==p;){const h=qc(m),x=m.getBoundingClientRect(),v=bp(m),g=x.left+(m.clientLeft+parseFloat(v.paddingLeft))*h.x,b=x.top+(m.clientTop+parseFloat(v.paddingTop))*h.y;c*=h.x,u*=h.y,d*=h.x,f*=h.y,c+=g,u+=b,m=Xt(m).frameElement}}return gP({width:d,height:f,x:c,y:u})}function jP(e,t){let n=null,r;const o=Kb(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:u,top:d,width:f,height:p}=e.getBoundingClientRect();if(l||t(),!f||!p)return;const y=Fi(d),m=Fi(o.clientWidth-(u+f)),h=Fi(o.clientHeight-(d+p)),x=Fi(u),g={rootMargin:-y+"px "+-m+"px "+-h+"px "+-x+"px",threshold:mP(0,hP(1,c))||1};let b=!0;function S(_){const j=_[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(S,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,g)}n.observe(e)}return i(!0),s}function CP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=wp(e),d=o||s?[...u?al(u):[],...al(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=u&&l?jP(u,n):null;let p=-1,y=null;i&&(y=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=y)==null||b.observe(t)})),n()}),u&&!c&&y.observe(u),y.observe(t));let m,h=c?eg(e):null;c&&x();function x(){const v=eg(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(x)}return n(),()=>{var v;d.forEach(g=>{o&&g.removeEventListener("scroll",n),s&&g.removeEventListener("resize",n)}),f==null||f(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(m)}}var Sd=w.useLayoutEffect,EP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],ll=function(){};function RP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function NP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var s=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&s.push("".concat(RP(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var tg=function(t){return FP(t)?t.filter(Boolean):Fr(t)==="object"&&t!==null?[t]:[]},Xb=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=mn(t,EP);return H({},n)},Te=function(t,n,r){var o=t.cx,s=t.getStyles,i=t.getClassNames,l=t.className;return{css:s(n,t),className:o(r??{},i(n,t),l)}};function kP(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function ec(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function TP(e){return ec(e)?window.innerHeight:e.clientHeight}function Zb(e){return ec(e)?window.pageYOffset:e.scrollTop}function cl(e,t){if(ec(e)){window.scrollTo(0,t);return}e.scrollTop=t}function OP(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function PP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Li(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ll,o=Zb(e),s=t-o,i=10,l=0;function c(){l+=i;var u=PP(l,o,s,n);cl(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function ng(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?cl(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&cl(e,Math.max(t.offsetTop-o,0))}function $P(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function rg(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function IP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Jb=!1,AP={get passive(){return Jb=!0}},Ui=typeof window<"u"?window:{};Ui.addEventListener&&Ui.removeEventListener&&(Ui.addEventListener("p",ll,AP),Ui.removeEventListener("p",ll,!1));var MP=Jb;function DP(e){return e!=null}function FP(e){return Array.isArray(e)}function Vi(e,t,n){return e?t:n}var LP=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(i){var l=Ue(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=Ue(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},UP=["children","innerProps"],VP=["children","innerProps"];function BP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=OP(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),y=p.bottom,m=p.height,h=p.top,x=n.offsetParent.getBoundingClientRect(),v=x.top,g=i?window.innerHeight:TP(c),b=Zb(c),S=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),j=v-_,C=g-h,E=j+b,N=f-b-h,R=y-g+b+S,T=b+h-_,k=160;switch(o){case"auto":case"bottom":if(C>=m)return{placement:"bottom",maxHeight:t};if(N>=m&&!i)return s&&Li(c,R,k),{placement:"bottom",maxHeight:t};if(!i&&N>=r||i&&C>=r){s&&Li(c,R,k);var P=i?C-S:N-S;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var D=t,F=i?j:E;return F>=r&&(D=Math.min(F-S-l,t)),{placement:"top",maxHeight:D}}if(o==="bottom")return s&&cl(c,R),{placement:"bottom",maxHeight:t};break;case"top":if(j>=m)return{placement:"top",maxHeight:t};if(E>=m&&!i)return s&&Li(c,T,k),{placement:"top",maxHeight:t};if(!i&&E>=r||i&&j>=r){var V=t;return(!i&&E>=r||i&&j>=r)&&(V=i?j-_:E-_),s&&Li(c,T,k),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function zP(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var ew=function(t){return t==="auto"?"bottom":t},qP=function(t,n){var r,o=t.placement,s=t.theme,i=s.borderRadius,l=s.spacing,c=s.colors;return H((r={label:"menu"},io(r,zP(o),"100%"),io(r,"position","absolute"),io(r,"width","100%"),io(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},tw=w.createContext(null),HP=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,i=t.menuPosition,l=t.menuShouldScrollIntoView,c=t.theme,u=w.useContext(tw)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),y=Ue(p,2),m=y[0],h=y[1],x=w.useState(null),v=Ue(x,2),g=v[0],b=v[1],S=c.spacing.controlHeight;return Sd(function(){var _=f.current;if(_){var j=i==="fixed",C=l&&!j,E=BP({maxHeight:o,menuEl:_,minHeight:r,placement:s,shouldScroll:C,isFixedPosition:j,controlHeight:S});h(E.maxHeight),b(E.placement),d==null||d(E.placement)}},[o,s,i,l,r,d,S]),n({ref:f,placerProps:H(H({},t),{},{placement:g||ew(s),maxHeight:m})})},WP=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return K("div",G({},Te(t,"menu",{menu:!0}),{ref:r},o),n)},KP=WP,GP=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return H({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},YP=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return K("div",G({},Te(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},nw=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return H({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},QP=nw,XP=nw,ZP=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=mn(t,UP);return K("div",G({},Te(H(H({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},JP=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=mn(t,VP);return K("div",G({},Te(H(H({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},e$=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},t$=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,i=t.menuPlacement,l=t.menuPosition,c=w.useRef(null),u=w.useRef(null),d=w.useState(ew(i)),f=Ue(d,2),p=f[0],y=f[1],m=w.useMemo(function(){return{setPortalPlacement:y}},[]),h=w.useState(null),x=Ue(h,2),v=x[0],g=x[1],b=w.useCallback(function(){if(o){var C=$P(o),E=l==="fixed"?0:window.pageYOffset,N=C[p]+E;(N!==(v==null?void 0:v.offset)||C.left!==(v==null?void 0:v.rect.left)||C.width!==(v==null?void 0:v.rect.width))&&g({offset:N,rect:C})}},[o,l,p,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);Sd(function(){b()},[b]);var S=w.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&c.current&&(u.current=CP(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);Sd(function(){S()},[S]);var _=w.useCallback(function(C){c.current=C,S()},[S]);if(!n&&l!=="fixed"||!v)return null;var j=K("div",G({ref:_},Te(H(H({},t),{},{offset:v.offset,position:l,rect:v.rect}),"menuPortal",{"menu-portal":!0}),s),r);return K(tw.Provider,{value:m},n?Ef.createPortal(j,n):j)},n$=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},r$=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return K("div",G({},Te(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},o$=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return H({alignItems:"center",display:o&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},s$=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return K("div",G({},Te(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},i$=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},a$=function(t){var n=t.children,r=t.innerProps;return K("div",G({},Te(t,"indicatorsContainer",{indicators:!0}),r),n)},og,l$=["size"],c$=["innerProps","isRtl","size"],u$={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},rw=function(t){var n=t.size,r=mn(t,l$);return K("svg",G({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:u$},r))},Sp=function(t){return K(rw,G({size:20},t),K("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ow=function(t){return K(rw,G({size:20},t),K("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},sw=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return H({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},d$=sw,f$=function(t){var n=t.children,r=t.innerProps;return K("div",G({},Te(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||K(ow,null))},p$=sw,h$=function(t){var n=t.children,r=t.innerProps;return K("div",G({},Te(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||K(Sp,null))},m$=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return H({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},g$=function(t){var n=t.innerProps;return K("span",G({},n,Te(t,"indicatorSeparator",{"indicator-separator":!0})))},v$=fP(og||(og=pP([`
67
+ */var ze=typeof Symbol=="function"&&Symbol.for,pp=ze?Symbol.for("react.element"):60103,hp=ze?Symbol.for("react.portal"):60106,zl=ze?Symbol.for("react.fragment"):60107,ql=ze?Symbol.for("react.strict_mode"):60108,Hl=ze?Symbol.for("react.profiler"):60114,Wl=ze?Symbol.for("react.provider"):60109,Kl=ze?Symbol.for("react.context"):60110,mp=ze?Symbol.for("react.async_mode"):60111,Gl=ze?Symbol.for("react.concurrent_mode"):60111,Yl=ze?Symbol.for("react.forward_ref"):60112,Ql=ze?Symbol.for("react.suspense"):60113,UO=ze?Symbol.for("react.suspense_list"):60120,Xl=ze?Symbol.for("react.memo"):60115,Zl=ze?Symbol.for("react.lazy"):60116,VO=ze?Symbol.for("react.block"):60121,BO=ze?Symbol.for("react.fundamental"):60117,zO=ze?Symbol.for("react.responder"):60118,qO=ze?Symbol.for("react.scope"):60119;function Ot(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case pp:switch(e=e.type,e){case mp:case Gl:case zl:case Hl:case ql:case Ql:return e;default:switch(e=e&&e.$$typeof,e){case Kl:case Yl:case Zl:case Xl:case Wl:return e;default:return t}}case hp:return t}}}function Db(e){return Ot(e)===Gl}me.AsyncMode=mp;me.ConcurrentMode=Gl;me.ContextConsumer=Kl;me.ContextProvider=Wl;me.Element=pp;me.ForwardRef=Yl;me.Fragment=zl;me.Lazy=Zl;me.Memo=Xl;me.Portal=hp;me.Profiler=Hl;me.StrictMode=ql;me.Suspense=Ql;me.isAsyncMode=function(e){return Db(e)||Ot(e)===mp};me.isConcurrentMode=Db;me.isContextConsumer=function(e){return Ot(e)===Kl};me.isContextProvider=function(e){return Ot(e)===Wl};me.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===pp};me.isForwardRef=function(e){return Ot(e)===Yl};me.isFragment=function(e){return Ot(e)===zl};me.isLazy=function(e){return Ot(e)===Zl};me.isMemo=function(e){return Ot(e)===Xl};me.isPortal=function(e){return Ot(e)===hp};me.isProfiler=function(e){return Ot(e)===Hl};me.isStrictMode=function(e){return Ot(e)===ql};me.isSuspense=function(e){return Ot(e)===Ql};me.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zl||e===Gl||e===Hl||e===ql||e===Ql||e===UO||typeof e=="object"&&e!==null&&(e.$$typeof===Zl||e.$$typeof===Xl||e.$$typeof===Wl||e.$$typeof===Kl||e.$$typeof===Yl||e.$$typeof===BO||e.$$typeof===zO||e.$$typeof===qO||e.$$typeof===VO)};me.typeOf=Ot;Mb.exports=me;var HO=Mb.exports,Fb=HO,WO={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},KO={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Lb={};Lb[Fb.ForwardRef]=WO;Lb[Fb.Memo]=KO;var GO=!0;function YO(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Ub=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||GO===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},QO=function(t,n,r){Ub(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+o:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function XO(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var ZO={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},JO=/[A-Z]|^ms/g,eP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Vb=function(t){return t.charCodeAt(1)===45},Qm=function(t){return t!=null&&typeof t!="boolean"},Bc=OO(function(e){return Vb(e)?e:e.replace(JO,"-$&").toLowerCase()}),Xm=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(eP,function(r,o,s){return ln={name:o,styles:s,next:ln},o})}return ZO[t]!==1&&!Vb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Ys(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ln={name:n.name,styles:n.styles,next:ln},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ln={name:r.name,styles:r.styles,next:ln},r=r.next;var o=n.styles+";";return o}return tP(e,t,n)}case"function":{if(e!==void 0){var s=ln,i=n(e);return ln=s,Ys(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function tP(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ys(e,t,n[o])+";";else for(var s in n){var i=n[s];if(typeof i!="object")t!=null&&t[i]!==void 0?r+=s+"{"+t[i]+"}":Qm(i)&&(r+=Bc(s)+":"+Xm(s,i)+";");else if(Array.isArray(i)&&typeof i[0]=="string"&&(t==null||t[i[0]]===void 0))for(var l=0;l<i.length;l++)Qm(i[l])&&(r+=Bc(s)+":"+Xm(s,i[l])+";");else{var c=Ys(e,t,i);switch(s){case"animation":case"animationName":{r+=Bc(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var Zm=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ln,Bb=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,s="";ln=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,s+=Ys(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=Ys(r,n,t[l]),o&&(s+=i[l]);Zm.lastIndex=0;for(var c="",u;(u=Zm.exec(s))!==null;)c+="-"+u[1];var d=XO(s)+c;return{name:d,styles:s,next:ln}},nP=function(t){return t()},rP=ma.useInsertionEffect?ma.useInsertionEffect:!1,oP=rP||nP,gp={}.hasOwnProperty,zb=w.createContext(typeof HTMLElement<"u"?LO({key:"css"}):null);zb.Provider;var sP=function(t){return w.forwardRef(function(n,r){var o=w.useContext(zb);return t(n,o,r)})},iP=w.createContext({}),xd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",aP=function(t,n){var r={};for(var o in n)gp.call(n,o)&&(r[o]=n[o]);return r[xd]=t,r},lP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Ub(n,r,o),oP(function(){return QO(n,r,o)}),null},cP=sP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[xd],s=[r],i="";typeof e.className=="string"?i=YO(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=Bb(s,void 0,w.useContext(iP));i+=t.key+"-"+l.name;var c={};for(var u in e)gp.call(e,u)&&u!=="css"&&u!==xd&&(c[u]=e[u]);return c.ref=n,c.className=i,w.createElement(w.Fragment,null,w.createElement(lP,{cache:t,serialized:l,isStringTag:typeof o=="string"}),w.createElement(o,c))}),uP=cP,G=function(t,n){var r=arguments;if(n==null||!gp.call(n,"css"))return w.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=uP,s[1]=aP(t,n);for(var i=2;i<o;i++)s[i]=r[i];return w.createElement.apply(null,s)};function vp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Bb(t)}var dP=function(){var t=vp.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function fP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const pP=Math.min,hP=Math.max,ol=Math.round,Fi=Math.floor,sl=e=>({x:e,y:e});function mP(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function qb(e){return Wb(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Hb(e){var t;return(t=(Wb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Wb(e){return e instanceof Node||e instanceof Jt(e).Node}function bd(e){return e instanceof Element||e instanceof Jt(e).Element}function yp(e){return e instanceof HTMLElement||e instanceof Jt(e).HTMLElement}function Jm(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function Kb(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=xp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function gP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vP(e){return["html","body","#document"].includes(qb(e))}function xp(e){return Jt(e).getComputedStyle(e)}function yP(e){if(qb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Jm(e)&&e.host||Hb(e);return Jm(t)?t.host:t}function Gb(e){const t=yP(e);return vP(t)?e.ownerDocument?e.ownerDocument.body:e.body:yp(t)&&Kb(t)?t:Gb(t)}function il(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Gb(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Jt(o);return s?t.concat(i,i.visualViewport||[],Kb(o)?o:[],i.frameElement&&n?il(i.frameElement):[]):t.concat(o,il(o,[],n))}function xP(e){const t=xp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yp(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=ol(n)!==s||ol(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function bp(e){return bd(e)?e:e.contextElement}function zc(e){const t=bp(e);if(!yp(t))return sl(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=xP(t);let i=(s?ol(n.width):n.width)/r,l=(s?ol(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const bP=sl(0);function wP(e){const t=Jt(e);return!gP()||!t.visualViewport?bP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jt(e)?!1:t}function eg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=bp(e);let i=sl(1);t&&(r?bd(r)&&(i=zc(r)):i=zc(e));const l=SP(s,n,r)?wP(s):sl(0);let c=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const p=Jt(s),y=r&&bd(r)?Jt(r):r;let m=p.frameElement;for(;m&&r&&y!==p;){const h=zc(m),x=m.getBoundingClientRect(),v=xp(m),g=x.left+(m.clientLeft+parseFloat(v.paddingLeft))*h.x,b=x.top+(m.clientTop+parseFloat(v.paddingTop))*h.y;c*=h.x,u*=h.y,d*=h.x,f*=h.y,c+=g,u+=b,m=Jt(m).frameElement}}return mP({width:d,height:f,x:c,y:u})}function _P(e,t){let n=null,r;const o=Hb(e);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const{left:u,top:d,width:f,height:p}=e.getBoundingClientRect();if(l||t(),!f||!p)return;const y=Fi(d),m=Fi(o.clientWidth-(u+f)),h=Fi(o.clientHeight-(d+p)),x=Fi(u),g={rootMargin:-y+"px "+-m+"px "+-h+"px "+-x+"px",threshold:hP(0,pP(1,c))||1};let b=!0;function S(_){const j=_[0].intersectionRatio;if(j!==c){if(!b)return i();j?i(!1,j):r=setTimeout(()=>{i(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(S,{...g,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,g)}n.observe(e)}return i(!0),s}function jP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=bp(e),d=o||s?[...u?il(u):[],...il(t)]:[];d.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=u&&l?_P(u,n):null;let p=-1,y=null;i&&(y=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&y&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=y)==null||b.observe(t)})),n()}),u&&!c&&y.observe(u),y.observe(t));let m,h=c?eg(e):null;c&&x();function x(){const v=eg(e);h&&(v.x!==h.x||v.y!==h.y||v.width!==h.width||v.height!==h.height)&&n(),h=v,m=requestAnimationFrame(x)}return n(),()=>{var v;d.forEach(g=>{o&&g.removeEventListener("scroll",n),s&&g.removeEventListener("resize",n)}),f==null||f(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(m)}}var wd=w.useLayoutEffect,CP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],al=function(){};function EP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function RP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var s=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&s.push("".concat(EP(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var tg=function(t){return DP(t)?t.filter(Boolean):Dr(t)==="object"&&t!==null?[t]:[]},Yb=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=gn(t,CP);return K({},n)},Oe=function(t,n,r){var o=t.cx,s=t.getStyles,i=t.getClassNames,l=t.className;return{css:s(n,t),className:o(r??{},i(n,t),l)}};function NP(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function Jl(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function kP(e){return Jl(e)?window.innerHeight:e.clientHeight}function Qb(e){return Jl(e)?window.pageYOffset:e.scrollTop}function ll(e,t){if(Jl(e)){window.scrollTo(0,t);return}e.scrollTop=t}function TP(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function OP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Li(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:al,o=Qb(e),s=t-o,i=10,l=0;function c(){l+=i;var u=OP(l,o,s,n);ll(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function ng(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?ll(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&ll(e,Math.max(t.offsetTop-o,0))}function PP(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function rg(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function IP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var Xb=!1,$P={get passive(){return Xb=!0}},Ui=typeof window<"u"?window:{};Ui.addEventListener&&Ui.removeEventListener&&(Ui.addEventListener("p",al,$P),Ui.removeEventListener("p",al,!1));var AP=Xb;function MP(e){return e!=null}function DP(e){return Array.isArray(e)}function Vi(e,t,n){return e?t:n}var FP=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var s=Object.entries(t).filter(function(i){var l=Ue(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=Ue(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},LP=["children","innerProps"],UP=["children","innerProps"];function VP(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=TP(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),y=p.bottom,m=p.height,h=p.top,x=n.offsetParent.getBoundingClientRect(),v=x.top,g=i?window.innerHeight:kP(c),b=Qb(c),S=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),j=v-_,C=g-h,E=j+b,N=f-b-h,R=y-g+b+S,T=b+h-_,k=160;switch(o){case"auto":case"bottom":if(C>=m)return{placement:"bottom",maxHeight:t};if(N>=m&&!i)return s&&Li(c,R,k),{placement:"bottom",maxHeight:t};if(!i&&N>=r||i&&C>=r){s&&Li(c,R,k);var P=i?C-S:N-S;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var M=t,D=i?j:E;return D>=r&&(M=Math.min(D-S-l,t)),{placement:"top",maxHeight:M}}if(o==="bottom")return s&&ll(c,R),{placement:"bottom",maxHeight:t};break;case"top":if(j>=m)return{placement:"top",maxHeight:t};if(E>=m&&!i)return s&&Li(c,T,k),{placement:"top",maxHeight:t};if(!i&&E>=r||i&&j>=r){var V=t;return(!i&&E>=r||i&&j>=r)&&(V=i?j-_:E-_),s&&Li(c,T,k),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function BP(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Zb=function(t){return t==="auto"?"bottom":t},zP=function(t,n){var r,o=t.placement,s=t.theme,i=s.borderRadius,l=s.spacing,c=s.colors;return K((r={label:"menu"},so(r,BP(o),"100%"),so(r,"position","absolute"),so(r,"width","100%"),so(r,"zIndex",1),r),n?{}:{backgroundColor:c.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:l.menuGutter,marginTop:l.menuGutter})},Jb=w.createContext(null),qP=function(t){var n=t.children,r=t.minMenuHeight,o=t.maxMenuHeight,s=t.menuPlacement,i=t.menuPosition,l=t.menuShouldScrollIntoView,c=t.theme,u=w.useContext(Jb)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),y=Ue(p,2),m=y[0],h=y[1],x=w.useState(null),v=Ue(x,2),g=v[0],b=v[1],S=c.spacing.controlHeight;return wd(function(){var _=f.current;if(_){var j=i==="fixed",C=l&&!j,E=VP({maxHeight:o,menuEl:_,minHeight:r,placement:s,shouldScroll:C,isFixedPosition:j,controlHeight:S});h(E.maxHeight),b(E.placement),d==null||d(E.placement)}},[o,s,i,l,r,d,S]),n({ref:f,placerProps:K(K({},t),{},{placement:g||Zb(s),maxHeight:m})})},HP=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return G("div",Y({},Oe(t,"menu",{menu:!0}),{ref:r},o),n)},WP=HP,KP=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return K({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},GP=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return G("div",Y({},Oe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},ew=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return K({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},YP=ew,QP=ew,XP=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=gn(t,LP);return G("div",Y({},Oe(K(K({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},ZP=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=gn(t,UP);return G("div",Y({},Oe(K(K({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},JP=function(t){var n=t.rect,r=t.offset,o=t.position;return{left:n.left,position:o,top:r,width:n.width,zIndex:1}},eI=function(t){var n=t.appendTo,r=t.children,o=t.controlElement,s=t.innerProps,i=t.menuPlacement,l=t.menuPosition,c=w.useRef(null),u=w.useRef(null),d=w.useState(Zb(i)),f=Ue(d,2),p=f[0],y=f[1],m=w.useMemo(function(){return{setPortalPlacement:y}},[]),h=w.useState(null),x=Ue(h,2),v=x[0],g=x[1],b=w.useCallback(function(){if(o){var C=PP(o),E=l==="fixed"?0:window.pageYOffset,N=C[p]+E;(N!==(v==null?void 0:v.offset)||C.left!==(v==null?void 0:v.rect.left)||C.width!==(v==null?void 0:v.rect.width))&&g({offset:N,rect:C})}},[o,l,p,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);wd(function(){b()},[b]);var S=w.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&c.current&&(u.current=jP(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);wd(function(){S()},[S]);var _=w.useCallback(function(C){c.current=C,S()},[S]);if(!n&&l!=="fixed"||!v)return null;var j=G("div",Y({ref:_},Oe(K(K({},t),{},{offset:v.offset,position:l,rect:v.rect}),"menuPortal",{"menu-portal":!0}),s),r);return G(Jb.Provider,{value:m},n?Cf.createPortal(j,n):j)},tI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},nI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return G("div",Y({},Oe(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},rI=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return K({alignItems:"center",display:o&&s&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},oI=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return G("div",Y({},Oe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},sI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},iI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Oe(t,"indicatorsContainer",{indicators:!0}),r),n)},og,aI=["size"],lI=["innerProps","isRtl","size"],cI={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},tw=function(t){var n=t.size,r=gn(t,aI);return G("svg",Y({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:cI},r))},wp=function(t){return G(tw,Y({size:20},t),G("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},nw=function(t){return G(tw,Y({size:20},t),G("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},rw=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return K({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},uI=rw,dI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Oe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||G(nw,null))},fI=rw,pI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Oe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||G(wp,null))},hI=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return K({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},mI=function(t){var n=t.innerProps;return G("span",Y({},n,Oe(t,"indicatorSeparator",{"indicator-separator":!0})))},gI=dP(og||(og=fP([`
68
68
  0%, 80%, 100% { opacity: 0; }
69
69
  40% { opacity: 1; }
70
- `]))),y$=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,i=s.colors,l=s.spacing.baseUnit;return H({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:l*2})},Hc=function(t){var n=t.delay,r=t.offset;return K("span",{css:yp({animation:"".concat(v$," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},x$=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=mn(t,c$);return K("div",G({},Te(H(H({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),K(Hc,{delay:0,offset:r}),K(Hc,{delay:160,offset:!0}),K(Hc,{delay:320,offset:!r}))},b$=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,i=s.colors,l=s.borderRadius,c=s.spacing;return H({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:o?i.primary:i.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},w$=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,i=t.innerProps,l=t.menuIsOpen;return K("div",G({ref:s},Te(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":r||void 0}),n)},S$=w$,_$=["data"],j$=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},C$=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,i=t.Heading,l=t.headingProps,c=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return K("div",G({},Te(t,"group",{group:!0}),c),K(i,G({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:s,cx:r}),u),K("div",null,n))},E$=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return H({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},R$=function(t){var n=Xb(t);n.data;var r=mn(n,_$);return K("div",G({},Te(t,"groupHeading",{"group-heading":!0}),r))},N$=C$,k$=["innerRef","isDisabled","isHidden","inputClassName"],T$=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,i=s.spacing,l=s.colors;return H(H({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},O$),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},iw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},O$={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":H({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},iw)},P$=function(t){return H({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},iw)},$$=function(t){var n=t.cx,r=t.value,o=Xb(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=mn(o,k$);return K("div",G({},Te(t,"input",{"input-container":!0}),{"data-value":r||""}),K("input",G({className:n({input:!0},c),ref:s,style:P$(l),disabled:i},u)))},I$=$$,A$=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors;return H({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},M$=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return H({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},D$=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors,l=t.isFocused;return H({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:l?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},aw=function(t){var n=t.children,r=t.innerProps;return K("div",r,n)},F$=aw,L$=aw;function U$(e){var t=e.children,n=e.innerProps;return K("div",G({role:"button"},n),t||K(Sp,{size:14}))}var V$=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,i=t.isDisabled,l=t.removeProps,c=t.selectProps,u=r.Container,d=r.Label,f=r.Remove;return K(u,{data:o,innerProps:H(H({},Te(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},K(d,{data:o,innerProps:H({},Te(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),K(f,{data:o,innerProps:H(H({},Te(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},B$=V$,z$=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.theme,l=i.spacing,c=i.colors;return H({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},q$=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.innerRef,l=t.innerProps;return K("div",G({},Te(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},l),n)},H$=q$,W$=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return H({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},K$=function(t){var n=t.children,r=t.innerProps;return K("div",G({},Te(t,"placeholder",{placeholder:!0}),r),n)},G$=K$,Y$=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,i=o.colors;return H({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?i.neutral40:i.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},Q$=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return K("div",G({},Te(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},X$=Q$,Z$={ClearIndicator:h$,Control:S$,DropdownIndicator:f$,DownChevron:ow,CrossIcon:Sp,Group:N$,GroupHeading:R$,IndicatorsContainer:a$,IndicatorSeparator:g$,Input:I$,LoadingIndicator:x$,Menu:KP,MenuList:YP,MenuPortal:t$,LoadingMessage:JP,NoOptionsMessage:ZP,MultiValue:B$,MultiValueContainer:F$,MultiValueLabel:L$,MultiValueRemove:U$,Option:H$,Placeholder:G$,SelectContainer:r$,SingleValue:X$,ValueContainer:s$},J$=function(t){return H(H({},Z$),t.components)},sg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function eI(e,t){return!!(e===t||sg(e)&&sg(t))}function tI(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!eI(e[n],t[n]))return!1;return!0}function nI(e,t){t===void 0&&(t=tI);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}var rI={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},oI=function(t){return K("span",G({css:rI},t))},ig=oI,sI={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,i=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,i=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return i?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,i=s===void 0?"":s,l=t.selectValue,c=t.isDisabled,u=t.isSelected,d=t.isAppleDevice,f=function(h,x){return h&&h.length?"".concat(h.indexOf(x)+1," of ").concat(h.length):""};if(n==="value"&&l)return"value ".concat(i," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var p=c?" disabled":"",y="".concat(u?" selected":"").concat(p);return"".concat(i).concat(y,", ").concat(f(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},iI=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,i=t.isFocused,l=t.selectValue,c=t.selectProps,u=t.id,d=t.isAppleDevice,f=c.ariaLiveMessages,p=c.getOptionLabel,y=c.inputValue,m=c.isMulti,h=c.isOptionDisabled,x=c.isSearchable,v=c.menuIsOpen,g=c.options,b=c.screenReaderStatus,S=c.tabSelectsValue,_=c.isLoading,j=c["aria-label"],C=c["aria-live"],E=w.useMemo(function(){return H(H({},sI),f||{})},[f]),N=w.useMemo(function(){var F="";if(n&&E.onChange){var V=n.option,Q=n.options,O=n.removedValue,L=n.removedValues,A=n.value,W=function(pe){return Array.isArray(pe)?null:pe},U=O||V||W(A),Y=U?p(U):"",Z=Q||L||void 0,J=Z?Z.map(p):[],X=H({isDisabled:U&&h(U,l),label:Y,labels:J},n);F=E.onChange(X)}return F},[n,E,h,l,p]),R=w.useMemo(function(){var F="",V=r||o,Q=!!(r&&l&&l.includes(r));if(V&&E.onFocus){var O={focused:V,label:p(V),isDisabled:h(V,l),isSelected:Q,options:s,context:V===r?"menu":"value",selectValue:l,isAppleDevice:d};F=E.onFocus(O)}return F},[r,o,p,h,E,s,l,d]),T=w.useMemo(function(){var F="";if(v&&g.length&&!_&&E.onFilter){var V=b({count:s.length});F=E.onFilter({inputValue:y,resultsMessage:V})}return F},[s,y,v,E,g,b,_]),k=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var F="";if(E.guidance){var V=o?"value":v?"menu":"input";F=E.guidance({"aria-label":j,context:V,isDisabled:r&&h(r,l),isMulti:m,isSearchable:x,tabSelectsValue:S,isInitialFocus:k})}return F},[j,r,o,m,h,x,v,E,l,S,k]),D=K(w.Fragment,null,K("span",{id:"aria-selection"},N),K("span",{id:"aria-focused"},R),K("span",{id:"aria-results"},T),K("span",{id:"aria-guidance"},P));return K(w.Fragment,null,K(ig,{id:u},k&&D),K(ig,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&D))},aI=iI,_d=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],lI=new RegExp("["+_d.map(function(e){return e.letters}).join("")+"]","g"),lw={};for(var Wc=0;Wc<_d.length;Wc++)for(var Kc=_d[Wc],Gc=0;Gc<Kc.letters.length;Gc++)lw[Kc.letters[Gc]]=Kc.base;var cw=function(t){return t.replace(lI,function(n){return lw[n]})},cI=nI(cw),ag=function(t){return t.replace(/^\s+|\s+$/g,"")},uI=function(t){return"".concat(t.label," ").concat(t.value)},dI=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=H({ignoreCase:!0,ignoreAccents:!0,stringify:uI,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,c=o.trim,u=o.matchFrom,d=c?ag(r):r,f=c?ag(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=cI(d),f=cw(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},fI=["innerRef"];function pI(e){var t=e.innerRef,n=mn(e,fI),r=LP(n,"onExited","in","enter","exit","appear");return K("input",G({ref:t},r,{css:yp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var hI=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function mI(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,i=w.useRef(!1),l=w.useRef(!1),c=w.useRef(0),u=w.useRef(null),d=w.useCallback(function(x,v){if(u.current!==null){var g=u.current,b=g.scrollTop,S=g.scrollHeight,_=g.clientHeight,j=u.current,C=v>0,E=S-_-b,N=!1;E>v&&i.current&&(r&&r(x),i.current=!1),C&&l.current&&(s&&s(x),l.current=!1),C&&v>E?(n&&!i.current&&n(x),j.scrollTop=S,N=!0,i.current=!0):!C&&-v>b&&(o&&!l.current&&o(x),j.scrollTop=0,N=!0,l.current=!0),N&&hI(x)}},[n,r,o,s]),f=w.useCallback(function(x){d(x,x.deltaY)},[d]),p=w.useCallback(function(x){c.current=x.changedTouches[0].clientY},[]),y=w.useCallback(function(x){var v=c.current-x.changedTouches[0].clientY;d(x,v)},[d]),m=w.useCallback(function(x){if(x){var v=MP?{passive:!1}:!1;x.addEventListener("wheel",f,v),x.addEventListener("touchstart",p,v),x.addEventListener("touchmove",y,v)}},[y,p,f]),h=w.useCallback(function(x){x&&(x.removeEventListener("wheel",f,!1),x.removeEventListener("touchstart",p,!1),x.removeEventListener("touchmove",y,!1))},[y,p,f]);return w.useEffect(function(){if(t){var x=u.current;return m(x),function(){h(x)}}},[t,m,h]),function(x){u.current=x}}var lg=["boxSizing","height","overflow","paddingRight","position"],cg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ug(e){e.preventDefault()}function dg(e){e.stopPropagation()}function fg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function pg(){return"ontouchstart"in window||navigator.maxTouchPoints}var hg=!!(typeof window<"u"&&window.document&&window.document.createElement),rs=0,Kr={capture:!1,passive:!1};function gI(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=w.useRef({}),s=w.useRef(null),i=w.useCallback(function(c){if(hg){var u=document.body,d=u&&u.style;if(r&&lg.forEach(function(m){var h=d&&d[m];o.current[m]=h}),r&&rs<1){var f=parseInt(o.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,y=window.innerWidth-p+f||0;Object.keys(cg).forEach(function(m){var h=cg[m];d&&(d[m]=h)}),d&&(d.paddingRight="".concat(y,"px"))}u&&pg()&&(u.addEventListener("touchmove",ug,Kr),c&&(c.addEventListener("touchstart",fg,Kr),c.addEventListener("touchmove",dg,Kr))),rs+=1}},[r]),l=w.useCallback(function(c){if(hg){var u=document.body,d=u&&u.style;rs=Math.max(rs-1,0),r&&rs<1&&lg.forEach(function(f){var p=o.current[f];d&&(d[f]=p)}),u&&pg()&&(u.removeEventListener("touchmove",ug,Kr),c&&(c.removeEventListener("touchstart",fg,Kr),c.removeEventListener("touchmove",dg,Kr)))}},[r]);return w.useEffect(function(){if(t){var c=s.current;return i(c),function(){l(c)}}},[t,i,l]),function(c){s.current=c}}var vI=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},yI={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function xI(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,i=e.onBottomLeave,l=e.onTopArrive,c=e.onTopLeave,u=mI({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=gI({isEnabled:n}),f=function(y){u(y),d(y)};return K(w.Fragment,null,n&&K("div",{onClick:vI,css:yI}),t(f))}var bI={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},wI=function(t){var n=t.name,r=t.onFocus;return K("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:bI,value:"",onChange:function(){}})},SI=wI;function _p(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function _I(){return _p(/^iPhone/i)}function uw(){return _p(/^Mac/i)}function jI(){return _p(/^iPad/i)||uw()&&navigator.maxTouchPoints>1}function CI(){return _I()||jI()}function EI(){return uw()||CI()}var RI=function(t){return t.label},NI=function(t){return t.label},kI=function(t){return t.value},TI=function(t){return!!t.isDisabled},OI={clearIndicator:p$,container:n$,control:b$,dropdownIndicator:d$,group:j$,groupHeading:E$,indicatorsContainer:i$,indicatorSeparator:m$,input:T$,loadingIndicator:y$,loadingMessage:XP,menu:qP,menuList:GP,menuPortal:e$,multiValue:A$,multiValueLabel:M$,multiValueRemove:D$,noOptionsMessage:QP,option:z$,placeholder:W$,singleValue:Y$,valueContainer:o$},PI={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},$I=4,dw=4,II=38,AI=dw*2,MI={baseUnit:dw,controlHeight:II,menuGutter:AI},Yc={borderRadius:$I,colors:PI,spacing:MI},DI={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:rg(),captureMenuScroll:!rg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:dI(),formatGroupLabel:RI,getOptionLabel:NI,getOptionValue:kI,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:TI,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!IP(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function mg(e,t,n,r){var o=hw(e,t,n),s=mw(e,t,n),i=pw(e,t),l=ul(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:i,value:l,index:r}}function fa(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,l){return mg(e,i,t,l)}).filter(function(i){return vg(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=mg(e,n,t,r);return vg(e,s)?s:void 0}).filter(DP)}function fw(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,up(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function gg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,up(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function FI(e,t){return fw(fa(e,t))}function vg(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!vw(e)||!s)&&gw(e,{label:i,value:l,data:o},r)}function LI(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function UI(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Qc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},pw=function(t,n){return t.getOptionLabel(n)},ul=function(t,n){return t.getOptionValue(n)};function hw(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function mw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=ul(e,t);return n.some(function(o){return ul(e,o)===r})}function gw(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var vw=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},VI=1,jp=function(e){oO(n,e);var t=aO(n);function n(r){var o;if(nO(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=EI(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,u){var d=o.props,f=d.onChange,p=d.name;u.name=p,o.ariaOnChange(c,u),f(c,u)},o.setValue=function(c,u,d){var f=o.props,p=f.closeMenuOnSelect,y=f.isMulti,m=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:m}),p&&(o.setState({inputIsHiddenAfterUpdate:!y}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:u,option:d})},o.selectOption=function(c){var u=o.props,d=u.blurInputOnSelect,f=u.isMulti,p=u.name,y=o.state.selectValue,m=f&&o.isOptionSelected(c,y),h=o.isOptionDisabled(c,y);if(m){var x=o.getOptionValue(c);o.setValue(y.filter(function(v){return o.getOptionValue(v)!==x}),"deselect-option",c)}else if(!h)f?o.setValue([].concat(up(y),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:p});return}d&&o.blurInput()},o.removeValue=function(c){var u=o.props.isMulti,d=o.state.selectValue,f=o.getOptionValue(c),p=d.filter(function(m){return o.getOptionValue(m)!==f}),y=Vi(u,p,p[0]||null);o.onChange(y,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Vi(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,u=o.state.selectValue,d=u[u.length-1],f=u.slice(0,u.length-1),p=Vi(c,f,f[0]||null);o.onChange(p,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(c){return Qc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return gg(fa(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return NP.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return pw(o.props,c)},o.getOptionValue=function(c){return ul(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=OI[c](u,d);f.boxSizing="border-box";var p=o.props.styles[c];return p?p(f,u):f},o.getClassNames=function(c,u){var d,f;return(d=(f=o.props.classNames)[c])===null||d===void 0?void 0:d.call(f,u)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return J$(o.props)},o.buildCategorizedOptions=function(){return fa(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return fw(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,u){o.setState({ariaSelection:H({value:c},u)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var u=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():u&&o.openMenu("first"):(u&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var u=o.props,d=u.isMulti,f=u.menuIsOpen;o.focusInput(),f?(o.setState({inputIsHiddenAfterUpdate:!d}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&ec(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var u=c.touches,d=u&&u.item(0);d&&(o.initialTouchX=d.clientX,o.initialTouchY=d.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var u=c.touches,d=u&&u.item(0);if(d){var f=Math.abs(d.clientX-o.initialTouchX),p=Math.abs(d.clientY-o.initialTouchY),y=5;o.userIsDragging=f>y||p>y}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var u=o.props.inputValue,d=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(d,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var u=o.getFocusableOptions(),d=u.indexOf(c);o.setState({focusedOption:c,focusedOptionId:d>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return vw(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var u=o.props,d=u.isMulti,f=u.backspaceRemovesValue,p=u.escapeClearsValue,y=u.inputValue,m=u.isClearable,h=u.isDisabled,x=u.menuIsOpen,v=u.onKeyDown,g=u.tabSelectsValue,b=u.openMenuOnFocus,S=o.state,_=S.focusedOption,j=S.focusedValue,C=S.selectValue;if(!h&&!(typeof v=="function"&&(v(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||y)return;o.focusValue("previous");break;case"ArrowRight":if(!d||y)return;o.focusValue("next");break;case"Delete":case"Backspace":if(y)return;if(j)o.removeValue(j);else{if(!f)return;d?o.popValue():m&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!x||!g||!_||b&&o.isOptionSelected(_,C))return;o.selectOption(_);break;case"Enter":if(c.keyCode===229)break;if(x){if(!_||o.isComposing)return;o.selectOption(_);break}return;case"Escape":x?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:y}),o.onMenuClose()):m&&p&&o.clearValue();break;case" ":if(y)return;if(!x){o.openMenu("first");break}if(!_)return;o.selectOption(_);break;case"ArrowUp":x?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":x?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!x)return;o.focusOption("pageup");break;case"PageDown":if(!x)return;o.focusOption("pagedown");break;case"Home":if(!x)return;o.focusOption("first");break;case"End":if(!x)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++VI),o.state.selectValue=tg(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),l=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=i[l],o.state.focusedOptionId=Qc(s,i[l])}return o}return rO(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&ng(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,i=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!i&&o.isDisabled||c&&l&&!o.menuIsOpen)&&this.focusInput(),c&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(ng(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,i=this.state,l=i.selectValue,c=i.isFocused,u=this.buildFocusableOptions(),d=o==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d],focusedOptionId:this.getFocusedOptionId(u[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,i=s.selectValue,l=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=i.indexOf(l);l||(c=-1);var u=i.length-1,d=-1;if(i.length){switch(o){case"previous":c===0?d=0:c===-1?d=u:d=c-1;break;case"next":c>-1&&c<u&&(d=c+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:i[d]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,i=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var c=0,u=l.indexOf(i);i||(u=-1),o==="up"?c=u>0?u-1:l.length-1:o==="down"?c=(u+1)%l.length:o==="pageup"?(c=u-s,c<0&&(c=0)):o==="pagedown"?(c=u+s,c>l.length-1&&(c=l.length-1)):o==="last"&&(c=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Yc):H(H({},Yc),this.props.theme):Yc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,i=this.getStyles,l=this.getClassNames,c=this.getValue,u=this.selectOption,d=this.setValue,f=this.props,p=f.isMulti,y=f.isRtl,m=f.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:h,isMulti:p,isRtl:y,options:m,selectOption:u,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,i=o.isMulti;return s===void 0?i:s}},{key:"isOptionDisabled",value:function(o,s){return hw(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return mw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return gw(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:i,selectValue:l})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,i=o.isSearchable,l=o.inputId,c=o.inputValue,u=o.tabIndex,d=o.form,f=o.menuIsOpen,p=o.required,y=this.getComponents(),m=y.Input,h=this.state,x=h.inputIsHidden,v=h.ariaSelection,g=this.commonProps,b=l||this.getElementId("input"),S=H(H(H({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":p,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(v==null?void 0:v.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?w.createElement(m,G({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:s,isHidden:x,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c},S)):w.createElement(pI,G({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ll,onFocus:this.onInputFocus,disabled:s,tabIndex:u,inputMode:"none",form:d,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),i=s.MultiValue,l=s.MultiValueContainer,c=s.MultiValueLabel,u=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,p=this.commonProps,y=this.props,m=y.controlShouldRenderValue,h=y.isDisabled,x=y.isMulti,v=y.inputValue,g=y.placeholder,b=this.state,S=b.selectValue,_=b.focusedValue,j=b.isFocused;if(!this.hasValue()||!m)return v?null:w.createElement(f,G({},p,{key:"placeholder",isDisabled:h,isFocused:j,innerProps:{id:this.getElementId("placeholder")}}),g);if(x)return S.map(function(E,N){var R=E===_,T="".concat(o.getOptionLabel(E),"-").concat(o.getOptionValue(E));return w.createElement(i,G({},p,{components:{Container:l,Label:c,Remove:u},isFocused:R,isDisabled:h,key:T,index:N,removeProps:{onClick:function(){return o.removeValue(E)},onTouchEnd:function(){return o.removeValue(E)},onMouseDown:function(P){P.preventDefault()}},data:E}),o.formatOptionLabel(E,"value"))});if(v)return null;var C=S[0];return w.createElement(d,G({},p,{data:C,isDisabled:h}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(s,G({},i,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!s||!u)return null;var f={"aria-hidden":"true"};return w.createElement(s,G({},i,{innerProps:f,isDisabled:c,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,i=o.IndicatorSeparator;if(!s||!i)return null;var l=this.commonProps,c=this.props.isDisabled,u=this.state.isFocused;return w.createElement(i,G({},l,{isDisabled:c,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var i=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(s,G({},i,{innerProps:u,isDisabled:l,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),i=s.Group,l=s.GroupHeading,c=s.Menu,u=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,p=s.NoOptionsMessage,y=s.Option,m=this.commonProps,h=this.state.focusedOption,x=this.props,v=x.captureMenuScroll,g=x.inputValue,b=x.isLoading,S=x.loadingMessage,_=x.minMenuHeight,j=x.maxMenuHeight,C=x.menuIsOpen,E=x.menuPlacement,N=x.menuPosition,R=x.menuPortalTarget,T=x.menuShouldBlockScroll,k=x.menuShouldScrollIntoView,P=x.noOptionsMessage,D=x.onMenuScrollToTop,F=x.onMenuScrollToBottom;if(!C)return null;var V=function(Y,Z){var J=Y.type,X=Y.data,se=Y.isDisabled,pe=Y.isSelected,M=Y.label,z=Y.value,ve=h===X,ee=se?void 0:function(){return o.onOptionHover(X)},Oe=se?void 0:function(){return o.selectOption(X)},De="".concat(o.getElementId("option"),"-").concat(Z),ie={id:De,onClick:Oe,onMouseMove:ee,onMouseOver:ee,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:pe};return w.createElement(y,G({},m,{innerProps:ie,data:X,isDisabled:se,isSelected:pe,key:De,label:M,type:J,value:z,isFocused:ve,innerRef:ve?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(Y.data,"menu"))},Q;if(this.hasOptions())Q=this.getCategorizedOptions().map(function(U){if(U.type==="group"){var Y=U.data,Z=U.options,J=U.index,X="".concat(o.getElementId("group"),"-").concat(J),se="".concat(X,"-heading");return w.createElement(i,G({},m,{key:X,data:Y,options:Z,Heading:l,headingProps:{id:se,data:U.data},label:o.formatGroupLabel(U.data)}),U.options.map(function(pe){return V(pe,"".concat(J,"-").concat(pe.index))}))}else if(U.type==="option")return V(U,"".concat(U.index))});else if(b){var O=S({inputValue:g});if(O===null)return null;Q=w.createElement(f,m,O)}else{var L=P({inputValue:g});if(L===null)return null;Q=w.createElement(p,m,L)}var A={minMenuHeight:_,maxMenuHeight:j,menuPlacement:E,menuPosition:N,menuShouldScrollIntoView:k},W=w.createElement(HP,G({},m,A),function(U){var Y=U.ref,Z=U.placerProps,J=Z.placement,X=Z.maxHeight;return w.createElement(c,G({},m,A,{innerRef:Y,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:J}),w.createElement(xI,{captureEnabled:v,onTopArrive:D,onBottomArrive:F,lockEnabled:T},function(se){return w.createElement(u,G({},m,{innerRef:function(M){o.getMenuListRef(M),se(M)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:X,focusedOption:h}),Q)}))});return R||N==="fixed"?w.createElement(d,G({},m,{appendTo:R,controlElement:this.controlRef,menuPlacement:E,menuPosition:N}),W):W}},{key:"renderFormField",value:function(){var o=this,s=this.props,i=s.delimiter,l=s.isDisabled,c=s.isMulti,u=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return w.createElement(SI,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(c)if(i){var p=f.map(function(h){return o.getOptionValue(h)}).join(i);return w.createElement("input",{name:u,type:"hidden",value:p})}else{var y=f.length>0?f.map(function(h,x){return w.createElement("input",{key:"i-".concat(x),name:u,type:"hidden",value:o.getOptionValue(h)})}):w.createElement("input",{name:u,type:"hidden",value:""});return w.createElement("div",null,y)}else{var m=f[0]?this.getOptionValue(f[0]):"";return w.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,i=s.ariaSelection,l=s.focusedOption,c=s.focusedValue,u=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return w.createElement(aI,G({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:c,isFocused:u,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,i=o.IndicatorsContainer,l=o.SelectContainer,c=o.ValueContainer,u=this.props,d=u.className,f=u.id,p=u.isDisabled,y=u.menuIsOpen,m=this.state.isFocused,h=this.commonProps=this.getCommonProps();return w.createElement(l,G({},h,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:m}),this.renderLiveRegion(),w.createElement(s,G({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:m,menuIsOpen:y}),w.createElement(c,G({},h,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(i,G({},h,{isDisabled:p}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var i=s.prevProps,l=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,u=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,p=s.instancePrefix,y=o.options,m=o.value,h=o.menuIsOpen,x=o.inputValue,v=o.isMulti,g=tg(m),b={};if(i&&(m!==i.value||y!==i.options||h!==i.menuIsOpen||x!==i.inputValue)){var S=h?FI(o,g):[],_=h?gg(fa(o,g),"".concat(p,"-option")):[],j=l?LI(s,g):null,C=UI(s,S),E=Qc(_,C);b={selectValue:g,focusedOption:C,focusedOptionId:E,focusableOptionsWithIds:_,focusedValue:j,clearFocusValueOnUpdate:!1}}var N=c!=null&&o!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=u,T=d&&f;return d&&!T&&(R={value:Vi(v,g,g[0]||null),options:g,action:"initial-input-focus"},T=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(R=null),H(H(H({},b),N),{},{prevProps:o,ariaSelection:R,prevWasFocused:T})}}]),n}(w.Component);jp.defaultProps=DI;var BI=w.forwardRef(function(e,t){var n=kb(e);return w.createElement(jp,G({ref:t},n))}),Cp=BI;const zI=`, ${new Date().getFullYear()}`;function yg({creditResource:e,resource:t,short:n=!1}){const{base:r,current:o}=t.exchangeRates;if(o.unitCost>=r.unitCost)return;const s=o.endDate?"calendar3":"people-fill",i=o.endDate?"primary":"success";let c=`${Math.round(100*(r.unitCost-o.unitCost)/r.unitCost)}% off`,u=c;if(o.endDate){const d=o.endDate?` until ${jr(o.endDate).replace(zI,"")}`:"";n||(c+=d),u+=d}else n||(c+=" for you"),u+=o.institutionType?` for researchers from ${o.institutionType}`:" for you";return u+=`: ${hx(t.unit,o.unitCost,e.name)}`,a.jsxs("span",{className:`badge text-bg-${i} ms-2`,title:u,style:{cursor:"help"},children:[a.jsx("i",{className:`bi bi-${s} me-1`}),c]})}function go({bg:e="dark",children:t,color:n="light",fontWeight:r="bold",icon:o="info-circle-fill",initial:s=!1,maxWidth:i="200px",padding:l="10px",placement:c,target:u,trigger:d="click",visible:f=!0}){const p=typeof s=="string"||s instanceof String,[y,m]=w.useState(p?localStorage.getItem(s)!="true":s),[h,x]=w.useState(!1);w.useEffect(()=>{setTimeout(()=>x(!0),100)},[]);const v=()=>{p&&localStorage.setItem(s,"true")},g=a.jsxs(Ul,{style:{"--bs-tooltip-bg":`var(--bs-${e})`,"--bs-tooltip-color":`var(--bs-${n})`,"--bs-tooltip-max-width":i,"--bs-tooltip-padding-x":l,"--bs-tooltip-padding-y":l,fontWeight:r},children:[a.jsx("button",{"aria-label":"Close",onClick:()=>{v(),m(!1)},style:{background:"transparent",border:"0 none transparent",float:"right"},children:a.jsx("i",{className:"bi bi-x-lg"})}),t]});return u&&u.current?a.jsx(Eb,{target:u.current,placement:c,show:y&&f&&h,children:g}):a.jsx(cp,{placement:c,onToggle:b=>{v(),m(b)},overlay:g,show:y&&f&&h,trigger:d,children:a.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:a.jsx("i",{className:`bi bi-${o}`})})})}function qI({resources:e}){const t=e.filter(s=>{const{base:i,current:l}=s.exchangeRates;return l.unitCost<i.unitCost});if(!t.length)return;const n=[],r=[];for(let s of t){let{name:i,favicon:l}=s.resourceProvider;n.includes(i)||(n.push(i),r.push(l))}const o=r.map((s,i)=>a.jsx("span",{className:"d-inline-block border me-1",style:{backgroundColor:"white",backgroundImage:`url(${s})`,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"16px 16px",borderRadius:"24px",height:"24px",verticalAlign:"middle",width:"24px"},title:n[i]},n[i]));return a.jsx("span",{className:"d-flex justify-content-between align-items-center p-2 border-start border-end bg-secondary-subtle text-decoration-none fw-normal",children:a.jsxs("span",{children:[o,"Browse the list below to see discounts on"," ",Ke(t.length)," ",Wa("resources",t.length)," from"," ",Ke(n.length)," ",Wa("resource providers",n.length),"!"]})})}const HI="_items_c2dbg_1",WI="_item_c2dbg_1",KI="_details_c2dbg_14",GI="_text_c2dbg_20",YI="_number_c2dbg_35",QI="_outer_c2dbg_50",XI="_inner_c2dbg_61",xn={items:HI,item:WI,details:KI,text:GI,number:YI,outer:QI,inner:XI},os=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function ZI({requestId:e,grantNumber:t,creditColorClass:n="gray-300",colorClasses:r=Ju}){const{request:o}=at(e,t);if(!o)return;let s=0,i;const l=[];for(let p of o.resources)p.isBoolean||(p.isCredit?i=p:l.push(p),s+=ed(p));const c=[],u=[];let d=-.25;const f=[...l,i].map((p,y)=>{if(!p)return null;const m=y+1,x=ed(p)/s,v=p.requested-p.used,g=Math.max(0,v),b=p.isCredit?s/p.exchangeRates.base.unitCost:p.requested,S=b==0?0:100*g/b,j=`var(--bs-${p.isCredit?n:r[y%r.length]})`;if(x>0){const C=d,E=d+x/2,N=d+=x,R=x>.5?1:0,T=[`M ${os(C,100)}`,`A 100 100 0 ${R} 1 ${os(N,100)}`,`L ${os(N,50)}`,`A 50 50 0 ${R} 0 ${os(C,50)}`].join(" "),[k,P]=os(E,75).split(" ").map(D=>parseFloat(D));c.push(a.jsx("path",{d:T,style:{fill:j}},p.resourceId)),u.push(a.jsx("circle",{cx:k,cy:P,r:"8",fill:"black"},`${p.resourceId}-circle`),a.jsx("text",{x:k-4,y:P+4,fill:"white",className:xn.number,children:m},`${p.resourceId}-text`))}return p.isCredit&&u.push(a.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:a.jsx("div",{className:xn.text,children:a.jsxs("div",{children:[a.jsx("strong",{children:Ke(g,{abbreviate:!0})}),p.unit," available"]})})},"center-text")),a.jsxs("li",{className:xn.item,children:[a.jsx("span",{className:xn.number,children:m}),a.jsx("span",{className:`${xn.outer} ms-2 me-2`,style:{borderColor:j},children:a.jsx("span",{className:xn.inner,style:{backgroundColor:j,width:`${S}%`}})}),a.jsxs("strong",{className:xn.name,children:[a.jsx(Rr,{resource:p,userGuide:!1}),": "]}),a.jsxs("span",{className:xn.details,children:[Ke(v,{abbreviate:!0})," ",p.isCredit?null:a.jsxs(a.Fragment,{children:["of ",Ke(b,{abbreviate:!0})," "]}),p.unit," ",p.isCredit?"available":"remaining"," (",Math.round(S),"%)"]})]},p.resourceId)});return a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-3 mb-3 d-flex flex-row align-items-center justify-content-center",children:a.jsxs("svg",{version:"1.1",viewBox:"-100 -100 200 200",width:"200",height:"200",xmlns:"http://www.w3.org/2000/svg",children:[c,u]})}),a.jsx("div",{className:"col-lg-9 mb-3 d-flex flex-column justify-content-center",children:a.jsx("ul",{className:xn.items,children:f})})]})}const xg=e=>e;function JI({classes:e,clean:t=xg,format:n=xg,label:r,setValue:o,style:s,value:i}){const l=n(i),[c,u]=w.useState(l);return w.useEffect(()=>{u(l)},[l]),a.jsx("input",{type:"text","aria-label":r,className:`form-control ${e}`,value:c,style:s,onChange:d=>u(d.target.value),onBlur:d=>{const f=t(d.target.value);u(n(f)),o(f)},onKeyDown:d=>{d.code=="Enter"&&(d.preventDefault(),d.target.blur())}})}function eA({requestId:e,grantNumber:t}){const{request:n,addResource:r,openUsageDetailModal:o,resetResources:s,setResourceRequest:i,setResourcesReason:l,statuses:c,toggleActionsModal:u,toggleConfirmModal:d,toggleResourcesModal:f}=at(e,t),{project:p}=Et(t||n&&n.grantNumber),y=w.useRef(null),m=w.useRef(null);if(!n||!p)return;const h="Exchange"in n.allowedActions,x="Renewal"in n.allowedActions,v="Supplement"in n.allowedActions,g=n.exchangeStatus==c.pending,b=n.exchangeStatus==c.success,S=n.exchangeStatus==c.error,_=n.exchangeErrors,j=n.exchangeActionId!==null,C=n.exchangeActionEditable,E=n.resources,N=n.resourcesReason,R={};for(let M of E)R[M.resourceId]=M;const T=()=>{mx(n)>=.75?u():d()},k=[];for(let M of E){let z=[];if(M.requested>0){for(let ve of M.requires||[]){let ee=R[ve];if(ee){if(ee.requested>0){z=[];break}z.push(ee)}}z.length&&k.push(a.jsxs("span",{children:[a.jsx(Rr,{resource:M,userGuide:!1})," requires"," ",px(z.map(ve=>a.jsx(Rr,{resource:ve,userGuide:!1},ve.resourceId)),"or"),"."]},M.resourceId))}}const P=k.length>0;let D;b?D=a.jsx(be,{color:"info",children:"Your exchange request has been submitted."}):S&&_.length>0&&_[0].includes("PI")&&_[0].includes("person status Unknown")?D=a.jsx(be,{color:"danger",children:p.currentUser.role==="pi"?a.jsxs(a.Fragment,{children:["Please"," ",a.jsx("a",{href:te.routes.profile_path(),children:"update your academic status"})," ","before making an exchange request."]}):a.jsxs(a.Fragment,{children:["The primary investigator for this project has an unknown academic status. Please ask"," ",p.users.filter(M=>M.role==="pi").map(M=>`${M.firstName} ${M.lastName}`)," ","to update the academic status in their profile, and then try again."]})}):S?D=a.jsxs(be,{color:"danger",children:["Sorry, something went wrong: ",_.join(", "),". For assistance, please"," ",a.jsx("a",{href:"https://support.access-ci.org/open-a-ticket",children:"open a help ticket"})," ","and include this message."]}):j?D=a.jsx(be,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):n.timeStatus=="current"&&!p.isManager?D=a.jsxs(be,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",Df(p)," to request a change."]}):P&&(D=a.jsxs(be,{color:"warning",children:[k," Please adjust your balance values."]}));const F=N.length>0;let V=!1,Q=!1;for(let M of E)if(M.isNew&&(V=!0),M.allocated!=M.requested&&(Q=!0),V&&Q)break;const O=E.map(M=>M.resourceId),L={},A=h&&C?n.allowedActions.Exchange.resources.filter(M=>!O.includes(M.resourceId)).map(M=>{L[M.resourceId]=M;const z=Pl(M.name),ve=z.short?`${z.short} (${z.full.replace(/ \([^(]+\)/,"")})`:z.full;return{value:M.resourceId,label:ve}}):[],W=h?n.allowedActions.Exchange.resources.map(M=>M.resourceId):[];let U;const Y=[],Z=[];for(let M of E)M.isCredit?U=M:(Y.push(M),Z.push(C&&(M.isNew||M.allocated!=M.requested)?Cr.edited:W.includes(M.resourceId)?"":Cr.disabled));const J=`Add ${Y.length?"another":"a"} resource to your exchange...`,X=M=>M.requested-M.used,se=(M,z)=>{const ve=z.allocated-z.used,ee=ho(Number(M.replace(/[^0-9-.]/g,"")),z.decimalPlaces),Oe=Math.min(0,ve);if(ee<Oe)return Oe;let De=U.requested*U.exchangeRates.base.unitCost;const ie=(z.allocated-z.requested)*z.exchangeRates.base.unitCost,Ot=Math.min(De,ie);De-=Ot;let lt=z.requested-z.used+Ot/z.exchangeRates.base.unitCost;return De>0&&(lt+=De/z.exchangeRates.current.unitCost),ee>lt?ho(lt,z.decimalPlaces,"floor"):ee},pe=[{key:"name",name:"Resource",format:(M,z)=>a.jsx(Rr,{resource:z}),width:Math.min(350,window.innerWidth*.3)},{key:"isActive",name:"Status",format:(M,z)=>a.jsx(Oo,{status:M?"Active":z.isNew?"New":"Inactive"}),width:100},{key:"unit",name:"Unit",width:150,format:(M,z)=>z.isBoolean?a.jsx(a.Fragment,{children:"—"}):[a.jsx("abbr",{title:hx(M,z.exchangeRates.base.unitCost,U.name),children:M},"base"),a.jsx(yg,{creditResource:U,resource:z,short:!0},"discount")]},{key:"used",name:"Usage",class:"text-end",format:(M,z)=>z.isBoolean?a.jsx(a.Fragment,{children:"—"}):a.jsxs(a.Fragment,{children:[Ke(M),(p.currentUser.resourceIds.includes(z.resourceId)||p.currentUser.resourceAccountInactiveIds.includes(z.resourceId))&&a.jsx(nl,{icon:"table",onClick:()=>o(z.resourceRepositoryKey),target:"_blank",title:`${z.name} Usage Details`})]})}];return h&&pe.push({key:"requested",name:"Balance",class:"text-end",rowClass:M=>C&&W.includes(M.resourceId)?Cr.input:"",format:(M,z)=>{const ve=C&&W.includes(z.resourceId);return z.isBoolean?a.jsx("input",{className:"form-check-input",type:"checkbox",checked:M==1,disabled:!ve,onChange:ee=>i(z.resourceId,ee.target.checked?1:0)}):ve?a.jsx(JI,{classes:"text-end w-100",clean:ee=>se(ee,z),format:Ke,label:`Balance for ${z.name}`,setValue:ee=>{i(z.resourceId,ee+z.used)},style:{padding:"0.1rem 0.5rem"},value:X(z)}):Ke(X(z))},formatHeader:M=>a.jsxs(a.Fragment,{children:[M,C?a.jsx(go,{bg:"secondary",color:"dark",initial:"myprojects.requestedAllocation",placement:"top-end",visible:p.tab=="resources",children:"You can increase or decrease the balance below to change your allocation on a resource. Enter the total amount you would like to have available once the exchange is complete."}):null]})}),a.jsxs("div",{className:"resources",children:[D,E.length?a.jsx(ZI,{requestId:e}):null,U&&(h||x||v)?a.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[a.jsxs("span",{children:[cr(te.resourceTypeIcons.credit)," ",Ke(U.requested,U)," ",U.unit," available to exchange"]}),x||v?a.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:T,children:[cr(te.resourceTypeIcons.credit)," Request More"," ",n.usesCredits?"Credits":"Units"]}):null]}):null,Y.length?a.jsx(Ln,{columns:pe,rows:Y,rowClasses:Z,classes:A.length?"mb-0":"",frozenColumns:2,minWidth:"800px"}):a.jsx("div",{className:"card p-2 text-bg-light p-3",children:"This project does not have any resources."}),A.length?a.jsxs(a.Fragment,{children:[a.jsx(qI,{resources:h&&n.allowedActions.Exchange.resources||[]}),a.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:y,children:a.jsx(Cp,{classNames:{control:()=>"react-select mb-1"},options:A,onChange:M=>r(M.value),placeholder:J,value:null,"aria-label":J,formatOptionLabel:({value:M,label:z})=>[z,a.jsx(yg,{creditResource:U,resource:L[M]},"discount")]})}),Y.length?null:a.jsx(go,{bg:"secondary",color:"dark",visible:p.tab=="resources",initial:!0,target:y,children:"Ready to get started? Search for a resource to add it to your project."}),a.jsxs("p",{className:"text-black-50",style:{fontSize:"0.9rem"},children:["Need help choosing a resource? Visit our"," ",a.jsx("a",{href:te.routes.resources_path(),children:"Resource Catalog"}),"."]})]}):null,h&&C?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{htmlFor:"resources-reason",className:"form-label required",children:"Please briefly explain how the requested resources and amounts will contribute to your research."}),a.jsx("textarea",{className:"form-control",id:"resources-reason",rows:"2",value:N,onChange:M=>l(M.target.value),style:{minHeight:"3rem"}})]}),a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:g||!Q&&!F&&!V,onClick:s,children:"Reset Form"}),a.jsx("button",{ref:m,type:"button",className:"btn btn-secondary",disabled:g||!Q||!F||P,onClick:f,children:g?"Submitting...":"Submit for Approval"})]}),Q&&!P?a.jsx(go,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:m,visible:p.tab=="resources",children:"When you are finished adding resources, enter a justification for the requested resources above. Then you can submit your exchange for approval."}):null]}):null]})}function tA({question:e,requestId:t,grantNumber:n}){const{request:r,setResourceQuestionValues:o}=at(t,n),s=w.useId();if(!e||!r||r.error)return;const{attributeSetId:i,attributes:l,fieldType:c,label:u,resourceId:d,values:f}=e,p=l[0],y=p.required?"required":"",m=b=>o(d,i,b.target.value?[b.target.value]:[]),h=b=>{o(d,i,Array.from(b.target.options).filter(({selected:S})=>S).map(({value:S})=>parseInt(S,10)))},x=b=>{const S=parseInt(b.target.value,10),_=b.target.checked?[...f,S]:f.filter(j=>j!=S);o(d,i,_)},v=b=>{const S=parseInt(b.target.value);o(d,i,isNaN(S)?[]:[S])};let g;if(["calendar","integer_only","text"].includes(c)){const b={calendar:"date",integer_only:"number",text:"text"}[c];g=a.jsx("input",{className:"form-control",id:s,type:b,placeholder:p.label,required:p.required,value:f[0]||"",onChange:c=="integer_only"?v:m})}else if(c=="textarea")g=a.jsx("textarea",{className:"form-control",id:s,placeholder:p.label,required:p.required,value:f[0]||"",onChange:m});else if(c=="drop_down"||l.length>=10){const b=c=="multi_sel";g=a.jsxs("select",{id:s,className:"form-select",required:p.required,multiple:b,onChange:b?h:v,value:b?f:f[0]||"",children:[b?null:a.jsx("option",{}),l.map(S=>a.jsx("option",{value:S.resourceAttributeId,children:S.label},S.resourceAttributeId))]})}else g=a.jsx("div",{id:s,children:l.map(b=>{const S=`resource-attribute-${b.resourceAttributeId}`;return a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:c=="single_sel"?"radio":"checkbox",id:S,value:b.resourceAttributeId,checked:f.includes(b.resourceAttributeId),onChange:c=="single_sel"?v:x}),a.jsx("label",{className:"form-check-label",htmlFor:S,children:b.label})]},b.resourceAttributeId)})});return a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{htmlFor:s,className:`form-label ${y}`,children:u}),g]})}function nA({requestId:e,grantNumber:t}){const{request:n,saveResources:r,toggleResourcesModal:o}=at(e,t),{project:s}=Et(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=[],l=n.resources.filter(u=>u.allocated!=u.requested).map(u=>{const d=u.requested-u.allocated;return u.questions&&i.push(...u.questions),a.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center mb-0",children:[u.name,a.jsx("span",{className:`badge bg-${d>0?"primary":"danger"} rounded-pill`,children:u.isBoolean?Mf(u.requested):a.jsxs(a.Fragment,{children:[d>0?"+":"",Ke(d,u)," ",u.unit]})})]},u.resourceId)}),c=i.some(({attributes:u,values:d})=>d.length==0&&u[0].required);return a.jsxs(ge,{size:"lg",show:n.showResourcesModal,onHide:o,scrollable:!0,children:[a.jsx(ge.Header,{closeButton:!0,children:a.jsx(ge.Title,{children:"Complete Your Exchange"})}),a.jsxs(ge.Body,{children:[a.jsx("p",{children:"Please review your exchange to make sure it includes all the resources you need. Once you submit it, you will not be able to request another exchange until this one has been processed by the resource providers."}),a.jsx("ul",{className:"list-group mb-3",children:l}),i.length?a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Resource Questions"}),a.jsx("p",{children:"Some of the resources you selected have associated questions. Please answer the questions below."}),i.map(u=>a.jsx(tA,{question:u,requestId:e,grantNumber:t},u.attributeSetId))]}):null]}),a.jsx(ge.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Continue Editing"}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:r,disabled:c,children:"Submit"})]})})]})}function yw({user:e}){const t=`${e.lastName}, ${e.firstName}`;let n=t,r=[e.organization,e.email].filter(o=>o).join(", ");return r&&(n+=`: ${r}`),a.jsx("abbr",{title:n,children:t})}function rA({requestId:e,grantNumber:t}){const{project:n}=Et(t),{request:r,closeUsageDetailModal:o}=at(e,t);if(!r||r.error||!n||n.error||!r.usageDetailStatus)return;let s,i="Usage";if(r.usageDetailStatus==Le.pending)s=a.jsx(Do,{});else if(r.usageDetailStatus==Le.error)s=a.jsx(be,{color:"danger",children:"An error occurred while loading usage data."});else{const{projectTitle:l,resourceDisplayName:c,resourceRepositoryKey:u,users:d}=r.usageDetail,{full:f,short:p}=Pl(c),y=r.resources.find(v=>v.resourceRepositoryKey==u),m=v=>Ke(v,{decimalPlaces:y?y.decimalPlaces:void 0}),h={};for(let v of n.users)h[v.username]=v;i=a.jsxs(a.Fragment,{children:["Usage: ",p||f," for ",l]});const x=[{key:"name",name:"Name",format:(v,{lastName:g,firstName:b,portalUsername:S})=>{const _=h[S];return _?a.jsx(yw,{user:_}):`${g}, ${b}`}},{key:"portalUsername",name:"Resource Username",format:v=>{const g=h[v],b=g?g.resourceUsernames[y.resourceId]:null;return b||a.jsx(a.Fragment,{children:"—"})}},{key:"role",name:"Role",format:v=>gx[v].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:m},{key:"lastMonth",name:"Last Month",class:"text-end",format:m},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:m},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:m},{key:"total",name:"All Time",class:"text-end",format:m}];s=d.length?a.jsx(Ln,{rows:d,columns:x}):a.jsx(be,{color:"info",children:"There is no usage for this resource."})}return a.jsxs(ge,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[a.jsx(ge.Header,{closeButton:!0,children:a.jsx(ge.Title,{children:i})}),a.jsx(ge.Body,{children:s})]})}var oA=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function sA(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var i=e.isLoading,l=i===void 0?!1:i,c=e.onInputChange,u=e.filterOption,d=u===void 0?null:u,f=mn(e,oA),p=f.inputValue,y=w.useRef(void 0),m=w.useRef(!1),h=w.useState(Array.isArray(n)?n:void 0),x=Ue(h,2),v=x[0],g=x[1],b=w.useState(typeof p<"u"?p:""),S=Ue(b,2),_=S[0],j=S[1],C=w.useState(n===!0),E=Ue(C,2),N=E[0],R=E[1],T=w.useState(void 0),k=Ue(T,2),P=k[0],D=k[1],F=w.useState([]),V=Ue(F,2),Q=V[0],O=V[1],L=w.useState(!1),A=Ue(L,2),W=A[0],U=A[1],Y=w.useState({}),Z=Ue(Y,2),J=Z[0],X=Z[1],se=w.useState(void 0),pe=Ue(se,2),M=pe[0],z=pe[1],ve=w.useState(void 0),ee=Ue(ve,2),Oe=ee[0],De=ee[1];o!==Oe&&(X({}),De(o)),n!==M&&(g(Array.isArray(n)?n:void 0),z(n)),w.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var ie=w.useCallback(function(gn,en){if(!s)return en();var je=s(gn,en);je&&typeof je.then=="function"&&je.then(en,function(){return en()})},[s]);w.useEffect(function(){n===!0&&ie(_,function(gn){m.current&&(g(gn||[]),R(!!y.current))})},[]);var Ot=w.useCallback(function(gn,en){var je=kP(gn,en,c);if(!je){y.current=void 0,j(""),D(""),O([]),R(!1),U(!1);return}if(o&&J[je])j(je),D(je),O(J[je]),R(!1),U(!1);else{var Vn=y.current={};j(je),R(!0),U(!P),ie(je,function(Bn){m&&Vn===y.current&&(y.current=void 0,R(!1),D(je),O(Bn||[]),U(!1),X(Bn?H(H({},J),{},io({},je,Bn)):J))})}},[o,ie,P,J,c]),lt=W?[]:_&&P?Q:v||[];return H(H({},f),{},{options:lt,isLoading:N||l,onInputChange:Ot,filterOption:d})}var iA=w.forwardRef(function(e,t){var n=sA(e),r=kb(n);return w.createElement(jp,G({ref:t},r))}),aA=iA;const bg=({description:e,disabled:t=!1,onChange:n,selectedLength:r,totalLength:o})=>{const s=w.useRef(),i=w.useId();let l=r==o,c=r>0&&!l;return w.useEffect(()=>{s.current&&(s.current.checked=l,s.current.indeterminate=c)},[l,c]),a.jsxs(a.Fragment,{children:[a.jsx("input",{className:"custom-checkbox form-check-input",disabled:t,id:i,onChange:u=>n(u.target.checked),ref:s,type:"checkbox"}),a.jsx("label",{className:"form-check-label",htmlFor:i,"aria-description":`${l?"Deselect":"Select"} ${e}`})]})};function lA({grantNumber:e,requestId:t}){const{project:n,addUser:r,resetUsers:o,saveUsers:s,setTab:i,setUserRole:l,statuses:c,toggleUsersResources:u}=Et(e),{request:d}=n?at(t||n.currentRequestId,e):{request:null};if(!n||!n.currentRequestId||!d||n.error||d.error)return;const f=n.isManager,p="Exchange"in d.allowedActions,y=n.usersStatus==c.pending,m=n.usersStatus==c.success,h=n.usersStatus==c.error,x=n.users,v=d.resources.filter(sd),g=v.length==0,b=x.find(R=>R.hasChanges)!==void 0,S=x.find(R=>R.role!="pi")!==void 0;let _;m&&!b?_=a.jsx(be,{color:"info",children:"Your changes have been saved. Creation of user accounts can take some time. Users can check the status of their accounts on the Overview tab of the My Projects page."}):h?_=a.jsx(be,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):f?v.length?g&&(_=a.jsx(be,{color:"warning",children:"This project does not have any active resources."})):_=a.jsxs(be,{color:"warning",children:["This project does not have any resources."," ",p?a.jsx("a",{href:te.routes.request_action_path(d.requestId,"new?action_type=Exchange"),onClick:R=>{R.preventDefault(),i("resources")},children:"Exchange credits for resources."}):null," ","Additional users can be added after an exchange is approved."]}):_=a.jsxs(be,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",Df(n)," to request a change."]});const j=(R,T)=>{let k,P,D,F;if(T.key=="all"){k="all resources for all users",P=V=>u(V),D=0;for(let V of x)D+=V.resourceIds.length;F=x.length*v.length}else k=`all users for ${T.name}`,P=V=>u(V,null,T.key),D=x.filter(({resourceIds:V})=>V.includes(T.key)).length,F=x.length;return a.jsxs(a.Fragment,{children:[T.key=="all"?R:a.jsx(Rr,{resource:T,userGuide:!1}),a.jsx("br",{}),a.jsx(bg,{description:k,disabled:T.disabled,onChange:P,selectedLength:D,totalLength:F})]})},C=$l.map(({role:R,name:T})=>a.jsx("option",{value:R,children:T},R)),E=[{key:"name",name:"Name",width:200,format:(R,T)=>a.jsx(yw,{user:T})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(R,T)=>a.jsx("select",{className:"form-select",value:R,onChange:k=>l(T.username,k.target.value),disabled:!f||R=="pi"||R=="co_pi",style:{position:"absolute",left:0,top:0,bottom:0,right:0,borderWidth:0},children:C.filter(k=>k.key==R||!["pi","co_pi"].includes(k.key))})}];v.length&&E.push({key:"all",name:"All Resources",class:`text-center ${Cr.important}`,disabled:!f||g,width:100,format:(R,T)=>a.jsx(bg,{description:`all users for ${T.name}`,disabled:!f||g,onChange:k=>u(k,T.username),selectedLength:T.resourceIds.length,totalLength:v.length}),formatHeader:j});for(let R of v)E.push({key:R.resourceId,name:R.name,class:"text-center",disabled:!f||!R.isActive,icon:R.icon,format:(T,k)=>a.jsx(a.Fragment,{children:a.jsx("input",{className:"form-check-input",disabled:!f||!R.isActive,onChange:P=>u(P.target.checked,k.username,R.resourceId),type:"checkbox",checked:k.resourceIds.includes(R.resourceId)})}),formatHeader:j});const N=x.map(R=>R.hasChanges?Cr.edited:"");return a.jsxs(a.Fragment,{children:[_,a.jsx(Ln,{rows:x,columns:E,frozenColumns:v.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:N,scrollRowIndex:n.usersNewRowIndex}),f&&v.length&&!g?a.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:a.jsx(aA,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await $E(R)).map(k=>({isDisabled:k.eligibility==="no",label:a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsxs("span",{className:k.eligibility==="no"?"text-decoration-line-through":"",style:{color:k.eligibility==="no"?"#707070":void 0},children:[k.username," (",k.firstName," ",k.lastName,","," ",k.organization,k.email?`, ${k.email}`:""]}),k.eligibility==="no"&&k.eligibilityReason&&a.jsxs("span",{className:"text-danger ms-2",children:[a.jsx("i",{className:"bi bi-exclamation-octagon"})," ",k.eligibilityReason]})]}),value:k})),onChange:R=>r(R.value),placeholder:"Add another user...",value:null,"aria-label":"Add another user"})}):null,f&&(v.length&&!g||S)?a.jsxs("div",{className:"d-flex mt-3",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:y||!b,onClick:o,children:"Reset Form"}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:y||!b,onClick:s,children:y?"Saving...":"Save Changes"})]}):null]})}function cA({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r,setRequest:o,setTab:s}=Et(t||n.grantNumber);if(!n)return;if(n.error)return a.jsx(be,{color:"danger",children:n.error});const i=n.timeStatus||n.actions[0].status.toLowerCase(),l=n.actions.find(({showDeleteModal:d})=>d),c=[];n.resources.length||c.push("resources"),e!=r.currentRequestId&&c.push("users");const u=(r.users||[]).filter(d=>d.eligibility==="no"&&d.role!=="user");return a.jsxs("div",{className:"request",children:[n.returnedForCorrections?a.jsxs(be,{color:"warning",children:[a.jsx("p",{children:"Your request has been returned for corrections. These are the notes from the Allocations Team"}),a.jsx("div",{className:aR.returnedForCorrectionsNotes,children:n.returnedForCorrectionsNotes}),a.jsx("p",{className:"mt-3",children:"Please address these issues by clicking the Edit button to edit your request."})]}):"",n.timeStatus!="current"&&!n.returnedForCorrections?a.jsxs(be,{color:"warning",children:["You are viewing ","aeiou".includes(i[0])?"an":"a"," ",i," request."," ",c.length?`You cannot manage ${c.join(" or ")} for this request.`:""," ",r.currentRequestId?a.jsx("a",{href:te.routes.request_path(r.currentRequestId),onClick:d=>{d.preventDefault(),o(r.currentRequestId)},children:"Go to the current request."}):null]}):null,r.isManager&&u.length>0&&a.jsxs(be,{color:"danger",children:["Some project personnel need to update their profiles. You will be unable to submit exchanges, renewals, and other actions until these issues are resolved:",a.jsx("br",{}),a.jsx("ul",{className:"fs-6 mb-0",children:u.map(d=>a.jsxs("li",{children:[a.jsxs("strong",{children:[d.firstName," ",d.lastName," (",d.username,"):"]})," ",d.eligibilityReason]},d.username))})]}),a.jsxs(vN,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx($i,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(QT,{requestId:e,grantNumber:t})}),a.jsx($i,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(eA,{requestId:e})}),a.jsx($i,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx(lA,{grantNumber:t})}),a.jsx($i,{eventKey:"history",title:"History",children:a.jsx(CT,{requestId:e})})]}),a.jsx(wT,{grantNumber:t,requestId:e}),a.jsx(ST,{grantNumber:t,requestId:e}),a.jsx(_T,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(nA,{grantNumber:t,requestId:e}),a.jsx(rA,{grantNumber:t,requestId:e})]})}function uA({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleDeleteModal:o}=at(e,t);if(!n)return;const{actions:s,allowedActions:i}=n,l=[];i&&(("Extension"in i||"Renewal"in i)&&l.push(["Extend End Date",u=>{u.preventDefault(),r()},"calendar-plus"]),"Final Report"in i&&l.push(["Submit Final Report",`${te.routes.request_action_path(e,"new")}?action_type=Final+Report`,"file-earmark-check"]));const c=s.find(u=>u.isRequest);if(c){const u=c.allowedOperations||[];u.includes("Edit")&&l.push(["Edit",te.routes.edit_request_path(n.requestId),"pencil"]),u.includes("Delete")&&l.push(["Delete",d=>{d.preventDefault(),o(c.actionId)},"trash","danger"])}return l.map(([u,d,f,p])=>{const y=a.jsxs(a.Fragment,{children:[" ",f&&a.jsx("i",{className:`bi bi-${f} me-1`}),u]});return typeof d=="function"?a.jsx("button",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,onClick:d,children:y},u):a.jsx("a",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,href:d,children:y},u)})}function dA({open:e=!1,grantNumber:t,title:n,status:r}){const[o,s]=w.useState(e),{project:i,setRequest:l}=Et(t,!o&&n&&r&&!0),c=`project-${t}`;let u=null;if(o&&i)if(i.error)u=a.jsx(be,{color:"danger",children:i.error});else{let d;const f=i.requestsList.map(p=>(p.requestId==i.selectedRequestId&&(d=p),a.jsx("option",{value:p.requestId,children:Af(p)},p.requestId)));u=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"d-flex",children:[a.jsx("select",{className:"form-select","aria-label":"Select a request to display",onChange:p=>l(parseInt(p.target.value,10)),value:i.selectedRequestId,disabled:f.length<2,children:f}),a.jsx(uA,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(cA,{...d,grantNumber:t}):null]})}return a.jsxs("div",{className:`${vm.project} card mb-3`,children:[a.jsxs("div",{className:`card-header d-flex justify-content-between ${o?"":"border-bottom-0"}`,children:[a.jsx("button",{"aria-expanded":o,"aria-controls":c,className:vm.expand,onClick:()=>s(!o),children:a.jsxs("h2",{className:"mb-1 mt-1 text-start",children:[a.jsx("i",{className:`bi bi-caret-${o?"down":"right"}-fill`})," ",/^[A-Z]/.test(t)?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"grant-number",children:[t,":"]})," "]}):null,n||i.title]})}),a.jsx(Oo,{status:r||i.status})]}),a.jsx("div",{className:"card-body",id:c,hidden:!o||!i,children:u})]})}function fA({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=rR(e);if(r)return a.jsx(Do,{});if(n)return a.jsxs(be,{color:"danger",children:[n," ",a.jsx("a",{href:"#",onClick:i=>{i.preventDefault(),window.location.reload()},children:"Reload the page"})," ","to try again."]});if(!o.length)return a.jsxs("div",{className:"pt-5 pb-5 text-bg-light border border-light-subtle",children:[a.jsx("p",{className:"fs-2 text-center mb-4",children:"You don't have any projects yet."}),a.jsxs("div",{className:"d-flex gap-2 justify-content-center",children:[a.jsxs("a",{className:"btn btn-primary w-25",href:te.routes.project_types_path(),children:[a.jsx("i",{className:"bi bi-boxes fs-1 d-block"})," Learn about Project Types"]}),a.jsxs("a",{className:"btn btn-secondary w-25",href:te.routes.get_your_first_project_path(),children:[a.jsx("i",{className:"bi bi-cpu fs-1 d-block"})," Learn How to Get Your"," ",a.jsx("br",{className:"d-none d-xxl-inline"})," First Project"]}),a.jsxs("a",{className:"btn btn-primary w-25",href:te.routes.how_to_path(),children:[a.jsx("i",{className:"bi bi-person-plus fs-1 d-block"})," Learn How to Join an Existing Project"]})]})]});const s=new URLSearchParams(window.location.hash.slice(1)).get("grantNumber");return o.map((i,l)=>a.jsx(dA,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const xw={apiUrl:null,listIsFiltered:!1,pages:1,projects:[],projectsLoaded:!1,filtersLoaded:!0,showPagination:!1,singleEntry:!1,filters:{org:"",allocationType:"",allFosToggled:!0,resource:"",requestNumber:""},pageData:{current_page:1,last_page:1},typeLists:{orgs:[],fosTypes:[],allocationTypes:[],resources:[]}},pA=Qe("projectsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{const r=window.location.search,o=new URLSearchParams(r);o.has("_requestNumber")&&(n(Ed({name:"requestNumber",value:o.get("_requestNumber")})),n(ww(!0))),await n(jd()),await n(Nr()),n(hA())}),hA=Qe("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(bw({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),jd=Qe("projectsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().projectsBrowser.apiUrl}?filters=1`,i=await(await fetch(o)).json();n(bw(i.filters))}),Nr=Qe("projectsBrowser/getProjects",async(e,{getState:t,dispatch:n})=>{const r=t().projectsBrowser,o=r.filters,s=r.typeLists,i=s.fosTypes.filter(d=>d.checked);let l=`${r.apiUrl}?page=${r.pageData.current_page}`;return o.requestNumber!=""?(l+=`&request_number=${o.requestNumber}`,n(wg(!0))):(n(wg(!1)),i.length!=s.fosTypes.length&&(l+=`&fos=${i.map(d=>d.fosTypeId).join(",")}`),o.org!=""&&o.org!="-- ALL --"&&(l+=`&org=${encodeURIComponent(o.org)}`),o.allocationType!=""&&(l+=`&allocation_type=${o.allocationType}`),o.resource!=""&&(l+=`&resources=${o.resource}`)),await(await fetch(l)).json()}),Ep=ri({name:"projectsBrowser",initialState:xw,reducers:{resetFilters:e=>{e.filters={org:"",allocationType:"",allFosToggled:!1,resource:"",requestNumber:""},e.singleEntry=!1,Ep.caseReducers.toggleAllFos(e)},setApiUrl:(e,{payload:t})=>{e.apiUrl=t},setShowPagination:(e,{payload:t})=>{e.showPagination=t},setTypeLists:(e,{payload:t})=>{e.typeLists=t},toggleAllFos:e=>{e.typeLists.fosTypes.forEach(t=>t.checked=!e.filters.allFosToggled),e.filters.allFosToggled=!e.filters.allFosToggled},toggleFos:(e,{payload:t})=>{e.typeLists.fosTypes.forEach(n=>{n.fosTypeId==t.fosTypeId&&(n.checked=!n.checked)}),e.typeLists.fosTypes.filter(n=>n.checked).length!=e.typeLists.fosTypes.length?e.filters.allFosToggled=!1:e.filters.allFosToggled=!0},toggleListFiltered:(e,{payload:t})=>{e.listIsFiltered=t},toggleSingleEntry:(e,{payload:t})=>{e.singleEntry=t},updateFilter:(e,{payload:t})=>{e.filters[t.name]=t.value},updatePageData:(e,{payload:t})=>{t.current_page&&(e.pageData.current_page=t.current_page),t.last_page&&(e.pageData.last_page=t.last_page)}},extraReducers:e=>{e.addCase(Nr.pending,t=>{t.projectsLoaded=!1}).addCase(Nr.fulfilled,(t,n)=>{const r=n.payload;t.projectsLoaded=!0,t.projects=r.projects,r.pages!=t.pageData.last_page&&(t.pageData.current_page=1),t.showPagination=!0,t.pageData.last_page=r.pages}).addCase(Nr.rejected,(t,n)=>{console.log(n.error)}).addCase(jd.pending,t=>{t.filtersLoaded=!1}).addCase(jd.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:mA,setApiUrl:mD,setShowPagination:Cd,setTypeLists:bw,toggleAllFos:gA,toggleFos:vA,toggleListFiltered:ww,toggleSingleEntry:wg,updateFilter:Ed,updatePageData:dl}=Ep.actions,yA=e=>e.projectsBrowser.filters,xA=e=>e.projectsBrowser.filtersLoaded,bA=e=>e.projectsBrowser.listIsFiltered,wA=e=>e.projectsBrowser.singleEntry,SA=e=>e.projectsBrowser.projectsLoaded,_A=e=>e.projectsBrowser.pageData,jA=e=>e.projectsBrowser.projects,CA=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,EA=e=>e.projectsBrowser.typeLists,RA=Ep.reducer;const NA=()=>{const e=it(),t=fe(yA),n=fe(EA),r=fe(bA),o=n.orgs.map(h=>({label:h,value:h})),s=w.useRef(),[i,l]=w.useState(null),c={height:"200px",overflowX:"auto",padding:"2px"},u=h=>{e(Ed({name:h.target.name,value:h.target.value}))},d=()=>{window.scrollTo(0,0),p(!0),e(Cd(!1)),e(dl({current_page:1})),e(Nr())},f=()=>{l(null),e(Cd(!1)),e(dl({current_page:1})),e(mA()),r&&(window.scrollTo(0,0),e(Nr()),p(!1))},p=h=>{e(ww(h))},y=h=>{l(h),e(Ed({name:"org",value:h.value}))},m=()=>t.org==""&&t.allocationType==""&&t.allFosToggled&&t.resource==""&&t.requestNumber=="";return a.jsx("div",{className:"row sticky-top mb-2",children:a.jsxs("div",{className:"col",children:[a.jsx("h3",{className:"mb-2",children:"Filters"}),a.jsx("h5",{className:"mb-1",children:"Field of Science"}),a.jsxs("div",{className:"border mb-3",style:c,children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:"",id:"toggle_all",checked:t.allFosToggled,onChange:()=>{e(gA())}}),a.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),n.fosTypes.map(h=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:h.fosTypeId,id:`fos_${h.fosTypeId}`,checked:h.checked,onChange:()=>e(vA(h))}),a.jsx("label",{className:"form-check-label",htmlFor:`fos_${h.fosTypeId}`,children:h.fosName})]},`fos_${h.fosTypeId}`))]}),a.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),a.jsx("div",{className:"mb-3",children:a.jsx(Cp,{options:o,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:s,closeMenuOnSelect:!0,onChange:y,value:i,"aria-labelledby":"org_select_label"},"org_select")}),a.jsx("h5",{id:"project_type_label",className:"mb-1",children:a.jsx("abbr",{title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"allocationType",id:"project_type_select",value:t.allocationType,className:"form-control","aria-labelledby":"project_type_label",onChange:h=>u(h),children:[a.jsx("option",{value:"",children:"-- All --"}),n.allocationTypes.map((h,x)=>a.jsx("option",{value:h,children:h},`allocation_type_${x}`))]})}),a.jsx("h5",{id:"resource_filter_label",className:"mb-1",children:"Resource"}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"resource",id:"resource_select",value:t.resource,className:"form-control","aria-labelledby":"resource_filter_label",onChange:h=>u(h),children:[a.jsx("option",{value:"",children:"-- All --"}),n.resources.map((h,x)=>a.jsx("option",{value:h.resourceId,children:h.resourceName},`resource_${x}`))]})}),a.jsx("h5",{id:"request_number_label",className:"mb-1",children:"Request Number"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{type:"text",className:"form-control",value:t.requestNumber,name:"requestNumber",id:"requestNumber","aria-labelledby":"request_number_label",onChange:h=>u(h)})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("button",{className:"btn btn-primary me-2",onClick:d,children:"Submit"}),a.jsx("button",{className:"btn btn-secondary",disabled:m(),onClick:f,children:"Reset"})]})]})})};const kA=({project:e})=>{const t=e.resources,[n,r]=w.useState(!1),o=fe(wA);let s={flush:!0,className:"mt-3 mb-1",alwaysOpen:!0};const i=g=>{let b=g.units?g.units:g.resourceUnits;const S=g.allocation?g.allocation:g.amount;if(b=="[Yes = 1, No = 0]"||b=="Yes / No")return S=="1.0"?"Yes":"No";{let _="0";return parseInt(S)&&(_=parseInt(S).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),b=="ACCESS Credits"&&(b=a.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),b=="Dollars"?`$${_}`:a.jsxs(a.Fragment,{children:[_," ",b]})}},l=()=>{const{origin:g,pathname:b}=window.location,S=`${g}${b}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(S),setTimeout(()=>r(!1),2e3)},c=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",u=a.jsx(Ul,{id:"link-tooltip",children:"Link Copied!"}),d=()=>{if(c()){const g={background:"none",border:"none",color:"#fff",fontSize:"24px"};return a.jsx(cp,{placement:"left",trigger:"click",defaultShow:n,show:n,onToggle:()=>r(!n),overlay:u,children:a.jsx("button",{onClick:l,style:g,children:a.jsx("i",{className:"bi bi-link-45deg",children:a.jsx("div",{className:"d-none",children:"Direct link to project"})})})})}return a.jsx(a.Fragment,{})},f=()=>{const g=e.pi.split(",");return`${g[1]} ${g[0]}`},p=()=>!e.coPis||e.coPis.length<=0?"":a.jsxs(a.Fragment,{children:[a.jsx("br",{}),a.jsxs("small",{className:"fst-italic",children:["CoPI(s): ",e.coPis.map(g=>`${g.name} (${g.organization})`).join(";")]})]}),y=()=>!e.beginDate||!e.endDate?"-":a.jsxs(a.Fragment,{children:[e.beginDate," to ",e.endDate]}),m=()=>e.allocationType==="NAIRR Start-Up"?a.jsxs("span",{className:"fw-bold",children:[c()," Start-Up: ",f(),", ",a.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"fw-bold",children:[c()," ",e.requestTitle]})," ",a.jsx("br",{}),a.jsxs("span",{className:"fst-italic",children:[e.pi," ",a.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),p()]}),h=a.jsxs("table",{className:"table table-striped table-bordered mt-2 mb-0",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("span",{className:"m-0 p-0",children:"Resource"})}),a.jsx("td",{children:a.jsx("span",{className:"m-0 p-0 d-inline",children:"Allocation"})})]})}),a.jsx("tbody",{children:t.map((g,b)=>a.jsxs("tr",{children:[a.jsx("td",{children:g.resourceName}),a.jsx("td",{style:{whiteSpace:"nowrap"},children:i(g)})]},`resource_${e.requestId}_${b}`))})]}),x=a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row mt-2 fw-bold",children:a.jsx("div",{className:"col-3 border-bottom",children:"Resources"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:h})})]}),v=()=>e.allocationType==="NAIRR Start-Up"?x:o?a.jsxs(a.Fragment,{children:[x,a.jsx("div",{className:"row mt-2 fw-bold",children:a.jsx("div",{className:"col-3 border-bottom",children:"Abstract"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:e.abstract})})})]}):a.jsxs(Wt,{...s,children:[a.jsxs(Wt.Item,{eventKey:"0",children:[a.jsx(Wt.Header,{children:"Resources"}),a.jsx(Wt.Body,{children:h})]}),a.jsxs(Wt.Item,{eventKey:"1",children:[a.jsx(Wt.Header,{children:"Abstract"}),a.jsx(Wt.Body,{children:a.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:e.abstract})})]})]});return a.jsxs("div",{className:"card mb-4",children:[a.jsx("div",{className:"card-header bg-primary text-white",children:a.jsxs("div",{className:"d-flex justify-content-between",children:[a.jsx("div",{children:m()}),a.jsx("div",{children:d()})]})}),a.jsxs("div",{className:"card-body",children:[a.jsxs("div",{className:"row fw-bold border-bottom",children:[a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0",children:"Field of Science"})}),a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 tooltip-underline",title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0",children:"Dates"})})]}),a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col",children:e.fos}),a.jsx("div",{className:"col",children:e.allocationType}),a.jsx("div",{className:"col",children:y()})]}),v()]})]})},TA=()=>{const e=fe(jA);return e.length==0?a.jsx("div",{children:"No Projects Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(kA,{project:t},`project_${n}`))})};const Sg=()=>{const e=it(),t=fe(_A),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(m,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{f()},[t]);const u=m=>{const h=parseInt(m);e(dl({current_page:m})),e(Nr(h))},d=m=>(event.preventDefault(),s("0"),u(m),!1),f=()=>{const m=[];if(t.last_page>l)if(t.current_page>4){m.push(1),m.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&m.push(t.current_page-h);m.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&m.push(t.current_page+h);t.last_page-t.current_page>1&&(m.push("spacer"),m.push(t.last_page))}else[1,2,3,4,5].forEach(x=>{x==t.current_page?m.push(["current",x]):m.push(x)}),m.push("spacer"),m.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?m.push(["current",h]):m.push(h);r(m)},p=m=>{let h="";return typeof m=="object"?[m,h]=m:h=m,m=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):m=="current"?a.jsx("li",{className:"page-item active","aria-current":"page",children:a.jsx("span",{className:"page-link",style:c,children:h})}):a.jsx("li",{className:"page-item",children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(m),children:h})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:m=>d(m.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(m=>a.jsx("option",{value:m+1,children:m+1},`page_option_${m}`))]})});return a.jsx("div",{children:a.jsx("nav",{"aria-label":"Pages for the table",children:a.jsxs("ul",{className:"pagination",children:[a.jsx("li",{className:`page-item ${t.current_page==1?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>u(t.current_page-1),disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((m,h)=>a.jsx(_e.Fragment,{children:p(m)},`page_${h}`)),t.last_page>l?y():"",a.jsx("li",{className:`page-item ${t.current_page==t.last_page?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(t.current_page+1),disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},OA=({api_url:e})=>{const t=it(),n=fe(SA),r=fe(xA),o=fe(CA),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(pA())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(NA,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Sg,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(TA,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Sg,{scroll:"projects_browser_app"}):""})})]})]})})},PA=e=>e.publications_store.publication,$A=e=>e.publications_store.publication.doi,IA=e=>e.publications_store.publication_types,Sw=e=>e.publications_store.publication.authors,AA=e=>e.publications_store.tag_categories,MA=e=>e.publications_store.projects,DA=e=>e.publications_store.publication.tags,FA=e=>e.publications_store.errors,_w=e=>e.publications_store.data_loaded,jw=e=>e.publications_store.show_saved,Rp=e=>e.publications_store.saving,LA=e=>e.publications_store.modal,Cw=e=>e.publications_store.form_valid,Ew=e=>!Rp(e)&&_w(e)&&Cw(e)&&Rw(e)&&e.publications_store.projects.filter(t=>t.selected).length>0,Rw=e=>{const t=Sw(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},Nw=e=>({type:"UPDATE_PUBLICATION",payload:e}),UA=e=>({type:"UPDATE_FIELD",payload:e}),Rd=e=>({type:"CHANGE_PUB_TYPE",payload:e}),VA=e=>({type:"SET_PUBLICATION",payload:e}),BA=()=>({type:"ADD_AUTHOR"}),zA=e=>({type:"UPDATE_AUTHOR",payload:e}),qA=e=>({type:"TOGGLE_REQUEST",payload:e}),Qs=e=>({type:"UPDATE_ERRORS",payload:e}),kw=e=>({type:"HIDE_ERROR",payload:e}),HA=e=>({type:"UPDATE_SELECTED_TAGS",payload:e}),WA=e=>({type:"DELETE_AUTHOR",payload:e}),KA=e=>({type:"DATA_LOADED",payload:e}),Tw=e=>({type:"UPDATE_SHOW_SAVED",payload:e}),GA=()=>({type:"RESET_STATE"}),Xc=e=>({type:"UPDATE_SAVING",payload:e}),YA=e=>({type:"SET_FORM_VALID",payload:e}),Ow=e=>({type:"SET_GRANT_NUMBER",payload:e}),QA=e=>({type:"ADD_PROJECT",payload:e}),XA=(e,t,n)=>{let r=!0;const o=[];for(const i of t)e[i]||(r=!1,o.push(i));const s=e.authors||[];for(const i of s)for(const l of n)i[l]||(r=!1,o.includes(l)||o.push(l));return{formValid:r,missingFields:o}},ZA=e=>e.length>0?a.jsxs("div",{role:"alert",children:[a.jsx("p",{children:"Please provide the following information before submitting:"}),a.jsx("ul",{children:e.map(t=>a.jsx("li",{children:JA(t)},t))})]}):null;function JA(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const e2=()=>async(e,t)=>{const n=t().publications_store.publication.doi,r=encodeURIComponent(n).replaceAll(".","%2E"),o="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(`/publications/lookup?doi=${r}`).then(s=>s.json()).then(s=>{if(s.title!=""){let i=t().publications_store.publication_types.find(l=>l.citation_style_type==s.type);e(Rd(i?i.publication_type:"Other")),e(VA(s))}else e(Qs(o))},s=>{e(Qs(o))})},t2=()=>async(e,t)=>{const n=t().publications_store.grant_number,r=te.routes.publications_find_project_path();await fetch(`${r}?grant_number=${n}`).then(o=>o.json()).then(o=>{e(QA(o)),e(Ow(""))},()=>{e(Qs("Unable to find a project with this grant number."))})},Pw=()=>async e=>{const t=/^\/requests/.test(window.location.pathname)?te.routes.publication_path("new.json"):window.location.href+".json";await fetch(t).then(n=>n.json()).then(n=>{e(KA(n))})},$w=()=>async(e,t)=>{const n=t().publications_store,r=n.projects.filter(p=>p.selected),o=Object.keys(n.selected_tags).map(p=>n.selected_tags[p]).flat(),s={...n.publication},i=n.errors,{formValid:l,missingFields:c}=XA(s,["title","publication_year","publication_month"],["first_name","last_name"]);if(!l){i.length>0&&Array.from(i).forEach(y=>{e(kw(y.id))});const p=ZA(c);e(Qs(p));return}const u={authenticity_token:document.getElementsByName("authenticity_token")[0].value,publication:s,authors:s.authors.map(p=>({...p,order:0})),tags:o,projects:r};let d,f;s.publication_id?(d=te.routes.publication_path(s.publication_id),f="PATCH"):(d=te.routes.publications_path(),f="POST"),e(Xc(!0)),await fetch(d,{method:f,headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}).then(p=>{n.redirect?window.location.href=te.routes.publications_path():(s.publication_id||(e(GA()),e(Pw())),e(Tw(!0)),e(Xc(!1)))},()=>{e(Xc(!1)),e(Qs("There was an error saving this publication."))})},n2=({doi:e,updatePublication:t,doiLookup:n})=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:"doi",className:"form-label",children:"DOI"}),a.jsxs("div",{className:"input-group",children:[a.jsx("input",{type:"text",className:"form-control",id:"doi",name:"publication[doi]","aria-label":"DOI Input and Search box","aria-describedby":"doi_button",value:e,onChange:r=>t(r.target.value)}),a.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>n(),children:"Lookup Publication"})]})]})}),r2=e=>({doi:$A(e)}),o2=e=>({updatePublication:t=>e(Nw({key:"doi",value:t})),doiLookup:()=>e(e2())}),s2=Jt(r2,o2)(n2),i2=({author:e,authorKey:t,updateAuthor:n,deleteAuthor:r})=>{const o=l=>{n({key:l.target.name,value:l.target.value,idx:t})},s=l=>a.jsx("td",{children:a.jsx("input",{type:"text",className:"form-control",name:l,id:l,value:e[l],onChange:c=>o(c)})},`field_${l}`),i=["first_name","last_name","affiliation"];return a.jsxs("tr",{children:[i.map(l=>s(l)),a.jsx("td",{children:t!==0&&a.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>r(t),children:a.jsx("i",{className:"bi bi-trash"})})})]})},a2=e=>({updateAuthor:t=>e(zA(t)),deleteAuthor:t=>e(WA(t))}),_g=Jt(null,a2)(i2),l2=({authors:e,addAuthor:t,authors_exist:n})=>{const r=e.length===0,o=()=>n?"":a.jsx("div",{className:"alert alert-danger",children:"You must add at least one author and each author must have a first and last name"});return a.jsxs("div",{children:[o(),a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"First Name"}),a.jsx("th",{children:"Last Name"}),a.jsx("th",{children:"Affiliation"}),a.jsx("th",{})]})}),a.jsxs("tbody",{children:[e.map((s,i)=>a.jsx(_g,{author:s,authorKey:i},`author_${i}`)),r&&a.jsx(_g,{author:t()})]})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>t(),children:"Add Author"})]})},c2=e=>({authors:Sw(e),authors_exist:Rw(e)}),u2=e=>({addAuthor:()=>e(BA())}),d2=Jt(c2,u2)(l2),f2=({category:e,publication_tags:t,updateSelectedTags:n,index:r})=>{const o=w.useRef(null),s=()=>{const l=t.filter(c=>c.label==e.label)[0];return l?l.options:[]},i=l=>{n({category:e.label,tags:l})};return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fw-bold mb-1",children:e.label}),a.jsx("div",{className:"mb-3",children:a.jsx(Cp,{classNames:{control:l=>l.isFocused?"custom-select-selected":"border-grey-300"},defaultValue:s(),options:e.options,isMulti:!0,openMenuOnClick:!0,name:`tags_${r}`,inputId:`tags_${r}`,ref:o,closeMenuOnSelect:!1,onChange:i})})]})},p2=e=>({updateSelectedTags:t=>e(HA(t))}),h2=e=>({publication_tags:DA(e)}),m2=Jt(h2,p2)(f2),g2=({projects:e,toggleProject:t})=>{const n=o=>`list-group-item list-group-item-action clickable ${o.selected?"list-group-item-success":""}`,r=()=>e.filter(o=>o.selected).length>0;return a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[r()?"":a.jsx("div",{className:"alert alert-danger",children:"You must select at least one project"}),a.jsx("div",{className:"list-group",children:e.map((o,s)=>a.jsxs("div",{className:n(o),onClick:()=>t(s),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})},v2=e=>({projects:MA(e)}),y2=e=>({toggleProject:t=>e(qA(t))}),x2=Jt(v2,y2)(g2),b2=({grant_number:e,setGrantNumber:t,grantSearch:n})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:["If your project isn't listed above, you can manually add it by entering the grant number below.",a.jsxs("div",{className:"input-group mt-1",children:[a.jsx("input",{type:"text",className:"form-control",value:e,onChange:r=>t(r.target.value),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>n(),children:"Find Project"})]})]})}),w2=e=>({setGrantNumber:t=>e(Ow(t)),grantSearch:()=>e(t2())}),S2=e=>({grant_number:e.publications_store.grant_number}),_2=Jt(S2,w2)(b2),j2=({publication:e,updateField:t,publication_types:n,changePubType:r,updatePublication:o,tag_categories:s,savePublication:i,modal:l,save_enabled:c,setFormValid:u,form_valid:d})=>{const f=g=>{g.target.value.trim()==""?u(!1):u(!0),o({key:"title",value:g.target.value})},p=()=>e.fields.map((g,b)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:`field_${g.csl_field_name}`,className:"form-label",children:g.name}),a.jsx("input",{type:"text",className:"form-control",name:`field_${g.csl_field_name}`,id:`field_${g.csl_field_name}`,value:g.field_value,onChange:S=>t({index:b,value:S.target.value})})]})},`field_${g.csl_field_name}`)),y=()=>{const g=new Date().getFullYear()+2;let b=1980;const S=[];for(;b<=g;)S.push(b++);const _=["January","February","March","April","May","June","July","August","September","October","November","December"],j=a.jsx("i",{className:"bi bi-asterisk text-danger"});return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("label",{className:"form-label",htmlFor:"publication_title",children:["Title ",j]}),a.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${d?"":"is-invalid"}`,value:e.title,onChange:C=>f(C)})]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{className:"form-label",htmlFor:"publication_year",children:"Year Published"}),a.jsx("select",{name:"publication_year",id:"publication_year",className:"form-control",value:e.publication_year,onChange:C=>{o({key:"publication_year",value:C.target.value})},children:S.map(C=>a.jsx("option",{value:C,children:C},`year_${C}`))})]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{className:"form-label",htmlFor:"publication_month",children:"Month Published"}),a.jsx("select",{name:"publication_month",id:"publication_month",className:"form-control",value:e.publication_month,onChange:C=>{o({key:"publication_month",value:C.target.value})},children:_.map((C,E)=>a.jsx("option",{value:E+1,children:C},`month_${E}`))})]})})]})},m=a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"card-header",children:a.jsx("h2",{children:"Publication Information"})}),a.jsxs("div",{className:"card-body",children:[a.jsx("p",{className:"mb-2",children:'Enter information about this publication below. If you have a DOI, you may use the "Lookup Publication" button to attempt to find this information automatically.'}),a.jsx(s2,{}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:"publication_type",className:"form-label",children:"Publication Type"}),a.jsx("select",{name:"publication[publication_type]",id:"publication_type",className:"form-control",value:e.publication_type,onChange:g=>r(g.target.value),children:n.map(g=>a.jsx("option",{value:g.publication_type,children:g.publication_type},`pub_type_${g.type_id}`))})]})}),y(),p()]})]}),h=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Authors"}),a.jsxs(go,{children:[`Add authors by clicking the "Add Authors" button below and entering the author's details. You may also remove authors by clicking the `,a.jsx("i",{className:"bi bi-trash fw-bold text-danger"})," ","button"]})]}),a.jsx("div",{className:"card-body",children:a.jsx(d2,{})})]}),x=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Tags"}),a.jsx(go,{children:"Add related tags from the lists below. You may choose multiple tags per category."})]}),a.jsx("div",{className:"card-body",children:s.map((g,b)=>a.jsx(m2,{index:b,category:g},`tc_${b}`))})]}),v=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Associated Projects"}),a.jsx(go,{children:"Click/Tap each project that this publication is related to."})]}),a.jsxs("div",{className:"card-body",children:[a.jsx(x2,{}),a.jsx("hr",{}),a.jsx(_2,{})]})]});return a.jsxs(a.Fragment,{children:[m,h,x,v,l?null:a.jsx("p",{className:"mt-3",children:a.jsx("button",{onClick:()=>i(),className:"btn btn-success",disabled:!c,children:"Save Publication"})})]})},C2=e=>({publication:PA(e),publication_types:IA(e),tag_categories:AA(e),saving:Rp(e),modal:LA(e),save_enabled:Ew(e),form_valid:Cw(e)}),E2=e=>({updateField:t=>e(UA(t)),changePubType:t=>e(Rd(t)),updatePublication:t=>e(Nw(t)),savePublication:()=>e($w()),setFormValid:t=>e(YA(t))}),R2=Jt(C2,E2)(j2),N2=({errors:e,hideError:t})=>a.jsx(a.Fragment,{children:e.map(n=>a.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[n.message,a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>t(n.id)})]},`err_${n.id}`))}),k2=e=>({errors:FA(e)}),T2=e=>({hideError:t=>e(kw(t))}),O2=Jt(k2,T2)(N2),P2=({show_saved:e,updateShowSaved:t})=>{const n=a.jsxs("div",{className:"alert alert-success alert-dismissible sticky-top",children:["Publication Saved Successfully!",a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>t(!1)})]});return e?n:a.jsx(a.Fragment,{})},$2=e=>({show_saved:jw(e)}),I2=e=>({updateShowSaved:t=>e(Tw(t))}),A2=Jt($2,I2)(P2),M2=({getData:e,data_loaded:t})=>(w.useEffect(()=>{e()},[]),a.jsxs(a.Fragment,{children:[a.jsx(A2,{}),a.jsx(O2,{}),t?a.jsx(R2,{}):a.jsx(Do,{})]})),D2=e=>({data_loaded:_w(e)}),F2=e=>({getData:()=>e(Pw())}),Iw=Jt(D2,F2)(M2),L2=({saving:e,savePublication:t,showSaved:n,updatePublications:r,save_enabled:o})=>{const[s,i]=w.useState(!1);return w.useEffect(()=>{!e&&n&&r()},[e,n]),a.jsxs(a.Fragment,{children:[a.jsxs(ge,{size:"xl",show:s,onHide:()=>i(!1),scrollable:!0,children:[a.jsx(ge.Header,{closeButton:!0,children:a.jsx(ge.Title,{children:"Add Publication"})}),a.jsx(ge.Body,{children:a.jsx(Iw,{})}),a.jsx(ge.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>i(!1),children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{t(),i(!1)},children:"Save Publication"})]})})]}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>i(!0),children:"Add a New Publication"})]})},U2=e=>({saving:Rp(e),showSaved:jw(e),save_enabled:Ew(e)}),V2=e=>({savePublication:()=>e($w())}),B2=Jt(U2,V2)(L2),z2=({usernames:e=[],publication_ids:t=[]})=>{const[n,r]=w.useState(e),[o,s]=w.useState(t),[i,l]=w.useState([]),c=w.useRef(n),u=h=>{c.current=h,r(h)},d=async()=>{const x=await(await fetch(te.routes.search_publications_path({usernames:n}))).json();l(x)};w.useEffect(()=>{d()},[n]),w.useEffect(()=>{addEventListener("requestAddRole",h=>u([...c.current,h.detail.username])),addEventListener("requestRemoveRole",h=>u(c.current.filter(x=>x!=h.detail.username)))},[]);let f=!1,p=!1;const y=i.map(h=>{const x=o.includes(h.publication_id);f=f||x,p=p||!x;const v=new Date(h.publication_year,h.publication_month-1);return a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("input",{type:"checkbox",name:"publication_ids[]",value:h.publication_id,checked:x,onChange:()=>s(x?o.filter(g=>g!=h.publication_id):[...o,h.publication_id])})}),a.jsx("td",{children:h.title}),a.jsx("td",{children:h.authors.map(g=>`${g.first_name} ${g.last_name}`).join(", ")}),a.jsx("td",{children:h.publication_type}),a.jsxs("td",{children:[v.toLocaleString("default",{month:"short"})," ",h.publication_year]})]},h.publication_id)}),m=`${p?"Select":"Deselect"} all`;return a.jsxs("div",{className:"publications-select",children:[a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:a.jsx("input",{type:"checkbox",value:"","aria-label":m,title:m,checked:f&&!p,onChange:()=>s(p?i.map(h=>h.publication_id):[]),ref:h=>{h&&(h.indeterminate=f&&p)}})}),a.jsx("th",{children:"Title"}),a.jsx("th",{children:"Authors"}),a.jsx("th",{children:"Type"}),a.jsx("th",{children:"Date"})]})}),a.jsx("tbody",{children:y})]}),a.jsx(B2,{updatePublications:d})]})},q2=()=>`${Math.random().toString(36).slice(2)}`,Nd=document.querySelector("#publications-react"),H2=Nd?Nd.dataset:{},jg={publication_types:[],tag_categories:[],publication:{},projects:[],errors:[],selected_tags:{},data_loaded:!1,saving:!1,show_saved:!1,redirect:H2.redirect||!1,modal:Nd==null,form_valid:!1,grant_number:""},W2=(e=jg,t)=>{const{type:n,payload:r}=t;switch(n){case"UPDATE_FIELD":return Pt(e,s=>(s.publication.fields[r.index].field_value=r.value,s));case"CHANGE_PUB_TYPE":return Pt(e,s=>{let i=s.publication_types.find(l=>l.publication_type==r).fields;return i.forEach(l=>{const c=s.publication.fields.find(u=>u.csl_field_name==l.csl_field_name);c&&(l.value=c.value)}),s.publication.publication_type=r,s.publication.fields=i,s});case"UPDATE_PUBLICATION":return{...e,publication:{...e.publication,[r.key]:r.value}};case"SET_PUBLICATION":return Pt(e,s=>(s.publication.fields.forEach(i=>{i.field_value=r[i.csl_field_name]}),Object.keys(s.publication).forEach(i=>{r[i]&&(s.publication[i]=r[i])}),s.form_valid=r.title.trim()!="",s));case"ADD_AUTHOR":{const o={portal_username:"",first_name:"",middle_name:"",last_name:"",prefix:"",suffix:"",initials:"",affiliation:"",hash:{}};return Pt(e,i=>{i.publication.authors.push(o)})}case"UPDATE_AUTHOR":return Pt(e,s=>{s.publication.authors[r.idx][r.key]=r.value});case"TOGGLE_TAG":return Pt(e,s=>{let i=s.tag_categories.find(l=>l.publication_tags_category_id==r.publication_tags_category_id);i.tags[r.idx].selected=!i.tags[r.idx].selected});case"TOGGLE_REQUEST":return Pt(e,s=>(s.projects[r].selected=!s.projects[r].selected,s));case"UPDATE_ERRORS":{const o={id:q2(),message:r};return{...e,errors:[...e.errors,o]}}case"HIDE_ERROR":{const o=e.errors.filter(s=>s.id!=r);return{...e,errors:o}}case"UPDATE_SELECTED_TAGS":return Pt(e,s=>{const i=r.tags.map(l=>l.value);return s.selected_tags[r.category]=i,s});case"DELETE_AUTHOR":return Pt(e,s=>(s.publication.authors.splice(r,1),s));case"DATA_LOADED":return Pt(e,s=>(s.publication=r.publication,s.form_valid=r.publication.title.trim()!="",s.publication.authors.forEach(i=>{i.affiliation||(i.affiliation="")}),s.publication_types=r.publication_types,s.tag_categories=r.tag_categories,s.projects=r.publication.projects,r.publication.tags.forEach(i=>s.selected_tags[i.label]=i.options.map(l=>l.value)),s.data_loaded=!0,s));case"UPDATE_SHOW_SAVED":return{...e,show_saved:r};case"UPDATE_SAVING":return{...e,saving:r};case"RESET_STATE":return jg;case"SET_FORM_VALID":return{...e,form_valid:r};case"SET_GRANT_NUMBER":return{...e,grant_number:r};case"ADD_PROJECT":return{...e,projects:[...e.projects,r]};default:return e}},K2={catalogs:{},filteredResources:[],filters:[],hasErrors:!1,onRamps:!1,resources:[],resourcesLoaded:!1,resourceSorting:{"NSF Capacity Resources":1,"NSF Innovative Testbeds":2,"Other NSF-funded Resources":3,"Services and Support":4}},pa=Qe("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(Cg(!1));let n=[];e.catalogSources?n=e.catalogSources:n.push({...e,catalogLabel:"Default"}),e.onRamps&&n.push({apiUrl:"https://allocations.access-ci.org/resources.json",catalogLabel:"ACCESS",allowedCategories:[],allowedFilters:[],allowedResources:[],excludedCategories:["Resource Category"],excludedFilters:[],excludedResources:["ACCESS Credits"]});const r=await Promise.all(n.map(async o=>{const i=await(await fetch(o.apiUrl)).json();return{...o,data:i}}));t(X2({data:r,params:e})),t(Cg(!0))});Qe("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(J2(e)),t(Mw())});const G2=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},Y2=e=>{const t={},n={};let r={};return e.forEach(s=>{t[s.catalogLabel]={...s,resourceIds:[],selected:!1,catalogId:s.catalogLabel.replace(/[^(A-z)]/,"")},delete t[s.catalogLabel].data,s.data.forEach(i=>{if(kd(s.allowedResources,s.excludedResources,i.resourceName)){const{categories:l,formattedResource:c}=Q2(s,i,r);n[i.resourceId]=c,t[s.catalogLabel].resourceIds.push(i.resourceId),r=l}})}),{resources:Object.keys(n).map(s=>n[s]),catalogs:t,categories:r}},kd=(e,t,n)=>!e&&!t||e&&e.length==0&&t&&t.length==0?!0:e&&e.length>0?e.find(r=>r==n):t&&t.length>0?!t.find(r=>r==n):!0,Q2=(e,t,n)=>{const r=[];let o="";t.featureCategories.filter(l=>l.categoryIsFilter).forEach(l=>{const c=l.categoryId;l.categoryName=="ACCESS Resource Grouping"?o=l.features[0].name:(!n[c]&&kd(e.allowedCategories,e.excludedCategories,l.categoryName)&&(n[c]={categoryId:c,categoryName:l.categoryName,categoryDescription:l.categoryDescription,features:{}}),l.features.forEach(u=>{const d={featureId:u.featureId,name:u.name,description:u.description,categoryId:c,selected:!1},f=kd(e.allowedFilters,e.excludedFilters,d.name);f&&r.push(d),n[c]&&f&&!n[c].features[u.featureId]&&(n[c].features[u.featureId]=d)}))});const s=r.map(l=>l.name).sort((l,c)=>l>c);return{formattedResource:{...t,resourceName:t.resourceName.trim(),features:s,featureIds:r.map(l=>l.featureId),sortCategory:o},categories:n}},Aw=ri({name:"resourceCatalog",initialState:K2,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,{resources:r,catalogs:o,categories:s}=Y2(n);e.catalogs=o,e.onRamps=t.params.onRamps;for(const i in s){const l=s[i],c=[];for(const u in l.features)c.push(l.features[u]);e.filters.push({...l,features:c.sort((u,d)=>u.name>d.name)})}e.filters=e.filters.sort((i,l)=>i.categoryName.localeCompare(l.categoryName)),e.resources=r.sort((i,l)=>i.resourceName.localeCompare(l.resourceName)).sort((i,l)=>e.resourceSorting[i.sortCategory]>e.resourceSorting[l.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(n=>n.selected=!1)}),e.filteredResources=[...e.resources]},setResourcesLoaded:(e,{payload:t})=>{e.resourcesLoaded=t},toggleCatalog:(e,{payload:t})=>{const{catalog:n,selected:r}=t;e.catalogs[n.catalogLabel].selected=r},toggleFilter:(e,{payload:t})=>{if(t){const i=t,c=e.filters.find(u=>u.categoryId==i.categoryId).features.find(u=>u.featureId==i.featureId);c.selected=!c.selected}const n=G2(e.filters);let r=[];if(n.length>0){const i=n.map(l=>l.features.map(c=>c.featureId));e.resources.forEach(l=>{let c=0;i.forEach(u=>{let d=!1;l.featureIds.forEach(f=>{u.indexOf(f)>=0&&(d=!0)}),d&&(c+=1)}),c>=i.length&&r.push(l)})}else r=e.resources;const o=Object.keys(e.catalogs).map(i=>e.catalogs[i]),s=o.filter(i=>i.selected);if(s.length>0&&s.length<o.length){const i=s.map(l=>l.resourceIds).flat();r=r.filter(l=>i.indexOf(l.resourceId)>=0)}e.filteredResources=r}},extraReducers:e=>{e.addCase(pa.pending,t=>{}).addCase(pa.fulfilled,(t,n)=>{}).addCase(pa.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:X2,processData:gD,resetFilters:Z2,setResourcesLoaded:Cg,toggleCatalog:J2,toggleFilter:Mw}=Aw.actions,Dw=e=>e.resourceCatalog.catalogs,eM=e=>e.resourceCatalog.filters,tM=e=>e.resourceCatalog.hasErrors,nM=e=>e.resourceCatalog.resourcesLoaded,rM=e=>e.resourceCatalog.filteredResources,oM=Aw.reducer,sM="_access_1yrq0_2",iM="_resourceName_1yrq0_6",aM="_description_1yrq0_11",lM="_filterBar_1yrq0_15",cM="_cardBg_1yrq0_20",uM="_active_1yrq0_25",dM="_plainButton_1yrq0_30",fM="_btnSecondary_1yrq0_40",pM="_filtersHidden_1yrq0_51",hM="_filtersVisible_1yrq0_57",At={access:sM,resourceName:iM,description:aM,filterBar:lM,cardBg:cM,active:uM,plainButton:dM,btnSecondary:fM,filtersHidden:pM,filtersVisible:hM},mM=({resource:e})=>{const[t,n]=w.useState(!0),r=u=>{const d={"CPU Compute":"cpu-fill","GPU Compute":"gpu-card",Cloud:"cloud-fill","Commercial Cloud":"cloud-fill",Storage:"database-fill","Service / Other":"journal","Innovative / Novel Compute":"pc"};return d[u]?a.jsx("i",{title:u,className:`bi bi-${d[u]} me-2 `},`${e.resourceId}_${d[u]}`):""},o=()=>a.jsxs("span",{className:"float-end",children:[e.features.map(u=>r(u)),e.resourceType]}),s=u=>u.length==0?"":a.jsx(a.Fragment,{children:u.map((d,f)=>a.jsx("span",{className:"badge text-bg-secondary me-2",children:d},`feature_${e.resourceId}_${f}`))}),i=()=>{let u=e.resourceDescription;return u&&u!=""?(At.plainButton,a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col fw-bold",children:["About ",e.resourceName]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col ",children:[a.jsx("div",{className:At.description,dangerouslySetInnerHTML:{__html:u}}),""]})})]})):""},l=()=>e.recommendedUse&&e.recommendedUse!=""?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:"Recommended Use"})}),a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",children:a.jsx("div",{className:At.description,dangerouslySetInnerHTML:{__html:e.recommendedUse}})})})]}):"",c=()=>At.cardBg;return a.jsx(a.Fragment,{children:a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"card mb-3",children:[a.jsxs("div",{className:`card-header ${c()}`,children:[a.jsx("span",{className:"",children:e.resourceName}),o()]}),a.jsxs("div",{className:"card-body",children:[a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",children:s(e.features)})}),l(),i()]}),a.jsx("div",{className:"card-footer",children:a.jsxs("a",{target:"_blank",href:e.userGuideUrl,className:"btn btn-info me-2 fw-bold",children:["System Info ",a.jsx("i",{className:"bi bi-box-arrow-up-right"})]})})]})})})})},gM=({filter:e})=>{const t=it(),n=()=>{t(Mw(e))};return a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"form-check",children:[a.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),a.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:n})]})})})},vM=({category:e})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>a.jsx(gM,{filter:t},t.featureId))]})}),yM=({onReset:e})=>{const t=it(),n=fe(Dw),r=fe(eM),o=r.filter(s=>s.features.filter(i=>i.selected).length>0);return Object.keys(n).map(s=>n[s]),a.jsxs(a.Fragment,{children:[r.map(s=>a.jsx(vM,{category:s},s.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(Z2()),disabled:o.length==0,children:"Reset Filters"}),a.jsx("button",{className:"btn btn-outline-primary ms-3 mt-2 mb-2",onClick:e,children:"Close Menu"})]})},xM=()=>{const[e,t]=w.useState(!1),n=w.useRef(null),r=()=>{const o=n.current;e?(o.style.height="0px",o.classList.remove(At.filtersVisible),o.classList.add(At.filtersHidden)):(o.style.height=o.scrollHeight+"px",o.classList.remove(At.filtersHidden),o.classList.add(At.filtersVisible)),t(!e)};return a.jsx("div",{className:At.filterBar,children:a.jsx("div",{className:"row mb-2",children:a.jsx("div",{className:"col pt-2 pb-2",children:a.jsxs("div",{className:"p-1 pb-0 border-bottom bg-white shadow",children:[a.jsxs("button",{className:"btn btn-outline-primary mb-1 mt-1",type:"button",onClick:r,children:[a.jsx("i",{className:"bi bi-filter"})," Filters"]}),a.jsx("div",{className:`${At.filtersHidden} pe-2 ps-2`,id:"filtersList",ref:n,children:a.jsx(yM,{onReset:r})})]})})})})},bM=()=>{const e=fe(rM);return e.length==0?a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):a.jsx("div",{className:"card shadow",children:a.jsxs("div",{className:"card-body",children:[a.jsx(xM,{}),e.map(t=>a.jsx(mM,{resource:t},t.resourceId))]})})},wM=({baseUrl:e})=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col d-flex",children:a.jsx("img",{alt:"Access Logo",style:{height:"75px"},src:`${e}/access_logo.png`})})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("h3",{className:"border-bottom",children:"NSF ACCESS Resources"})})}),a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("h4",{children:"Discover the nationwide NSF cyberinfrastructure"}),a.jsx("p",{children:"Need advanced computing and storage options for your research or classroom? The ACCESS program has been established and funded by the U.S. National Science Foundation to help you - the nation's researchers and educators - to use some of the country's most advanced computing systems and services - at no cost to you."}),a.jsx("p",{children:"Thousands of researchers, instructors, and students from institutions large and small use ACCESS-integrated resources every year. With more than 30 resources from more than 15 resource providers, there's bound to be a resource for you, your lab, or your class."}),a.jsx("p",{children:"Explore the resource catalog below - filter the list to discover the resources that have the features or services to accelerate your activities. The System Info button will take you to the resource's documentation for all the details."}),a.jsx("p",{children:'Ready to begin? Click the "Get Your First Project" button and join the ACCESS community!'}),a.jsx("p",{children:a.jsxs("a",{href:"https://allocations.access-ci.org/get-your-first-project",target:"_blank",className:`btn btn-secondary fw-bold ${At.btnSecondary}`,children:["Get Your First Project ",a.jsx("i",{className:"bi bi-box-arrow-up-right"})]})}),a.jsxs("p",{children:["If you have feedback for ACCESS, please complete our",a.jsx("a",{target:"_blank",href:"https://docs.google.com/forms/d/e/1FAIpQLSdn-SXokNB_5s0r2SA_S9ZIZWZFlVPRD2OHepTH5HY2YND_zw/viewform",children:" Feedback Form"}),".",a.jsx("br",{}),"If you have questions, please",a.jsx("a",{target:"_blank",href:"https://support.access-ci.org/user/login?destination=/open-a-ticket",children:" open a help ticket"}),"."]})]})})]}),SM=({catalogSources:e=[],onRamps:t=!1,baseUrl:n})=>{const r=it(),o=fe(nM),s=fe(tM),i=fe(Dw),l=Object.keys(i).map(u=>i[u]);w.useEffect(()=>{r(pa({catalogSources:e,onRamps:t}))},[]);const c=()=>t&&l.length>1?a.jsx(a.Fragment,{children:l.filter(u=>u.catalogLabel!="ACCESS").map((u,d)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("h4",{className:"border-bottom",children:["About ",u.catalogLabel]}),a.jsx("div",{dangerouslySetInnerHTML:{__html:u.description}})]})},`catalog_${d}`))}):"";return s?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):o?a.jsxs("div",{className:`container mt-3 ${At.access}`,children:[t?a.jsx(wM,{baseUrl:n}):"",c(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(bM,{})})})]}):a.jsx(Do,{})},_M={filters:[],resources:[],filteredResources:[],resourcesLoaded:!1,hasErrors:!1,resourceSorting:{"NSF Capacity Resources":1,"NSF Innovative Testbeds":2,"Other NSF-funded Resources":3,"Services and Support":4}},ha=Qe("resourceCatalog/getResources",async(e,{dispatch:t})=>{const r=await(await fetch(e.apiUrl)).json();t(CM({data:r,params:e}))}),jM=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},Eg=(e,t,n)=>{if(e.length==0&&t.length==0)return!0;if(e.length>0)return e.find(r=>r==n);if(t.length>0)return!t.find(r=>r==n)},Fw=ri({name:"resourceCatalog",initialState:_M,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,r=t.params.excludedCategories,o=t.params.excludedFilters,s=t.params.excludedResources,i=t.params.allowedCategories,l=t.params.allowedFilters,c=[],u={};n.filter(d=>!s.includes(d.resourceName)).forEach(d=>{const f=[];let p="";d.featureCategories.filter(m=>m.categoryIsFilter).forEach(m=>{const h=m.categoryId;m.categoryName=="ACCESS Resource Grouping"?p=m.features[0].name:(!u[h]&&Eg(i,r,m.categoryName)&&(u[h]={categoryId:h,categoryName:m.categoryName,categoryDescription:m.categoryDescription,features:{}}),m.features.forEach(x=>{const v={featureId:x.featureId,name:x.name,description:x.description,categoryId:h,selected:!1},g=Eg(l,o,v.name);g&&f.push(v),u[h]&&g&&!u[h].features[x.featureId]&&(u[h].features[x.featureId]=v)}))});const y={resourceName:d.resourceName,resourceId:d.resourceId,resourceType:d.resourceType,organization:d.organization,units:d.units,userGuideUrl:d.userGuideUrl,resourceDescription:d.resourceDescription,description:d.description,recommendedUse:d.recommendedUse,features:f.map(m=>m.name).sort((m,h)=>m>h),featureIds:f.map(m=>m.featureId),sortCategory:p};c.push(y)});for(const d in u){const f=u[d],p=[];for(const y in f.features)p.push(f.features[y]);e.filters.push({...f,features:p.sort((y,m)=>y.name>m.name)})}i.length>0?e.filters=e.filters.sort((d,f)=>i.indexOf(d.categoryName)>i.indexOf(f.categoryName)):e.filters=e.filters.sort((d,f)=>d.categoryName.localeCompare(f.categoryName)),e.resources=c.sort((d,f)=>d.resourceName.localeCompare(f.resourceName)).sort((d,f)=>e.resourceSorting[d.sortCategory]>e.resourceSorting[f.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(n=>n.selected=!1)}),e.filteredResources=[...e.resources]},toggleFilter:(e,{payload:t})=>{const n=t,o=e.filters.find(i=>i.categoryId==n.categoryId).features.find(i=>i.featureId==n.featureId);o.selected=!o.selected;const s=jM(e.filters);if(s.length>0){const i=[],l=s.map(c=>c.features.map(u=>u.featureId));e.resources.forEach(c=>{let u=0;l.forEach(d=>{let f=!1;c.featureIds.forEach(p=>{d.indexOf(p)>=0&&(f=!0)}),f&&(u+=1)}),u>=l.length&&i.push(c)}),e.filteredResources=i}else e.filteredResources=[...e.resources]}},extraReducers:e=>{e.addCase(ha.pending,t=>{}).addCase(ha.fulfilled,(t,n)=>{}).addCase(ha.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:CM,processData:vD,resetFilters:EM,toggleFilter:RM}=Fw.actions,NM=e=>e.resourceCatalog.hasErrors,kM=e=>e.resourceCatalog.resourcesLoaded,TM=e=>e.resourceCatalog.filters,OM=e=>e.resourceCatalog.filteredResources,PM=Fw.reducer,$M=({resource:e})=>{const t=r=>r.length==0?"":a.jsx("ul",{children:r.map((o,s)=>a.jsx("li",{children:o},`feature_${e.resourceId}_${s}`))}),n=(r,o)=>o&&o!=""?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:r})}),a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",dangerouslySetInnerHTML:{__html:o}})})]}):"";return a.jsxs(Wt.Item,{eventKey:e.resourceId,children:[a.jsx(Wt.Header,{children:e.resourceName}),a.jsxs(Wt.Body,{children:[a.jsx("table",{className:"table",children:a.jsxs("tbody",{children:[a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Resource Type:"}),a.jsx("td",{children:e.resourceType})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Organization:"}),a.jsx("td",{children:e.organization})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Units:"}),a.jsx("td",{children:e.units})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"User Guide:"}),a.jsx("td",{children:e.userGuideUrl==""?"":a.jsx("a",{href:e.userGuideUrl,target:"_blank",rel:"noreferrer",children:"Link to User Guide"})})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Features Available:"}),a.jsx("td",{children:t(e.features)})]})]})}),n("Resource Description",e.resourceDescription),n("Allocations Description",e.description),n("Recommended Use",e.recommendedUse)]})]})},IM=()=>{const e=fe(OM);return e.length==0?a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):a.jsxs("div",{children:[a.jsx("h4",{className:"mb-0",children:"Resources"}),a.jsx(Wt,{children:e.map(t=>a.jsx($M,{resource:t},t.resourceId))})]})},AM=({filter:e})=>{const t=it(),n=()=>{t(RM(e))};return a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"form-check",children:[a.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),a.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:n})]})})})},MM=({category:e})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>a.jsx(AM,{filter:t},t.featureId))]})}),DM=()=>{const e=it(),t=fe(TM),n=t.filter(r=>r.features.filter(o=>o.selected).length>0);return a.jsxs("div",{children:[a.jsx("h4",{className:"mb-0",children:"Filters"}),t.map(r=>a.jsx(MM,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(EM()),disabled:n.length==0,children:"Reset Filters"})]})},FM=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=it(),l=fe(kM),c=fe(NM);return w.useEffect(()=>{i(ha({apiUrl:e,excludedCategories:t,excludedFilters:n,excludedResources:r,allowedCategories:o,allowedFilters:s}))},[]),c?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):l?a.jsx(a.Fragment,{children:a.jsxs("div",{className:"row mt-3",children:[a.jsx("div",{className:"col-sm-4",children:a.jsx(DM,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(IM,{})})]})}):a.jsx(Do,{})},Lw={apiUrl:null,pages:1,publications:[],publicationsLoaded:!0,showPagination:!1,filterSelections:{allJournalsToggled:!1,doi:"",journal:"",authorName:"",publicationType:""},pageData:{current_page:1,last_page:1},filterOptions:{journals:[],publication_types:[]}},LM=Qe("publicationsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{await n(kr()),await n(Uw())}),kr=Qe("publicationsBrowser/getPublications",async(e,{getState:t})=>{const n=t().publicationsBrowser;let r=`${n.apiUrl}?page=${n.pageData.current_page}`;if(n.filterSelections.doi!==""&&(r+=`&doi=${encodeURIComponent(n.filterSelections.doi)}`),n.filterSelections.authorName!==""&&(r+=`&author_name=${encodeURIComponent(n.filterSelections.authorName)}`),n.filterSelections.journal!==""){const i=n.filterSelections.journal;n.filterOptions.journals.includes(i)&&(r+=`&journal=${encodeURIComponent(n.filterSelections.journal)}`)}return n.filterSelections.publicationType!==""&&(r+=`&publication_type=${encodeURIComponent(n.filterSelections.publicationType)}`),await(await fetch(r)).json()}),Uw=Qe("publicationsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().publicationsBrowser.apiUrl}?filters=1`;return(await(await fetch(o)).json()).filters||[]}),Vw=ri({name:"publicationsBrowser",initialState:Lw,reducers:{updatePageData:(e,{payload:t})=>{t.current_page&&(e.pageData.current_page=t.current_page),t.last_page&&(e.pageData.last_page=t.last_page)},updateFilterSelection:(e,{payload:t})=>{e.filterSelections[t.name]=t.value},resetFilters:e=>{e.filterSelections={doi:"",allJournalsToggled:!1,journal:"",authorName:"",publicationType:""}}},extraReducers:e=>{e.addCase(kr.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(kr.fulfilled,(t,n)=>{t.publicationsLoaded=!0,t.publications=n.payload.publications||[],n.payload.pagination&&n.payload.pagination.last_page!==t.pageData.last_page&&(t.pageData.current_page=1),t.showPagination=!0,n.payload.pagination&&(t.pageData.last_page=n.payload.pagination.last_page)}).addCase(kr.rejected,(t,n)=>{t.publicationsLoaded=!0,t.error=n.error.message}).addCase(Uw.fulfilled,(t,n)=>{t.filterOptions=n.payload})}}),{updatePageData:UM,updateFilterSelection:Rg,resetFilters:VM}=Vw.actions,BM=e=>e.publicationsBrowser.filterSelections,zM=e=>e.publicationsBrowser.publicationsLoaded,qM=e=>e.publicationsBrowser.publications,HM=e=>e.publicationsBrowser.filterOptions,WM=e=>e.publicationsBrowser.pageData,KM=Vw.reducer,Td=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),GM=({publication:e,index:t})=>{const n=e.authors.map(f=>`${f.last_name}, ${f.first_name.substr(0,1)}.`).join(", "),r=e.projects.map(f=>f.grant_number),o=e.publication_type==="Other"?"Publication":e.publication_type,s=e.projects,i=t%2==0?"bg-light":"",l={textIndent:"-50px",marginLeft:"50px"},c=e.publication_datas,u=f=>{switch(f){case"Publication Type":return e.publication_type;case"Publication Year":return e.publication_year?e.publication_year:"N/A";case"DOI":return e.doi?a.jsx("a",{href:`https://doi.org/${Td(e.doi)}`,target:"_blank",className:"fw-normal",children:Td(e.doi)}):!1;case"Journal":return e.journal.title?e.journal.title:!1;case"Volume/Issue":return c["Volume/Issue"]?c["Volume/Issue"]:!1;case"Pages":return c.Pages?c.Pages:!1;case"Publisher":return c.Publisher?c.Publisher:!1}},d=()=>{const f=u("Publication Year");let p=e.title;const y=u("Journal"),m=u("DOI"),h=u("Volume/Issue"),x=u("Pages"),v=u("Publisher");return p[p.length-1]!="."&&(p+="."),e.publication_type==="Journal Paper"||e.publication_type==="Other"?a.jsxs(a.Fragment,{children:[n," (",f,"). ",p,y?a.jsxs("em",{className:"ms-1",children:[y,"."]}):"",h?a.jsxs("span",{className:"ms-1",children:[h,","]}):"",x?a.jsxs("span",{className:"ms-1",children:[x,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Conference Paper"||e.publication_type==="Software"?a.jsxs(a.Fragment,{children:[n," (",f,"). ",p,y?a.jsxs("em",{className:"ms-1",children:[y,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Book"||e.publication_type==="Book Chapter"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p}),v?a.jsxs("em",{className:"ms-1",children:[v,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Dataset"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p})," [Dataset]. ",v||"",".",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Dissertation"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p}),". [Doctoral dissertation",v?", "+v:"","].",m?a.jsx("span",{className:"ms-1",children:m}):""]}):""};return a.jsx("div",{className:"col-12 mb-2 border-bottom",children:a.jsx("div",{className:"card",style:{border:"unset"},children:a.jsxs("div",{className:`card-body pt-2 mb-2 ${i}`,children:[a.jsx("p",{style:l,children:d()}),s.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-decoration-underline mb-2",children:["Projects Supporting this ",o]}),a.jsx("ul",{style:{...l,listStyleType:"none"},children:r.map((f,p)=>a.jsx("li",{id:`project_${p}`,children:a.jsx("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${f}`,id:`grant_link${p}`,target:"_blank",style:{fontWeight:"600"},children:f})},`grant_${p}`))})]})]})})})},YM=()=>{const e=fe(qM);return e.length===0?a.jsx("div",{children:"No Publications Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(GM,{publication:t,index:n},`publication_${n}`))})},QM=()=>{const e=it(),t=fe(HM),n=fe(BM),r=()=>{window.scrollTo(0,0),e(Cd(!1)),e(dl({current_page:1})),e(kr())},o=()=>{e(VM()),window.scrollTo(0,0),e(kr())};if(!t.journals)return a.jsx("p",{children:"Loading filters..."});const s=l=>{e(Rg({name:l.target.name,value:l.target.value}))},i=l=>{e(Rg({name:l.target.name,value:l.target.value}))};return a.jsx("div",{className:"row sticky-top mb-2",children:a.jsxs("div",{className:"col",children:[a.jsx("h3",{className:"mb-2",children:"Filters"}),a.jsx("h5",{id:"journals_filter_label",className:"mb-1",children:"Journals"}),a.jsxs("div",{className:"mb-3",children:[a.jsx("input",{placeholder:"Type to search...",list:"journal_list",name:"journal",id:"journal_select",value:n.journal,className:"form-control","aria-labelledby":"journal_filter_label",onChange:l=>s(l),onInput:l=>i(l)}),a.jsx("datalist",{id:"journal_list",children:t.journals.map((l,c)=>a.jsx("option",{value:l,children:l},`journal_${c}`))})]}),a.jsx("h5",{id:"author_name_label",className:"mb-1",children:"Author Name"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{placeholder:"Last Name, First Initial",type:"text",className:"form-control",value:n.authorName,name:"authorName",id:"authorName","aria-labelledby":"author_name",onChange:s})}),a.jsx("h5",{id:"doi_number_label",className:"mb-1",children:"DOI"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{type:"text",className:"form-control",value:Td(n.doi),name:"doi",id:"doiNumber","aria-labelledby":"doi_number_label",onChange:s})}),a.jsx("h5",{id:"publication_type_label",className:"mb-1",children:"Publication Type"}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"publicationType",id:"publication_type_select",value:n.publicationType,className:"form-control","aria-labelledby":"publication_type_label",onChange:l=>s(l),children:[a.jsx("option",{value:"",children:"-- All --"}),t.publication_types.map((l,c)=>a.jsx("option",{value:l,children:l},`publication_type_${c}`))]})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("button",{className:"btn btn-primary me-2",onClick:r,children:"Submit"}),a.jsx("button",{className:"btn btn-secondary",onClick:o,children:"Reset"})]})]})})},Ng=()=>{const e=it(),t=fe(WM),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(m,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{f()},[t]);const u=m=>{const h=parseInt(m);e(UM({current_page:m})),e(kr(h))},d=m=>(event.preventDefault(),s("0"),u(m),!1),f=()=>{const m=[];if(t.last_page>l)if(t.current_page>4){m.push(1),m.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&m.push(t.current_page-h);m.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&m.push(t.current_page+h);t.last_page-t.current_page>1&&(m.push("spacer"),m.push(t.last_page))}else[1,2,3,4,5].forEach(x=>{x==t.current_page?m.push(["current",x]):m.push(x)}),m.push("spacer"),m.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?m.push(["current",h]):m.push(h);r(m)},p=m=>{let h=m,x="";return typeof m=="object"?[h,x]=m:x=m,h=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):h=="current"?a.jsx("li",{className:"page-item active","aria-current":"page",children:a.jsx("span",{className:"page-link",style:c,children:x})}):a.jsx("li",{className:"page-item",children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(h),children:x})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:m=>d(m.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(m=>a.jsx("option",{value:m+1,children:m+1},`page_option_${m}`))]})});return a.jsx("div",{children:a.jsx("nav",{"aria-label":"Pages for the table",children:a.jsxs("ul",{className:"pagination",children:[a.jsx("li",{className:`page-item ${t.current_page==1?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>u(t.current_page-1),disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((m,h)=>a.jsx(_e.Fragment,{children:p(m)},`page_${h}`)),t.last_page>l?y():"",a.jsx("li",{className:`page-item ${t.current_page==t.last_page?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(t.current_page+1),disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},XM=({apiUrl:e})=>{const t=it(),n=fe(zM),r=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(LM())},[t]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(QM,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(Ng,{})})}),a.jsx("div",{className:"row",id:"publicationListRow",children:a.jsx("div",{className:"col",children:n?a.jsx(YM,{}):r})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(Ng,{})})})]})]})})},Bw=({id:e,type:t,checked:n,onChange:r})=>a.jsx("div",{className:"control-group",style:{marginBottom:"0px"},children:a.jsx("div",{className:"controls",children:a.jsxs("label",{htmlFor:e,className:"checkbox",children:[a.jsx("input",{onChange:()=>r(t.allocation_type_id),type:"checkbox",checked:n,id:e}),t.display_allocation_type]})})}),ZM=({types:e,createData:t})=>{const[n,r]=w.useState(""),[o,s]=w.useState([]),i=async(u,d)=>{t(u,d),r(""),s([])};function l(u){let d=o;d.includes(u)?d=d.filter(f=>f!==u):d=[...d,u],s(d)}function c(){s(o.length===e.length?[]:[...e.map(d=>d.allocation_type_id)])}return a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Keyword"}),a.jsx("th",{children:"Allocation Type"}),a.jsx("td",{})]})}),a.jsx("tbody",{children:a.jsxs("tr",{children:[a.jsx("td",{style:{width:"150px"},children:a.jsx("input",{type:"text",value:n,className:"form-control",onChange:u=>r(u.target.value)})}),a.jsx("td",{children:a.jsxs("div",{className:"form-inline",children:[a.jsx("div",{className:"control-group",style:{marginBottom:"0px"},children:a.jsx("div",{className:"controls",children:a.jsxs("label",{htmlFor:"select-all-checkbox",className:"checkbox",children:[a.jsx("input",{onChange:()=>c(),type:"checkbox",checked:o.length===e.length,id:"select-all-checkbox"}),"Select All"]})})}),e.map(u=>a.jsx(Bw,{id:`id_create_alloc_type_${u.allocation_type_id}`,type:u,checked:o.includes(u.allocation_type_id),onChange:l},`create_keyword_alloc_t_${u.allocation_type_id}`))]})}),a.jsx("td",{style:{width:"50px"},children:a.jsx("button",{className:"btn btn-primary",type:"button",onClick:async()=>i(n,o),children:"Add"})})]})})]})},JM=({keyword:e,keywordAllocationTypeIds:t,types:n,saveData:r,deleteData:o})=>{const[s,i]=w.useState(!1),[l,c]=w.useState(e.keyword),[u,d]=w.useState(t),f=()=>{i(!1),r(e.keyword_id,l,u)},p=h=>{let x=u;x.includes(h)?x=x.filter(v=>v!==h):x=[...x,h],d(x)};let y="",m=e.keyword.toString();return s?(m=a.jsx("input",{type:"text",id:e.keyword_id,value:l,onChange:h=>c(h.target.value)}),y=n.map(h=>a.jsx(Bw,{checked:u.includes(h.allocation_type_id),id:`keyword_${e.keyword}_alloc_type_${h.allocation_type_id}`,onChange:p,type:h},`keyword_${e.keyword}_alloc_t_${h.allocation_type_id}`))):y=n.filter(h=>t.includes(h.allocation_type_id)).map(h=>h.display_allocation_type).join(", "),a.jsxs("tr",{children:[a.jsxs("td",{children:[" ",m," "]}),a.jsxs("td",{children:[" ",y," "]}),s?a.jsxs("td",{style:{width:"150px"},children:[a.jsx("button",{style:{marginRight:"5px"},className:"btn btn-warning btn-sm",onClick:()=>i(!1),children:"Cancel"}),a.jsx("button",{className:"btn btn-success btn-sm",onClick:async()=>{f()},children:"Save"})]}):a.jsxs("td",{style:{width:"150px"},children:[a.jsx("button",{style:{marginRight:"5px"},className:"btn btn-primary btn-sm",onClick:()=>i(!0),children:"Edit"}),a.jsx("button",{className:"btn btn-danger btn-sm",onClick:async()=>o(e.keyword_id),children:"Delete"})]})]})};function eD({allocationTypes:e}){const[t,n]=w.useState([]),[r,o]=w.useState([]),[s,i]=w.useState(""),[l,c]=w.useState(!0),u=async h=>{const v=(await h.json()).message??"Error: Changes not saved";h.ok&&await f(),i(v),c(h.ok)},d=async(h,x)=>{const v=await fetch("/keywords",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({value:h,allocation_types:x})});await u(v)},f=async()=>{r.length===0&&o(e);const x=await(await fetch("/keywords",{headers:{"Content-Type":"application/json",Accept:"application/json"}})).json();n(x)},p=async(h,x,v)=>{const g=await fetch(`/keywords/${h}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({id:h,keyword:x,allocation_types:v})});await u(g)},y=async h=>{const x=await fetch(`/keywords/${h}`,{headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},method:"DELETE"});await u(x)};w.useEffect(()=>{f()},[]);let m=null;return s.length!==0&&(m=a.jsx(be,{color:l?"success":"warning",children:s})),a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"Type new keywords separated by semicolons, select the desired allocation types, and then submit."}),a.jsx(a.Fragment,{children:m}),a.jsx(ZM,{types:r,createData:d},"add-keywords"),a.jsx("h3",{children:"Current Keywords"}),a.jsxs("table",{className:"table table-bordered",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Keyword"}),a.jsx("th",{children:"Allocation Types"}),a.jsx("td",{})]})}),a.jsx("tbody",{children:t.map(h=>a.jsx(JM,{keyword:h,keywordAllocationTypeIds:h.allocation_type_keywords.map(x=>x.allocation_type_id),types:r,saveData:p,deleteData:y},h.keyword_id))})]})]})}function tD(e,{bootstrapFonts:t=!0,bootstrapVariables:n=!0,access:r=!1,baseUrl:o=null}={}){const s=e.attachShadow({mode:"open"}),i=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),u=document.createElement("div"),d=document.createElement("link"),f=document.createElement("link"),p=document.createElement("link");return o=o??(typeof document>"u"?require("url").pathToFileURL(__filename).href:Np&&Np.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),d.rel="stylesheet",d.href=`${o}/bootstrap.css`,f.rel="stylesheet",f.href=`${o}/xras-ui.css`,p.rel="stylesheet",p.href=`${o}/access.css`,c.appendChild(u),l.appendChild(c),i.appendChild(l),s.appendChild(d),s.appendChild(f),s.appendChild(p),s.appendChild(i),i.classList.add("bootstrap"),n&&l.classList.add("bootstrap-variables"),t&&(c.classList.add("bootstrap-fonts"),c.setAttribute("data-bs-theme","light")),u}function nD({target:e}){St.createRoot(e).render(a.jsx(XC,{}))}function rD({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){St.createRoot(o).render(a.jsx(gE,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function oD({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){St.createRoot(t).render(a.jsx(Cx,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function sD({target:e,username:t,routes:n}){Ff(n);const r=Mo({reducer:{api:nR}});St.createRoot(e).render(a.jsx(Vr,{store:r,children:a.jsx(fA,{username:t})}))}function iD({target:e,apiUrl:t}){const n=Mo({reducer:{projectsBrowser:RA},preloadedState:{projectsBrowser:{...xw,apiUrl:t}}});St.createRoot(e).render(a.jsx(Vr,{store:n,children:a.jsx(OA,{})}))}function aD({target:e,apiUrl:t}){const n=Mo({reducer:{publicationsBrowser:KM},preloadedState:{publicationsBrowser:{...Lw,apiUrl:t}}});St.createRoot(e).render(a.jsx(Vr,{store:n,children:a.jsx(XM,{apiUrl:t})}))}function zw(){return Mo({reducer:{publications_store:W2}})}function lD({target:e,routes:t}){Ff(t),St.createRoot(e).render(a.jsx(Vr,{store:zw(),children:a.jsx(Iw,{})}))}function cD({target:e,routes:t}){Ff(t),St.createRoot(e).render(a.jsx(Vr,{store:zw(),children:a.jsx(z2,{...JSON.parse(e.dataset.publicationsSelectProps)})}))}function uD({target:e,catalogSources:t,onRamps:n,baseUrl:r}){const o=Mo({reducer:{resourceCatalog:oM}});St.createRoot(e).render(a.jsx(Vr,{store:o,children:a.jsx(SM,{catalogSources:t,onRamps:n,baseUrl:r})}))}function dD({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=Mo({reducer:{resourceCatalog:PM}});St.createRoot(e).render(a.jsx(Vr,{store:l,children:a.jsx(FM,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function fD({allocationTypes:e,target:t}){St.createRoot(t).render(a.jsx(eD,{allocationTypes:e}))}exports.allocationsMap=nD;exports.editResource=oD;exports.keywords=fD;exports.onRampsResourceCatalog=uD;exports.projects=sD;exports.projectsBrowser=iD;exports.publications=lD;exports.publicationsBrowser=aD;exports.publicationsSelect=cD;exports.resourceCatalog=dD;exports.resources=rD;exports.shadowTarget=tD;
70
+ `]))),vI=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,i=s.colors,l=s.spacing.baseUnit;return K({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:l*2})},qc=function(t){var n=t.delay,r=t.offset;return G("span",{css:vp({animation:"".concat(gI," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},yI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=gn(t,lI);return G("div",Y({},Oe(K(K({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),G(qc,{delay:0,offset:r}),G(qc,{delay:160,offset:!0}),G(qc,{delay:320,offset:!r}))},xI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,i=s.colors,l=s.borderRadius,c=s.spacing;return K({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:o?i.primary:i.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},bI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.innerRef,i=t.innerProps,l=t.menuIsOpen;return G("div",Y({ref:s},Oe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":r||void 0}),n)},wI=bI,SI=["data"],_I=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},jI=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,i=t.Heading,l=t.headingProps,c=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return G("div",Y({},Oe(t,"group",{group:!0}),c),G(i,Y({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:s,cx:r}),u),G("div",null,n))},CI=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return K({label:"group",cursor:"default",display:"block"},n?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:s.baseUnit*3,paddingRight:s.baseUnit*3,textTransform:"uppercase"})},EI=function(t){var n=Yb(t);n.data;var r=gn(n,SI);return G("div",Y({},Oe(t,"groupHeading",{"group-heading":!0}),r))},RI=jI,NI=["innerRef","isDisabled","isHidden","inputClassName"],kI=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,i=s.spacing,l=s.colors;return K(K({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},TI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},ow={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},TI={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":K({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},ow)},OI=function(t){return K({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},ow)},PI=function(t){var n=t.cx,r=t.value,o=Yb(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=gn(o,NI);return G("div",Y({},Oe(t,"input",{"input-container":!0}),{"data-value":r||""}),G("input",Y({className:n({input:!0},c),ref:s,style:OI(l),disabled:i},u)))},II=PI,$I=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors;return K({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},AI=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return K({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:o/2,color:s.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},MI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors,l=t.isFocused;return K({alignItems:"center",display:"flex"},n?{}:{borderRadius:s/2,backgroundColor:l?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},sw=function(t){var n=t.children,r=t.innerProps;return G("div",r,n)},DI=sw,FI=sw;function LI(e){var t=e.children,n=e.innerProps;return G("div",Y({role:"button"},n),t||G(wp,{size:14}))}var UI=function(t){var n=t.children,r=t.components,o=t.data,s=t.innerProps,i=t.isDisabled,l=t.removeProps,c=t.selectProps,u=r.Container,d=r.Label,f=r.Remove;return G(u,{data:o,innerProps:K(K({},Oe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},G(d,{data:o,innerProps:K({},Oe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),G(f,{data:o,innerProps:K(K({},Oe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},VI=UI,BI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.theme,l=i.spacing,c=i.colors;return K({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:s?c.primary:o?c.primary25:"transparent",color:r?c.neutral20:s?c.neutral0:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:s?c.primary:c.primary50}})},zI=function(t){var n=t.children,r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.innerRef,l=t.innerProps;return G("div",Y({},Oe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},l),n)},qI=zI,HI=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return K({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},WI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Oe(t,"placeholder",{placeholder:!0}),r),n)},KI=WI,GI=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,i=o.colors;return K({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?i.neutral40:i.neutral80,marginLeft:s.baseUnit/2,marginRight:s.baseUnit/2})},YI=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return G("div",Y({},Oe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},QI=YI,XI={ClearIndicator:pI,Control:wI,DropdownIndicator:dI,DownChevron:nw,CrossIcon:wp,Group:RI,GroupHeading:EI,IndicatorsContainer:iI,IndicatorSeparator:mI,Input:II,LoadingIndicator:yI,Menu:WP,MenuList:GP,MenuPortal:eI,LoadingMessage:ZP,NoOptionsMessage:XP,MultiValue:VI,MultiValueContainer:DI,MultiValueLabel:FI,MultiValueRemove:LI,Option:qI,Placeholder:KI,SelectContainer:nI,SingleValue:QI,ValueContainer:oI},ZI=function(t){return K(K({},XI),t.components)},sg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function JI(e,t){return!!(e===t||sg(e)&&sg(t))}function e$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!JI(e[n],t[n]))return!1;return!0}function t$(e,t){t===void 0&&(t=e$);var n=null;function r(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];if(n&&n.lastThis===this&&t(o,n.lastArgs))return n.lastResult;var i=e.apply(this,o);return n={lastResult:i,lastArgs:o,lastThis:this},i}return r.clear=function(){n=null},r}var n$={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},r$=function(t){return G("span",Y({css:n$},t))},ig=r$,o$={guidance:function(t){var n=t.isSearchable,r=t.isMulti,o=t.tabSelectsValue,s=t.context,i=t.isInitialFocus;switch(s){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,o=r===void 0?"":r,s=t.labels,i=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(s.length>1?"s":""," ").concat(s.join(","),", selected.");case"select-option":return i?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,o=t.options,s=t.label,i=s===void 0?"":s,l=t.selectValue,c=t.isDisabled,u=t.isSelected,d=t.isAppleDevice,f=function(h,x){return h&&h.length?"".concat(h.indexOf(x)+1," of ").concat(h.length):""};if(n==="value"&&l)return"value ".concat(i," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var p=c?" disabled":"",y="".concat(u?" selected":"").concat(p);return"".concat(i).concat(y,", ").concat(f(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},s$=function(t){var n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,s=t.focusableOptions,i=t.isFocused,l=t.selectValue,c=t.selectProps,u=t.id,d=t.isAppleDevice,f=c.ariaLiveMessages,p=c.getOptionLabel,y=c.inputValue,m=c.isMulti,h=c.isOptionDisabled,x=c.isSearchable,v=c.menuIsOpen,g=c.options,b=c.screenReaderStatus,S=c.tabSelectsValue,_=c.isLoading,j=c["aria-label"],C=c["aria-live"],E=w.useMemo(function(){return K(K({},o$),f||{})},[f]),N=w.useMemo(function(){var D="";if(n&&E.onChange){var V=n.option,Q=n.options,O=n.removedValue,U=n.removedValues,A=n.value,H=function(ge){return Array.isArray(ge)?null:ge},B=O||V||H(A),W=B?p(B):"",Z=Q||U||void 0,ee=Z?Z.map(p):[],X=K({isDisabled:B&&h(B,l),label:W,labels:ee},n);D=E.onChange(X)}return D},[n,E,h,l,p]),R=w.useMemo(function(){var D="",V=r||o,Q=!!(r&&l&&l.includes(r));if(V&&E.onFocus){var O={focused:V,label:p(V),isDisabled:h(V,l),isSelected:Q,options:s,context:V===r?"menu":"value",selectValue:l,isAppleDevice:d};D=E.onFocus(O)}return D},[r,o,p,h,E,s,l,d]),T=w.useMemo(function(){var D="";if(v&&g.length&&!_&&E.onFilter){var V=b({count:s.length});D=E.onFilter({inputValue:y,resultsMessage:V})}return D},[s,y,v,E,g,b,_]),k=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var D="";if(E.guidance){var V=o?"value":v?"menu":"input";D=E.guidance({"aria-label":j,context:V,isDisabled:r&&h(r,l),isMulti:m,isSearchable:x,tabSelectsValue:S,isInitialFocus:k})}return D},[j,r,o,m,h,x,v,E,l,S,k]),M=G(w.Fragment,null,G("span",{id:"aria-selection"},N),G("span",{id:"aria-focused"},R),G("span",{id:"aria-results"},T),G("span",{id:"aria-guidance"},P));return G(w.Fragment,null,G(ig,{id:u},k&&M),G(ig,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&M))},i$=s$,Sd=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],a$=new RegExp("["+Sd.map(function(e){return e.letters}).join("")+"]","g"),iw={};for(var Hc=0;Hc<Sd.length;Hc++)for(var Wc=Sd[Hc],Kc=0;Kc<Wc.letters.length;Kc++)iw[Wc.letters[Kc]]=Wc.base;var aw=function(t){return t.replace(a$,function(n){return iw[n]})},l$=t$(aw),ag=function(t){return t.replace(/^\s+|\s+$/g,"")},c$=function(t){return"".concat(t.label," ").concat(t.value)},u$=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=K({ignoreCase:!0,ignoreAccents:!0,stringify:c$,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,c=o.trim,u=o.matchFrom,d=c?ag(r):r,f=c?ag(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=l$(d),f=aw(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},d$=["innerRef"];function f$(e){var t=e.innerRef,n=gn(e,d$),r=FP(n,"onExited","in","enter","exit","appear");return G("input",Y({ref:t},r,{css:vp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var p$=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function h$(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,i=w.useRef(!1),l=w.useRef(!1),c=w.useRef(0),u=w.useRef(null),d=w.useCallback(function(x,v){if(u.current!==null){var g=u.current,b=g.scrollTop,S=g.scrollHeight,_=g.clientHeight,j=u.current,C=v>0,E=S-_-b,N=!1;E>v&&i.current&&(r&&r(x),i.current=!1),C&&l.current&&(s&&s(x),l.current=!1),C&&v>E?(n&&!i.current&&n(x),j.scrollTop=S,N=!0,i.current=!0):!C&&-v>b&&(o&&!l.current&&o(x),j.scrollTop=0,N=!0,l.current=!0),N&&p$(x)}},[n,r,o,s]),f=w.useCallback(function(x){d(x,x.deltaY)},[d]),p=w.useCallback(function(x){c.current=x.changedTouches[0].clientY},[]),y=w.useCallback(function(x){var v=c.current-x.changedTouches[0].clientY;d(x,v)},[d]),m=w.useCallback(function(x){if(x){var v=AP?{passive:!1}:!1;x.addEventListener("wheel",f,v),x.addEventListener("touchstart",p,v),x.addEventListener("touchmove",y,v)}},[y,p,f]),h=w.useCallback(function(x){x&&(x.removeEventListener("wheel",f,!1),x.removeEventListener("touchstart",p,!1),x.removeEventListener("touchmove",y,!1))},[y,p,f]);return w.useEffect(function(){if(t){var x=u.current;return m(x),function(){h(x)}}},[t,m,h]),function(x){u.current=x}}var lg=["boxSizing","height","overflow","paddingRight","position"],cg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ug(e){e.preventDefault()}function dg(e){e.stopPropagation()}function fg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function pg(){return"ontouchstart"in window||navigator.maxTouchPoints}var hg=!!(typeof window<"u"&&window.document&&window.document.createElement),rs=0,Wr={capture:!1,passive:!1};function m$(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,o=w.useRef({}),s=w.useRef(null),i=w.useCallback(function(c){if(hg){var u=document.body,d=u&&u.style;if(r&&lg.forEach(function(m){var h=d&&d[m];o.current[m]=h}),r&&rs<1){var f=parseInt(o.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,y=window.innerWidth-p+f||0;Object.keys(cg).forEach(function(m){var h=cg[m];d&&(d[m]=h)}),d&&(d.paddingRight="".concat(y,"px"))}u&&pg()&&(u.addEventListener("touchmove",ug,Wr),c&&(c.addEventListener("touchstart",fg,Wr),c.addEventListener("touchmove",dg,Wr))),rs+=1}},[r]),l=w.useCallback(function(c){if(hg){var u=document.body,d=u&&u.style;rs=Math.max(rs-1,0),r&&rs<1&&lg.forEach(function(f){var p=o.current[f];d&&(d[f]=p)}),u&&pg()&&(u.removeEventListener("touchmove",ug,Wr),c&&(c.removeEventListener("touchstart",fg,Wr),c.removeEventListener("touchmove",dg,Wr)))}},[r]);return w.useEffect(function(){if(t){var c=s.current;return i(c),function(){l(c)}}},[t,i,l]),function(c){s.current=c}}var g$=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},v$={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function y$(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=r===void 0?!0:r,s=e.onBottomArrive,i=e.onBottomLeave,l=e.onTopArrive,c=e.onTopLeave,u=h$({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=m$({isEnabled:n}),f=function(y){u(y),d(y)};return G(w.Fragment,null,n&&G("div",{onClick:g$,css:v$}),t(f))}var x$={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},b$=function(t){var n=t.name,r=t.onFocus;return G("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:x$,value:"",onChange:function(){}})},w$=b$;function Sp(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function S$(){return Sp(/^iPhone/i)}function lw(){return Sp(/^Mac/i)}function _$(){return Sp(/^iPad/i)||lw()&&navigator.maxTouchPoints>1}function j$(){return S$()||_$()}function C$(){return lw()||j$()}var E$=function(t){return t.label},R$=function(t){return t.label},N$=function(t){return t.value},k$=function(t){return!!t.isDisabled},T$={clearIndicator:fI,container:tI,control:xI,dropdownIndicator:uI,group:_I,groupHeading:CI,indicatorsContainer:sI,indicatorSeparator:hI,input:kI,loadingIndicator:vI,loadingMessage:QP,menu:zP,menuList:KP,menuPortal:JP,multiValue:$I,multiValueLabel:AI,multiValueRemove:MI,noOptionsMessage:YP,option:BI,placeholder:HI,singleValue:GI,valueContainer:rI},O$={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},P$=4,cw=4,I$=38,$$=cw*2,A$={baseUnit:cw,controlHeight:I$,menuGutter:$$},Gc={borderRadius:P$,colors:O$,spacing:A$},M$={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:rg(),captureMenuScroll:!rg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:u$(),formatGroupLabel:E$,getOptionLabel:R$,getOptionValue:N$,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:k$,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!IP(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function mg(e,t,n,r){var o=fw(e,t,n),s=pw(e,t,n),i=dw(e,t),l=cl(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:i,value:l,index:r}}function fa(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,l){return mg(e,i,t,l)}).filter(function(i){return vg(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=mg(e,n,t,r);return vg(e,s)?s:void 0}).filter(MP)}function uw(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,cp(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function gg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,cp(r.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(r.index,"-").concat(o.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function D$(e,t){return uw(fa(e,t))}function vg(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!mw(e)||!s)&&hw(e,{label:i,value:l,data:o},r)}function F$(e,t){var n=e.focusedValue,r=e.selectValue,o=r.indexOf(n);if(o>-1){var s=t.indexOf(n);if(s>-1)return n;if(o<t.length)return t[o]}return null}function L$(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var Yc=function(t,n){var r,o=(r=t.find(function(s){return s.data===n}))===null||r===void 0?void 0:r.id;return o||null},dw=function(t,n){return t.getOptionLabel(n)},cl=function(t,n){return t.getOptionValue(n)};function fw(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function pw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=cl(e,t);return n.some(function(o){return cl(e,o)===r})}function hw(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var mw=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},U$=1,_p=function(e){rO(n,e);var t=iO(n);function n(r){var o;if(tO(this,n),o=t.call(this,r),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=C$(),o.controlRef=null,o.getControlRef=function(c){o.controlRef=c},o.focusedOptionRef=null,o.getFocusedOptionRef=function(c){o.focusedOptionRef=c},o.menuListRef=null,o.getMenuListRef=function(c){o.menuListRef=c},o.inputRef=null,o.getInputRef=function(c){o.inputRef=c},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(c,u){var d=o.props,f=d.onChange,p=d.name;u.name=p,o.ariaOnChange(c,u),f(c,u)},o.setValue=function(c,u,d){var f=o.props,p=f.closeMenuOnSelect,y=f.isMulti,m=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:m}),p&&(o.setState({inputIsHiddenAfterUpdate:!y}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(c,{action:u,option:d})},o.selectOption=function(c){var u=o.props,d=u.blurInputOnSelect,f=u.isMulti,p=u.name,y=o.state.selectValue,m=f&&o.isOptionSelected(c,y),h=o.isOptionDisabled(c,y);if(m){var x=o.getOptionValue(c);o.setValue(y.filter(function(v){return o.getOptionValue(v)!==x}),"deselect-option",c)}else if(!h)f?o.setValue([].concat(cp(y),[c]),"select-option",c):o.setValue(c,"select-option");else{o.ariaOnChange(c,{action:"select-option",option:c,name:p});return}d&&o.blurInput()},o.removeValue=function(c){var u=o.props.isMulti,d=o.state.selectValue,f=o.getOptionValue(c),p=d.filter(function(m){return o.getOptionValue(m)!==f}),y=Vi(u,p,p[0]||null);o.onChange(y,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Vi(o.props.isMulti,[],null),{action:"clear",removedValues:c})},o.popValue=function(){var c=o.props.isMulti,u=o.state.selectValue,d=u[u.length-1],f=u.slice(0,u.length-1),p=Vi(c,f,f[0]||null);o.onChange(p,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(c){return Yc(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return gg(fa(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var c=arguments.length,u=new Array(c),d=0;d<c;d++)u[d]=arguments[d];return RP.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return dw(o.props,c)},o.getOptionValue=function(c){return cl(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=T$[c](u,d);f.boxSizing="border-box";var p=o.props.styles[c];return p?p(f,u):f},o.getClassNames=function(c,u){var d,f;return(d=(f=o.props.classNames)[c])===null||d===void 0?void 0:d.call(f,u)},o.getElementId=function(c){return"".concat(o.state.instancePrefix,"-").concat(c)},o.getComponents=function(){return ZI(o.props)},o.buildCategorizedOptions=function(){return fa(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return uw(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,u){o.setState({ariaSelection:K({value:c},u)})},o.onMenuMouseDown=function(c){c.button===0&&(c.stopPropagation(),c.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(c){o.blockOptionHover=!1},o.onControlMouseDown=function(c){if(!c.defaultPrevented){var u=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&o.onMenuClose():u&&o.openMenu("first"):(u&&(o.openAfterFocus=!0),o.focusInput()),c.target.tagName!=="INPUT"&&c.target.tagName!=="TEXTAREA"&&c.preventDefault()}},o.onDropdownIndicatorMouseDown=function(c){if(!(c&&c.type==="mousedown"&&c.button!==0)&&!o.props.isDisabled){var u=o.props,d=u.isMulti,f=u.menuIsOpen;o.focusInput(),f?(o.setState({inputIsHiddenAfterUpdate:!d}),o.onMenuClose()):o.openMenu("first"),c.preventDefault()}},o.onClearIndicatorMouseDown=function(c){c&&c.type==="mousedown"&&c.button!==0||(o.clearValue(),c.preventDefault(),o.openAfterFocus=!1,c.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(c){typeof o.props.closeMenuOnScroll=="boolean"?c.target instanceof HTMLElement&&Jl(c.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(c)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(c){var u=c.touches,d=u&&u.item(0);d&&(o.initialTouchX=d.clientX,o.initialTouchY=d.clientY,o.userIsDragging=!1)},o.onTouchMove=function(c){var u=c.touches,d=u&&u.item(0);if(d){var f=Math.abs(d.clientX-o.initialTouchX),p=Math.abs(d.clientY-o.initialTouchY),y=5;o.userIsDragging=f>y||p>y}},o.onTouchEnd=function(c){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(c.target)&&o.menuListRef&&!o.menuListRef.contains(c.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(c){o.userIsDragging||o.onControlMouseDown(c)},o.onClearIndicatorTouchEnd=function(c){o.userIsDragging||o.onClearIndicatorMouseDown(c)},o.onDropdownIndicatorTouchEnd=function(c){o.userIsDragging||o.onDropdownIndicatorMouseDown(c)},o.handleInputChange=function(c){var u=o.props.inputValue,d=c.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(d,{action:"input-change",prevInputValue:u}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(c){o.props.onFocus&&o.props.onFocus(c),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(c){var u=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(c),o.onInputChange("",{action:"input-blur",prevInputValue:u}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(c){if(!(o.blockOptionHover||o.state.focusedOption===c)){var u=o.getFocusableOptions(),d=u.indexOf(c);o.setState({focusedOption:c,focusedOptionId:d>-1?o.getFocusedOptionId(c):null})}},o.shouldHideSelectedOptions=function(){return mw(o.props)},o.onValueInputFocus=function(c){c.preventDefault(),c.stopPropagation(),o.focus()},o.onKeyDown=function(c){var u=o.props,d=u.isMulti,f=u.backspaceRemovesValue,p=u.escapeClearsValue,y=u.inputValue,m=u.isClearable,h=u.isDisabled,x=u.menuIsOpen,v=u.onKeyDown,g=u.tabSelectsValue,b=u.openMenuOnFocus,S=o.state,_=S.focusedOption,j=S.focusedValue,C=S.selectValue;if(!h&&!(typeof v=="function"&&(v(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||y)return;o.focusValue("previous");break;case"ArrowRight":if(!d||y)return;o.focusValue("next");break;case"Delete":case"Backspace":if(y)return;if(j)o.removeValue(j);else{if(!f)return;d?o.popValue():m&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!x||!g||!_||b&&o.isOptionSelected(_,C))return;o.selectOption(_);break;case"Enter":if(c.keyCode===229)break;if(x){if(!_||o.isComposing)return;o.selectOption(_);break}return;case"Escape":x?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:y}),o.onMenuClose()):m&&p&&o.clearValue();break;case" ":if(y)return;if(!x){o.openMenu("first");break}if(!_)return;o.selectOption(_);break;case"ArrowUp":x?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":x?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!x)return;o.focusOption("pageup");break;case"PageDown":if(!x)return;o.focusOption("pagedown");break;case"Home":if(!x)return;o.focusOption("first");break;case"End":if(!x)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++U$),o.state.selectValue=tg(r.value),r.menuIsOpen&&o.state.selectValue.length){var s=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),l=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=s,o.state.focusedOption=i[l],o.state.focusedOptionId=Yc(s,i[l])}return o}return nO(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&ng(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var s=this.props,i=s.isDisabled,l=s.menuIsOpen,c=this.state.isFocused;(c&&!i&&o.isDisabled||c&&l&&!o.menuIsOpen)&&this.focusInput(),c&&i&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!c&&!i&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(ng(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,s){this.props.onInputChange(o,s)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var s=this,i=this.state,l=i.selectValue,c=i.isFocused,u=this.buildFocusableOptions(),d=o==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(l[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(c&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[d],focusedOptionId:this.getFocusedOptionId(u[d])},function(){return s.onMenuOpen()})}},{key:"focusValue",value:function(o){var s=this.state,i=s.selectValue,l=s.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var c=i.indexOf(l);l||(c=-1);var u=i.length-1,d=-1;if(i.length){switch(o){case"previous":c===0?d=0:c===-1?d=u:d=c-1;break;case"next":c>-1&&c<u&&(d=c+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:i[d]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",s=this.props.pageSize,i=this.state.focusedOption,l=this.getFocusableOptions();if(l.length){var c=0,u=l.indexOf(i);i||(u=-1),o==="up"?c=u>0?u-1:l.length-1:o==="down"?c=(u+1)%l.length:o==="pageup"?(c=u-s,c<0&&(c=0)):o==="pagedown"?(c=u+s,c>l.length-1&&(c=l.length-1)):o==="last"&&(c=l.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:l[c],focusedValue:null,focusedOptionId:this.getFocusedOptionId(l[c])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Gc):K(K({},Gc),this.props.theme):Gc}},{key:"getCommonProps",value:function(){var o=this.clearValue,s=this.cx,i=this.getStyles,l=this.getClassNames,c=this.getValue,u=this.selectOption,d=this.setValue,f=this.props,p=f.isMulti,y=f.isRtl,m=f.options,h=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:h,isMulti:p,isRtl:y,options:m,selectOption:u,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,s=o.isClearable,i=o.isMulti;return s===void 0?i:s}},{key:"isOptionDisabled",value:function(o,s){return fw(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return pw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return hw(this.props,o,s)}},{key:"formatOptionLabel",value:function(o,s){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,l=this.state.selectValue;return this.props.formatOptionLabel(o,{context:s,inputValue:i,selectValue:l})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,s=o.isDisabled,i=o.isSearchable,l=o.inputId,c=o.inputValue,u=o.tabIndex,d=o.form,f=o.menuIsOpen,p=o.required,y=this.getComponents(),m=y.Input,h=this.state,x=h.inputIsHidden,v=h.ariaSelection,g=this.commonProps,b=l||this.getElementId("input"),S=K(K(K({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":p,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(v==null?void 0:v.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?w.createElement(m,Y({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:s,isHidden:x,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c},S)):w.createElement(f$,Y({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:al,onFocus:this.onInputFocus,disabled:s,tabIndex:u,inputMode:"none",form:d,value:""},S))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,s=this.getComponents(),i=s.MultiValue,l=s.MultiValueContainer,c=s.MultiValueLabel,u=s.MultiValueRemove,d=s.SingleValue,f=s.Placeholder,p=this.commonProps,y=this.props,m=y.controlShouldRenderValue,h=y.isDisabled,x=y.isMulti,v=y.inputValue,g=y.placeholder,b=this.state,S=b.selectValue,_=b.focusedValue,j=b.isFocused;if(!this.hasValue()||!m)return v?null:w.createElement(f,Y({},p,{key:"placeholder",isDisabled:h,isFocused:j,innerProps:{id:this.getElementId("placeholder")}}),g);if(x)return S.map(function(E,N){var R=E===_,T="".concat(o.getOptionLabel(E),"-").concat(o.getOptionValue(E));return w.createElement(i,Y({},p,{components:{Container:l,Label:c,Remove:u},isFocused:R,isDisabled:h,key:T,index:N,removeProps:{onClick:function(){return o.removeValue(E)},onTouchEnd:function(){return o.removeValue(E)},onMouseDown:function(P){P.preventDefault()}},data:E}),o.formatOptionLabel(E,"value"))});if(v)return null;var C=S[0];return w.createElement(d,Y({},p,{data:C,isDisabled:h}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),s=o.ClearIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!this.isClearable()||!s||c||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(s,Y({},i,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),s=o.LoadingIndicator,i=this.commonProps,l=this.props,c=l.isDisabled,u=l.isLoading,d=this.state.isFocused;if(!s||!u)return null;var f={"aria-hidden":"true"};return w.createElement(s,Y({},i,{innerProps:f,isDisabled:c,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator,i=o.IndicatorSeparator;if(!s||!i)return null;var l=this.commonProps,c=this.props.isDisabled,u=this.state.isFocused;return w.createElement(i,Y({},l,{isDisabled:c,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),s=o.DropdownIndicator;if(!s)return null;var i=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(s,Y({},i,{innerProps:u,isDisabled:l,isFocused:c}))}},{key:"renderMenu",value:function(){var o=this,s=this.getComponents(),i=s.Group,l=s.GroupHeading,c=s.Menu,u=s.MenuList,d=s.MenuPortal,f=s.LoadingMessage,p=s.NoOptionsMessage,y=s.Option,m=this.commonProps,h=this.state.focusedOption,x=this.props,v=x.captureMenuScroll,g=x.inputValue,b=x.isLoading,S=x.loadingMessage,_=x.minMenuHeight,j=x.maxMenuHeight,C=x.menuIsOpen,E=x.menuPlacement,N=x.menuPosition,R=x.menuPortalTarget,T=x.menuShouldBlockScroll,k=x.menuShouldScrollIntoView,P=x.noOptionsMessage,M=x.onMenuScrollToTop,D=x.onMenuScrollToBottom;if(!C)return null;var V=function(W,Z){var ee=W.type,X=W.data,ie=W.isDisabled,ge=W.isSelected,Se=W.label,Ae=W.value,F=h===X,L=ie?void 0:function(){return o.onOptionHover(X)},te=ie?void 0:function(){return o.selectOption(X)},J="".concat(o.getElementId("option"),"-").concat(Z),re={id:J,onClick:te,onMouseMove:L,onMouseOver:L,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ge};return w.createElement(y,Y({},m,{innerProps:re,data:X,isDisabled:ie,isSelected:ge,key:J,label:Se,type:ee,value:Ae,isFocused:F,innerRef:F?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(W.data,"menu"))},Q;if(this.hasOptions())Q=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var W=B.data,Z=B.options,ee=B.index,X="".concat(o.getElementId("group"),"-").concat(ee),ie="".concat(X,"-heading");return w.createElement(i,Y({},m,{key:X,data:W,options:Z,Heading:l,headingProps:{id:ie,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(ge){return V(ge,"".concat(ee,"-").concat(ge.index))}))}else if(B.type==="option")return V(B,"".concat(B.index))});else if(b){var O=S({inputValue:g});if(O===null)return null;Q=w.createElement(f,m,O)}else{var U=P({inputValue:g});if(U===null)return null;Q=w.createElement(p,m,U)}var A={minMenuHeight:_,maxMenuHeight:j,menuPlacement:E,menuPosition:N,menuShouldScrollIntoView:k},H=w.createElement(qP,Y({},m,A),function(B){var W=B.ref,Z=B.placerProps,ee=Z.placement,X=Z.maxHeight;return w.createElement(c,Y({},m,A,{innerRef:W,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:ee}),w.createElement(y$,{captureEnabled:v,onTopArrive:M,onBottomArrive:D,lockEnabled:T},function(ie){return w.createElement(u,Y({},m,{innerRef:function(Se){o.getMenuListRef(Se),ie(Se)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:X,focusedOption:h}),Q)}))});return R||N==="fixed"?w.createElement(d,Y({},m,{appendTo:R,controlElement:this.controlRef,menuPlacement:E,menuPosition:N}),H):H}},{key:"renderFormField",value:function(){var o=this,s=this.props,i=s.delimiter,l=s.isDisabled,c=s.isMulti,u=s.name,d=s.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!l)return w.createElement(w$,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(c)if(i){var p=f.map(function(h){return o.getOptionValue(h)}).join(i);return w.createElement("input",{name:u,type:"hidden",value:p})}else{var y=f.length>0?f.map(function(h,x){return w.createElement("input",{key:"i-".concat(x),name:u,type:"hidden",value:o.getOptionValue(h)})}):w.createElement("input",{name:u,type:"hidden",value:""});return w.createElement("div",null,y)}else{var m=f[0]?this.getOptionValue(f[0]):"";return w.createElement("input",{name:u,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,s=this.state,i=s.ariaSelection,l=s.focusedOption,c=s.focusedValue,u=s.isFocused,d=s.selectValue,f=this.getFocusableOptions();return w.createElement(i$,Y({},o,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:l,focusedValue:c,isFocused:u,selectValue:d,focusableOptions:f,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),s=o.Control,i=o.IndicatorsContainer,l=o.SelectContainer,c=o.ValueContainer,u=this.props,d=u.className,f=u.id,p=u.isDisabled,y=u.menuIsOpen,m=this.state.isFocused,h=this.commonProps=this.getCommonProps();return w.createElement(l,Y({},h,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:m}),this.renderLiveRegion(),w.createElement(s,Y({},h,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:m,menuIsOpen:y}),w.createElement(c,Y({},h,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(i,Y({},h,{isDisabled:p}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,s){var i=s.prevProps,l=s.clearFocusValueOnUpdate,c=s.inputIsHiddenAfterUpdate,u=s.ariaSelection,d=s.isFocused,f=s.prevWasFocused,p=s.instancePrefix,y=o.options,m=o.value,h=o.menuIsOpen,x=o.inputValue,v=o.isMulti,g=tg(m),b={};if(i&&(m!==i.value||y!==i.options||h!==i.menuIsOpen||x!==i.inputValue)){var S=h?D$(o,g):[],_=h?gg(fa(o,g),"".concat(p,"-option")):[],j=l?F$(s,g):null,C=L$(s,S),E=Yc(_,C);b={selectValue:g,focusedOption:C,focusedOptionId:E,focusableOptionsWithIds:_,focusedValue:j,clearFocusValueOnUpdate:!1}}var N=c!=null&&o!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=u,T=d&&f;return d&&!T&&(R={value:Vi(v,g,g[0]||null),options:g,action:"initial-input-focus"},T=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(R=null),K(K(K({},b),N),{},{prevProps:o,ariaSelection:R,prevWasFocused:T})}}]),n}(w.Component);_p.defaultProps=M$;var V$=w.forwardRef(function(e,t){var n=Rb(e);return w.createElement(_p,Y({ref:t},n))}),jp=V$;function go({bg:e="dark",children:t,color:n="light",fontWeight:r="bold",icon:o="info-circle-fill",initial:s=!1,maxWidth:i="200px",padding:l="10px",placement:c,target:u,trigger:d="click",visible:f=!0}){const p=typeof s=="string"||s instanceof String,[y,m]=w.useState(p?localStorage.getItem(s)!="true":s),[h,x]=w.useState(!1);w.useEffect(()=>{setTimeout(()=>x(!0),100)},[]);const v=()=>{p&&localStorage.setItem(s,"true")},g=a.jsxs(Ll,{style:{"--bs-tooltip-bg":`var(--bs-${e})`,"--bs-tooltip-color":`var(--bs-${n})`,"--bs-tooltip-max-width":i,"--bs-tooltip-padding-x":l,"--bs-tooltip-padding-y":l,fontWeight:r},children:[a.jsx("button",{"aria-label":"Close",onClick:()=>{v(),m(!1)},style:{background:"transparent",border:"0 none transparent",float:"right"},children:a.jsx("i",{className:"bi bi-x-lg"})}),t]});return u&&u.current?a.jsx(jb,{target:u.current,placement:c,show:y&&f&&h,children:g}):a.jsx(lp,{placement:c,onToggle:b=>{v(),m(b)},overlay:g,show:y&&f&&h,trigger:d,children:a.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:a.jsx("i",{className:`bi bi-${o}`})})})}const B$="_items_c2dbg_1",z$="_item_c2dbg_1",q$="_details_c2dbg_14",H$="_text_c2dbg_20",W$="_number_c2dbg_35",K$="_outer_c2dbg_50",G$="_inner_c2dbg_61",xn={items:B$,item:z$,details:q$,text:H$,number:W$,outer:K$,inner:G$},os=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function Y$({requestId:e,grantNumber:t,creditColorClass:n="gray-300",colorClasses:r=Zu}){const{request:o}=at(e,t);if(!o)return;let s=0,i;const l=[];for(let p of o.resources)p.isBoolean||(p.isCredit?i=p:l.push(p),s+=Ju(p));const c=[],u=[];let d=-.25;const f=[...l,i].map((p,y)=>{if(!p)return null;const m=y+1,x=Ju(p)/s,v=p.requested-p.used,g=Math.max(0,v),b=p.isCredit?s/p.exchangeRates.base.unitCost:p.requested,S=b==0?0:100*g/b,j=`var(--bs-${p.isCredit?n:r[y%r.length]})`;if(x>0){const C=d,E=d+x/2,N=d+=x,R=x>.5?1:0,T=[`M ${os(C,100)}`,`A 100 100 0 ${R} 1 ${os(N,100)}`,`L ${os(N,50)}`,`A 50 50 0 ${R} 0 ${os(C,50)}`].join(" "),[k,P]=os(E,75).split(" ").map(M=>parseFloat(M));c.push(a.jsx("path",{d:T,style:{fill:j}},p.resourceId)),u.push(a.jsx("circle",{cx:k,cy:P,r:"8",fill:"black"},`${p.resourceId}-circle`),a.jsx("text",{x:k-4,y:P+4,fill:"white",className:xn.number,children:m},`${p.resourceId}-text`))}return p.isCredit&&u.push(a.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:a.jsx("div",{className:xn.text,children:a.jsxs("div",{children:[a.jsx("strong",{children:nt(g,{abbreviate:!0})}),p.unit," available"]})})},"center-text")),a.jsxs("li",{className:xn.item,children:[a.jsx("span",{className:xn.number,children:m}),a.jsx("span",{className:`${xn.outer} ms-2 me-2`,style:{borderColor:j},children:a.jsx("span",{className:xn.inner,style:{backgroundColor:j,width:`${S}%`}})}),a.jsxs("strong",{className:xn.name,children:[a.jsx(Jn,{resource:p,userGuide:!1}),": "]}),a.jsxs("span",{className:xn.details,children:[nt(v,{abbreviate:!0})," ",p.isCredit?null:a.jsxs(a.Fragment,{children:["of ",nt(b,{abbreviate:!0})," "]}),p.unit," ",p.isCredit?"available":"remaining"," (",Math.round(S),"%)"]})]},p.resourceId)});return a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-3 mb-3 d-flex flex-row align-items-center justify-content-center",children:a.jsxs("svg",{version:"1.1",viewBox:"-100 -100 200 200",width:"200",height:"200",xmlns:"http://www.w3.org/2000/svg",children:[c,u]})}),a.jsx("div",{className:"col-lg-9 mb-3 d-flex flex-column justify-content-center",children:a.jsx("ul",{className:xn.items,children:f})})]})}const yg=e=>e;function Q$({classes:e,clean:t=yg,format:n=yg,label:r,setValue:o,style:s,value:i}){const l=n(i),[c,u]=w.useState(l);return w.useEffect(()=>{u(l)},[l]),a.jsx("input",{type:"text","aria-label":r,className:`form-control ${e}`,value:c,style:s,onChange:d=>u(d.target.value),onBlur:d=>{const f=t(d.target.value);u(n(f)),o(f)},onKeyDown:d=>{d.code=="Enter"&&(d.preventDefault(),d.target.blur())}})}function X$({requestId:e,grantNumber:t}){const{request:n,addResource:r,openUsageDetailModal:o,resetResources:s,setResourceRequest:i,setResourcesReason:l,statuses:c,toggleActionsModal:u,toggleConfirmModal:d,toggleResourcesModal:f}=at(e,t),{project:p}=Rt(t||n&&n.grantNumber),y=w.useRef(null),m=w.useRef(null);if(!n||!p)return;const h="Exchange"in n.allowedActions,x="Renewal"in n.allowedActions,v="Supplement"in n.allowedActions,g=n.exchangeStatus==c.pending,b=n.exchangeStatus==c.success,S=n.exchangeStatus==c.error,_=n.exchangeErrors,j=n.exchangeActionId!==null,C=n.exchangeActionEditable,E=n.resources,N=n.resourcesReason,R={};for(let F of E)R[F.resourceId]=F;const T=()=>{px(n)>=.75?u():d()},k=[];for(let F of E){let L=[];if(F.requested>0){for(let te of F.requires||[]){let J=R[te];if(J){if(J.requested>0){L=[];break}L.push(J)}}L.length&&k.push(a.jsxs("span",{children:[a.jsx(Jn,{resource:F,userGuide:!1})," requires"," ",fx(L.map(te=>a.jsx(Jn,{resource:te,userGuide:!1},te.resourceId)),"or"),"."]},F.resourceId))}}const P=k.length>0;let M;b?M=a.jsx(be,{color:"info",children:"Your exchange request has been submitted."}):S&&_.length>0&&_[0].includes("PI")&&_[0].includes("person status Unknown")?M=a.jsx(be,{color:"danger",children:p.currentUser.role==="pi"?a.jsxs(a.Fragment,{children:["Please"," ",a.jsx("a",{href:ne.routes.profile_path(),children:"update your academic status"})," ","before making an exchange request."]}):a.jsxs(a.Fragment,{children:["The primary investigator for this project has an unknown academic status. Please ask"," ",p.users.filter(F=>F.role==="pi").map(F=>`${F.firstName} ${F.lastName}`)," ","to update the academic status in their profile, and then try again."]})}):S?M=a.jsxs(be,{color:"danger",children:["Sorry, something went wrong: ",_.join(", "),". For assistance, please"," ",a.jsx("a",{href:"https://support.access-ci.org/open-a-ticket",children:"open a help ticket"})," ","and include this message."]}):j?M=a.jsx(be,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):n.timeStatus=="current"&&!p.isManager?M=a.jsxs(be,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",Mf(p)," to request a change."]}):P&&(M=a.jsxs(be,{color:"warning",children:[k," Please adjust your balance values."]}));const D=N.length>0;let V=!1,Q=!1;for(let F of E)if(F.isNew&&(V=!0),F.allocated!=F.requested&&(Q=!0),V&&Q)break;const O=E.map(F=>F.resourceId),U={},A={},H=[];if(h&&C){n.allowedActions.Exchange.resources.filter(F=>!O.includes(F.resourceId)).map(F=>{U[F.resourceId]=F;const L=`${F.type} Resources (${F.unit})`;A[L]=A[L]||[],A[L].push(F)});for(const[F,L]of Object.entries(A))H.push({label:F,options:L.sort((te,J)=>te.exchangeRates.current.unitCost<J.exchangeRates.current.unitCost||te.exchangeRates.current.unitCost==J.exchangeRates.current.unitCost&&te.name<J.name?-1:1).map(te=>{const J=Ol(te.name),re=J.short?`${J.short} (${J.full.replace(/ \([^(]+\)/,"")})`:J.full;return{value:te.resourceId,label:re}})}),H.sort((te,J)=>te.label<J.label?-1:1)}const B=h?n.allowedActions.Exchange.resources.map(F=>F.resourceId):[];let W;const Z=[],ee=[];for(let F of E)F.isCredit?W=F:(Z.push(F),ee.push(C&&(F.isNew||F.allocated!=F.requested)?Cr.edited:B.includes(F.resourceId)?"":Cr.disabled));const X=`Add ${Z.length?"another":"a"} resource to your exchange...`,ie=F=>F.requested-F.used,ge=(F,L)=>{const te=L.allocated-L.used,J=po(Number(F.replace(/[^0-9-.]/g,"")),L.decimalPlaces),re=Math.min(0,te);if(J<re)return re;let lt=W.requested*W.exchangeRates.base.unitCost;const Pt=(L.allocated-L.requested)*L.exchangeRates.base.unitCost,It=Math.min(lt,Pt);lt-=It;let ct=L.requested-L.used+It/L.exchangeRates.base.unitCost;return lt>0&&(ct+=lt/L.exchangeRates.current.unitCost),J>ct?po(ct,L.decimalPlaces,"floor"):J},Se=F=>F.isBoolean?a.jsx(a.Fragment,{children:"—"}):a.jsxs(a.Fragment,{children:[kn(ne.resourceTypeIcons[W.icon]),a.jsx("span",{className:"ms-2",children:CC(F.unit,F.exchangeRates.current.unitCost,W.name)})]}),Ae=[{key:"name",name:"Resource",format:(F,L)=>a.jsxs(a.Fragment,{children:[a.jsx(Jn,{resource:L}),(p.currentUser.resourceIds.includes(L.resourceId)||p.currentUser.resourceAccountInactiveIds.includes(L.resourceId))&&a.jsx(tl,{icon:"table",onClick:()=>o(L.resourceRepositoryKey),target:"_blank",title:`${L.name} Usage Details`})," ",a.jsx(Oo,{status:L.isActive?"Active":L.isNew?"New":"Inactive"})]}),width:Math.min(350,window.innerWidth*.3)},{key:"unit",name:"Unit Cost",width:300,format:(F,L)=>Se(L)}];return h&&Ae.push({key:"requested",name:"Balance",class:"text-end",rowClass:F=>C&&B.includes(F.resourceId)?Cr.input:"",format:(F,L)=>{const te=C&&B.includes(L.resourceId);return L.isBoolean?a.jsxs("span",{className:"d-flex",children:[a.jsx("span",{className:"w-100",children:a.jsx("input",{className:"form-check-input",type:"checkbox",checked:F==1,disabled:!te,onChange:J=>i(L.resourceId,J.target.checked?1:0)})}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:"Requested"})]}):a.jsxs("span",{className:"d-flex",children:[te?a.jsx(Q$,{classes:"text-end w-100",clean:J=>ge(J,L),format:nt,label:`Balance for ${L.name}`,setValue:J=>{i(L.resourceId,J+L.used)},style:{padding:"0.1rem 0.5rem"},value:ie(L)}):a.jsx("span",{children:nt(ie(L))}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:L.unit})]})},formatHeader:F=>a.jsxs(a.Fragment,{children:[F,C?a.jsx(go,{bg:"secondary",color:"dark",initial:"myprojects.requestedAllocation",placement:"top-end",visible:p.tab=="resources",children:"You can increase or decrease the balance below to change your allocation on a resource. Enter the total amount you would like to have available once the exchange is complete."}):null]})},{key:"change",name:"Credit Change",format:(F,L)=>{const J=-1*(L.requested-L.allocated)*L.exchangeRates.current.unitCost;return J!==0?a.jsxs("span",{className:`badge bg-${J>0?"primary":"danger"} rounded-pill`,children:[J>0?"+":"",nt(J,W)," ",W.unit]}):a.jsx(a.Fragment,{children:"—"})}}),a.jsxs("div",{className:"resources",children:[M,E.length?a.jsx(Y$,{requestId:e}):null,W&&(h||x||v)?a.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[a.jsxs("span",{children:[kn(ne.resourceTypeIcons.credit)," ",nt(W.requested,W)," ",W.unit," available to exchange"]}),x||v?a.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:T,children:[kn(ne.resourceTypeIcons.credit)," Request More"," ",n.usesCredits?"Credits":"Units"]}):null]}):null,Z.length?a.jsx(Un,{columns:Ae,rows:Z,rowClasses:ee,classes:H.length?"mb-0":"",frozenColumns:2,minWidth:"800px"}):a.jsx("div",{className:"card p-2 text-bg-light p-3",children:"This project does not have any resources."}),H.length?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:y,children:a.jsx(jp,{classNames:{control:()=>"react-select mb-1"},options:H,onChange:F=>r(F.value),placeholder:X,value:null,"aria-label":X,formatOptionLabel:({value:F,label:L})=>{const te=U[F];return a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsx("span",{children:a.jsx(Jn,{resource:te,userGuide:!1},L)}),a.jsx("span",{children:Se(te)})]})}})}),Z.length?null:a.jsx(go,{bg:"secondary",color:"dark",visible:p.tab=="resources",initial:!0,target:y,children:"Ready to get started? Search for a resource to add it to your project."}),a.jsxs("p",{className:"text-black-50",style:{fontSize:"0.9rem"},children:["Need help choosing a resource? Visit our"," ",a.jsx("a",{href:ne.routes.resources_path(),children:"Resource Catalog"}),"."]})]}):null,h&&C?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{htmlFor:"resources-reason",className:"form-label required",children:"Please briefly explain how the requested resources and amounts will contribute to your research."}),a.jsx("textarea",{className:"form-control",id:"resources-reason",rows:"2",value:N,onChange:F=>l(F.target.value),style:{minHeight:"3rem"}})]}),a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:g||!Q&&!D&&!V,onClick:s,children:"Reset Form"}),a.jsx("button",{ref:m,type:"button",className:"btn btn-secondary",disabled:g||!Q||!D||P,onClick:f,children:g?"Submitting...":"Submit for Approval"})]}),Q&&!P?a.jsx(go,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:m,visible:p.tab=="resources",children:"When you are finished adding resources, enter a justification for the requested resources above. Then you can submit your exchange for approval."}):null]}):null]})}function Z$({question:e,requestId:t,grantNumber:n}){const{request:r,setResourceQuestionValues:o}=at(t,n),s=w.useId();if(!e||!r||r.error)return;const{attributeSetId:i,attributes:l,fieldType:c,label:u,resourceId:d,values:f}=e,p=l[0],y=p.required?"required":"",m=b=>o(d,i,b.target.value?[b.target.value]:[]),h=b=>{o(d,i,Array.from(b.target.options).filter(({selected:S})=>S).map(({value:S})=>parseInt(S,10)))},x=b=>{const S=parseInt(b.target.value,10),_=b.target.checked?[...f,S]:f.filter(j=>j!=S);o(d,i,_)},v=b=>{const S=parseInt(b.target.value);o(d,i,isNaN(S)?[]:[S])};let g;if(["calendar","integer_only","text"].includes(c)){const b={calendar:"date",integer_only:"number",text:"text"}[c];g=a.jsx("input",{className:"form-control",id:s,type:b,placeholder:p.label,required:p.required,value:f[0]||"",onChange:c=="integer_only"?v:m})}else if(c=="textarea")g=a.jsx("textarea",{className:"form-control",id:s,placeholder:p.label,required:p.required,value:f[0]||"",onChange:m});else if(c=="drop_down"||l.length>=10){const b=c=="multi_sel";g=a.jsxs("select",{id:s,className:"form-select",required:p.required,multiple:b,onChange:b?h:v,value:b?f:f[0]||"",children:[b?null:a.jsx("option",{}),l.map(S=>a.jsx("option",{value:S.resourceAttributeId,children:S.label},S.resourceAttributeId))]})}else g=a.jsx("div",{id:s,children:l.map(b=>{const S=`resource-attribute-${b.resourceAttributeId}`;return a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:c=="single_sel"?"radio":"checkbox",id:S,value:b.resourceAttributeId,checked:f.includes(b.resourceAttributeId),onChange:c=="single_sel"?v:x}),a.jsx("label",{className:"form-check-label",htmlFor:S,children:b.label})]},b.resourceAttributeId)})});return a.jsxs("div",{className:"mb-3",children:[a.jsx("label",{htmlFor:s,className:`form-label ${y}`,children:u}),g]})}function J$({requestId:e,grantNumber:t}){const{request:n,saveResources:r,toggleResourcesModal:o}=at(e,t),{project:s}=Rt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=[],l=n.resources.filter(u=>u.allocated!=u.requested).map(u=>{const d=u.requested-u.allocated;return u.questions&&i.push(...u.questions),a.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center mb-0",children:[u.name,a.jsx("span",{className:`badge bg-${d>0?"primary":"danger"} rounded-pill`,children:u.isBoolean?Af(u.requested):a.jsxs(a.Fragment,{children:[d>0?"+":"",nt(d,u)," ",u.unit]})})]},u.resourceId)}),c=i.some(({attributes:u,values:d})=>d.length==0&&u[0].required);return a.jsxs(ve,{size:"lg",show:n.showResourcesModal,onHide:o,scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Complete Your Exchange"})}),a.jsxs(ve.Body,{children:[a.jsx("p",{children:"Please review your exchange to make sure it includes all the resources you need. Once you submit it, you will not be able to request another exchange until this one has been processed by the resource providers."}),a.jsx("ul",{className:"list-group mb-3",children:l}),i.length?a.jsxs(a.Fragment,{children:[a.jsx("h2",{children:"Resource Questions"}),a.jsx("p",{children:"Some of the resources you selected have associated questions. Please answer the questions below."}),i.map(u=>a.jsx(Z$,{question:u,requestId:e,grantNumber:t},u.attributeSetId))]}):null]}),a.jsx(ve.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Continue Editing"}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:r,disabled:c,children:"Submit"})]})})]})}function gw({user:e}){const t=`${e.lastName}, ${e.firstName}`;let n=t,r=[e.organization,e.email].filter(o=>o).join(", ");return r&&(n+=`: ${r}`),a.jsx("abbr",{title:n,children:t})}function eA({requestId:e,grantNumber:t}){const{project:n}=Rt(t),{request:r,closeUsageDetailModal:o}=at(e,t);if(!r||r.error||!n||n.error||!r.usageDetailStatus)return;let s,i="Usage";if(r.usageDetailStatus==Le.pending)s=a.jsx(Do,{});else if(r.usageDetailStatus==Le.error)s=a.jsx(be,{color:"danger",children:"An error occurred while loading usage data."});else{const{projectTitle:l,resourceDisplayName:c,resourceRepositoryKey:u,users:d}=r.usageDetail,{full:f,short:p}=Ol(c),y=r.resources.find(v=>v.resourceRepositoryKey==u),m=v=>nt(v,{decimalPlaces:y?y.decimalPlaces:void 0}),h={};for(let v of n.users)h[v.username]=v;i=a.jsxs(a.Fragment,{children:["Usage: ",p||f," for ",l]});const x=[{key:"name",name:"Name",format:(v,{lastName:g,firstName:b,portalUsername:S})=>{const _=h[S];return _?a.jsx(gw,{user:_}):`${g}, ${b}`}},{key:"portalUsername",name:"Resource Username",format:v=>{const g=h[v],b=g?g.resourceUsernames[y.resourceId]:null;return b||a.jsx(a.Fragment,{children:"—"})}},{key:"role",name:"Role",format:v=>hx[v].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:m},{key:"lastMonth",name:"Last Month",class:"text-end",format:m},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:m},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:m},{key:"total",name:"All Time",class:"text-end",format:m}];s=d.length?a.jsx(Un,{rows:d,columns:x}):a.jsx(be,{color:"info",children:"There is no usage for this resource."})}return a.jsxs(ve,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:i})}),a.jsx(ve.Body,{children:s})]})}var tA=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function nA(e){var t=e.defaultOptions,n=t===void 0?!1:t,r=e.cacheOptions,o=r===void 0?!1:r,s=e.loadOptions;e.options;var i=e.isLoading,l=i===void 0?!1:i,c=e.onInputChange,u=e.filterOption,d=u===void 0?null:u,f=gn(e,tA),p=f.inputValue,y=w.useRef(void 0),m=w.useRef(!1),h=w.useState(Array.isArray(n)?n:void 0),x=Ue(h,2),v=x[0],g=x[1],b=w.useState(typeof p<"u"?p:""),S=Ue(b,2),_=S[0],j=S[1],C=w.useState(n===!0),E=Ue(C,2),N=E[0],R=E[1],T=w.useState(void 0),k=Ue(T,2),P=k[0],M=k[1],D=w.useState([]),V=Ue(D,2),Q=V[0],O=V[1],U=w.useState(!1),A=Ue(U,2),H=A[0],B=A[1],W=w.useState({}),Z=Ue(W,2),ee=Z[0],X=Z[1],ie=w.useState(void 0),ge=Ue(ie,2),Se=ge[0],Ae=ge[1],F=w.useState(void 0),L=Ue(F,2),te=L[0],J=L[1];o!==te&&(X({}),J(o)),n!==Se&&(g(Array.isArray(n)?n:void 0),Ae(n)),w.useEffect(function(){return m.current=!0,function(){m.current=!1}},[]);var re=w.useCallback(function(It,ct){if(!s)return ct();var Ce=s(It,ct);Ce&&typeof Ce.then=="function"&&Ce.then(ct,function(){return ct()})},[s]);w.useEffect(function(){n===!0&&re(_,function(It){m.current&&(g(It||[]),R(!!y.current))})},[]);var lt=w.useCallback(function(It,ct){var Ce=NP(It,ct,c);if(!Ce){y.current=void 0,j(""),M(""),O([]),R(!1),B(!1);return}if(o&&ee[Ce])j(Ce),M(Ce),O(ee[Ce]),R(!1),B(!1);else{var Bn=y.current={};j(Ce),R(!0),B(!P),re(Ce,function(zn){m&&Bn===y.current&&(y.current=void 0,R(!1),M(Ce),O(zn||[]),B(!1),X(zn?K(K({},ee),{},so({},Ce,zn)):ee))})}},[o,re,P,ee,c]),Pt=H?[]:_&&P?Q:v||[];return K(K({},f),{},{options:Pt,isLoading:N||l,onInputChange:lt,filterOption:d})}var rA=w.forwardRef(function(e,t){var n=nA(e),r=Rb(n);return w.createElement(_p,Y({ref:t},r))}),oA=rA;const xg=({description:e,disabled:t=!1,onChange:n,selectedLength:r,totalLength:o})=>{const s=w.useRef(),i=w.useId();let l=r==o,c=r>0&&!l;return w.useEffect(()=>{s.current&&(s.current.checked=l,s.current.indeterminate=c)},[l,c]),a.jsxs(a.Fragment,{children:[a.jsx("input",{className:"custom-checkbox form-check-input",disabled:t,id:i,onChange:u=>n(u.target.checked),ref:s,type:"checkbox"}),a.jsx("label",{className:"form-check-label",htmlFor:i,"aria-description":`${l?"Deselect":"Select"} ${e}`})]})};function sA({grantNumber:e,requestId:t}){const{project:n,addUser:r,resetUsers:o,saveUsers:s,setTab:i,setUserRole:l,statuses:c,toggleUsersResources:u}=Rt(e),{request:d}=n?at(t||n.currentRequestId,e):{request:null};if(!n||!n.currentRequestId||!d||n.error||d.error)return;const f=n.isManager,p="Exchange"in d.allowedActions,y=n.usersStatus==c.pending,m=n.usersStatus==c.success,h=n.usersStatus==c.error,x=n.users,v=d.resources.filter(od),g=v.length==0,b=x.find(R=>R.hasChanges)!==void 0,S=x.find(R=>R.role!="pi")!==void 0;let _;m&&!b?_=a.jsx(be,{color:"info",children:"Your changes have been saved. Creation of user accounts can take some time. Users can check the status of their accounts on the Overview tab of the My Projects page."}):h?_=a.jsx(be,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):f?v.length?g&&(_=a.jsx(be,{color:"warning",children:"This project does not have any active resources."})):_=a.jsxs(be,{color:"warning",children:["This project does not have any resources."," ",p?a.jsx("a",{href:ne.routes.request_action_path(d.requestId,"new?action_type=Exchange"),onClick:R=>{R.preventDefault(),i("resources")},children:"Exchange credits for resources."}):null," ","Additional users can be added after an exchange is approved."]}):_=a.jsxs(be,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",Mf(n)," to request a change."]});const j=(R,T)=>{let k,P,M,D;if(T.key=="all"){k="all resources for all users",P=V=>u(V),M=0;for(let V of x)M+=V.resourceIds.length;D=x.length*v.length}else k=`all users for ${T.name}`,P=V=>u(V,null,T.key),M=x.filter(({resourceIds:V})=>V.includes(T.key)).length,D=x.length;return a.jsxs(a.Fragment,{children:[T.key=="all"?R:a.jsx(Jn,{resource:T,userGuide:!1}),a.jsx("br",{}),a.jsx(xg,{description:k,disabled:T.disabled,onChange:P,selectedLength:M,totalLength:D})]})},C=Pl.map(({role:R,name:T})=>a.jsx("option",{value:R,children:T},R)),E=[{key:"name",name:"Name",width:200,format:(R,T)=>a.jsx(gw,{user:T})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(R,T)=>a.jsx("select",{className:"form-select",value:R,onChange:k=>l(T.username,k.target.value),disabled:!f||R=="pi"||R=="co_pi",style:{position:"absolute",left:0,top:0,bottom:0,right:0,borderWidth:0},children:C.filter(k=>k.key==R||!["pi","co_pi"].includes(k.key))})}];v.length&&E.push({key:"all",name:"All Resources",class:`text-center ${Cr.important}`,disabled:!f||g,width:100,format:(R,T)=>a.jsx(xg,{description:`all users for ${T.name}`,disabled:!f||g,onChange:k=>u(k,T.username),selectedLength:T.resourceIds.length,totalLength:v.length}),formatHeader:j});for(let R of v)E.push({key:R.resourceId,name:R.name,class:"text-center",disabled:!f||!R.isActive,icon:R.icon,format:(T,k)=>a.jsx(a.Fragment,{children:a.jsx("input",{className:"form-check-input",disabled:!f||!R.isActive,onChange:P=>u(P.target.checked,k.username,R.resourceId),type:"checkbox",checked:k.resourceIds.includes(R.resourceId)})}),formatHeader:j});const N=x.map(R=>R.hasChanges?Cr.edited:"");return a.jsxs(a.Fragment,{children:[_,a.jsx(Un,{rows:x,columns:E,frozenColumns:v.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:N,scrollRowIndex:n.usersNewRowIndex}),f&&v.length&&!g?a.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:a.jsx(oA,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await PE(R)).map(k=>({isDisabled:k.eligibility==="no",label:a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsxs("span",{className:k.eligibility==="no"?"text-decoration-line-through":"",style:{color:k.eligibility==="no"?"#707070":void 0},children:[k.username," (",k.firstName," ",k.lastName,","," ",k.organization,k.email?`, ${k.email}`:""]}),k.eligibility==="no"&&k.eligibilityReason&&a.jsxs("span",{className:"text-danger ms-2",children:[a.jsx("i",{className:"bi bi-exclamation-octagon"})," ",k.eligibilityReason]})]}),value:k})),onChange:R=>r(R.value),placeholder:"Add another user...",value:null,"aria-label":"Add another user"})}):null,f&&(v.length&&!g||S)?a.jsxs("div",{className:"d-flex mt-3",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:y||!b,onClick:o,children:"Reset Form"}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:y||!b,onClick:s,children:y?"Saving...":"Save Changes"})]}):null]})}function iA({requestId:e,grantNumber:t}){const{request:n}=at(e,t),{project:r,setRequest:o,setTab:s}=Rt(t||n.grantNumber);if(!n)return;if(n.error)return a.jsx(be,{color:"danger",children:n.error});const i=n.timeStatus||n.actions[0].status.toLowerCase(),l=n.actions.find(({showDeleteModal:d})=>d),c=[];n.resources.length||c.push("resources"),e!=r.currentRequestId&&c.push("users");const u=(r.users||[]).filter(d=>d.eligibility==="no"&&d.role!=="user");return a.jsxs("div",{className:"request",children:[n.returnedForCorrections?a.jsxs(be,{color:"warning",children:[a.jsx("p",{children:"Your request has been returned for corrections. These are the notes from the Allocations Team"}),a.jsx("div",{className:iR.returnedForCorrectionsNotes,children:n.returnedForCorrectionsNotes}),a.jsx("p",{className:"mt-3",children:"Please address these issues by clicking the Edit button to edit your request."})]}):"",n.timeStatus!="current"&&!n.returnedForCorrections?a.jsxs(be,{color:"warning",children:["You are viewing ","aeiou".includes(i[0])?"an":"a"," ",i," request."," ",c.length?`You cannot manage ${c.join(" or ")} for this request.`:""," ",r.currentRequestId?a.jsx("a",{href:ne.routes.request_path(r.currentRequestId),onClick:d=>{d.preventDefault(),o(r.currentRequestId)},children:"Go to the current request."}):null]}):null,r.isManager&&u.length>0&&a.jsxs(be,{color:"danger",children:["Some project personnel need to update their profiles. You will be unable to submit exchanges, renewals, and other actions until these issues are resolved:",a.jsx("br",{}),a.jsx("ul",{className:"fs-6 mb-0",children:u.map(d=>a.jsxs("li",{children:[a.jsxs("strong",{children:[d.firstName," ",d.lastName," (",d.username,"):"]})," ",d.eligibilityReason]},d.username))})]}),a.jsxs(gN,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx(Ii,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(YT,{requestId:e,grantNumber:t})}),a.jsx(Ii,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(X$,{requestId:e})}),a.jsx(Ii,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx(sA,{grantNumber:t})}),a.jsx(Ii,{eventKey:"history",title:"History",children:a.jsx(jT,{requestId:e})})]}),a.jsx(bT,{grantNumber:t,requestId:e}),a.jsx(wT,{grantNumber:t,requestId:e}),a.jsx(ST,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(J$,{grantNumber:t,requestId:e}),a.jsx(eA,{grantNumber:t,requestId:e})]})}function aA({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleDeleteModal:o}=at(e,t);if(!n)return;const{actions:s,allowedActions:i}=n,l=[];i&&(("Extension"in i||"Renewal"in i)&&l.push(["Extend End Date",u=>{u.preventDefault(),r()},"calendar-plus"]),"Final Report"in i&&l.push(["Submit Final Report",`${ne.routes.request_action_path(e,"new")}?action_type=Final+Report`,"file-earmark-check"]));const c=s.find(u=>u.isRequest);if(c){const u=c.allowedOperations||[];u.includes("Edit")&&l.push(["Edit",ne.routes.edit_request_path(n.requestId),"pencil"]),u.includes("Delete")&&l.push(["Delete",d=>{d.preventDefault(),o(c.actionId)},"trash","danger"])}return l.map(([u,d,f,p])=>{const y=a.jsxs(a.Fragment,{children:[" ",f&&a.jsx("i",{className:`bi bi-${f} me-1`}),u]});return typeof d=="function"?a.jsx("button",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,onClick:d,children:y},u):a.jsx("a",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,href:d,children:y},u)})}function lA({open:e=!1,grantNumber:t,title:n,status:r}){const[o,s]=w.useState(e),{project:i,setRequest:l}=Rt(t,!o&&n&&r&&!0),c=`project-${t}`;let u=null;if(o&&i)if(i.error)u=a.jsx(be,{color:"danger",children:i.error});else{let d;const f=i.requestsList.map(p=>(p.requestId==i.selectedRequestId&&(d=p),a.jsx("option",{value:p.requestId,children:$f(p)},p.requestId)));u=a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"d-flex",children:[a.jsx("select",{className:"form-select","aria-label":"Select a request to display",onChange:p=>l(parseInt(p.target.value,10)),value:i.selectedRequestId,disabled:f.length<2,children:f}),a.jsx(aA,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(iA,{...d,grantNumber:t}):null]})}return a.jsxs("div",{className:`${vm.project} card mb-3`,children:[a.jsxs("div",{className:`card-header d-flex justify-content-between ${o?"":"border-bottom-0"}`,children:[a.jsx("button",{"aria-expanded":o,"aria-controls":c,className:vm.expand,onClick:()=>s(!o),children:a.jsxs("h2",{className:"mb-1 mt-1 text-start",children:[a.jsx("i",{className:`bi bi-caret-${o?"down":"right"}-fill`})," ",/^[A-Z]/.test(t)?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"grant-number",children:[t,":"]})," "]}):null,n||i.title]})}),a.jsx(Oo,{status:r||i.status})]}),a.jsx("div",{className:"card-body",id:c,hidden:!o||!i,children:u})]})}function cA({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=nR(e);if(r)return a.jsx(Do,{});if(n)return a.jsxs(be,{color:"danger",children:[n," ",a.jsx("a",{href:"#",onClick:i=>{i.preventDefault(),window.location.reload()},children:"Reload the page"})," ","to try again."]});if(!o.length)return a.jsxs("div",{className:"pt-5 pb-5 text-bg-light border border-light-subtle",children:[a.jsx("p",{className:"fs-2 text-center mb-4",children:"You don't have any projects yet."}),a.jsxs("div",{className:"d-flex gap-2 justify-content-center",children:[a.jsxs("a",{className:"btn btn-primary w-25",href:ne.routes.project_types_path(),children:[a.jsx("i",{className:"bi bi-boxes fs-1 d-block"})," Learn about Project Types"]}),a.jsxs("a",{className:"btn btn-secondary w-25",href:ne.routes.get_your_first_project_path(),children:[a.jsx("i",{className:"bi bi-cpu fs-1 d-block"})," Learn How to Get Your"," ",a.jsx("br",{className:"d-none d-xxl-inline"})," First Project"]}),a.jsxs("a",{className:"btn btn-primary w-25",href:ne.routes.how_to_path(),children:[a.jsx("i",{className:"bi bi-person-plus fs-1 d-block"})," Learn How to Join an Existing Project"]})]})]});const s=new URLSearchParams(window.location.hash.slice(1)).get("grantNumber");return o.map((i,l)=>a.jsx(lA,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const vw={apiUrl:null,listIsFiltered:!1,pages:1,projects:[],projectsLoaded:!1,filtersLoaded:!0,showPagination:!1,singleEntry:!1,filters:{org:"",allocationType:"",allFosToggled:!0,resource:"",requestNumber:""},pageData:{current_page:1,last_page:1},typeLists:{orgs:[],fosTypes:[],allocationTypes:[],resources:[]}},uA=Ye("projectsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{const r=window.location.search,o=new URLSearchParams(r);o.has("_requestNumber")&&(n(Cd({name:"requestNumber",value:o.get("_requestNumber")})),n(xw(!0))),await n(_d()),await n(Rr()),n(dA())}),dA=Ye("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(yw({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),_d=Ye("projectsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().projectsBrowser.apiUrl}?filters=1`,i=await(await fetch(o)).json();n(yw(i.filters))}),Rr=Ye("projectsBrowser/getProjects",async(e,{getState:t,dispatch:n})=>{const r=t().projectsBrowser,o=r.filters,s=r.typeLists,i=s.fosTypes.filter(d=>d.checked);let l=`${r.apiUrl}?page=${r.pageData.current_page}`;return o.requestNumber!=""?(l+=`&request_number=${o.requestNumber}`,n(bg(!0))):(n(bg(!1)),i.length!=s.fosTypes.length&&(l+=`&fos=${i.map(d=>d.fosTypeId).join(",")}`),o.org!=""&&o.org!="-- ALL --"&&(l+=`&org=${encodeURIComponent(o.org)}`),o.allocationType!=""&&(l+=`&allocation_type=${o.allocationType}`),o.resource!=""&&(l+=`&resources=${o.resource}`)),await(await fetch(l)).json()}),Cp=ri({name:"projectsBrowser",initialState:vw,reducers:{resetFilters:e=>{e.filters={org:"",allocationType:"",allFosToggled:!1,resource:"",requestNumber:""},e.singleEntry=!1,Cp.caseReducers.toggleAllFos(e)},setApiUrl:(e,{payload:t})=>{e.apiUrl=t},setShowPagination:(e,{payload:t})=>{e.showPagination=t},setTypeLists:(e,{payload:t})=>{e.typeLists=t},toggleAllFos:e=>{e.typeLists.fosTypes.forEach(t=>t.checked=!e.filters.allFosToggled),e.filters.allFosToggled=!e.filters.allFosToggled},toggleFos:(e,{payload:t})=>{e.typeLists.fosTypes.forEach(n=>{n.fosTypeId==t.fosTypeId&&(n.checked=!n.checked)}),e.typeLists.fosTypes.filter(n=>n.checked).length!=e.typeLists.fosTypes.length?e.filters.allFosToggled=!1:e.filters.allFosToggled=!0},toggleListFiltered:(e,{payload:t})=>{e.listIsFiltered=t},toggleSingleEntry:(e,{payload:t})=>{e.singleEntry=t},updateFilter:(e,{payload:t})=>{e.filters[t.name]=t.value},updatePageData:(e,{payload:t})=>{t.current_page&&(e.pageData.current_page=t.current_page),t.last_page&&(e.pageData.last_page=t.last_page)}},extraReducers:e=>{e.addCase(Rr.pending,t=>{t.projectsLoaded=!1}).addCase(Rr.fulfilled,(t,n)=>{const r=n.payload;t.projectsLoaded=!0,t.projects=r.projects,r.pages!=t.pageData.last_page&&(t.pageData.current_page=1),t.showPagination=!0,t.pageData.last_page=r.pages}).addCase(Rr.rejected,(t,n)=>{console.log(n.error)}).addCase(_d.pending,t=>{t.filtersLoaded=!1}).addCase(_d.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:fA,setApiUrl:fD,setShowPagination:jd,setTypeLists:yw,toggleAllFos:pA,toggleFos:hA,toggleListFiltered:xw,toggleSingleEntry:bg,updateFilter:Cd,updatePageData:ul}=Cp.actions,mA=e=>e.projectsBrowser.filters,gA=e=>e.projectsBrowser.filtersLoaded,vA=e=>e.projectsBrowser.listIsFiltered,yA=e=>e.projectsBrowser.singleEntry,xA=e=>e.projectsBrowser.projectsLoaded,bA=e=>e.projectsBrowser.pageData,wA=e=>e.projectsBrowser.projects,SA=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,_A=e=>e.projectsBrowser.typeLists,jA=Cp.reducer;const CA=()=>{const e=it(),t=pe(mA),n=pe(_A),r=pe(vA),o=n.orgs.map(h=>({label:h,value:h})),s=w.useRef(),[i,l]=w.useState(null),c={height:"200px",overflowX:"auto",padding:"2px"},u=h=>{e(Cd({name:h.target.name,value:h.target.value}))},d=()=>{window.scrollTo(0,0),p(!0),e(jd(!1)),e(ul({current_page:1})),e(Rr())},f=()=>{l(null),e(jd(!1)),e(ul({current_page:1})),e(fA()),r&&(window.scrollTo(0,0),e(Rr()),p(!1))},p=h=>{e(xw(h))},y=h=>{l(h),e(Cd({name:"org",value:h.value}))},m=()=>t.org==""&&t.allocationType==""&&t.allFosToggled&&t.resource==""&&t.requestNumber=="";return a.jsx("div",{className:"row sticky-top mb-2",children:a.jsxs("div",{className:"col",children:[a.jsx("h3",{className:"mb-2",children:"Filters"}),a.jsx("h5",{className:"mb-1",children:"Field of Science"}),a.jsxs("div",{className:"border mb-3",style:c,children:[a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:"",id:"toggle_all",checked:t.allFosToggled,onChange:()=>{e(pA())}}),a.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),n.fosTypes.map(h=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:h.fosTypeId,id:`fos_${h.fosTypeId}`,checked:h.checked,onChange:()=>e(hA(h))}),a.jsx("label",{className:"form-check-label",htmlFor:`fos_${h.fosTypeId}`,children:h.fosName})]},`fos_${h.fosTypeId}`))]}),a.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),a.jsx("div",{className:"mb-3",children:a.jsx(jp,{options:o,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:s,closeMenuOnSelect:!0,onChange:y,value:i,"aria-labelledby":"org_select_label"},"org_select")}),a.jsx("h5",{id:"project_type_label",className:"mb-1",children:a.jsx("abbr",{title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"allocationType",id:"project_type_select",value:t.allocationType,className:"form-control","aria-labelledby":"project_type_label",onChange:h=>u(h),children:[a.jsx("option",{value:"",children:"-- All --"}),n.allocationTypes.map((h,x)=>a.jsx("option",{value:h,children:h},`allocation_type_${x}`))]})}),a.jsx("h5",{id:"resource_filter_label",className:"mb-1",children:"Resource"}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"resource",id:"resource_select",value:t.resource,className:"form-control","aria-labelledby":"resource_filter_label",onChange:h=>u(h),children:[a.jsx("option",{value:"",children:"-- All --"}),n.resources.map((h,x)=>a.jsx("option",{value:h.resourceId,children:h.resourceName},`resource_${x}`))]})}),a.jsx("h5",{id:"request_number_label",className:"mb-1",children:"Request Number"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{type:"text",className:"form-control",value:t.requestNumber,name:"requestNumber",id:"requestNumber","aria-labelledby":"request_number_label",onChange:h=>u(h)})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("button",{className:"btn btn-primary me-2",onClick:d,children:"Submit"}),a.jsx("button",{className:"btn btn-secondary",disabled:m(),onClick:f,children:"Reset"})]})]})})};const EA=({project:e})=>{const t=e.resources,[n,r]=w.useState(!1),o=pe(yA);let s={flush:!0,className:"mt-3 mb-1",alwaysOpen:!0};const i=g=>{let b=g.units?g.units:g.resourceUnits;const S=g.allocation?g.allocation:g.amount;if(b=="[Yes = 1, No = 0]"||b=="Yes / No")return S=="1.0"?"Yes":"No";{let _="0";return parseInt(S)&&(_=parseInt(S).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),b=="ACCESS Credits"&&(b=a.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),b=="Dollars"?`$${_}`:a.jsxs(a.Fragment,{children:[_," ",b]})}},l=()=>{const{origin:g,pathname:b}=window.location,S=`${g}${b}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(S),setTimeout(()=>r(!1),2e3)},c=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",u=a.jsx(Ll,{id:"link-tooltip",children:"Link Copied!"}),d=()=>{if(c()){const g={background:"none",border:"none",color:"#fff",fontSize:"24px"};return a.jsx(lp,{placement:"left",trigger:"click",defaultShow:n,show:n,onToggle:()=>r(!n),overlay:u,children:a.jsx("button",{onClick:l,style:g,children:a.jsx("i",{className:"bi bi-link-45deg",children:a.jsx("div",{className:"d-none",children:"Direct link to project"})})})})}return a.jsx(a.Fragment,{})},f=()=>{const g=e.pi.split(",");return`${g[1]} ${g[0]}`},p=()=>!e.coPis||e.coPis.length<=0?"":a.jsxs(a.Fragment,{children:[a.jsx("br",{}),a.jsxs("small",{className:"fst-italic",children:["CoPI(s): ",e.coPis.map(g=>`${g.name} (${g.organization})`).join(";")]})]}),y=()=>!e.beginDate||!e.endDate?"-":a.jsxs(a.Fragment,{children:[e.beginDate," to ",e.endDate]}),m=()=>e.allocationType==="NAIRR Start-Up"?a.jsxs("span",{className:"fw-bold",children:[c()," Start-Up: ",f(),", ",a.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"fw-bold",children:[c()," ",e.requestTitle]})," ",a.jsx("br",{}),a.jsxs("span",{className:"fst-italic",children:[e.pi," ",a.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),p()]}),h=a.jsxs("table",{className:"table table-striped table-bordered mt-2 mb-0",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("span",{className:"m-0 p-0",children:"Resource"})}),a.jsx("td",{children:a.jsx("span",{className:"m-0 p-0 d-inline",children:"Allocation"})})]})}),a.jsx("tbody",{children:t.map((g,b)=>a.jsxs("tr",{children:[a.jsx("td",{children:g.resourceName}),a.jsx("td",{style:{whiteSpace:"nowrap"},children:i(g)})]},`resource_${e.requestId}_${b}`))})]}),x=a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row mt-2 fw-bold",children:a.jsx("div",{className:"col-3 border-bottom",children:"Resources"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:h})})]}),v=()=>e.allocationType==="NAIRR Start-Up"?x:o?a.jsxs(a.Fragment,{children:[x,a.jsx("div",{className:"row mt-2 fw-bold",children:a.jsx("div",{className:"col-3 border-bottom",children:"Abstract"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:e.abstract})})})]}):a.jsxs(Gt,{...s,children:[a.jsxs(Gt.Item,{eventKey:"0",children:[a.jsx(Gt.Header,{children:"Resources"}),a.jsx(Gt.Body,{children:h})]}),a.jsxs(Gt.Item,{eventKey:"1",children:[a.jsx(Gt.Header,{children:"Abstract"}),a.jsx(Gt.Body,{children:a.jsx("div",{style:{whiteSpace:"pre-wrap",padding:"5px"},children:e.abstract})})]})]});return a.jsxs("div",{className:"card mb-4",children:[a.jsx("div",{className:"card-header bg-primary text-white",children:a.jsxs("div",{className:"d-flex justify-content-between",children:[a.jsx("div",{children:m()}),a.jsx("div",{children:d()})]})}),a.jsxs("div",{className:"card-body",children:[a.jsxs("div",{className:"row fw-bold border-bottom",children:[a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0",children:"Field of Science"})}),a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 tooltip-underline",title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0",children:"Dates"})})]}),a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col",children:e.fos}),a.jsx("div",{className:"col",children:e.allocationType}),a.jsx("div",{className:"col",children:y()})]}),v()]})]})},RA=()=>{const e=pe(wA);return e.length==0?a.jsx("div",{children:"No Projects Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(EA,{project:t},`project_${n}`))})};const wg=()=>{const e=it(),t=pe(bA),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(m,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{f()},[t]);const u=m=>{const h=parseInt(m);e(ul({current_page:m})),e(Rr(h))},d=m=>(event.preventDefault(),s("0"),u(m),!1),f=()=>{const m=[];if(t.last_page>l)if(t.current_page>4){m.push(1),m.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&m.push(t.current_page-h);m.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&m.push(t.current_page+h);t.last_page-t.current_page>1&&(m.push("spacer"),m.push(t.last_page))}else[1,2,3,4,5].forEach(x=>{x==t.current_page?m.push(["current",x]):m.push(x)}),m.push("spacer"),m.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?m.push(["current",h]):m.push(h);r(m)},p=m=>{let h="";return typeof m=="object"?[m,h]=m:h=m,m=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):m=="current"?a.jsx("li",{className:"page-item active","aria-current":"page",children:a.jsx("span",{className:"page-link",style:c,children:h})}):a.jsx("li",{className:"page-item",children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(m),children:h})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:m=>d(m.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(m=>a.jsx("option",{value:m+1,children:m+1},`page_option_${m}`))]})});return a.jsx("div",{children:a.jsx("nav",{"aria-label":"Pages for the table",children:a.jsxs("ul",{className:"pagination",children:[a.jsx("li",{className:`page-item ${t.current_page==1?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>u(t.current_page-1),disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((m,h)=>a.jsx(je.Fragment,{children:p(m)},`page_${h}`)),t.last_page>l?y():"",a.jsx("li",{className:`page-item ${t.current_page==t.last_page?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(t.current_page+1),disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},NA=({api_url:e})=>{const t=it(),n=pe(xA),r=pe(gA),o=pe(SA),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(uA())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(CA,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(wg,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(RA,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(wg,{scroll:"projects_browser_app"}):""})})]})]})})},kA=e=>e.publications_store.publication,TA=e=>e.publications_store.publication.doi,OA=e=>e.publications_store.publication_types,bw=e=>e.publications_store.publication.authors,PA=e=>e.publications_store.tag_categories,IA=e=>e.publications_store.projects,$A=e=>e.publications_store.publication.tags,AA=e=>e.publications_store.errors,ww=e=>e.publications_store.data_loaded,Sw=e=>e.publications_store.show_saved,Ep=e=>e.publications_store.saving,MA=e=>e.publications_store.modal,_w=e=>e.publications_store.form_valid,jw=e=>!Ep(e)&&ww(e)&&_w(e)&&Cw(e)&&e.publications_store.projects.filter(t=>t.selected).length>0,Cw=e=>{const t=bw(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},Ew=e=>({type:"UPDATE_PUBLICATION",payload:e}),DA=e=>({type:"UPDATE_FIELD",payload:e}),Ed=e=>({type:"CHANGE_PUB_TYPE",payload:e}),FA=e=>({type:"SET_PUBLICATION",payload:e}),LA=()=>({type:"ADD_AUTHOR"}),UA=e=>({type:"UPDATE_AUTHOR",payload:e}),VA=e=>({type:"TOGGLE_REQUEST",payload:e}),Qs=e=>({type:"UPDATE_ERRORS",payload:e}),Rw=e=>({type:"HIDE_ERROR",payload:e}),BA=e=>({type:"UPDATE_SELECTED_TAGS",payload:e}),zA=e=>({type:"DELETE_AUTHOR",payload:e}),qA=e=>({type:"DATA_LOADED",payload:e}),Nw=e=>({type:"UPDATE_SHOW_SAVED",payload:e}),HA=()=>({type:"RESET_STATE"}),Qc=e=>({type:"UPDATE_SAVING",payload:e}),WA=e=>({type:"SET_FORM_VALID",payload:e}),kw=e=>({type:"SET_GRANT_NUMBER",payload:e}),KA=e=>({type:"ADD_PROJECT",payload:e}),GA=(e,t,n)=>{let r=!0;const o=[];for(const i of t)e[i]||(r=!1,o.push(i));const s=e.authors||[];for(const i of s)for(const l of n)i[l]||(r=!1,o.includes(l)||o.push(l));return{formValid:r,missingFields:o}},YA=e=>e.length>0?a.jsxs("div",{role:"alert",children:[a.jsx("p",{children:"Please provide the following information before submitting:"}),a.jsx("ul",{children:e.map(t=>a.jsx("li",{children:QA(t)},t))})]}):null;function QA(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const XA=()=>async(e,t)=>{const n=t().publications_store.publication.doi,r=encodeURIComponent(n).replaceAll(".","%2E"),o="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(`/publications/lookup?doi=${r}`).then(s=>s.json()).then(s=>{if(s.title!=""){let i=t().publications_store.publication_types.find(l=>l.citation_style_type==s.type);e(Ed(i?i.publication_type:"Other")),e(FA(s))}else e(Qs(o))},s=>{e(Qs(o))})},ZA=()=>async(e,t)=>{const n=t().publications_store.grant_number,r=ne.routes.publications_find_project_path();await fetch(`${r}?grant_number=${n}`).then(o=>o.json()).then(o=>{e(KA(o)),e(kw(""))},()=>{e(Qs("Unable to find a project with this grant number."))})},Tw=()=>async e=>{const t=/^\/requests/.test(window.location.pathname)?ne.routes.publication_path("new.json"):window.location.href+".json";await fetch(t).then(n=>n.json()).then(n=>{e(qA(n))})},Ow=()=>async(e,t)=>{const n=t().publications_store,r=n.projects.filter(p=>p.selected),o=Object.keys(n.selected_tags).map(p=>n.selected_tags[p]).flat(),s={...n.publication},i=n.errors,{formValid:l,missingFields:c}=GA(s,["title","publication_year","publication_month"],["first_name","last_name"]);if(!l){i.length>0&&Array.from(i).forEach(y=>{e(Rw(y.id))});const p=YA(c);e(Qs(p));return}const u={authenticity_token:document.getElementsByName("authenticity_token")[0].value,publication:s,authors:s.authors.map(p=>({...p,order:0})),tags:o,projects:r};let d,f;s.publication_id?(d=ne.routes.publication_path(s.publication_id),f="PATCH"):(d=ne.routes.publications_path(),f="POST"),e(Qc(!0)),await fetch(d,{method:f,headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}).then(p=>{n.redirect?window.location.href=ne.routes.publications_path():(s.publication_id||(e(HA()),e(Tw())),e(Nw(!0)),e(Qc(!1)))},()=>{e(Qc(!1)),e(Qs("There was an error saving this publication."))})},JA=({doi:e,updatePublication:t,doiLookup:n})=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:"doi",className:"form-label",children:"DOI"}),a.jsxs("div",{className:"input-group",children:[a.jsx("input",{type:"text",className:"form-control",id:"doi",name:"publication[doi]","aria-label":"DOI Input and Search box","aria-describedby":"doi_button",value:e,onChange:r=>t(r.target.value)}),a.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>n(),children:"Lookup Publication"})]})]})}),e2=e=>({doi:TA(e)}),t2=e=>({updatePublication:t=>e(Ew({key:"doi",value:t})),doiLookup:()=>e(XA())}),n2=tn(e2,t2)(JA),r2=({author:e,authorKey:t,updateAuthor:n,deleteAuthor:r})=>{const o=l=>{n({key:l.target.name,value:l.target.value,idx:t})},s=l=>a.jsx("td",{children:a.jsx("input",{type:"text",className:"form-control",name:l,id:l,value:e[l],onChange:c=>o(c)})},`field_${l}`),i=["first_name","last_name","affiliation"];return a.jsxs("tr",{children:[i.map(l=>s(l)),a.jsx("td",{children:t!==0&&a.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>r(t),children:a.jsx("i",{className:"bi bi-trash"})})})]})},o2=e=>({updateAuthor:t=>e(UA(t)),deleteAuthor:t=>e(zA(t))}),Sg=tn(null,o2)(r2),s2=({authors:e,addAuthor:t,authors_exist:n})=>{const r=e.length===0,o=()=>n?"":a.jsx("div",{className:"alert alert-danger",children:"You must add at least one author and each author must have a first and last name"});return a.jsxs("div",{children:[o(),a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"First Name"}),a.jsx("th",{children:"Last Name"}),a.jsx("th",{children:"Affiliation"}),a.jsx("th",{})]})}),a.jsxs("tbody",{children:[e.map((s,i)=>a.jsx(Sg,{author:s,authorKey:i},`author_${i}`)),r&&a.jsx(Sg,{author:t()})]})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>t(),children:"Add Author"})]})},i2=e=>({authors:bw(e),authors_exist:Cw(e)}),a2=e=>({addAuthor:()=>e(LA())}),l2=tn(i2,a2)(s2),c2=({category:e,publication_tags:t,updateSelectedTags:n,index:r})=>{const o=w.useRef(null),s=()=>{const l=t.filter(c=>c.label==e.label)[0];return l?l.options:[]},i=l=>{n({category:e.label,tags:l})};return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fw-bold mb-1",children:e.label}),a.jsx("div",{className:"mb-3",children:a.jsx(jp,{classNames:{control:l=>l.isFocused?"custom-select-selected":"border-grey-300"},defaultValue:s(),options:e.options,isMulti:!0,openMenuOnClick:!0,name:`tags_${r}`,inputId:`tags_${r}`,ref:o,closeMenuOnSelect:!1,onChange:i})})]})},u2=e=>({updateSelectedTags:t=>e(BA(t))}),d2=e=>({publication_tags:$A(e)}),f2=tn(d2,u2)(c2),p2=({projects:e,toggleProject:t})=>{const n=o=>`list-group-item list-group-item-action clickable ${o.selected?"list-group-item-success":""}`,r=()=>e.filter(o=>o.selected).length>0;return a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[r()?"":a.jsx("div",{className:"alert alert-danger",children:"You must select at least one project"}),a.jsx("div",{className:"list-group",children:e.map((o,s)=>a.jsxs("div",{className:n(o),onClick:()=>t(s),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})},h2=e=>({projects:IA(e)}),m2=e=>({toggleProject:t=>e(VA(t))}),g2=tn(h2,m2)(p2),v2=({grant_number:e,setGrantNumber:t,grantSearch:n})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:["If your project isn't listed above, you can manually add it by entering the grant number below.",a.jsxs("div",{className:"input-group mt-1",children:[a.jsx("input",{type:"text",className:"form-control",value:e,onChange:r=>t(r.target.value),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>n(),children:"Find Project"})]})]})}),y2=e=>({setGrantNumber:t=>e(kw(t)),grantSearch:()=>e(ZA())}),x2=e=>({grant_number:e.publications_store.grant_number}),b2=tn(x2,y2)(v2),w2=({publication:e,updateField:t,publication_types:n,changePubType:r,updatePublication:o,tag_categories:s,savePublication:i,modal:l,save_enabled:c,setFormValid:u,form_valid:d})=>{const f=g=>{g.target.value.trim()==""?u(!1):u(!0),o({key:"title",value:g.target.value})},p=()=>e.fields.map((g,b)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:`field_${g.csl_field_name}`,className:"form-label",children:g.name}),a.jsx("input",{type:"text",className:"form-control",name:`field_${g.csl_field_name}`,id:`field_${g.csl_field_name}`,value:g.field_value,onChange:S=>t({index:b,value:S.target.value})})]})},`field_${g.csl_field_name}`)),y=()=>{const g=new Date().getFullYear()+2;let b=1980;const S=[];for(;b<=g;)S.push(b++);const _=["January","February","March","April","May","June","July","August","September","October","November","December"],j=a.jsx("i",{className:"bi bi-asterisk text-danger"});return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("label",{className:"form-label",htmlFor:"publication_title",children:["Title ",j]}),a.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${d?"":"is-invalid"}`,value:e.title,onChange:C=>f(C)})]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{className:"form-label",htmlFor:"publication_year",children:"Year Published"}),a.jsx("select",{name:"publication_year",id:"publication_year",className:"form-control",value:e.publication_year,onChange:C=>{o({key:"publication_year",value:C.target.value})},children:S.map(C=>a.jsx("option",{value:C,children:C},`year_${C}`))})]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{className:"form-label",htmlFor:"publication_month",children:"Month Published"}),a.jsx("select",{name:"publication_month",id:"publication_month",className:"form-control",value:e.publication_month,onChange:C=>{o({key:"publication_month",value:C.target.value})},children:_.map((C,E)=>a.jsx("option",{value:E+1,children:C},`month_${E}`))})]})})]})},m=a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"card-header",children:a.jsx("h2",{children:"Publication Information"})}),a.jsxs("div",{className:"card-body",children:[a.jsx("p",{className:"mb-2",children:'Enter information about this publication below. If you have a DOI, you may use the "Lookup Publication" button to attempt to find this information automatically.'}),a.jsx(n2,{}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:"publication_type",className:"form-label",children:"Publication Type"}),a.jsx("select",{name:"publication[publication_type]",id:"publication_type",className:"form-control",value:e.publication_type,onChange:g=>r(g.target.value),children:n.map(g=>a.jsx("option",{value:g.publication_type,children:g.publication_type},`pub_type_${g.type_id}`))})]})}),y(),p()]})]}),h=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Authors"}),a.jsxs(go,{children:[`Add authors by clicking the "Add Authors" button below and entering the author's details. You may also remove authors by clicking the `,a.jsx("i",{className:"bi bi-trash fw-bold text-danger"})," ","button"]})]}),a.jsx("div",{className:"card-body",children:a.jsx(l2,{})})]}),x=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Tags"}),a.jsx(go,{children:"Add related tags from the lists below. You may choose multiple tags per category."})]}),a.jsx("div",{className:"card-body",children:s.map((g,b)=>a.jsx(f2,{index:b,category:g},`tc_${b}`))})]}),v=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Associated Projects"}),a.jsx(go,{children:"Click/Tap each project that this publication is related to."})]}),a.jsxs("div",{className:"card-body",children:[a.jsx(g2,{}),a.jsx("hr",{}),a.jsx(b2,{})]})]});return a.jsxs(a.Fragment,{children:[m,h,x,v,l?null:a.jsx("p",{className:"mt-3",children:a.jsx("button",{onClick:()=>i(),className:"btn btn-success",disabled:!c,children:"Save Publication"})})]})},S2=e=>({publication:kA(e),publication_types:OA(e),tag_categories:PA(e),saving:Ep(e),modal:MA(e),save_enabled:jw(e),form_valid:_w(e)}),_2=e=>({updateField:t=>e(DA(t)),changePubType:t=>e(Ed(t)),updatePublication:t=>e(Ew(t)),savePublication:()=>e(Ow()),setFormValid:t=>e(WA(t))}),j2=tn(S2,_2)(w2),C2=({errors:e,hideError:t})=>a.jsx(a.Fragment,{children:e.map(n=>a.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[n.message,a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>t(n.id)})]},`err_${n.id}`))}),E2=e=>({errors:AA(e)}),R2=e=>({hideError:t=>e(Rw(t))}),N2=tn(E2,R2)(C2),k2=({show_saved:e,updateShowSaved:t})=>{const n=a.jsxs("div",{className:"alert alert-success alert-dismissible sticky-top",children:["Publication Saved Successfully!",a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>t(!1)})]});return e?n:a.jsx(a.Fragment,{})},T2=e=>({show_saved:Sw(e)}),O2=e=>({updateShowSaved:t=>e(Nw(t))}),P2=tn(T2,O2)(k2),I2=({getData:e,data_loaded:t})=>(w.useEffect(()=>{e()},[]),a.jsxs(a.Fragment,{children:[a.jsx(P2,{}),a.jsx(N2,{}),t?a.jsx(j2,{}):a.jsx(Do,{})]})),$2=e=>({data_loaded:ww(e)}),A2=e=>({getData:()=>e(Tw())}),Pw=tn($2,A2)(I2),M2=({saving:e,savePublication:t,showSaved:n,updatePublications:r,save_enabled:o})=>{const[s,i]=w.useState(!1);return w.useEffect(()=>{!e&&n&&r()},[e,n]),a.jsxs(a.Fragment,{children:[a.jsxs(ve,{size:"xl",show:s,onHide:()=>i(!1),scrollable:!0,children:[a.jsx(ve.Header,{closeButton:!0,children:a.jsx(ve.Title,{children:"Add Publication"})}),a.jsx(ve.Body,{children:a.jsx(Pw,{})}),a.jsx(ve.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>i(!1),children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{t(),i(!1)},children:"Save Publication"})]})})]}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>i(!0),children:"Add a New Publication"})]})},D2=e=>({saving:Ep(e),showSaved:Sw(e),save_enabled:jw(e)}),F2=e=>({savePublication:()=>e(Ow())}),L2=tn(D2,F2)(M2),U2=({usernames:e=[],publication_ids:t=[]})=>{const[n,r]=w.useState(e),[o,s]=w.useState(t),[i,l]=w.useState([]),c=w.useRef(n),u=h=>{c.current=h,r(h)},d=async()=>{const x=await(await fetch(ne.routes.search_publications_path({usernames:n}))).json();l(x)};w.useEffect(()=>{d()},[n]),w.useEffect(()=>{addEventListener("requestAddRole",h=>u([...c.current,h.detail.username])),addEventListener("requestRemoveRole",h=>u(c.current.filter(x=>x!=h.detail.username)))},[]);let f=!1,p=!1;const y=i.map(h=>{const x=o.includes(h.publication_id);f=f||x,p=p||!x;const v=new Date(h.publication_year,h.publication_month-1);return a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("input",{type:"checkbox",name:"publication_ids[]",value:h.publication_id,checked:x,onChange:()=>s(x?o.filter(g=>g!=h.publication_id):[...o,h.publication_id])})}),a.jsx("td",{children:h.title}),a.jsx("td",{children:h.authors.map(g=>`${g.first_name} ${g.last_name}`).join(", ")}),a.jsx("td",{children:h.publication_type}),a.jsxs("td",{children:[v.toLocaleString("default",{month:"short"})," ",h.publication_year]})]},h.publication_id)}),m=`${p?"Select":"Deselect"} all`;return a.jsxs("div",{className:"publications-select",children:[a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:a.jsx("input",{type:"checkbox",value:"","aria-label":m,title:m,checked:f&&!p,onChange:()=>s(p?i.map(h=>h.publication_id):[]),ref:h=>{h&&(h.indeterminate=f&&p)}})}),a.jsx("th",{children:"Title"}),a.jsx("th",{children:"Authors"}),a.jsx("th",{children:"Type"}),a.jsx("th",{children:"Date"})]})}),a.jsx("tbody",{children:y})]}),a.jsx(L2,{updatePublications:d})]})},V2=()=>`${Math.random().toString(36).slice(2)}`,Rd=document.querySelector("#publications-react"),B2=Rd?Rd.dataset:{},_g={publication_types:[],tag_categories:[],publication:{},projects:[],errors:[],selected_tags:{},data_loaded:!1,saving:!1,show_saved:!1,redirect:B2.redirect||!1,modal:Rd==null,form_valid:!1,grant_number:""},z2=(e=_g,t)=>{const{type:n,payload:r}=t;switch(n){case"UPDATE_FIELD":return $t(e,s=>(s.publication.fields[r.index].field_value=r.value,s));case"CHANGE_PUB_TYPE":return $t(e,s=>{let i=s.publication_types.find(l=>l.publication_type==r).fields;return i.forEach(l=>{const c=s.publication.fields.find(u=>u.csl_field_name==l.csl_field_name);c&&(l.value=c.value)}),s.publication.publication_type=r,s.publication.fields=i,s});case"UPDATE_PUBLICATION":return{...e,publication:{...e.publication,[r.key]:r.value}};case"SET_PUBLICATION":return $t(e,s=>(s.publication.fields.forEach(i=>{i.field_value=r[i.csl_field_name]}),Object.keys(s.publication).forEach(i=>{r[i]&&(s.publication[i]=r[i])}),s.form_valid=r.title.trim()!="",s));case"ADD_AUTHOR":{const o={portal_username:"",first_name:"",middle_name:"",last_name:"",prefix:"",suffix:"",initials:"",affiliation:"",hash:{}};return $t(e,i=>{i.publication.authors.push(o)})}case"UPDATE_AUTHOR":return $t(e,s=>{s.publication.authors[r.idx][r.key]=r.value});case"TOGGLE_TAG":return $t(e,s=>{let i=s.tag_categories.find(l=>l.publication_tags_category_id==r.publication_tags_category_id);i.tags[r.idx].selected=!i.tags[r.idx].selected});case"TOGGLE_REQUEST":return $t(e,s=>(s.projects[r].selected=!s.projects[r].selected,s));case"UPDATE_ERRORS":{const o={id:V2(),message:r};return{...e,errors:[...e.errors,o]}}case"HIDE_ERROR":{const o=e.errors.filter(s=>s.id!=r);return{...e,errors:o}}case"UPDATE_SELECTED_TAGS":return $t(e,s=>{const i=r.tags.map(l=>l.value);return s.selected_tags[r.category]=i,s});case"DELETE_AUTHOR":return $t(e,s=>(s.publication.authors.splice(r,1),s));case"DATA_LOADED":return $t(e,s=>(s.publication=r.publication,s.form_valid=r.publication.title.trim()!="",s.publication.authors.forEach(i=>{i.affiliation||(i.affiliation="")}),s.publication_types=r.publication_types,s.tag_categories=r.tag_categories,s.projects=r.publication.projects,r.publication.tags.forEach(i=>s.selected_tags[i.label]=i.options.map(l=>l.value)),s.data_loaded=!0,s));case"UPDATE_SHOW_SAVED":return{...e,show_saved:r};case"UPDATE_SAVING":return{...e,saving:r};case"RESET_STATE":return _g;case"SET_FORM_VALID":return{...e,form_valid:r};case"SET_GRANT_NUMBER":return{...e,grant_number:r};case"ADD_PROJECT":return{...e,projects:[...e.projects,r]};default:return e}},q2={catalogs:{},filteredResources:[],filters:[],hasErrors:!1,onRamps:!1,resources:[],resourcesLoaded:!1,resourceSorting:{"NSF Capacity Resources":1,"NSF Innovative Testbeds":2,"Other NSF-funded Resources":3,"Services and Support":4}},pa=Ye("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(jg(!1));let n=[];e.catalogSources?n=e.catalogSources:n.push({...e,catalogLabel:"Default"}),e.onRamps&&n.push({apiUrl:"https://allocations.access-ci.org/resources.json",catalogLabel:"ACCESS",allowedCategories:[],allowedFilters:[],allowedResources:[],excludedCategories:["Resource Category"],excludedFilters:[],excludedResources:["ACCESS Credits"]});const r=await Promise.all(n.map(async o=>{const i=await(await fetch(o.apiUrl)).json();return{...o,data:i}}));t(G2({data:r,params:e})),t(jg(!0))});Ye("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(Q2(e)),t($w())});const H2=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},W2=e=>{const t={},n={};let r={};return e.forEach(s=>{t[s.catalogLabel]={...s,resourceIds:[],selected:!1,catalogId:s.catalogLabel.replace(/[^(A-z)]/,"")},delete t[s.catalogLabel].data,s.data.forEach(i=>{if(Nd(s.allowedResources,s.excludedResources,i.resourceName)){const{categories:l,formattedResource:c}=K2(s,i,r);n[i.resourceId]=c,t[s.catalogLabel].resourceIds.push(i.resourceId),r=l}})}),{resources:Object.keys(n).map(s=>n[s]),catalogs:t,categories:r}},Nd=(e,t,n)=>!e&&!t||e&&e.length==0&&t&&t.length==0?!0:e&&e.length>0?e.find(r=>r==n):t&&t.length>0?!t.find(r=>r==n):!0,K2=(e,t,n)=>{const r=[];let o="";t.featureCategories.filter(l=>l.categoryIsFilter).forEach(l=>{const c=l.categoryId;l.categoryName=="ACCESS Resource Grouping"?o=l.features[0].name:(!n[c]&&Nd(e.allowedCategories,e.excludedCategories,l.categoryName)&&(n[c]={categoryId:c,categoryName:l.categoryName,categoryDescription:l.categoryDescription,features:{}}),l.features.forEach(u=>{const d={featureId:u.featureId,name:u.name,description:u.description,categoryId:c,selected:!1},f=Nd(e.allowedFilters,e.excludedFilters,d.name);f&&r.push(d),n[c]&&f&&!n[c].features[u.featureId]&&(n[c].features[u.featureId]=d)}))});const s=r.map(l=>l.name).sort((l,c)=>l>c);return{formattedResource:{...t,resourceName:t.resourceName.trim(),features:s,featureIds:r.map(l=>l.featureId),sortCategory:o},categories:n}},Iw=ri({name:"resourceCatalog",initialState:q2,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,{resources:r,catalogs:o,categories:s}=W2(n);e.catalogs=o,e.onRamps=t.params.onRamps;for(const i in s){const l=s[i],c=[];for(const u in l.features)c.push(l.features[u]);e.filters.push({...l,features:c.sort((u,d)=>u.name>d.name)})}e.filters=e.filters.sort((i,l)=>i.categoryName.localeCompare(l.categoryName)),e.resources=r.sort((i,l)=>i.resourceName.localeCompare(l.resourceName)).sort((i,l)=>e.resourceSorting[i.sortCategory]>e.resourceSorting[l.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(n=>n.selected=!1)}),e.filteredResources=[...e.resources]},setResourcesLoaded:(e,{payload:t})=>{e.resourcesLoaded=t},toggleCatalog:(e,{payload:t})=>{const{catalog:n,selected:r}=t;e.catalogs[n.catalogLabel].selected=r},toggleFilter:(e,{payload:t})=>{if(t){const i=t,c=e.filters.find(u=>u.categoryId==i.categoryId).features.find(u=>u.featureId==i.featureId);c.selected=!c.selected}const n=H2(e.filters);let r=[];if(n.length>0){const i=n.map(l=>l.features.map(c=>c.featureId));e.resources.forEach(l=>{let c=0;i.forEach(u=>{let d=!1;l.featureIds.forEach(f=>{u.indexOf(f)>=0&&(d=!0)}),d&&(c+=1)}),c>=i.length&&r.push(l)})}else r=e.resources;const o=Object.keys(e.catalogs).map(i=>e.catalogs[i]),s=o.filter(i=>i.selected);if(s.length>0&&s.length<o.length){const i=s.map(l=>l.resourceIds).flat();r=r.filter(l=>i.indexOf(l.resourceId)>=0)}e.filteredResources=r}},extraReducers:e=>{e.addCase(pa.pending,t=>{}).addCase(pa.fulfilled,(t,n)=>{}).addCase(pa.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:G2,processData:pD,resetFilters:Y2,setResourcesLoaded:jg,toggleCatalog:Q2,toggleFilter:$w}=Iw.actions,Aw=e=>e.resourceCatalog.catalogs,X2=e=>e.resourceCatalog.filters,Z2=e=>e.resourceCatalog.hasErrors,J2=e=>e.resourceCatalog.resourcesLoaded,eM=e=>e.resourceCatalog.filteredResources,tM=Iw.reducer,nM="_access_1yrq0_2",rM="_resourceName_1yrq0_6",oM="_description_1yrq0_11",sM="_filterBar_1yrq0_15",iM="_cardBg_1yrq0_20",aM="_active_1yrq0_25",lM="_plainButton_1yrq0_30",cM="_btnSecondary_1yrq0_40",uM="_filtersHidden_1yrq0_51",dM="_filtersVisible_1yrq0_57",Dt={access:nM,resourceName:rM,description:oM,filterBar:sM,cardBg:iM,active:aM,plainButton:lM,btnSecondary:cM,filtersHidden:uM,filtersVisible:dM},fM=({resource:e})=>{const[t,n]=w.useState(!0),r=u=>{const d={"CPU Compute":"cpu-fill","GPU Compute":"gpu-card",Cloud:"cloud-fill","Commercial Cloud":"cloud-fill",Storage:"database-fill","Service / Other":"journal","Innovative / Novel Compute":"pc"};return d[u]?a.jsx("i",{title:u,className:`bi bi-${d[u]} me-2 `},`${e.resourceId}_${d[u]}`):""},o=()=>a.jsxs("span",{className:"float-end",children:[e.features.map(u=>r(u)),e.resourceType]}),s=u=>u.length==0?"":a.jsx(a.Fragment,{children:u.map((d,f)=>a.jsx("span",{className:"badge text-bg-secondary me-2",children:d},`feature_${e.resourceId}_${f}`))}),i=()=>{let u=e.resourceDescription;return u&&u!=""?(Dt.plainButton,a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col fw-bold",children:["About ",e.resourceName]})}),a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col ",children:[a.jsx("div",{className:Dt.description,dangerouslySetInnerHTML:{__html:u}}),""]})})]})):""},l=()=>e.recommendedUse&&e.recommendedUse!=""?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:"Recommended Use"})}),a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",children:a.jsx("div",{className:Dt.description,dangerouslySetInnerHTML:{__html:e.recommendedUse}})})})]}):"",c=()=>Dt.cardBg;return a.jsx(a.Fragment,{children:a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"card mb-3",children:[a.jsxs("div",{className:`card-header ${c()}`,children:[a.jsx("span",{className:"",children:e.resourceName}),o()]}),a.jsxs("div",{className:"card-body",children:[a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",children:s(e.features)})}),l(),i()]}),a.jsx("div",{className:"card-footer",children:a.jsxs("a",{target:"_blank",href:e.userGuideUrl,className:"btn btn-info me-2 fw-bold",children:["System Info ",a.jsx("i",{className:"bi bi-box-arrow-up-right"})]})})]})})})})},pM=({filter:e})=>{const t=it(),n=()=>{t($w(e))};return a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"form-check",children:[a.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),a.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:n})]})})})},hM=({category:e})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>a.jsx(pM,{filter:t},t.featureId))]})}),mM=({onReset:e})=>{const t=it(),n=pe(Aw),r=pe(X2),o=r.filter(s=>s.features.filter(i=>i.selected).length>0);return Object.keys(n).map(s=>n[s]),a.jsxs(a.Fragment,{children:[r.map(s=>a.jsx(hM,{category:s},s.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(Y2()),disabled:o.length==0,children:"Reset Filters"}),a.jsx("button",{className:"btn btn-outline-primary ms-3 mt-2 mb-2",onClick:e,children:"Close Menu"})]})},gM=()=>{const[e,t]=w.useState(!1),n=w.useRef(null),r=()=>{const o=n.current;e?(o.style.height="0px",o.classList.remove(Dt.filtersVisible),o.classList.add(Dt.filtersHidden)):(o.style.height=o.scrollHeight+"px",o.classList.remove(Dt.filtersHidden),o.classList.add(Dt.filtersVisible)),t(!e)};return a.jsx("div",{className:Dt.filterBar,children:a.jsx("div",{className:"row mb-2",children:a.jsx("div",{className:"col pt-2 pb-2",children:a.jsxs("div",{className:"p-1 pb-0 border-bottom bg-white shadow",children:[a.jsxs("button",{className:"btn btn-outline-primary mb-1 mt-1",type:"button",onClick:r,children:[a.jsx("i",{className:"bi bi-filter"})," Filters"]}),a.jsx("div",{className:`${Dt.filtersHidden} pe-2 ps-2`,id:"filtersList",ref:n,children:a.jsx(mM,{onReset:r})})]})})})})},vM=()=>{const e=pe(eM);return e.length==0?a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):a.jsx("div",{className:"card shadow",children:a.jsxs("div",{className:"card-body",children:[a.jsx(gM,{}),e.map(t=>a.jsx(fM,{resource:t},t.resourceId))]})})},yM=({baseUrl:e})=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col d-flex",children:a.jsx("img",{alt:"Access Logo",style:{height:"75px"},src:`${e}/access_logo.png`})})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("h3",{className:"border-bottom",children:"NSF ACCESS Resources"})})}),a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("h4",{children:"Discover the nationwide NSF cyberinfrastructure"}),a.jsx("p",{children:"Need advanced computing and storage options for your research or classroom? The ACCESS program has been established and funded by the U.S. National Science Foundation to help you - the nation's researchers and educators - to use some of the country's most advanced computing systems and services - at no cost to you."}),a.jsx("p",{children:"Thousands of researchers, instructors, and students from institutions large and small use ACCESS-integrated resources every year. With more than 30 resources from more than 15 resource providers, there's bound to be a resource for you, your lab, or your class."}),a.jsx("p",{children:"Explore the resource catalog below - filter the list to discover the resources that have the features or services to accelerate your activities. The System Info button will take you to the resource's documentation for all the details."}),a.jsx("p",{children:'Ready to begin? Click the "Get Your First Project" button and join the ACCESS community!'}),a.jsx("p",{children:a.jsxs("a",{href:"https://allocations.access-ci.org/get-your-first-project",target:"_blank",className:`btn btn-secondary fw-bold ${Dt.btnSecondary}`,children:["Get Your First Project ",a.jsx("i",{className:"bi bi-box-arrow-up-right"})]})}),a.jsxs("p",{children:["If you have feedback for ACCESS, please complete our",a.jsx("a",{target:"_blank",href:"https://docs.google.com/forms/d/e/1FAIpQLSdn-SXokNB_5s0r2SA_S9ZIZWZFlVPRD2OHepTH5HY2YND_zw/viewform",children:" Feedback Form"}),".",a.jsx("br",{}),"If you have questions, please",a.jsx("a",{target:"_blank",href:"https://support.access-ci.org/user/login?destination=/open-a-ticket",children:" open a help ticket"}),"."]})]})})]}),xM=({catalogSources:e=[],onRamps:t=!1,baseUrl:n})=>{const r=it(),o=pe(J2),s=pe(Z2),i=pe(Aw),l=Object.keys(i).map(u=>i[u]);w.useEffect(()=>{r(pa({catalogSources:e,onRamps:t}))},[]);const c=()=>t&&l.length>1?a.jsx(a.Fragment,{children:l.filter(u=>u.catalogLabel!="ACCESS").map((u,d)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("h4",{className:"border-bottom",children:["About ",u.catalogLabel]}),a.jsx("div",{dangerouslySetInnerHTML:{__html:u.description}})]})},`catalog_${d}`))}):"";return s?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):o?a.jsxs("div",{className:`container mt-3 ${Dt.access}`,children:[t?a.jsx(yM,{baseUrl:n}):"",c(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(vM,{})})})]}):a.jsx(Do,{})},bM={filters:[],resources:[],filteredResources:[],resourcesLoaded:!1,hasErrors:!1,resourceSorting:{"NSF Capacity Resources":1,"NSF Innovative Testbeds":2,"Other NSF-funded Resources":3,"Services and Support":4}},ha=Ye("resourceCatalog/getResources",async(e,{dispatch:t})=>{const r=await(await fetch(e.apiUrl)).json();t(SM({data:r,params:e}))}),wM=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},Cg=(e,t,n)=>{if(e.length==0&&t.length==0)return!0;if(e.length>0)return e.find(r=>r==n);if(t.length>0)return!t.find(r=>r==n)},Mw=ri({name:"resourceCatalog",initialState:bM,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,r=t.params.excludedCategories,o=t.params.excludedFilters,s=t.params.excludedResources,i=t.params.allowedCategories,l=t.params.allowedFilters,c=[],u={};n.filter(d=>!s.includes(d.resourceName)).forEach(d=>{const f=[];let p="";d.featureCategories.filter(m=>m.categoryIsFilter).forEach(m=>{const h=m.categoryId;m.categoryName=="ACCESS Resource Grouping"?p=m.features[0].name:(!u[h]&&Cg(i,r,m.categoryName)&&(u[h]={categoryId:h,categoryName:m.categoryName,categoryDescription:m.categoryDescription,features:{}}),m.features.forEach(x=>{const v={featureId:x.featureId,name:x.name,description:x.description,categoryId:h,selected:!1},g=Cg(l,o,v.name);g&&f.push(v),u[h]&&g&&!u[h].features[x.featureId]&&(u[h].features[x.featureId]=v)}))});const y={resourceName:d.resourceName,resourceId:d.resourceId,resourceType:d.resourceType,organization:d.organization,units:d.units,userGuideUrl:d.userGuideUrl,resourceDescription:d.resourceDescription,description:d.description,recommendedUse:d.recommendedUse,features:f.map(m=>m.name).sort((m,h)=>m>h),featureIds:f.map(m=>m.featureId),sortCategory:p};c.push(y)});for(const d in u){const f=u[d],p=[];for(const y in f.features)p.push(f.features[y]);e.filters.push({...f,features:p.sort((y,m)=>y.name>m.name)})}i.length>0?e.filters=e.filters.sort((d,f)=>i.indexOf(d.categoryName)>i.indexOf(f.categoryName)):e.filters=e.filters.sort((d,f)=>d.categoryName.localeCompare(f.categoryName)),e.resources=c.sort((d,f)=>d.resourceName.localeCompare(f.resourceName)).sort((d,f)=>e.resourceSorting[d.sortCategory]>e.resourceSorting[f.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(n=>n.selected=!1)}),e.filteredResources=[...e.resources]},toggleFilter:(e,{payload:t})=>{const n=t,o=e.filters.find(i=>i.categoryId==n.categoryId).features.find(i=>i.featureId==n.featureId);o.selected=!o.selected;const s=wM(e.filters);if(s.length>0){const i=[],l=s.map(c=>c.features.map(u=>u.featureId));e.resources.forEach(c=>{let u=0;l.forEach(d=>{let f=!1;c.featureIds.forEach(p=>{d.indexOf(p)>=0&&(f=!0)}),f&&(u+=1)}),u>=l.length&&i.push(c)}),e.filteredResources=i}else e.filteredResources=[...e.resources]}},extraReducers:e=>{e.addCase(ha.pending,t=>{}).addCase(ha.fulfilled,(t,n)=>{}).addCase(ha.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:SM,processData:hD,resetFilters:_M,toggleFilter:jM}=Mw.actions,CM=e=>e.resourceCatalog.hasErrors,EM=e=>e.resourceCatalog.resourcesLoaded,RM=e=>e.resourceCatalog.filters,NM=e=>e.resourceCatalog.filteredResources,kM=Mw.reducer,TM=({resource:e})=>{const t=r=>r.length==0?"":a.jsx("ul",{children:r.map((o,s)=>a.jsx("li",{children:o},`feature_${e.resourceId}_${s}`))}),n=(r,o)=>o&&o!=""?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:r})}),a.jsx("div",{className:"row mb-3",children:a.jsx("div",{className:"col",dangerouslySetInnerHTML:{__html:o}})})]}):"";return a.jsxs(Gt.Item,{eventKey:e.resourceId,children:[a.jsx(Gt.Header,{children:e.resourceName}),a.jsxs(Gt.Body,{children:[a.jsx("table",{className:"table",children:a.jsxs("tbody",{children:[a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Resource Type:"}),a.jsx("td",{children:e.resourceType})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Organization:"}),a.jsx("td",{children:e.organization})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Units:"}),a.jsx("td",{children:e.units})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"User Guide:"}),a.jsx("td",{children:e.userGuideUrl==""?"":a.jsx("a",{href:e.userGuideUrl,target:"_blank",rel:"noreferrer",children:"Link to User Guide"})})]}),a.jsxs("tr",{children:[a.jsx("td",{className:"fw-bold",children:"Features Available:"}),a.jsx("td",{children:t(e.features)})]})]})}),n("Resource Description",e.resourceDescription),n("Allocations Description",e.description),n("Recommended Use",e.recommendedUse)]})]})},OM=()=>{const e=pe(NM);return e.length==0?a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):a.jsxs("div",{children:[a.jsx("h4",{className:"mb-0",children:"Resources"}),a.jsx(Gt,{children:e.map(t=>a.jsx(TM,{resource:t},t.resourceId))})]})},PM=({filter:e})=>{const t=it(),n=()=>{t(jM(e))};return a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsxs("div",{className:"form-check",children:[a.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),a.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:n})]})})})},IM=({category:e})=>a.jsx("div",{className:"row",children:a.jsxs("div",{className:"col",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>a.jsx(PM,{filter:t},t.featureId))]})}),$M=()=>{const e=it(),t=pe(RM),n=t.filter(r=>r.features.filter(o=>o.selected).length>0);return a.jsxs("div",{children:[a.jsx("h4",{className:"mb-0",children:"Filters"}),t.map(r=>a.jsx(IM,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(_M()),disabled:n.length==0,children:"Reset Filters"})]})},AM=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=it(),l=pe(EM),c=pe(CM);return w.useEffect(()=>{i(ha({apiUrl:e,excludedCategories:t,excludedFilters:n,excludedResources:r,allowedCategories:o,allowedFilters:s}))},[]),c?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):l?a.jsx(a.Fragment,{children:a.jsxs("div",{className:"row mt-3",children:[a.jsx("div",{className:"col-sm-4",children:a.jsx($M,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(OM,{})})]})}):a.jsx(Do,{})},Dw={apiUrl:null,pages:1,publications:[],publicationsLoaded:!0,showPagination:!1,filterSelections:{allJournalsToggled:!1,doi:"",journal:"",authorName:"",publicationType:""},pageData:{current_page:1,last_page:1},filterOptions:{journals:[],publication_types:[]}},MM=Ye("publicationsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{await n(Nr()),await n(Fw())}),Nr=Ye("publicationsBrowser/getPublications",async(e,{getState:t})=>{const n=t().publicationsBrowser;let r=`${n.apiUrl}?page=${n.pageData.current_page}`;if(n.filterSelections.doi!==""&&(r+=`&doi=${encodeURIComponent(n.filterSelections.doi)}`),n.filterSelections.authorName!==""&&(r+=`&author_name=${encodeURIComponent(n.filterSelections.authorName)}`),n.filterSelections.journal!==""){const i=n.filterSelections.journal;n.filterOptions.journals.includes(i)&&(r+=`&journal=${encodeURIComponent(n.filterSelections.journal)}`)}return n.filterSelections.publicationType!==""&&(r+=`&publication_type=${encodeURIComponent(n.filterSelections.publicationType)}`),await(await fetch(r)).json()}),Fw=Ye("publicationsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().publicationsBrowser.apiUrl}?filters=1`;return(await(await fetch(o)).json()).filters||[]}),Lw=ri({name:"publicationsBrowser",initialState:Dw,reducers:{updatePageData:(e,{payload:t})=>{t.current_page&&(e.pageData.current_page=t.current_page),t.last_page&&(e.pageData.last_page=t.last_page)},updateFilterSelection:(e,{payload:t})=>{e.filterSelections[t.name]=t.value},resetFilters:e=>{e.filterSelections={doi:"",allJournalsToggled:!1,journal:"",authorName:"",publicationType:""}}},extraReducers:e=>{e.addCase(Nr.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(Nr.fulfilled,(t,n)=>{t.publicationsLoaded=!0,t.publications=n.payload.publications||[],n.payload.pagination&&n.payload.pagination.last_page!==t.pageData.last_page&&(t.pageData.current_page=1),t.showPagination=!0,n.payload.pagination&&(t.pageData.last_page=n.payload.pagination.last_page)}).addCase(Nr.rejected,(t,n)=>{t.publicationsLoaded=!0,t.error=n.error.message}).addCase(Fw.fulfilled,(t,n)=>{t.filterOptions=n.payload})}}),{updatePageData:DM,updateFilterSelection:Eg,resetFilters:FM}=Lw.actions,LM=e=>e.publicationsBrowser.filterSelections,UM=e=>e.publicationsBrowser.publicationsLoaded,VM=e=>e.publicationsBrowser.publications,BM=e=>e.publicationsBrowser.filterOptions,zM=e=>e.publicationsBrowser.pageData,qM=Lw.reducer,kd=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),HM=({publication:e,index:t})=>{const n=e.authors.map(f=>`${f.last_name}, ${f.first_name.substr(0,1)}.`).join(", "),r=e.projects.map(f=>f.grant_number),o=e.publication_type==="Other"?"Publication":e.publication_type,s=e.projects,i=t%2==0?"bg-light":"",l={textIndent:"-50px",marginLeft:"50px"},c=e.publication_datas,u=f=>{switch(f){case"Publication Type":return e.publication_type;case"Publication Year":return e.publication_year?e.publication_year:"N/A";case"DOI":return e.doi?a.jsx("a",{href:`https://doi.org/${kd(e.doi)}`,target:"_blank",className:"fw-normal",children:kd(e.doi)}):!1;case"Journal":return e.journal.title?e.journal.title:!1;case"Volume/Issue":return c["Volume/Issue"]?c["Volume/Issue"]:!1;case"Pages":return c.Pages?c.Pages:!1;case"Publisher":return c.Publisher?c.Publisher:!1}},d=()=>{const f=u("Publication Year");let p=e.title;const y=u("Journal"),m=u("DOI"),h=u("Volume/Issue"),x=u("Pages"),v=u("Publisher");return p[p.length-1]!="."&&(p+="."),e.publication_type==="Journal Paper"||e.publication_type==="Other"?a.jsxs(a.Fragment,{children:[n," (",f,"). ",p,y?a.jsxs("em",{className:"ms-1",children:[y,"."]}):"",h?a.jsxs("span",{className:"ms-1",children:[h,","]}):"",x?a.jsxs("span",{className:"ms-1",children:[x,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Conference Paper"||e.publication_type==="Software"?a.jsxs(a.Fragment,{children:[n," (",f,"). ",p,y?a.jsxs("em",{className:"ms-1",children:[y,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Book"||e.publication_type==="Book Chapter"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p}),v?a.jsxs("em",{className:"ms-1",children:[v,"."]}):"",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Dataset"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p})," [Dataset]. ",v||"",".",m?a.jsx("span",{className:"ms-1",children:m}):""]}):e.publication_type==="Dissertation"?a.jsxs(a.Fragment,{children:[n," (",f,").",a.jsx("em",{className:"ms-1",children:p}),". [Doctoral dissertation",v?", "+v:"","].",m?a.jsx("span",{className:"ms-1",children:m}):""]}):""};return a.jsx("div",{className:"col-12 mb-2 border-bottom",children:a.jsx("div",{className:"card",style:{border:"unset"},children:a.jsxs("div",{className:`card-body pt-2 mb-2 ${i}`,children:[a.jsx("p",{style:l,children:d()}),s.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-decoration-underline mb-2",children:["Projects Supporting this ",o]}),a.jsx("ul",{style:{...l,listStyleType:"none"},children:r.map((f,p)=>a.jsx("li",{id:`project_${p}`,children:a.jsx("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${f}`,id:`grant_link${p}`,target:"_blank",style:{fontWeight:"600"},children:f})},`grant_${p}`))})]})]})})})},WM=()=>{const e=pe(VM);return e.length===0?a.jsx("div",{children:"No Publications Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(HM,{publication:t,index:n},`publication_${n}`))})},KM=()=>{const e=it(),t=pe(BM),n=pe(LM),r=()=>{window.scrollTo(0,0),e(jd(!1)),e(ul({current_page:1})),e(Nr())},o=()=>{e(FM()),window.scrollTo(0,0),e(Nr())};if(!t.journals)return a.jsx("p",{children:"Loading filters..."});const s=l=>{e(Eg({name:l.target.name,value:l.target.value}))},i=l=>{e(Eg({name:l.target.name,value:l.target.value}))};return a.jsx("div",{className:"row sticky-top mb-2",children:a.jsxs("div",{className:"col",children:[a.jsx("h3",{className:"mb-2",children:"Filters"}),a.jsx("h5",{id:"journals_filter_label",className:"mb-1",children:"Journals"}),a.jsxs("div",{className:"mb-3",children:[a.jsx("input",{placeholder:"Type to search...",list:"journal_list",name:"journal",id:"journal_select",value:n.journal,className:"form-control","aria-labelledby":"journal_filter_label",onChange:l=>s(l),onInput:l=>i(l)}),a.jsx("datalist",{id:"journal_list",children:t.journals.map((l,c)=>a.jsx("option",{value:l,children:l},`journal_${c}`))})]}),a.jsx("h5",{id:"author_name_label",className:"mb-1",children:"Author Name"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{placeholder:"Last Name, First Initial",type:"text",className:"form-control",value:n.authorName,name:"authorName",id:"authorName","aria-labelledby":"author_name",onChange:s})}),a.jsx("h5",{id:"doi_number_label",className:"mb-1",children:"DOI"}),a.jsx("div",{className:"mb-3",children:a.jsx("input",{type:"text",className:"form-control",value:kd(n.doi),name:"doi",id:"doiNumber","aria-labelledby":"doi_number_label",onChange:s})}),a.jsx("h5",{id:"publication_type_label",className:"mb-1",children:"Publication Type"}),a.jsx("div",{className:"mb-3",children:a.jsxs("select",{name:"publicationType",id:"publication_type_select",value:n.publicationType,className:"form-control","aria-labelledby":"publication_type_label",onChange:l=>s(l),children:[a.jsx("option",{value:"",children:"-- All --"}),t.publication_types.map((l,c)=>a.jsx("option",{value:l,children:l},`publication_type_${c}`))]})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("button",{className:"btn btn-primary me-2",onClick:r,children:"Submit"}),a.jsx("button",{className:"btn btn-secondary",onClick:o,children:"Reset"})]})]})})},Rg=()=>{const e=it(),t=pe(zM),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(m,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{f()},[t]);const u=m=>{const h=parseInt(m);e(DM({current_page:m})),e(Nr(h))},d=m=>(event.preventDefault(),s("0"),u(m),!1),f=()=>{const m=[];if(t.last_page>l)if(t.current_page>4){m.push(1),m.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&m.push(t.current_page-h);m.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&m.push(t.current_page+h);t.last_page-t.current_page>1&&(m.push("spacer"),m.push(t.last_page))}else[1,2,3,4,5].forEach(x=>{x==t.current_page?m.push(["current",x]):m.push(x)}),m.push("spacer"),m.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?m.push(["current",h]):m.push(h);r(m)},p=m=>{let h=m,x="";return typeof m=="object"?[h,x]=m:x=m,h=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):h=="current"?a.jsx("li",{className:"page-item active","aria-current":"page",children:a.jsx("span",{className:"page-link",style:c,children:x})}):a.jsx("li",{className:"page-item",children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(h),children:x})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:m=>d(m.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(m=>a.jsx("option",{value:m+1,children:m+1},`page_option_${m}`))]})});return a.jsx("div",{children:a.jsx("nav",{"aria-label":"Pages for the table",children:a.jsxs("ul",{className:"pagination",children:[a.jsx("li",{className:`page-item ${t.current_page==1?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:()=>u(t.current_page-1),disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((m,h)=>a.jsx(je.Fragment,{children:p(m)},`page_${h}`)),t.last_page>l?y():"",a.jsx("li",{className:`page-item ${t.current_page==t.last_page?"disabled":""}`,children:a.jsx("button",{className:"page-link",style:c,onClick:()=>u(t.current_page+1),disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},GM=({apiUrl:e})=>{const t=it(),n=pe(UM),r=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(MM())},[t]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(KM,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(Rg,{})})}),a.jsx("div",{className:"row",id:"publicationListRow",children:a.jsx("div",{className:"col",children:n?a.jsx(WM,{}):r})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(Rg,{})})})]})]})})},Uw=({id:e,type:t,checked:n,onChange:r})=>a.jsx("div",{className:"control-group",style:{marginBottom:"0px"},children:a.jsx("div",{className:"controls",children:a.jsxs("label",{htmlFor:e,className:"checkbox",children:[a.jsx("input",{onChange:()=>r(t.allocation_type_id),type:"checkbox",checked:n,id:e}),t.display_allocation_type]})})}),YM=({types:e,createData:t})=>{const[n,r]=w.useState(""),[o,s]=w.useState([]),i=async(u,d)=>{t(u,d),r(""),s([])};function l(u){let d=o;d.includes(u)?d=d.filter(f=>f!==u):d=[...d,u],s(d)}function c(){s(o.length===e.length?[]:[...e.map(d=>d.allocation_type_id)])}return a.jsxs("table",{className:"table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Keyword"}),a.jsx("th",{children:"Allocation Type"}),a.jsx("td",{})]})}),a.jsx("tbody",{children:a.jsxs("tr",{children:[a.jsx("td",{style:{width:"150px"},children:a.jsx("input",{type:"text",value:n,className:"form-control",onChange:u=>r(u.target.value)})}),a.jsx("td",{children:a.jsxs("div",{className:"form-inline",children:[a.jsx("div",{className:"control-group",style:{marginBottom:"0px"},children:a.jsx("div",{className:"controls",children:a.jsxs("label",{htmlFor:"select-all-checkbox",className:"checkbox",children:[a.jsx("input",{onChange:()=>c(),type:"checkbox",checked:o.length===e.length,id:"select-all-checkbox"}),"Select All"]})})}),e.map(u=>a.jsx(Uw,{id:`id_create_alloc_type_${u.allocation_type_id}`,type:u,checked:o.includes(u.allocation_type_id),onChange:l},`create_keyword_alloc_t_${u.allocation_type_id}`))]})}),a.jsx("td",{style:{width:"50px"},children:a.jsx("button",{className:"btn btn-primary",type:"button",onClick:async()=>i(n,o),children:"Add"})})]})})]})},QM=({keyword:e,keywordAllocationTypeIds:t,types:n,saveData:r,deleteData:o})=>{const[s,i]=w.useState(!1),[l,c]=w.useState(e.keyword),[u,d]=w.useState(t),f=()=>{i(!1),r(e.keyword_id,l,u)},p=h=>{let x=u;x.includes(h)?x=x.filter(v=>v!==h):x=[...x,h],d(x)};let y="",m=e.keyword.toString();return s?(m=a.jsx("input",{type:"text",id:e.keyword_id,value:l,onChange:h=>c(h.target.value)}),y=n.map(h=>a.jsx(Uw,{checked:u.includes(h.allocation_type_id),id:`keyword_${e.keyword}_alloc_type_${h.allocation_type_id}`,onChange:p,type:h},`keyword_${e.keyword}_alloc_t_${h.allocation_type_id}`))):y=n.filter(h=>t.includes(h.allocation_type_id)).map(h=>h.display_allocation_type).join(", "),a.jsxs("tr",{children:[a.jsxs("td",{children:[" ",m," "]}),a.jsxs("td",{children:[" ",y," "]}),s?a.jsxs("td",{style:{width:"150px"},children:[a.jsx("button",{style:{marginRight:"5px"},className:"btn btn-warning btn-sm",onClick:()=>i(!1),children:"Cancel"}),a.jsx("button",{className:"btn btn-success btn-sm",onClick:async()=>{f()},children:"Save"})]}):a.jsxs("td",{style:{width:"150px"},children:[a.jsx("button",{style:{marginRight:"5px"},className:"btn btn-primary btn-sm",onClick:()=>i(!0),children:"Edit"}),a.jsx("button",{className:"btn btn-danger btn-sm",onClick:async()=>o(e.keyword_id),children:"Delete"})]})]})};function XM({allocationTypes:e}){const[t,n]=w.useState([]),[r,o]=w.useState([]),[s,i]=w.useState(""),[l,c]=w.useState(!0),u=async h=>{const v=(await h.json()).message??"Error: Changes not saved";h.ok&&await f(),i(v),c(h.ok)},d=async(h,x)=>{const v=await fetch("/keywords",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({value:h,allocation_types:x})});await u(v)},f=async()=>{r.length===0&&o(e);const x=await(await fetch("/keywords",{headers:{"Content-Type":"application/json",Accept:"application/json"}})).json();n(x)},p=async(h,x,v)=>{const g=await fetch(`/keywords/${h}`,{method:"PATCH",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({id:h,keyword:x,allocation_types:v})});await u(g)},y=async h=>{const x=await fetch(`/keywords/${h}`,{headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},method:"DELETE"});await u(x)};w.useEffect(()=>{f()},[]);let m=null;return s.length!==0&&(m=a.jsx(be,{color:l?"success":"warning",children:s})),a.jsxs(a.Fragment,{children:[a.jsx("p",{children:"Type new keywords separated by semicolons, select the desired allocation types, and then submit."}),a.jsx(a.Fragment,{children:m}),a.jsx(YM,{types:r,createData:d},"add-keywords"),a.jsx("h3",{children:"Current Keywords"}),a.jsxs("table",{className:"table table-bordered",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"Keyword"}),a.jsx("th",{children:"Allocation Types"}),a.jsx("td",{})]})}),a.jsx("tbody",{children:t.map(h=>a.jsx(QM,{keyword:h,keywordAllocationTypeIds:h.allocation_type_keywords.map(x=>x.allocation_type_id),types:r,saveData:p,deleteData:y},h.keyword_id))})]})]})}function ZM(e,{bootstrapFonts:t=!0,bootstrapVariables:n=!0,access:r=!1,baseUrl:o=null}={}){const s=e.attachShadow({mode:"open"}),i=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),u=document.createElement("div"),d=document.createElement("link"),f=document.createElement("link"),p=document.createElement("link");return o=o??(typeof document>"u"?require("url").pathToFileURL(__filename).href:Rp&&Rp.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),d.rel="stylesheet",d.href=`${o}/bootstrap.css`,f.rel="stylesheet",f.href=`${o}/xras-ui.css`,p.rel="stylesheet",p.href=`${o}/access.css`,c.appendChild(u),l.appendChild(c),i.appendChild(l),s.appendChild(d),s.appendChild(f),s.appendChild(p),s.appendChild(i),i.classList.add("bootstrap"),n&&l.classList.add("bootstrap-variables"),t&&(c.classList.add("bootstrap-fonts"),c.setAttribute("data-bs-theme","light")),u}function JM({target:e}){_t.createRoot(e).render(a.jsx(QC,{}))}function eD({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){_t.createRoot(o).render(a.jsx(mE,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function tD({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){_t.createRoot(t).render(a.jsx(_x,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function nD({target:e,username:t,routes:n}){Df(n);const r=Mo({reducer:{api:tR}});_t.createRoot(e).render(a.jsx(Ur,{store:r,children:a.jsx(cA,{username:t})}))}function rD({target:e,apiUrl:t}){const n=Mo({reducer:{projectsBrowser:jA},preloadedState:{projectsBrowser:{...vw,apiUrl:t}}});_t.createRoot(e).render(a.jsx(Ur,{store:n,children:a.jsx(NA,{})}))}function oD({target:e,apiUrl:t}){const n=Mo({reducer:{publicationsBrowser:qM},preloadedState:{publicationsBrowser:{...Dw,apiUrl:t}}});_t.createRoot(e).render(a.jsx(Ur,{store:n,children:a.jsx(GM,{apiUrl:t})}))}function Vw(){return Mo({reducer:{publications_store:z2}})}function sD({target:e,routes:t}){Df(t),_t.createRoot(e).render(a.jsx(Ur,{store:Vw(),children:a.jsx(Pw,{})}))}function iD({target:e,routes:t}){Df(t),_t.createRoot(e).render(a.jsx(Ur,{store:Vw(),children:a.jsx(U2,{...JSON.parse(e.dataset.publicationsSelectProps)})}))}function aD({target:e,catalogSources:t,onRamps:n,baseUrl:r}){const o=Mo({reducer:{resourceCatalog:tM}});_t.createRoot(e).render(a.jsx(Ur,{store:o,children:a.jsx(xM,{catalogSources:t,onRamps:n,baseUrl:r})}))}function lD({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=Mo({reducer:{resourceCatalog:kM}});_t.createRoot(e).render(a.jsx(Ur,{store:l,children:a.jsx(AM,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function cD({allocationTypes:e,target:t}){_t.createRoot(t).render(a.jsx(XM,{allocationTypes:e}))}exports.allocationsMap=JM;exports.editResource=tD;exports.keywords=cD;exports.onRampsResourceCatalog=aD;exports.projects=nD;exports.projectsBrowser=rD;exports.publications=sD;exports.publicationsBrowser=oD;exports.publicationsSelect=iD;exports.resourceCatalog=lD;exports.resources=eD;exports.shadowTarget=ZM;