@xras/ui 0.27.0 → 0.28.0
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.
- package/dist/xras-ui.cjs +16 -16
- package/dist/xras-ui.js +4932 -4758
- package/package.json +1 -1
package/dist/xras-ui.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var a1=Object.defineProperty;var l1=(e,t,n)=>t in e?a1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var sc=(e,t,n)=>(l1(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ap=typeof document<"u"?document.currentScript:null;function c1(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 Js(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fg={exports:{}},ml={},Lg={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 ei=Symbol.for("react.element"),
|
|
9
|
+
*/var ei=Symbol.for("react.element"),u1=Symbol.for("react.portal"),d1=Symbol.for("react.fragment"),f1=Symbol.for("react.strict_mode"),p1=Symbol.for("react.profiler"),h1=Symbol.for("react.provider"),m1=Symbol.for("react.context"),g1=Symbol.for("react.forward_ref"),v1=Symbol.for("react.suspense"),y1=Symbol.for("react.memo"),x1=Symbol.for("react.lazy"),Mp=Symbol.iterator;function b1(e){return e===null||typeof e!="object"?null:(e=Mp&&e[Mp]||e["@@iterator"],typeof e=="function"?e:null)}var Ug={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Vg=Object.assign,zg={};function Do(e,t,n){this.props=e,this.context=t,this.refs=zg,this.updater=n||Ug}Do.prototype.isReactComponent={};Do.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")};Do.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Bg(){}Bg.prototype=Do.prototype;function Ad(e,t,n){this.props=e,this.context=t,this.refs=zg,this.updater=n||Ug}var Md=Ad.prototype=new Bg;Md.constructor=Ad;Vg(Md,Do.prototype);Md.isPureReactComponent=!0;var Dp=Array.isArray,qg=Object.prototype.hasOwnProperty,Dd={current:null},Hg={key:!0,ref:!0,__self:!0,__source:!0};function Wg(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)qg.call(t,r)&&!Hg.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:ei,type:e,key:s,ref:i,props:o,_owner:Dd.current}}function w1(e,t){return{$$typeof:ei,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Fd(e){return typeof e=="object"&&e!==null&&e.$$typeof===ei}function S1(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fp=/\/+/g;function ic(e,t){return typeof e=="object"&&e!==null&&e.key!=null?S1(""+e.key):t.toString(36)}function Wi(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 ei:case u1:i=!0}}if(i)return i=e,o=o(i),e=r===""?"."+ic(i,0):r,Dp(o)?(n="",e!=null&&(n=e.replace(Fp,"$&/")+"/"),Wi(o,t,n,"",function(u){return u})):o!=null&&(Fd(o)&&(o=w1(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Fp,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=r===""?".":r+":",Dp(e))for(var l=0;l<e.length;l++){s=e[l];var c=r+ic(s,l);i+=Wi(s,t,n,c,o)}else if(c=b1(e),typeof c=="function")for(e=c.call(e),l=0;!(s=e.next()).done;)s=s.value,c=r+ic(s,l++),i+=Wi(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 gi(e,t,n){if(e==null)return e;var r=[],o=0;return Wi(e,r,"","",function(s){return t.call(n,s,o++)}),r}function _1(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 lt={current:null},Ki={transition:null},C1={ReactCurrentDispatcher:lt,ReactCurrentBatchConfig:Ki,ReactCurrentOwner:Dd};se.Children={map:gi,forEach:function(e,t,n){gi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return gi(e,function(){t++}),t},toArray:function(e){return gi(e,function(t){return t})||[]},only:function(e){if(!Fd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};se.Component=Do;se.Fragment=d1;se.Profiler=p1;se.PureComponent=Ad;se.StrictMode=f1;se.Suspense=v1;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=C1;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=Vg({},e.props),o=e.key,s=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,i=Dd.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)qg.call(t,c)&&!Hg.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:ei,type:e.type,key:o,ref:s,props:r,_owner:i}};se.createContext=function(e){return e={$$typeof:m1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:h1,_context:e},e.Consumer=e};se.createElement=Wg;se.createFactory=function(e){var t=Wg.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:g1,render:e}};se.isValidElement=Fd;se.lazy=function(e){return{$$typeof:x1,_payload:{_status:-1,_result:e},_init:_1}};se.memo=function(e,t){return{$$typeof:y1,type:e,compare:t===void 0?null:t}};se.startTransition=function(e){var t=Ki.transition;Ki.transition={};try{e()}finally{Ki.transition=t}};se.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};se.useCallback=function(e,t){return lt.current.useCallback(e,t)};se.useContext=function(e){return lt.current.useContext(e)};se.useDebugValue=function(){};se.useDeferredValue=function(e){return lt.current.useDeferredValue(e)};se.useEffect=function(e,t){return lt.current.useEffect(e,t)};se.useId=function(){return lt.current.useId()};se.useImperativeHandle=function(e,t,n){return lt.current.useImperativeHandle(e,t,n)};se.useInsertionEffect=function(e,t){return lt.current.useInsertionEffect(e,t)};se.useLayoutEffect=function(e,t){return lt.current.useLayoutEffect(e,t)};se.useMemo=function(e,t){return lt.current.useMemo(e,t)};se.useReducer=function(e,t,n){return lt.current.useReducer(e,t,n)};se.useRef=function(e){return lt.current.useRef(e)};se.useState=function(e){return lt.current.useState(e)};se.useSyncExternalStore=function(e,t,n){return lt.current.useSyncExternalStore(e,t,n)};se.useTransition=function(){return lt.current.useTransition()};se.version="18.2.0";Lg.exports=se;var w=Lg.exports;const Ee=Js(w),ba=c1({__proto__:null,default:Ee},[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 j1=w,
|
|
17
|
+
*/var j1=w,E1=Symbol.for("react.element"),R1=Symbol.for("react.fragment"),N1=Object.prototype.hasOwnProperty,k1=j1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,O1={key:!0,ref:!0,__self:!0,__source:!0};function Kg(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)N1.call(t,r)&&!O1.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:E1,type:e,key:s,ref:i,props:o,_owner:k1.current}}ml.Fragment=R1;ml.jsx=Kg;ml.jsxs=Kg;Fg.exports=ml;var a=Fg.exports,bt={},Gg={exports:{}},Tt={},Yg={exports:{}},Qg={};/**
|
|
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(T,L){var
|
|
25
|
+
*/(function(e){function t(T,L){var M=T.length;T.push(L);e:for(;0<M;){var W=M-1>>>1,B=T[W];if(0<o(B,L))T[W]=L,T[M]=B,M=W;else break e}}function n(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var L=T[0],M=T.pop();if(M!==L){T[0]=M;e:for(var W=0,B=T.length,X=B>>>1;W<X;){var J=2*(W+1)-1,ee=T[J],Q=J+1,te=T[Q];if(0>o(ee,M))Q<B&&0>o(te,ee)?(T[W]=te,T[Q]=M,W=Q):(T[W]=ee,T[J]=M,W=J);else if(Q<B&&0>o(te,M))T[W]=te,T[Q]=M,W=Q;else break e}}return L}function o(T,L){var M=T.sortIndex-L.sortIndex;return M!==0?M:T.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,m=!1,v=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,x=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(T){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=T)r(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function S(T){if(y=!1,b(T),!v)if(n(c)!==null)v=!0,V(_);else{var L=n(u);L!==null&&Z(S,L.startTime-T)}}function _(T,L){v=!1,y&&(y=!1,h(C),C=-1),m=!0;var M=p;try{for(b(L),f=n(c);f!==null&&(!(f.expirationTime>L)||T&&!O());){var W=f.callback;if(typeof W=="function"){f.callback=null,p=f.priorityLevel;var B=W(f.expirationTime<=L);L=e.unstable_now(),typeof B=="function"?f.callback=B:f===n(c)&&r(c),b(L)}else r(c);f=n(c)}if(f!==null)var X=!0;else{var J=n(u);J!==null&&Z(S,J.startTime-L),X=!1}return X}finally{f=null,p=M,m=!1}}var j=!1,E=null,C=-1,N=5,R=-1;function O(){return!(e.unstable_now()-R<N)}function k(){if(E!==null){var T=e.unstable_now();R=T;var L=!0;try{L=E(!0,T)}finally{L?P():(j=!1,E=null)}}else j=!1}var P;if(typeof x=="function")P=function(){x(k)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,F=U.port2;U.port1.onmessage=k,P=function(){F.postMessage(null)}}else P=function(){g(k,0)};function V(T){E=T,j||(j=!0,P())}function Z(T,L){C=g(function(){T(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(T){T.callback=null},e.unstable_continueExecution=function(){v||m||(v=!0,V(_))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(T){switch(p){case 1:case 2:case 3:var L=3;break;default:L=p}var M=p;p=L;try{return T()}finally{p=M}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,L){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var M=p;p=T;try{return L()}finally{p=M}},e.unstable_scheduleCallback=function(T,L,M){var W=e.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?W+M:W):M=W,T){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=M+B,T={id:d++,callback:L,priorityLevel:T,startTime:M,expirationTime:B,sortIndex:-1},M>W?(T.sortIndex=M,t(u,T),n(c)===null&&T===n(u)&&(y?(h(C),C=-1):y=!0,Z(S,M-W))):(T.sortIndex=B,t(c,T),v||m||(v=!0,V(_))),T},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(T){var L=p;return function(){var M=p;p=L;try{return T.apply(this,arguments)}finally{p=M}}}})(Qg);Yg.exports=Qg;var T1=Yg.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
|
|
33
|
+
*/var Xg=w,Et=T1;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 Dr(e,t){xo(e,t),xo(e+"Capture",t)}function xo(e,t){for(js[e]=t,e=0;e<t.length;e++)Zg.add(t[e])}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),nu=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]*$/,Lp={},Up={};function I1(e){return nu.call(Up,e)?!0:nu.call(Lp,e)?!1:P1.test(e)?Up[e]=!0:(Lp[e]=!0,!1)}function $1(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 A1(e,t,n,r){if(t===null||typeof t>"u"||$1(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 ct(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 Xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Xe[e]=new ct(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Xe[t]=new ct(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Xe[e]=new ct(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Xe[e]=new ct(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){Xe[e]=new ct(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Xe[e]=new ct(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Xe[e]=new ct(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Xe[e]=new ct(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Xe[e]=new ct(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ld=/[\-:]([a-z])/g;function Ud(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(Ld,Ud);Xe[t]=new ct(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(Ld,Ud);Xe[t]=new ct(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(Ld,Ud);Xe[t]=new ct(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Xe[e]=new ct(e,1,!1,e.toLowerCase(),null,!1,!1)});Xe.xlinkHref=new ct("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Xe[e]=new ct(e,1,!1,e.toLowerCase(),null,!0,!0)});function Vd(e,t,n,r){var o=Xe.hasOwnProperty(t)?Xe[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(A1(t,n,o,r)&&(n=null),r||o===null?I1(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 Vn=Xg.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,vi=Symbol.for("react.element"),Yr=Symbol.for("react.portal"),Qr=Symbol.for("react.fragment"),zd=Symbol.for("react.strict_mode"),ru=Symbol.for("react.profiler"),Jg=Symbol.for("react.provider"),ev=Symbol.for("react.context"),Bd=Symbol.for("react.forward_ref"),ou=Symbol.for("react.suspense"),su=Symbol.for("react.suspense_list"),qd=Symbol.for("react.memo"),Wn=Symbol.for("react.lazy"),tv=Symbol.for("react.offscreen"),Vp=Symbol.iterator;function Wo(e){return e===null||typeof e!="object"?null:(e=Vp&&e[Vp]||e["@@iterator"],typeof e=="function"?e:null)}var ke=Object.assign,ac;function as(e){if(ac===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ac=t&&t[1]||""}return`
|
|
34
34
|
`+ac+e}var lc=!1;function cc(e,t){if(!e||lc)return"";lc=!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{lc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?as(e):""}function $1(e){switch(e.tag){case 5:return as(e.type);case 16:return as("Lazy");case 13:return as("Suspense");case 19:return as("SuspenseList");case 0:case 2:case 15:return e=cc(e.type,!1),e;case 11:return e=cc(e.type.render,!1),e;case 1:return e=cc(e.type,!0),e;default:return""}}function iu(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 Qr:return"Fragment";case Yr:return"Portal";case ru:return"Profiler";case zd:return"StrictMode";case ou:return"Suspense";case su:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jg:return(e.displayName||"Context")+".Consumer";case Zg:return(e._context.displayName||"Context")+".Provider";case Bd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qd:return t=e.displayName||null,t!==null?t:iu(e.type)||"Memo";case Wn:t=e._payload,e=e._init;try{return iu(e(t))}catch{}}return null}function M1(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 iu(t);case 8:return t===zd?"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 tv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function A1(e){var t=tv(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 vi(e){e._valueTracker||(e._valueTracker=A1(e))}function nv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function wa(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 au(e,t){var n=t.checked;return ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vp(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 rv(e,t){t=t.checked,t!=null&&Vd(e,"checked",t,!1)}function lu(e,t){rv(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")?cu(e,t.type,n):t.hasOwnProperty("defaultValue")&&cu(e,t.type,lr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function zp(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 cu(e,t,n){(t!=="number"||wa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ls=Array.isArray;function lo(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 uu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Bp(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(ls(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 ov(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 qp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sv(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 du(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yi,iv=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(yi=yi||document.createElement("div"),yi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Es(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ps={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},D1=["Webkit","ms","Moz","O"];Object.keys(ps).forEach(function(e){D1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ps[t]=ps[e]})});function av(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ps.hasOwnProperty(e)&&ps[e]?(""+t).trim():t+"px"}function lv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=av(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var F1=ke({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 fu(e,t){if(t){if(F1[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 pu(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 hu=null;function Hd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mu=null,co=null,uo=null;function Hp(e){if(e=ri(e)){if(typeof mu!="function")throw Error(I(280));var t=e.stateNode;t&&(t=xl(t),mu(e.stateNode,e.type,t))}}function cv(e){co?uo?uo.push(e):uo=[e]:co=e}function uv(){if(co){var e=co,t=uo;if(uo=co=null,Hp(e),t)for(e=0;e<t.length;e++)Hp(t[e])}}function dv(e,t){return e(t)}function fv(){}var uc=!1;function pv(e,t,n){if(uc)return e(t,n);uc=!0;try{return dv(e,t,n)}finally{uc=!1,(co!==null||uo!==null)&&(fv(),uv())}}function Rs(e,t){var n=e.stateNode;if(n===null)return null;var r=xl(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 gu=!1;if(In)try{var Ko={};Object.defineProperty(Ko,"passive",{get:function(){gu=!0}}),window.addEventListener("test",Ko,Ko),window.removeEventListener("test",Ko,Ko)}catch{gu=!1}function L1(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 hs=!1,Sa=null,ja=!1,vu=null,U1={onError:function(e){hs=!0,Sa=e}};function V1(e,t,n,r,o,s,i,l,c){hs=!1,Sa=null,L1.apply(U1,arguments)}function z1(e,t,n,r,o,s,i,l,c){if(V1.apply(this,arguments),hs){if(hs){var u=Sa;hs=!1,Sa=null}else throw Error(I(198));ja||(ja=!0,vu=u)}}function Fr(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 hv(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 Wp(e){if(Fr(e)!==e)throw Error(I(188))}function B1(e){var t=e.alternate;if(!t){if(t=Fr(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 Wp(o),e;if(s===r)return Wp(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 mv(e){return e=B1(e),e!==null?gv(e):null}function gv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=gv(e);if(t!==null)return t;e=e.sibling}return null}var vv=Et.unstable_scheduleCallback,Kp=Et.unstable_cancelCallback,q1=Et.unstable_shouldYield,H1=Et.unstable_requestPaint,$e=Et.unstable_now,W1=Et.unstable_getCurrentPriorityLevel,Wd=Et.unstable_ImmediatePriority,yv=Et.unstable_UserBlockingPriority,_a=Et.unstable_NormalPriority,K1=Et.unstable_LowPriority,xv=Et.unstable_IdlePriority,ml=null,cn=null;function G1(e){if(cn&&typeof cn.onCommitFiberRoot=="function")try{cn.onCommitFiberRoot(ml,e,void 0,(e.current.flags&128)===128)}catch{}}var Xt=Math.clz32?Math.clz32:X1,Y1=Math.log,Q1=Math.LN2;function X1(e){return e>>>=0,e===0?32:31-(Y1(e)/Q1|0)|0}var xi=64,bi=4194304;function cs(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 Ca(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=cs(l):(s&=i,s!==0&&(r=cs(s)))}else i=n&~o,i!==0?r=cs(i):s!==0&&(r=cs(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 Z1(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 J1(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]=Z1(l,t)):c<=t&&(e.expiredLanes|=l),s&=~l}}function yu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bv(){var e=xi;return xi<<=1,!(xi&4194240)&&(xi=64),e}function dc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ti(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 eS(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 Kd(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 ve=0;function wv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Sv,Gd,jv,_v,Cv,xu=!1,wi=[],er=null,tr=null,nr=null,Ns=new Map,ks=new Map,Yn=[],tS="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 Gp(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":Ns.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ks.delete(t.pointerId)}}function Go(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=ri(t),t!==null&&Gd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function nS(e,t,n,r,o){switch(t){case"focusin":return er=Go(er,e,t,n,r,o),!0;case"dragenter":return tr=Go(tr,e,t,n,r,o),!0;case"mouseover":return nr=Go(nr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Ns.set(s,Go(Ns.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,ks.set(s,Go(ks.get(s)||null,e,t,n,r,o)),!0}return!1}function Ev(e){var t=xr(e.target);if(t!==null){var n=Fr(t);if(n!==null){if(t=n.tag,t===13){if(t=hv(n),t!==null){e.blockedOn=t,Cv(e.priority,function(){jv(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 Ki(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);hu=r,n.target.dispatchEvent(r),hu=null}else return t=ri(n),t!==null&&Gd(t),e.blockedOn=n,!1;t.shift()}return!0}function Yp(e,t,n){Ki(e)&&n.delete(t)}function rS(){xu=!1,er!==null&&Ki(er)&&(er=null),tr!==null&&Ki(tr)&&(tr=null),nr!==null&&Ki(nr)&&(nr=null),Ns.forEach(Yp),ks.forEach(Yp)}function Yo(e,t){e.blockedOn===t&&(e.blockedOn=null,xu||(xu=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,rS)))}function Os(e){function t(o){return Yo(o,e)}if(0<wi.length){Yo(wi[0],e);for(var n=1;n<wi.length;n++){var r=wi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(er!==null&&Yo(er,e),tr!==null&&Yo(tr,e),nr!==null&&Yo(nr,e),Ns.forEach(t),ks.forEach(t),n=0;n<Yn.length;n++)r=Yn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Yn.length&&(n=Yn[0],n.blockedOn===null);)Ev(n),n.blockedOn===null&&Yn.shift()}var fo=Vn.ReactCurrentBatchConfig,Ea=!0;function oS(e,t,n,r){var o=ve,s=fo.transition;fo.transition=null;try{ve=1,Yd(e,t,n,r)}finally{ve=o,fo.transition=s}}function sS(e,t,n,r){var o=ve,s=fo.transition;fo.transition=null;try{ve=4,Yd(e,t,n,r)}finally{ve=o,fo.transition=s}}function Yd(e,t,n,r){if(Ea){var o=bu(e,t,n,r);if(o===null)wc(e,t,r,Ra,n),Gp(e,r);else if(nS(o,e,t,n,r))r.stopPropagation();else if(Gp(e,r),t&4&&-1<tS.indexOf(e)){for(;o!==null;){var s=ri(o);if(s!==null&&Sv(s),s=bu(e,t,n,r),s===null&&wc(e,t,r,Ra,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else wc(e,t,r,null,n)}}var Ra=null;function bu(e,t,n,r){if(Ra=null,e=Hd(r),e=xr(e),e!==null)if(t=Fr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=hv(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 Ra=e,null}function Rv(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(W1()){case Wd:return 1;case yv:return 4;case _a:case K1:return 16;case xv:return 536870912;default:return 16}default:return 16}}var Zn=null,Qd=null,Gi=null;function Nv(){if(Gi)return Gi;var e,t=Qd,n=t.length,r,o="value"in Zn?Zn.value:Zn.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 Gi=o.slice(e,1<r?1-r:void 0)}function Yi(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 Si(){return!0}function Qp(){return!1}function Pt(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)?Si:Qp,this.isPropagationStopped=Qp,this}return ke(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=Si)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Si)},persist:function(){},isPersistent:Si}),t}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xd=Pt(Fo),ni=ke({},Fo,{view:0,detail:0}),iS=Pt(ni),fc,pc,Qo,gl=ke({},ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zd,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!==Qo&&(Qo&&e.type==="mousemove"?(fc=e.screenX-Qo.screenX,pc=e.screenY-Qo.screenY):pc=fc=0,Qo=e),fc)},movementY:function(e){return"movementY"in e?e.movementY:pc}}),Xp=Pt(gl),aS=ke({},gl,{dataTransfer:0}),lS=Pt(aS),cS=ke({},ni,{relatedTarget:0}),hc=Pt(cS),uS=ke({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),dS=Pt(uS),fS=ke({},Fo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),pS=Pt(fS),hS=ke({},Fo,{data:0}),Zp=Pt(hS),mS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gS={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"},vS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=vS[e])?!!t[e]:!1}function Zd(){return yS}var xS=ke({},ni,{key:function(e){if(e.key){var t=mS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zd,charCode:function(e){return e.type==="keypress"?Yi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bS=Pt(xS),wS=ke({},gl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jp=Pt(wS),SS=ke({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zd}),jS=Pt(SS),_S=ke({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),CS=Pt(_S),ES=ke({},gl,{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}),RS=Pt(ES),NS=[9,13,27,32],Jd=In&&"CompositionEvent"in window,ms=null;In&&"documentMode"in document&&(ms=document.documentMode);var kS=In&&"TextEvent"in window&&!ms,kv=In&&(!Jd||ms&&8<ms&&11>=ms),eh=" ",th=!1;function Ov(e,t){switch(e){case"keyup":return NS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function OS(e,t){switch(e){case"compositionend":return Tv(t);case"keypress":return t.which!==32?null:(th=!0,eh);case"textInput":return e=t.data,e===eh&&th?null:e;default:return null}}function TS(e,t){if(Xr)return e==="compositionend"||!Jd&&Ov(e,t)?(e=Nv(),Gi=Qd=Zn=null,Xr=!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 kv&&t.locale!=="ko"?null:t.data;default:return null}}var PS={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 nh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!PS[e.type]:t==="textarea"}function Pv(e,t,n,r){cv(r),t=Na(t,"onChange"),0<t.length&&(n=new Xd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gs=null,Ts=null;function IS(e){Bv(e,0)}function vl(e){var t=eo(e);if(nv(t))return e}function $S(e,t){if(e==="change")return t}var Iv=!1;if(In){var mc;if(In){var gc="oninput"in document;if(!gc){var rh=document.createElement("div");rh.setAttribute("oninput","return;"),gc=typeof rh.oninput=="function"}mc=gc}else mc=!1;Iv=mc&&(!document.documentMode||9<document.documentMode)}function oh(){gs&&(gs.detachEvent("onpropertychange",$v),Ts=gs=null)}function $v(e){if(e.propertyName==="value"&&vl(Ts)){var t=[];Pv(t,Ts,e,Hd(e)),pv(IS,t)}}function MS(e,t,n){e==="focusin"?(oh(),gs=t,Ts=n,gs.attachEvent("onpropertychange",$v)):e==="focusout"&&oh()}function AS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return vl(Ts)}function DS(e,t){if(e==="click")return vl(t)}function FS(e,t){if(e==="input"||e==="change")return vl(t)}function LS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var en=typeof Object.is=="function"?Object.is:LS;function Ps(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(!nu.call(t,o)||!en(e[o],t[o]))return!1}return!0}function sh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ih(e,t){var n=sh(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=sh(n)}}function Mv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Av(){for(var e=window,t=wa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=wa(e.document)}return t}function ef(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 US(e){var t=Av(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Mv(n.ownerDocument.documentElement,n)){if(r!==null&&ef(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=ih(n,s);var i=ih(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 VS=In&&"documentMode"in document&&11>=document.documentMode,Zr=null,wu=null,vs=null,Su=!1;function ah(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Su||Zr==null||Zr!==wa(r)||(r=Zr,"selectionStart"in r&&ef(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}),vs&&Ps(vs,r)||(vs=r,r=Na(wu,"onSelect"),0<r.length&&(t=new Xd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function ji(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Jr={animationend:ji("Animation","AnimationEnd"),animationiteration:ji("Animation","AnimationIteration"),animationstart:ji("Animation","AnimationStart"),transitionend:ji("Transition","TransitionEnd")},vc={},Dv={};In&&(Dv=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);function yl(e){if(vc[e])return vc[e];if(!Jr[e])return e;var t=Jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Dv)return vc[e]=t[n];return e}var Fv=yl("animationend"),Lv=yl("animationiteration"),Uv=yl("animationstart"),Vv=yl("transitionend"),zv=new Map,lh="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){zv.set(e,t),Dr(t,[e])}for(var yc=0;yc<lh.length;yc++){var xc=lh[yc],zS=xc.toLowerCase(),BS=xc[0].toUpperCase()+xc.slice(1);fr(zS,"on"+BS)}fr(Fv,"onAnimationEnd");fr(Lv,"onAnimationIteration");fr(Uv,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(Vv,"onTransitionEnd");xo("onMouseEnter",["mouseout","mouseover"]);xo("onMouseLeave",["mouseout","mouseover"]);xo("onPointerEnter",["pointerout","pointerover"]);xo("onPointerLeave",["pointerout","pointerover"]);Dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="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(" "),qS=new Set("cancel close invalid load scroll toggle".split(" ").concat(us));function ch(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,z1(r,t,void 0,e),e.currentTarget=null}function Bv(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;ch(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;ch(o,l,u),s=c}}}if(ja)throw e=vu,ja=!1,vu=null,e}function we(e,t){var n=t[Ru];n===void 0&&(n=t[Ru]=new Set);var r=e+"__bubble";n.has(r)||(qv(t,e,2,!1),n.add(r))}function bc(e,t,n){var r=0;t&&(r|=4),qv(n,e,r,t)}var _i="_reactListening"+Math.random().toString(36).slice(2);function Is(e){if(!e[_i]){e[_i]=!0,Xg.forEach(function(n){n!=="selectionchange"&&(qS.has(n)||bc(n,!1,e),bc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_i]||(t[_i]=!0,bc("selectionchange",!1,t))}}function qv(e,t,n,r){switch(Rv(t)){case 1:var o=oS;break;case 4:o=sS;break;default:o=Yd}n=o.bind(null,t,n,e),o=void 0,!gu||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 wc(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}pv(function(){var u=s,d=Hd(n),f=[];e:{var p=zv.get(e);if(p!==void 0){var m=Xd,x=e;switch(e){case"keypress":if(Yi(n)===0)break e;case"keydown":case"keyup":m=bS;break;case"focusin":x="focus",m=hc;break;case"focusout":x="blur",m=hc;break;case"beforeblur":case"afterblur":m=hc;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":m=Xp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=lS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=jS;break;case Fv:case Lv:case Uv:m=dS;break;case Vv:m=CS;break;case"scroll":m=iS;break;case"wheel":m=RS;break;case"copy":case"cut":case"paste":m=pS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=Jp}var y=(t&4)!==0,g=!y&&e==="scroll",h=y?p!==null?p+"Capture":null:p;y=[];for(var v=u,b;v!==null;){b=v;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,h!==null&&(S=Rs(v,h),S!=null&&y.push($s(v,S,b)))),g)break;v=v.return}0<y.length&&(p=new m(p,x,null,n,d),f.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==hu&&(x=n.relatedTarget||n.fromElement)&&(xr(x)||x[$n]))break e;if((m||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,m?(x=n.relatedTarget||n.toElement,m=u,x=x?xr(x):null,x!==null&&(g=Fr(x),x!==g||x.tag!==5&&x.tag!==6)&&(x=null)):(m=null,x=u),m!==x)){if(y=Xp,S="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(y=Jp,S="onPointerLeave",h="onPointerEnter",v="pointer"),g=m==null?p:eo(m),b=x==null?p:eo(x),p=new y(S,v+"leave",m,n,d),p.target=g,p.relatedTarget=b,S=null,xr(d)===u&&(y=new y(h,v+"enter",x,n,d),y.target=b,y.relatedTarget=g,S=y),g=S,m&&x)t:{for(y=m,h=x,v=0,b=y;b;b=zr(b))v++;for(b=0,S=h;S;S=zr(S))b++;for(;0<v-b;)y=zr(y),v--;for(;0<b-v;)h=zr(h),b--;for(;v--;){if(y===h||h!==null&&y===h.alternate)break t;y=zr(y),h=zr(h)}y=null}else y=null;m!==null&&uh(f,p,m,y,!1),x!==null&&g!==null&&uh(f,g,x,y,!0)}}e:{if(p=u?eo(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var j=$S;else if(nh(p))if(Iv)j=FS;else{j=AS;var _=MS}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(j=DS);if(j&&(j=j(e,u))){Pv(f,j,n,d);break e}_&&_(e,p,u),e==="focusout"&&(_=p._wrapperState)&&_.controlled&&p.type==="number"&&cu(p,"number",p.value)}switch(_=u?eo(u):window,e){case"focusin":(nh(_)||_.contentEditable==="true")&&(Zr=_,wu=u,vs=null);break;case"focusout":vs=wu=Zr=null;break;case"mousedown":Su=!0;break;case"contextmenu":case"mouseup":case"dragend":Su=!1,ah(f,n,d);break;case"selectionchange":if(VS)break;case"keydown":case"keyup":ah(f,n,d)}var E;if(Jd)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Xr?Ov(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(kv&&n.locale!=="ko"&&(Xr||C!=="onCompositionStart"?C==="onCompositionEnd"&&Xr&&(E=Nv()):(Zn=d,Qd="value"in Zn?Zn.value:Zn.textContent,Xr=!0)),_=Na(u,C),0<_.length&&(C=new Zp(C,e,null,n,d),f.push({event:C,listeners:_}),E?C.data=E:(E=Tv(n),E!==null&&(C.data=E)))),(E=kS?OS(e,n):TS(e,n))&&(u=Na(u,"onBeforeInput"),0<u.length&&(d=new Zp("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=E))}Bv(f,t)})}function $s(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Na(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Rs(e,n),s!=null&&r.unshift($s(e,s,o)),s=Rs(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 uh(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=Rs(n,s),c!=null&&i.unshift($s(n,c,l))):o||(c=Rs(n,s),c!=null&&i.push($s(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var HS=/\r\n?/g,WS=/\u0000|\uFFFD/g;function dh(e){return(typeof e=="string"?e:""+e).replace(HS,`
|
|
38
|
-
`).replace(WS,"")}function Ci(e,t,n){if(t=dh(t),dh(e)!==t&&n)throw Error(I(425))}function ka(){}var ju=null,_u=null;function Cu(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 Eu=typeof setTimeout=="function"?setTimeout:void 0,KS=typeof clearTimeout=="function"?clearTimeout:void 0,fh=typeof Promise=="function"?Promise:void 0,GS=typeof queueMicrotask=="function"?queueMicrotask:typeof fh<"u"?function(e){return fh.resolve(null).then(e).catch(YS)}:Eu;function YS(e){setTimeout(function(){throw e})}function Sc(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),Os(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Os(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 ph(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 Lo=Math.random().toString(36).slice(2),ln="__reactFiber$"+Lo,Ms="__reactProps$"+Lo,$n="__reactContainer$"+Lo,Ru="__reactEvents$"+Lo,QS="__reactListeners$"+Lo,XS="__reactHandles$"+Lo;function xr(e){var t=e[ln];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$n]||n[ln]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ph(e);e!==null;){if(n=e[ln])return n;e=ph(e)}return t}e=n,n=e.parentNode}return null}function ri(e){return e=e[ln]||e[$n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function eo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function xl(e){return e[Ms]||null}var Nu=[],to=-1;function pr(e){return{current:e}}function je(e){0>to||(e.current=Nu[to],Nu[to]=null,to--)}function xe(e,t){to++,Nu[to]=e.current,e.current=t}var cr={},nt=pr(cr),ht=pr(!1),Nr=cr;function bo(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 mt(e){return e=e.childContextTypes,e!=null}function Oa(){je(ht),je(nt)}function hh(e,t,n){if(nt.current!==cr)throw Error(I(168));xe(nt,t),xe(ht,n)}function Hv(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,M1(e)||"Unknown",o));return ke({},n,r)}function Ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,Nr=nt.current,xe(nt,e),xe(ht,ht.current),!0}function mh(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Hv(e,t,Nr),r.__reactInternalMemoizedMergedChildContext=e,je(ht),je(nt),xe(nt,e)):je(ht),xe(ht,n)}var Sn=null,bl=!1,jc=!1;function Wv(e){Sn===null?Sn=[e]:Sn.push(e)}function ZS(e){bl=!0,Wv(e)}function hr(){if(!jc&&Sn!==null){jc=!0;var e=0,t=ve;try{var n=Sn;for(ve=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Sn=null,bl=!1}catch(o){throw Sn!==null&&(Sn=Sn.slice(e+1)),vv(Wd,hr),o}finally{ve=t,jc=!1}}return null}var no=[],ro=0,Pa=null,Ia=0,Mt=[],At=0,kr=null,En=1,Rn="";function gr(e,t){no[ro++]=Ia,no[ro++]=Pa,Pa=e,Ia=t}function Kv(e,t,n){Mt[At++]=En,Mt[At++]=Rn,Mt[At++]=kr,kr=e;var r=En;e=Rn;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,En=1<<32-Xt(t)+o|n<<o|r,Rn=s+e}else En=1<<s|n<<o|r,Rn=e}function tf(e){e.return!==null&&(gr(e,1),Kv(e,1,0))}function nf(e){for(;e===Pa;)Pa=no[--ro],no[ro]=null,Ia=no[--ro],no[ro]=null;for(;e===kr;)kr=Mt[--At],Mt[At]=null,Rn=Mt[--At],Mt[At]=null,En=Mt[--At],Mt[At]=null}var _t=null,jt=null,Ce=!1,Yt=null;function Gv(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 gh(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,_t=e,jt=rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,_t=e,jt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=kr!==null?{id:En,overflow:Rn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ft(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,_t=e,jt=null,!0):!1;default:return!1}}function ku(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ou(e){if(Ce){var t=jt;if(t){var n=t;if(!gh(e,t)){if(ku(e))throw Error(I(418));t=rr(n.nextSibling);var r=_t;t&&gh(e,t)?Gv(r,n):(e.flags=e.flags&-4097|2,Ce=!1,_t=e)}}else{if(ku(e))throw Error(I(418));e.flags=e.flags&-4097|2,Ce=!1,_t=e}}}function vh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;_t=e}function Ei(e){if(e!==_t)return!1;if(!Ce)return vh(e),Ce=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Cu(e.type,e.memoizedProps)),t&&(t=jt)){if(ku(e))throw Yv(),Error(I(418));for(;t;)Gv(e,t),t=rr(t.nextSibling)}if(vh(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){jt=rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}jt=null}}else jt=_t?rr(e.stateNode.nextSibling):null;return!0}function Yv(){for(var e=jt;e;)e=rr(e.nextSibling)}function wo(){jt=_t=null,Ce=!1}function rf(e){Yt===null?Yt=[e]:Yt.push(e)}var JS=Vn.ReactCurrentBatchConfig;function Kt(e,t){if(e&&e.defaultProps){t=ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var $a=pr(null),Ma=null,oo=null,of=null;function sf(){of=oo=Ma=null}function af(e){var t=$a.current;je($a),e._currentValue=t}function Tu(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 po(e,t){Ma=e,of=oo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(pt=!0),e.firstContext=null)}function Ut(e){var t=e._currentValue;if(of!==e)if(e={context:e,memoizedValue:t,next:null},oo===null){if(Ma===null)throw Error(I(308));oo=e,Ma.dependencies={lanes:0,firstContext:e}}else oo=oo.next=e;return t}var br=null;function lf(e){br===null?br=[e]:br.push(e)}function Qv(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,lf(t)):(n.next=o.next,o.next=n),t.interleaved=n,Mn(e,r)}function Mn(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 Kn=!1;function cf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xv(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 kn(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,le&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Mn(e,n)}return o=r.interleaved,o===null?(t.next=t,lf(r)):(t.next=o.next,o.next=t),r.interleaved=t,Mn(e,n)}function Qi(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,Kd(e,n)}}function yh(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 Aa(e,t,n,r){var o=e.updateQueue;Kn=!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,m=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,y=l;switch(p=t,m=n,y.tag){case 1:if(x=y.payload,typeof x=="function"){f=x.call(m,f,p);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,p=typeof x=="function"?x.call(m,f,p):x,p==null)break e;f=ke({},f,p);break e;case 2:Kn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else m={eventTime:m,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,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);Tr|=i,e.lanes=i,e.memoizedState=f}}function xh(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 Qg.Component().refs;function Pu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wl={isMounted:function(e){return(e=e._reactInternals)?Fr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=at(),o=ir(e),s=kn(r,o);s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Zt(t,e,o,r),Qi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=at(),o=ir(e),s=kn(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),Qi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=at(),r=ir(e),o=kn(n,r);o.tag=2,t!=null&&(o.callback=t),t=or(e,o,r),t!==null&&(Zt(t,e,r,n),Qi(t,e,r))}};function bh(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?!Ps(n,r)||!Ps(o,s):!0}function Jv(e,t,n){var r=!1,o=cr,s=t.contextType;return typeof s=="object"&&s!==null?s=Ut(s):(o=mt(t)?Nr:nt.current,r=t.contextTypes,s=(r=r!=null)?bo(e,o):cr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function wh(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&&wl.enqueueReplaceState(t,t.state,null)}function Iu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Zv,cf(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Ut(s):(s=mt(t)?Nr:nt.current,o.context=bo(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Pu(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&&wl.enqueueReplaceState(o,o.state,null),Aa(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Xo(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 Ri(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sh(e){var t=e._init;return t(e._payload)}function ey(e){function t(h,v){if(e){var b=h.deletions;b===null?(h.deletions=[v],h.flags|=16):b.push(v)}}function n(h,v){if(!e)return null;for(;v!==null;)t(h,v),v=v.sibling;return null}function r(h,v){for(h=new Map;v!==null;)v.key!==null?h.set(v.key,v):h.set(v.index,v),v=v.sibling;return h}function o(h,v){return h=ar(h,v),h.index=0,h.sibling=null,h}function s(h,v,b){return h.index=b,e?(b=h.alternate,b!==null?(b=b.index,b<v?(h.flags|=2,v):b):(h.flags|=2,v)):(h.flags|=1048576,v)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function l(h,v,b,S){return v===null||v.tag!==6?(v=Oc(b,h.mode,S),v.return=h,v):(v=o(v,b),v.return=h,v)}function c(h,v,b,S){var j=b.type;return j===Qr?d(h,v,b.props.children,S,b.key):v!==null&&(v.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Wn&&Sh(j)===v.type)?(S=o(v,b.props),S.ref=Xo(h,v,b),S.return=h,S):(S=na(b.type,b.key,b.props,null,h.mode,S),S.ref=Xo(h,v,b),S.return=h,S)}function u(h,v,b,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=Tc(b,h.mode,S),v.return=h,v):(v=o(v,b.children||[]),v.return=h,v)}function d(h,v,b,S,j){return v===null||v.tag!==7?(v=_r(b,h.mode,S,j),v.return=h,v):(v=o(v,b),v.return=h,v)}function f(h,v,b){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Oc(""+v,h.mode,b),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case gi:return b=na(v.type,v.key,v.props,null,h.mode,b),b.ref=Xo(h,null,v),b.return=h,b;case Yr:return v=Tc(v,h.mode,b),v.return=h,v;case Wn:var S=v._init;return f(h,S(v._payload),b)}if(ls(v)||Wo(v))return v=_r(v,h.mode,b,null),v.return=h,v;Ri(h,v)}return null}function p(h,v,b,S){var j=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return j!==null?null:l(h,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case gi:return b.key===j?c(h,v,b,S):null;case Yr:return b.key===j?u(h,v,b,S):null;case Wn:return j=b._init,p(h,v,j(b._payload),S)}if(ls(b)||Wo(b))return j!==null?null:d(h,v,b,S,null);Ri(h,b)}return null}function m(h,v,b,S,j){if(typeof S=="string"&&S!==""||typeof S=="number")return h=h.get(b)||null,l(v,h,""+S,j);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case gi:return h=h.get(S.key===null?b:S.key)||null,c(v,h,S,j);case Yr:return h=h.get(S.key===null?b:S.key)||null,u(v,h,S,j);case Wn:var _=S._init;return m(h,v,b,_(S._payload),j)}if(ls(S)||Wo(S))return h=h.get(b)||null,d(v,h,S,j,null);Ri(v,S)}return null}function x(h,v,b,S){for(var j=null,_=null,E=v,C=v=0,N=null;E!==null&&C<b.length;C++){E.index>C?(N=E,E=null):N=E.sibling;var R=p(h,E,b[C],S);if(R===null){E===null&&(E=N);break}e&&E&&R.alternate===null&&t(h,E),v=s(R,v,C),_===null?j=R:_.sibling=R,_=R,E=N}if(C===b.length)return n(h,E),Ce&&gr(h,C),j;if(E===null){for(;C<b.length;C++)E=f(h,b[C],S),E!==null&&(v=s(E,v,C),_===null?j=E:_.sibling=E,_=E);return Ce&&gr(h,C),j}for(E=r(h,E);C<b.length;C++)N=m(E,h,C,b[C],S),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?C:N.key),v=s(N,v,C),_===null?j=N:_.sibling=N,_=N);return e&&E.forEach(function(O){return t(h,O)}),Ce&&gr(h,C),j}function y(h,v,b,S){var j=Wo(b);if(typeof j!="function")throw Error(I(150));if(b=j.call(b),b==null)throw Error(I(151));for(var _=j=null,E=v,C=v=0,N=null,R=b.next();E!==null&&!R.done;C++,R=b.next()){E.index>C?(N=E,E=null):N=E.sibling;var O=p(h,E,R.value,S);if(O===null){E===null&&(E=N);break}e&&E&&O.alternate===null&&t(h,E),v=s(O,v,C),_===null?j=O:_.sibling=O,_=O,E=N}if(R.done)return n(h,E),Ce&&gr(h,C),j;if(E===null){for(;!R.done;C++,R=b.next())R=f(h,R.value,S),R!==null&&(v=s(R,v,C),_===null?j=R:_.sibling=R,_=R);return Ce&&gr(h,C),j}for(E=r(h,E);!R.done;C++,R=b.next())R=m(E,h,C,R.value,S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?C:R.key),v=s(R,v,C),_===null?j=R:_.sibling=R,_=R);return e&&E.forEach(function(k){return t(h,k)}),Ce&&gr(h,C),j}function g(h,v,b,S){if(typeof b=="object"&&b!==null&&b.type===Qr&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case gi:e:{for(var j=b.key,_=v;_!==null;){if(_.key===j){if(j=b.type,j===Qr){if(_.tag===7){n(h,_.sibling),v=o(_,b.props.children),v.return=h,h=v;break e}}else if(_.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Wn&&Sh(j)===_.type){n(h,_.sibling),v=o(_,b.props),v.ref=Xo(h,_,b),v.return=h,h=v;break e}n(h,_);break}else t(h,_);_=_.sibling}b.type===Qr?(v=_r(b.props.children,h.mode,S,b.key),v.return=h,h=v):(S=na(b.type,b.key,b.props,null,h.mode,S),S.ref=Xo(h,v,b),S.return=h,h=S)}return i(h);case Yr:e:{for(_=b.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(h,v.sibling),v=o(v,b.children||[]),v.return=h,h=v;break e}else{n(h,v);break}else t(h,v);v=v.sibling}v=Tc(b,h.mode,S),v.return=h,h=v}return i(h);case Wn:return _=b._init,g(h,v,_(b._payload),S)}if(ls(b))return x(h,v,b,S);if(Wo(b))return y(h,v,b,S);Ri(h,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,v!==null&&v.tag===6?(n(h,v.sibling),v=o(v,b),v.return=h,h=v):(n(h,v),v=Oc(b,h.mode,S),v.return=h,h=v),i(h)):n(h,v)}return g}var So=ey(!0),ty=ey(!1),oi={},un=pr(oi),As=pr(oi),Ds=pr(oi);function wr(e){if(e===oi)throw Error(I(174));return e}function uf(e,t){switch(xe(Ds,t),xe(As,e),xe(un,oi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:du(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=du(t,e)}je(un),xe(un,t)}function jo(){je(un),je(As),je(Ds)}function ny(e){wr(Ds.current);var t=wr(un.current),n=du(t,e.type);t!==n&&(xe(As,e),xe(un,n))}function df(e){As.current===e&&(je(un),je(As))}var Ee=pr(0);function Da(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 _c=[];function ff(){for(var e=0;e<_c.length;e++)_c[e]._workInProgressVersionPrimary=null;_c.length=0}var Xi=Vn.ReactCurrentDispatcher,Cc=Vn.ReactCurrentBatchConfig,Or=0,Ne=null,Fe=null,Be=null,Fa=!1,ys=!1,Fs=0,ej=0;function Ze(){throw Error(I(321))}function pf(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 hf(e,t,n,r,o,s){if(Or=s,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xi.current=e===null||e.memoizedState===null?oj:sj,e=n(r,o),ys){s=0;do{if(ys=!1,Fs=0,25<=s)throw Error(I(301));s+=1,Be=Fe=null,t.updateQueue=null,Xi.current=ij,e=n(r,o)}while(ys)}if(Xi.current=La,t=Fe!==null&&Fe.next!==null,Or=0,Be=Fe=Ne=null,Fa=!1,t)throw Error(I(300));return e}function mf(){var e=Fs!==0;return Fs=0,e}function rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Ne.memoizedState=Be=e:Be=Be.next=e,Be}function Vt(){if(Fe===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Be===null?Ne.memoizedState:Be.next;if(t!==null)Be=t,Fe=e;else{if(e===null)throw Error(I(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Be===null?Ne.memoizedState=Be=e:Be=Be.next=e}return Be}function Ls(e,t){return typeof t=="function"?t(e):t}function Ec(e){var t=Vt(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Fe,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,Ne.lanes|=d,Tr|=d}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,en(r,t.memoizedState)||(pt=!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,Ne.lanes|=s,Tr|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Rc(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)||(pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function ry(){}function oy(e,t){var n=Ne,r=Vt(),o=t(),s=!en(r.memoizedState,o);if(s&&(r.memoizedState=o,pt=!0),r=r.queue,gf(ay.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,Us(9,iy.bind(null,n,r,o,t),void 0,null),qe===null)throw Error(I(349));Or&30||sy(n,t,o)}return o}function sy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function iy(e,t,n,r){t.value=n,t.getSnapshot=r,ly(t)&&cy(e)}function ay(e,t,n){return n(function(){ly(t)&&cy(e)})}function ly(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!en(e,n)}catch{return!0}}function cy(e){var t=Mn(e,1);t!==null&&Zt(t,e,1,-1)}function jh(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:Ls,lastRenderedState:e},t.queue=e,e=e.dispatch=rj.bind(null,Ne,e),[t.memoizedState,e]}function Us(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.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 uy(){return Vt().memoizedState}function Zi(e,t,n,r){var o=rn();Ne.flags|=e,o.memoizedState=Us(1|t,n,void 0,r===void 0?null:r)}function Sl(e,t,n,r){var o=Vt();r=r===void 0?null:r;var s=void 0;if(Fe!==null){var i=Fe.memoizedState;if(s=i.destroy,r!==null&&pf(r,i.deps)){o.memoizedState=Us(t,n,s,r);return}}Ne.flags|=e,o.memoizedState=Us(1|t,n,s,r)}function _h(e,t){return Zi(8390656,8,e,t)}function gf(e,t){return Sl(2048,8,e,t)}function dy(e,t){return Sl(4,2,e,t)}function fy(e,t){return Sl(4,4,e,t)}function py(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 hy(e,t,n){return n=n!=null?n.concat([e]):null,Sl(4,4,py.bind(null,t,e),n)}function vf(){}function my(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function gy(e,t){var n=Vt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function vy(e,t,n){return Or&21?(en(n,t)||(n=bv(),Ne.lanes|=n,Tr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,pt=!0),e.memoizedState=n)}function tj(e,t){var n=ve;ve=n!==0&&4>n?n:4,e(!0);var r=Cc.transition;Cc.transition={};try{e(!1),t()}finally{ve=n,Cc.transition=r}}function yy(){return Vt().memoizedState}function nj(e,t,n){var r=ir(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},xy(e))by(t,n);else if(n=Qv(e,t,n,r),n!==null){var o=at();Zt(n,e,r,o),wy(n,t,r)}}function rj(e,t,n){var r=ir(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(xy(e))by(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,lf(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=Qv(e,t,o,r),n!==null&&(o=at(),Zt(n,e,r,o),wy(n,t,r))}}function xy(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function by(e,t){ys=Fa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function wy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kd(e,n)}}var La={readContext:Ut,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},oj={readContext:Ut,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:_h,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zi(4194308,4,py.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zi(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=nj.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:jh,useDebugValue:vf,useDeferredValue:function(e){return rn().memoizedState=e},useTransition:function(){var e=jh(!1),t=e[0];return e=tj.bind(null,e[1]),rn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,o=rn();if(Ce){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),qe===null)throw Error(I(349));Or&30||sy(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,_h(ay.bind(null,r,s,e),[e]),r.flags|=2048,Us(9,iy.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=rn(),t=qe.identifierPrefix;if(Ce){var n=Rn,r=En;n=(r&~(1<<32-Xt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=ej++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sj={readContext:Ut,useCallback:my,useContext:Ut,useEffect:gf,useImperativeHandle:hy,useInsertionEffect:dy,useLayoutEffect:fy,useMemo:gy,useReducer:Ec,useRef:uy,useState:function(){return Ec(Ls)},useDebugValue:vf,useDeferredValue:function(e){var t=Vt();return vy(t,Fe.memoizedState,e)},useTransition:function(){var e=Ec(Ls)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:ry,useSyncExternalStore:oy,useId:yy,unstable_isNewReconciler:!1},ij={readContext:Ut,useCallback:my,useContext:Ut,useEffect:gf,useImperativeHandle:hy,useInsertionEffect:dy,useLayoutEffect:fy,useMemo:gy,useReducer:Rc,useRef:uy,useState:function(){return Rc(Ls)},useDebugValue:vf,useDeferredValue:function(e){var t=Vt();return Fe===null?t.memoizedState=e:vy(t,Fe.memoizedState,e)},useTransition:function(){var e=Rc(Ls)[0],t=Vt().memoizedState;return[e,t]},useMutableSource:ry,useSyncExternalStore:oy,useId:yy,unstable_isNewReconciler:!1};function _o(e,t){try{var n="",r=t;do n+=$1(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{lc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?as(e):""}function M1(e){switch(e.tag){case 5:return as(e.type);case 16:return as("Lazy");case 13:return as("Suspense");case 19:return as("SuspenseList");case 0:case 2:case 15:return e=cc(e.type,!1),e;case 11:return e=cc(e.type.render,!1),e;case 1:return e=cc(e.type,!0),e;default:return""}}function iu(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 Qr:return"Fragment";case Yr:return"Portal";case ru:return"Profiler";case zd:return"StrictMode";case ou:return"Suspense";case su:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ev:return(e.displayName||"Context")+".Consumer";case Jg:return(e._context.displayName||"Context")+".Provider";case Bd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qd:return t=e.displayName||null,t!==null?t:iu(e.type)||"Memo";case Wn:t=e._payload,e=e._init;try{return iu(e(t))}catch{}}return null}function D1(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 iu(t);case 8:return t===zd?"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 nv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function F1(e){var t=nv(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 yi(e){e._valueTracker||(e._valueTracker=F1(e))}function rv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=nv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function wa(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 au(e,t){var n=t.checked;return ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function zp(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 ov(e,t){t=t.checked,t!=null&&Vd(e,"checked",t,!1)}function lu(e,t){ov(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")?cu(e,t.type,n):t.hasOwnProperty("defaultValue")&&cu(e,t.type,lr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bp(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 cu(e,t,n){(t!=="number"||wa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ls=Array.isArray;function lo(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 uu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(I(91));return ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qp(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(ls(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 sv(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 Hp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function iv(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 du(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?iv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xi,av=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(xi=xi||document.createElement("div"),xi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Es(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ps={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},L1=["Webkit","ms","Moz","O"];Object.keys(ps).forEach(function(e){L1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ps[t]=ps[e]})});function lv(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ps.hasOwnProperty(e)&&ps[e]?(""+t).trim():t+"px"}function cv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=lv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var U1=ke({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 fu(e,t){if(t){if(U1[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 pu(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 hu=null;function Hd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mu=null,co=null,uo=null;function Wp(e){if(e=ri(e)){if(typeof mu!="function")throw Error(I(280));var t=e.stateNode;t&&(t=bl(t),mu(e.stateNode,e.type,t))}}function uv(e){co?uo?uo.push(e):uo=[e]:co=e}function dv(){if(co){var e=co,t=uo;if(uo=co=null,Wp(e),t)for(e=0;e<t.length;e++)Wp(t[e])}}function fv(e,t){return e(t)}function pv(){}var uc=!1;function hv(e,t,n){if(uc)return e(t,n);uc=!0;try{return fv(e,t,n)}finally{uc=!1,(co!==null||uo!==null)&&(pv(),dv())}}function Rs(e,t){var n=e.stateNode;if(n===null)return null;var r=bl(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 gu=!1;if(In)try{var Ko={};Object.defineProperty(Ko,"passive",{get:function(){gu=!0}}),window.addEventListener("test",Ko,Ko),window.removeEventListener("test",Ko,Ko)}catch{gu=!1}function V1(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 hs=!1,Sa=null,_a=!1,vu=null,z1={onError:function(e){hs=!0,Sa=e}};function B1(e,t,n,r,o,s,i,l,c){hs=!1,Sa=null,V1.apply(z1,arguments)}function q1(e,t,n,r,o,s,i,l,c){if(B1.apply(this,arguments),hs){if(hs){var u=Sa;hs=!1,Sa=null}else throw Error(I(198));_a||(_a=!0,vu=u)}}function Fr(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 mv(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 Kp(e){if(Fr(e)!==e)throw Error(I(188))}function H1(e){var t=e.alternate;if(!t){if(t=Fr(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 Kp(o),e;if(s===r)return Kp(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 gv(e){return e=H1(e),e!==null?vv(e):null}function vv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vv(e);if(t!==null)return t;e=e.sibling}return null}var yv=Et.unstable_scheduleCallback,Gp=Et.unstable_cancelCallback,W1=Et.unstable_shouldYield,K1=Et.unstable_requestPaint,$e=Et.unstable_now,G1=Et.unstable_getCurrentPriorityLevel,Wd=Et.unstable_ImmediatePriority,xv=Et.unstable_UserBlockingPriority,Ca=Et.unstable_NormalPriority,Y1=Et.unstable_LowPriority,bv=Et.unstable_IdlePriority,gl=null,ln=null;function Q1(e){if(ln&&typeof ln.onCommitFiberRoot=="function")try{ln.onCommitFiberRoot(gl,e,void 0,(e.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:J1,X1=Math.log,Z1=Math.LN2;function J1(e){return e>>>=0,e===0?32:31-(X1(e)/Z1|0)|0}var bi=64,wi=4194304;function cs(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 ja(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=cs(l):(s&=i,s!==0&&(r=cs(s)))}else i=n&~o,i!==0?r=cs(i):s!==0&&(r=cs(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-Qt(t),o=1<<n,r|=e[n],t&=~o;return r}function eS(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 tS(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes;0<s;){var i=31-Qt(s),l=1<<i,c=o[i];c===-1?(!(l&n)||l&r)&&(o[i]=eS(l,t)):c<=t&&(e.expiredLanes|=l),s&=~l}}function yu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function wv(){var e=bi;return bi<<=1,!(bi&4194240)&&(bi=64),e}function dc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ti(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Qt(t),e[t]=n}function nS(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-Qt(n),s=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~s}}function Kd(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Qt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ve=0;function Sv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var _v,Gd,Cv,jv,Ev,xu=!1,Si=[],er=null,tr=null,nr=null,Ns=new Map,ks=new Map,Yn=[],rS="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 Yp(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":Ns.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ks.delete(t.pointerId)}}function Go(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=ri(t),t!==null&&Gd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function oS(e,t,n,r,o){switch(t){case"focusin":return er=Go(er,e,t,n,r,o),!0;case"dragenter":return tr=Go(tr,e,t,n,r,o),!0;case"mouseover":return nr=Go(nr,e,t,n,r,o),!0;case"pointerover":var s=o.pointerId;return Ns.set(s,Go(Ns.get(s)||null,e,t,n,r,o)),!0;case"gotpointercapture":return s=o.pointerId,ks.set(s,Go(ks.get(s)||null,e,t,n,r,o)),!0}return!1}function Rv(e){var t=xr(e.target);if(t!==null){var n=Fr(t);if(n!==null){if(t=n.tag,t===13){if(t=mv(n),t!==null){e.blockedOn=t,Ev(e.priority,function(){Cv(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 Gi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);hu=r,n.target.dispatchEvent(r),hu=null}else return t=ri(n),t!==null&&Gd(t),e.blockedOn=n,!1;t.shift()}return!0}function Qp(e,t,n){Gi(e)&&n.delete(t)}function sS(){xu=!1,er!==null&&Gi(er)&&(er=null),tr!==null&&Gi(tr)&&(tr=null),nr!==null&&Gi(nr)&&(nr=null),Ns.forEach(Qp),ks.forEach(Qp)}function Yo(e,t){e.blockedOn===t&&(e.blockedOn=null,xu||(xu=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,sS)))}function Os(e){function t(o){return Yo(o,e)}if(0<Si.length){Yo(Si[0],e);for(var n=1;n<Si.length;n++){var r=Si[n];r.blockedOn===e&&(r.blockedOn=null)}}for(er!==null&&Yo(er,e),tr!==null&&Yo(tr,e),nr!==null&&Yo(nr,e),Ns.forEach(t),ks.forEach(t),n=0;n<Yn.length;n++)r=Yn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Yn.length&&(n=Yn[0],n.blockedOn===null);)Rv(n),n.blockedOn===null&&Yn.shift()}var fo=Vn.ReactCurrentBatchConfig,Ea=!0;function iS(e,t,n,r){var o=ve,s=fo.transition;fo.transition=null;try{ve=1,Yd(e,t,n,r)}finally{ve=o,fo.transition=s}}function aS(e,t,n,r){var o=ve,s=fo.transition;fo.transition=null;try{ve=4,Yd(e,t,n,r)}finally{ve=o,fo.transition=s}}function Yd(e,t,n,r){if(Ea){var o=bu(e,t,n,r);if(o===null)wc(e,t,r,Ra,n),Yp(e,r);else if(oS(o,e,t,n,r))r.stopPropagation();else if(Yp(e,r),t&4&&-1<rS.indexOf(e)){for(;o!==null;){var s=ri(o);if(s!==null&&_v(s),s=bu(e,t,n,r),s===null&&wc(e,t,r,Ra,n),s===o)break;o=s}o!==null&&r.stopPropagation()}else wc(e,t,r,null,n)}}var Ra=null;function bu(e,t,n,r){if(Ra=null,e=Hd(r),e=xr(e),e!==null)if(t=Fr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=mv(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 Ra=e,null}function Nv(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(G1()){case Wd:return 1;case xv:return 4;case Ca:case Y1:return 16;case bv:return 536870912;default:return 16}default:return 16}}var Zn=null,Qd=null,Yi=null;function kv(){if(Yi)return Yi;var e,t=Qd,n=t.length,r,o="value"in Zn?Zn.value:Zn.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 Yi=o.slice(e,1<r?1-r:void 0)}function Qi(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 _i(){return!0}function Xp(){return!1}function Pt(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)?_i:Xp,this.isPropagationStopped=Xp,this}return ke(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=_i)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=_i)},persist:function(){},isPersistent:_i}),t}var Fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xd=Pt(Fo),ni=ke({},Fo,{view:0,detail:0}),lS=Pt(ni),fc,pc,Qo,vl=ke({},ni,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zd,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!==Qo&&(Qo&&e.type==="mousemove"?(fc=e.screenX-Qo.screenX,pc=e.screenY-Qo.screenY):pc=fc=0,Qo=e),fc)},movementY:function(e){return"movementY"in e?e.movementY:pc}}),Zp=Pt(vl),cS=ke({},vl,{dataTransfer:0}),uS=Pt(cS),dS=ke({},ni,{relatedTarget:0}),hc=Pt(dS),fS=ke({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),pS=Pt(fS),hS=ke({},Fo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),mS=Pt(hS),gS=ke({},Fo,{data:0}),Jp=Pt(gS),vS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yS={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"},xS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xS[e])?!!t[e]:!1}function Zd(){return bS}var wS=ke({},ni,{key:function(e){if(e.key){var t=vS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zd,charCode:function(e){return e.type==="keypress"?Qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),SS=Pt(wS),_S=ke({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eh=Pt(_S),CS=ke({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zd}),jS=Pt(CS),ES=ke({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),RS=Pt(ES),NS=ke({},vl,{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}),kS=Pt(NS),OS=[9,13,27,32],Jd=In&&"CompositionEvent"in window,ms=null;In&&"documentMode"in document&&(ms=document.documentMode);var TS=In&&"TextEvent"in window&&!ms,Ov=In&&(!Jd||ms&&8<ms&&11>=ms),th=" ",nh=!1;function Tv(e,t){switch(e){case"keyup":return OS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function PS(e,t){switch(e){case"compositionend":return Pv(t);case"keypress":return t.which!==32?null:(nh=!0,th);case"textInput":return e=t.data,e===th&&nh?null:e;default:return null}}function IS(e,t){if(Xr)return e==="compositionend"||!Jd&&Tv(e,t)?(e=kv(),Yi=Qd=Zn=null,Xr=!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 Ov&&t.locale!=="ko"?null:t.data;default:return null}}var $S={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 rh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$S[e.type]:t==="textarea"}function Iv(e,t,n,r){uv(r),t=Na(t,"onChange"),0<t.length&&(n=new Xd("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var gs=null,Ts=null;function AS(e){qv(e,0)}function yl(e){var t=eo(e);if(rv(t))return e}function MS(e,t){if(e==="change")return t}var $v=!1;if(In){var mc;if(In){var gc="oninput"in document;if(!gc){var oh=document.createElement("div");oh.setAttribute("oninput","return;"),gc=typeof oh.oninput=="function"}mc=gc}else mc=!1;$v=mc&&(!document.documentMode||9<document.documentMode)}function sh(){gs&&(gs.detachEvent("onpropertychange",Av),Ts=gs=null)}function Av(e){if(e.propertyName==="value"&&yl(Ts)){var t=[];Iv(t,Ts,e,Hd(e)),hv(AS,t)}}function DS(e,t,n){e==="focusin"?(sh(),gs=t,Ts=n,gs.attachEvent("onpropertychange",Av)):e==="focusout"&&sh()}function FS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yl(Ts)}function LS(e,t){if(e==="click")return yl(t)}function US(e,t){if(e==="input"||e==="change")return yl(t)}function VS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:VS;function Ps(e,t){if(Jt(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(!nu.call(t,o)||!Jt(e[o],t[o]))return!1}return!0}function ih(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ah(e,t){var n=ih(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=ih(n)}}function Mv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dv(){for(var e=window,t=wa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=wa(e.document)}return t}function ef(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 zS(e){var t=Dv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Mv(n.ownerDocument.documentElement,n)){if(r!==null&&ef(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=ah(n,s);var i=ah(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 BS=In&&"documentMode"in document&&11>=document.documentMode,Zr=null,wu=null,vs=null,Su=!1;function lh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Su||Zr==null||Zr!==wa(r)||(r=Zr,"selectionStart"in r&&ef(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}),vs&&Ps(vs,r)||(vs=r,r=Na(wu,"onSelect"),0<r.length&&(t=new Xd("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Zr)))}function Ci(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Jr={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionend:Ci("Transition","TransitionEnd")},vc={},Fv={};In&&(Fv=document.createElement("div").style,"AnimationEvent"in window||(delete Jr.animationend.animation,delete Jr.animationiteration.animation,delete Jr.animationstart.animation),"TransitionEvent"in window||delete Jr.transitionend.transition);function xl(e){if(vc[e])return vc[e];if(!Jr[e])return e;var t=Jr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fv)return vc[e]=t[n];return e}var Lv=xl("animationend"),Uv=xl("animationiteration"),Vv=xl("animationstart"),zv=xl("transitionend"),Bv=new Map,ch="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){Bv.set(e,t),Dr(t,[e])}for(var yc=0;yc<ch.length;yc++){var xc=ch[yc],qS=xc.toLowerCase(),HS=xc[0].toUpperCase()+xc.slice(1);fr(qS,"on"+HS)}fr(Lv,"onAnimationEnd");fr(Uv,"onAnimationIteration");fr(Vv,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(zv,"onTransitionEnd");xo("onMouseEnter",["mouseout","mouseover"]);xo("onMouseLeave",["mouseout","mouseover"]);xo("onPointerEnter",["pointerout","pointerover"]);xo("onPointerLeave",["pointerout","pointerover"]);Dr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Dr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Dr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Dr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Dr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var us="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(" "),WS=new Set("cancel close invalid load scroll toggle".split(" ").concat(us));function uh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,q1(r,t,void 0,e),e.currentTarget=null}function qv(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;uh(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;uh(o,l,u),s=c}}}if(_a)throw e=vu,_a=!1,vu=null,e}function we(e,t){var n=t[Ru];n===void 0&&(n=t[Ru]=new Set);var r=e+"__bubble";n.has(r)||(Hv(t,e,2,!1),n.add(r))}function bc(e,t,n){var r=0;t&&(r|=4),Hv(n,e,r,t)}var ji="_reactListening"+Math.random().toString(36).slice(2);function Is(e){if(!e[ji]){e[ji]=!0,Zg.forEach(function(n){n!=="selectionchange"&&(WS.has(n)||bc(n,!1,e),bc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ji]||(t[ji]=!0,bc("selectionchange",!1,t))}}function Hv(e,t,n,r){switch(Nv(t)){case 1:var o=iS;break;case 4:o=aS;break;default:o=Yd}n=o.bind(null,t,n,e),o=void 0,!gu||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 wc(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}hv(function(){var u=s,d=Hd(n),f=[];e:{var p=Bv.get(e);if(p!==void 0){var m=Xd,v=e;switch(e){case"keypress":if(Qi(n)===0)break e;case"keydown":case"keyup":m=SS;break;case"focusin":v="focus",m=hc;break;case"focusout":v="blur",m=hc;break;case"beforeblur":case"afterblur":m=hc;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":m=Zp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=uS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=jS;break;case Lv:case Uv:case Vv:m=pS;break;case zv:m=RS;break;case"scroll":m=lS;break;case"wheel":m=kS;break;case"copy":case"cut":case"paste":m=mS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=eh}var y=(t&4)!==0,g=!y&&e==="scroll",h=y?p!==null?p+"Capture":null:p;y=[];for(var x=u,b;x!==null;){b=x;var S=b.stateNode;if(b.tag===5&&S!==null&&(b=S,h!==null&&(S=Rs(x,h),S!=null&&y.push($s(x,S,b)))),g)break;x=x.return}0<y.length&&(p=new m(p,v,null,n,d),f.push({event:p,listeners:y}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==hu&&(v=n.relatedTarget||n.fromElement)&&(xr(v)||v[$n]))break e;if((m||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,m?(v=n.relatedTarget||n.toElement,m=u,v=v?xr(v):null,v!==null&&(g=Fr(v),v!==g||v.tag!==5&&v.tag!==6)&&(v=null)):(m=null,v=u),m!==v)){if(y=Zp,S="onMouseLeave",h="onMouseEnter",x="mouse",(e==="pointerout"||e==="pointerover")&&(y=eh,S="onPointerLeave",h="onPointerEnter",x="pointer"),g=m==null?p:eo(m),b=v==null?p:eo(v),p=new y(S,x+"leave",m,n,d),p.target=g,p.relatedTarget=b,S=null,xr(d)===u&&(y=new y(h,x+"enter",v,n,d),y.target=b,y.relatedTarget=g,S=y),g=S,m&&v)t:{for(y=m,h=v,x=0,b=y;b;b=zr(b))x++;for(b=0,S=h;S;S=zr(S))b++;for(;0<x-b;)y=zr(y),x--;for(;0<b-x;)h=zr(h),b--;for(;x--;){if(y===h||h!==null&&y===h.alternate)break t;y=zr(y),h=zr(h)}y=null}else y=null;m!==null&&dh(f,p,m,y,!1),v!==null&&g!==null&&dh(f,g,v,y,!0)}}e:{if(p=u?eo(u):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var _=MS;else if(rh(p))if($v)_=US;else{_=FS;var j=DS}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=LS);if(_&&(_=_(e,u))){Iv(f,_,n,d);break e}j&&j(e,p,u),e==="focusout"&&(j=p._wrapperState)&&j.controlled&&p.type==="number"&&cu(p,"number",p.value)}switch(j=u?eo(u):window,e){case"focusin":(rh(j)||j.contentEditable==="true")&&(Zr=j,wu=u,vs=null);break;case"focusout":vs=wu=Zr=null;break;case"mousedown":Su=!0;break;case"contextmenu":case"mouseup":case"dragend":Su=!1,lh(f,n,d);break;case"selectionchange":if(BS)break;case"keydown":case"keyup":lh(f,n,d)}var E;if(Jd)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Xr?Tv(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Ov&&n.locale!=="ko"&&(Xr||C!=="onCompositionStart"?C==="onCompositionEnd"&&Xr&&(E=kv()):(Zn=d,Qd="value"in Zn?Zn.value:Zn.textContent,Xr=!0)),j=Na(u,C),0<j.length&&(C=new Jp(C,e,null,n,d),f.push({event:C,listeners:j}),E?C.data=E:(E=Pv(n),E!==null&&(C.data=E)))),(E=TS?PS(e,n):IS(e,n))&&(u=Na(u,"onBeforeInput"),0<u.length&&(d=new Jp("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=E))}qv(f,t)})}function $s(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Na(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,s=o.stateNode;o.tag===5&&s!==null&&(o=s,s=Rs(e,n),s!=null&&r.unshift($s(e,s,o)),s=Rs(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 dh(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=Rs(n,s),c!=null&&i.unshift($s(n,c,l))):o||(c=Rs(n,s),c!=null&&i.push($s(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var KS=/\r\n?/g,GS=/\u0000|\uFFFD/g;function fh(e){return(typeof e=="string"?e:""+e).replace(KS,`
|
|
38
|
+
`).replace(GS,"")}function Ei(e,t,n){if(t=fh(t),fh(e)!==t&&n)throw Error(I(425))}function ka(){}var _u=null,Cu=null;function ju(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 Eu=typeof setTimeout=="function"?setTimeout:void 0,YS=typeof clearTimeout=="function"?clearTimeout:void 0,ph=typeof Promise=="function"?Promise:void 0,QS=typeof queueMicrotask=="function"?queueMicrotask:typeof ph<"u"?function(e){return ph.resolve(null).then(e).catch(XS)}:Eu;function XS(e){setTimeout(function(){throw e})}function Sc(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),Os(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Os(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 hh(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 Lo=Math.random().toString(36).slice(2),an="__reactFiber$"+Lo,As="__reactProps$"+Lo,$n="__reactContainer$"+Lo,Ru="__reactEvents$"+Lo,ZS="__reactListeners$"+Lo,JS="__reactHandles$"+Lo;function xr(e){var t=e[an];if(t)return t;for(var n=e.parentNode;n;){if(t=n[$n]||n[an]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hh(e);e!==null;){if(n=e[an])return n;e=hh(e)}return t}e=n,n=e.parentNode}return null}function ri(e){return e=e[an]||e[$n],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function eo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(I(33))}function bl(e){return e[As]||null}var Nu=[],to=-1;function pr(e){return{current:e}}function _e(e){0>to||(e.current=Nu[to],Nu[to]=null,to--)}function xe(e,t){to++,Nu[to]=e.current,e.current=t}var cr={},rt=pr(cr),ht=pr(!1),Nr=cr;function bo(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 mt(e){return e=e.childContextTypes,e!=null}function Oa(){_e(ht),_e(rt)}function mh(e,t,n){if(rt.current!==cr)throw Error(I(168));xe(rt,t),xe(ht,n)}function Wv(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,D1(e)||"Unknown",o));return ke({},n,r)}function Ta(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,Nr=rt.current,xe(rt,e),xe(ht,ht.current),!0}function gh(e,t,n){var r=e.stateNode;if(!r)throw Error(I(169));n?(e=Wv(e,t,Nr),r.__reactInternalMemoizedMergedChildContext=e,_e(ht),_e(rt),xe(rt,e)):_e(ht),xe(ht,n)}var wn=null,wl=!1,_c=!1;function Kv(e){wn===null?wn=[e]:wn.push(e)}function e_(e){wl=!0,Kv(e)}function hr(){if(!_c&&wn!==null){_c=!0;var e=0,t=ve;try{var n=wn;for(ve=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wn=null,wl=!1}catch(o){throw wn!==null&&(wn=wn.slice(e+1)),yv(Wd,hr),o}finally{ve=t,_c=!1}}return null}var no=[],ro=0,Pa=null,Ia=0,At=[],Mt=0,kr=null,En=1,Rn="";function gr(e,t){no[ro++]=Ia,no[ro++]=Pa,Pa=e,Ia=t}function Gv(e,t,n){At[Mt++]=En,At[Mt++]=Rn,At[Mt++]=kr,kr=e;var r=En;e=Rn;var o=32-Qt(r)-1;r&=~(1<<o),n+=1;var s=32-Qt(t)+o;if(30<s){var i=o-o%5;s=(r&(1<<i)-1).toString(32),r>>=i,o-=i,En=1<<32-Qt(t)+o|n<<o|r,Rn=s+e}else En=1<<s|n<<o|r,Rn=e}function tf(e){e.return!==null&&(gr(e,1),Gv(e,1,0))}function nf(e){for(;e===Pa;)Pa=no[--ro],no[ro]=null,Ia=no[--ro],no[ro]=null;for(;e===kr;)kr=At[--Mt],At[Mt]=null,Rn=At[--Mt],At[Mt]=null,En=At[--Mt],At[Mt]=null}var Ct=null,_t=null,je=!1,Gt=null;function Yv(e,t){var n=Dt(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 vh(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,Ct=e,_t=rr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ct=e,_t=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=kr!==null?{id:En,overflow:Rn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ct=e,_t=null,!0):!1;default:return!1}}function ku(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ou(e){if(je){var t=_t;if(t){var n=t;if(!vh(e,t)){if(ku(e))throw Error(I(418));t=rr(n.nextSibling);var r=Ct;t&&vh(e,t)?Yv(r,n):(e.flags=e.flags&-4097|2,je=!1,Ct=e)}}else{if(ku(e))throw Error(I(418));e.flags=e.flags&-4097|2,je=!1,Ct=e}}}function yh(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ct=e}function Ri(e){if(e!==Ct)return!1;if(!je)return yh(e),je=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ju(e.type,e.memoizedProps)),t&&(t=_t)){if(ku(e))throw Qv(),Error(I(418));for(;t;)Yv(e,t),t=rr(t.nextSibling)}if(yh(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){_t=rr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}_t=null}}else _t=Ct?rr(e.stateNode.nextSibling):null;return!0}function Qv(){for(var e=_t;e;)e=rr(e.nextSibling)}function wo(){_t=Ct=null,je=!1}function rf(e){Gt===null?Gt=[e]:Gt.push(e)}var t_=Vn.ReactCurrentBatchConfig;function Wt(e,t){if(e&&e.defaultProps){t=ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var $a=pr(null),Aa=null,oo=null,of=null;function sf(){of=oo=Aa=null}function af(e){var t=$a.current;_e($a),e._currentValue=t}function Tu(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 po(e,t){Aa=e,of=oo=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(pt=!0),e.firstContext=null)}function Lt(e){var t=e._currentValue;if(of!==e)if(e={context:e,memoizedValue:t,next:null},oo===null){if(Aa===null)throw Error(I(308));oo=e,Aa.dependencies={lanes:0,firstContext:e}}else oo=oo.next=e;return t}var br=null;function lf(e){br===null?br=[e]:br.push(e)}function Xv(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,lf(t)):(n.next=o.next,o.next=n),t.interleaved=n,An(e,r)}function An(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 Kn=!1;function cf(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 kn(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,le&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,An(e,n)}return o=r.interleaved,o===null?(t.next=t,lf(r)):(t.next=o.next,o.next=t),r.interleaved=t,An(e,n)}function Xi(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,Kd(e,n)}}function xh(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 Ma(e,t,n,r){var o=e.updateQueue;Kn=!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,m=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,y=l;switch(p=t,m=n,y.tag){case 1:if(v=y.payload,typeof v=="function"){f=v.call(m,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=y.payload,p=typeof v=="function"?v.call(m,f,p):v,p==null)break e;f=ke({},f,p);break e;case 2:Kn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[l]:p.push(l))}else m={eventTime:m,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=f):d=d.next=m,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);Tr|=i,e.lanes=i,e.memoizedState=f}}function bh(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 Jv=new Xg.Component().refs;function Pu(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Sl={isMounted:function(e){return(e=e._reactInternals)?Fr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=at(),o=ir(e),s=kn(r,o);s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Xt(t,e,o,r),Xi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=at(),o=ir(e),s=kn(r,o);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=or(e,s,o),t!==null&&(Xt(t,e,o,r),Xi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=at(),r=ir(e),o=kn(n,r);o.tag=2,t!=null&&(o.callback=t),t=or(e,o,r),t!==null&&(Xt(t,e,r,n),Xi(t,e,r))}};function wh(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?!Ps(n,r)||!Ps(o,s):!0}function ey(e,t,n){var r=!1,o=cr,s=t.contextType;return typeof s=="object"&&s!==null?s=Lt(s):(o=mt(t)?Nr:rt.current,r=t.contextTypes,s=(r=r!=null)?bo(e,o):cr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Sl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=s),t}function Sh(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&&Sl.enqueueReplaceState(t,t.state,null)}function Iu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=Jv,cf(e);var s=t.contextType;typeof s=="object"&&s!==null?o.context=Lt(s):(s=mt(t)?Nr:rt.current,o.context=bo(e,s)),o.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Pu(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&&Sl.enqueueReplaceState(o,o.state,null),Ma(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Xo(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===Jv&&(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 Ni(e,t){throw e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function _h(e){var t=e._init;return t(e._payload)}function ty(e){function t(h,x){if(e){var b=h.deletions;b===null?(h.deletions=[x],h.flags|=16):b.push(x)}}function n(h,x){if(!e)return null;for(;x!==null;)t(h,x),x=x.sibling;return null}function r(h,x){for(h=new Map;x!==null;)x.key!==null?h.set(x.key,x):h.set(x.index,x),x=x.sibling;return h}function o(h,x){return h=ar(h,x),h.index=0,h.sibling=null,h}function s(h,x,b){return h.index=b,e?(b=h.alternate,b!==null?(b=b.index,b<x?(h.flags|=2,x):b):(h.flags|=2,x)):(h.flags|=1048576,x)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function l(h,x,b,S){return x===null||x.tag!==6?(x=Oc(b,h.mode,S),x.return=h,x):(x=o(x,b),x.return=h,x)}function c(h,x,b,S){var _=b.type;return _===Qr?d(h,x,b.props.children,S,b.key):x!==null&&(x.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Wn&&_h(_)===x.type)?(S=o(x,b.props),S.ref=Xo(h,x,b),S.return=h,S):(S=ra(b.type,b.key,b.props,null,h.mode,S),S.ref=Xo(h,x,b),S.return=h,S)}function u(h,x,b,S){return x===null||x.tag!==4||x.stateNode.containerInfo!==b.containerInfo||x.stateNode.implementation!==b.implementation?(x=Tc(b,h.mode,S),x.return=h,x):(x=o(x,b.children||[]),x.return=h,x)}function d(h,x,b,S,_){return x===null||x.tag!==7?(x=Cr(b,h.mode,S,_),x.return=h,x):(x=o(x,b),x.return=h,x)}function f(h,x,b){if(typeof x=="string"&&x!==""||typeof x=="number")return x=Oc(""+x,h.mode,b),x.return=h,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case vi:return b=ra(x.type,x.key,x.props,null,h.mode,b),b.ref=Xo(h,null,x),b.return=h,b;case Yr:return x=Tc(x,h.mode,b),x.return=h,x;case Wn:var S=x._init;return f(h,S(x._payload),b)}if(ls(x)||Wo(x))return x=Cr(x,h.mode,b,null),x.return=h,x;Ni(h,x)}return null}function p(h,x,b,S){var _=x!==null?x.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return _!==null?null:l(h,x,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case vi:return b.key===_?c(h,x,b,S):null;case Yr:return b.key===_?u(h,x,b,S):null;case Wn:return _=b._init,p(h,x,_(b._payload),S)}if(ls(b)||Wo(b))return _!==null?null:d(h,x,b,S,null);Ni(h,b)}return null}function m(h,x,b,S,_){if(typeof S=="string"&&S!==""||typeof S=="number")return h=h.get(b)||null,l(x,h,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case vi:return h=h.get(S.key===null?b:S.key)||null,c(x,h,S,_);case Yr:return h=h.get(S.key===null?b:S.key)||null,u(x,h,S,_);case Wn:var j=S._init;return m(h,x,b,j(S._payload),_)}if(ls(S)||Wo(S))return h=h.get(b)||null,d(x,h,S,_,null);Ni(x,S)}return null}function v(h,x,b,S){for(var _=null,j=null,E=x,C=x=0,N=null;E!==null&&C<b.length;C++){E.index>C?(N=E,E=null):N=E.sibling;var R=p(h,E,b[C],S);if(R===null){E===null&&(E=N);break}e&&E&&R.alternate===null&&t(h,E),x=s(R,x,C),j===null?_=R:j.sibling=R,j=R,E=N}if(C===b.length)return n(h,E),je&&gr(h,C),_;if(E===null){for(;C<b.length;C++)E=f(h,b[C],S),E!==null&&(x=s(E,x,C),j===null?_=E:j.sibling=E,j=E);return je&&gr(h,C),_}for(E=r(h,E);C<b.length;C++)N=m(E,h,C,b[C],S),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?C:N.key),x=s(N,x,C),j===null?_=N:j.sibling=N,j=N);return e&&E.forEach(function(O){return t(h,O)}),je&&gr(h,C),_}function y(h,x,b,S){var _=Wo(b);if(typeof _!="function")throw Error(I(150));if(b=_.call(b),b==null)throw Error(I(151));for(var j=_=null,E=x,C=x=0,N=null,R=b.next();E!==null&&!R.done;C++,R=b.next()){E.index>C?(N=E,E=null):N=E.sibling;var O=p(h,E,R.value,S);if(O===null){E===null&&(E=N);break}e&&E&&O.alternate===null&&t(h,E),x=s(O,x,C),j===null?_=O:j.sibling=O,j=O,E=N}if(R.done)return n(h,E),je&&gr(h,C),_;if(E===null){for(;!R.done;C++,R=b.next())R=f(h,R.value,S),R!==null&&(x=s(R,x,C),j===null?_=R:j.sibling=R,j=R);return je&&gr(h,C),_}for(E=r(h,E);!R.done;C++,R=b.next())R=m(E,h,C,R.value,S),R!==null&&(e&&R.alternate!==null&&E.delete(R.key===null?C:R.key),x=s(R,x,C),j===null?_=R:j.sibling=R,j=R);return e&&E.forEach(function(k){return t(h,k)}),je&&gr(h,C),_}function g(h,x,b,S){if(typeof b=="object"&&b!==null&&b.type===Qr&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case vi:e:{for(var _=b.key,j=x;j!==null;){if(j.key===_){if(_=b.type,_===Qr){if(j.tag===7){n(h,j.sibling),x=o(j,b.props.children),x.return=h,h=x;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Wn&&_h(_)===j.type){n(h,j.sibling),x=o(j,b.props),x.ref=Xo(h,j,b),x.return=h,h=x;break e}n(h,j);break}else t(h,j);j=j.sibling}b.type===Qr?(x=Cr(b.props.children,h.mode,S,b.key),x.return=h,h=x):(S=ra(b.type,b.key,b.props,null,h.mode,S),S.ref=Xo(h,x,b),S.return=h,h=S)}return i(h);case Yr:e:{for(j=b.key;x!==null;){if(x.key===j)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(h,x.sibling),x=o(x,b.children||[]),x.return=h,h=x;break e}else{n(h,x);break}else t(h,x);x=x.sibling}x=Tc(b,h.mode,S),x.return=h,h=x}return i(h);case Wn:return j=b._init,g(h,x,j(b._payload),S)}if(ls(b))return v(h,x,b,S);if(Wo(b))return y(h,x,b,S);Ni(h,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(n(h,x.sibling),x=o(x,b),x.return=h,h=x):(n(h,x),x=Oc(b,h.mode,S),x.return=h,h=x),i(h)):n(h,x)}return g}var So=ty(!0),ny=ty(!1),oi={},cn=pr(oi),Ms=pr(oi),Ds=pr(oi);function wr(e){if(e===oi)throw Error(I(174));return e}function uf(e,t){switch(xe(Ds,t),xe(Ms,e),xe(cn,oi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:du(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=du(t,e)}_e(cn),xe(cn,t)}function _o(){_e(cn),_e(Ms),_e(Ds)}function ry(e){wr(Ds.current);var t=wr(cn.current),n=du(t,e.type);t!==n&&(xe(Ms,e),xe(cn,n))}function df(e){Ms.current===e&&(_e(cn),_e(Ms))}var Re=pr(0);function Da(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 Cc=[];function ff(){for(var e=0;e<Cc.length;e++)Cc[e]._workInProgressVersionPrimary=null;Cc.length=0}var Zi=Vn.ReactCurrentDispatcher,jc=Vn.ReactCurrentBatchConfig,Or=0,Ne=null,Fe=null,Be=null,Fa=!1,ys=!1,Fs=0,n_=0;function Je(){throw Error(I(321))}function pf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jt(e[n],t[n]))return!1;return!0}function hf(e,t,n,r,o,s){if(Or=s,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zi.current=e===null||e.memoizedState===null?i_:a_,e=n(r,o),ys){s=0;do{if(ys=!1,Fs=0,25<=s)throw Error(I(301));s+=1,Be=Fe=null,t.updateQueue=null,Zi.current=l_,e=n(r,o)}while(ys)}if(Zi.current=La,t=Fe!==null&&Fe.next!==null,Or=0,Be=Fe=Ne=null,Fa=!1,t)throw Error(I(300));return e}function mf(){var e=Fs!==0;return Fs=0,e}function nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Be===null?Ne.memoizedState=Be=e:Be=Be.next=e,Be}function Ut(){if(Fe===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=Be===null?Ne.memoizedState:Be.next;if(t!==null)Be=t,Fe=e;else{if(e===null)throw Error(I(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},Be===null?Ne.memoizedState=Be=e:Be=Be.next=e}return Be}function Ls(e,t){return typeof t=="function"?t(e):t}function Ec(e){var t=Ut(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var r=Fe,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,Ne.lanes|=d,Tr|=d}u=u.next}while(u!==null&&u!==s);c===null?i=r:c.next=l,Jt(r,t.memoizedState)||(pt=!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,Ne.lanes|=s,Tr|=s,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Rc(e){var t=Ut(),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);Jt(s,t.memoizedState)||(pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function oy(){}function sy(e,t){var n=Ne,r=Ut(),o=t(),s=!Jt(r.memoizedState,o);if(s&&(r.memoizedState=o,pt=!0),r=r.queue,gf(ly.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||Be!==null&&Be.memoizedState.tag&1){if(n.flags|=2048,Us(9,ay.bind(null,n,r,o,t),void 0,null),qe===null)throw Error(I(349));Or&30||iy(n,t,o)}return o}function iy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ay(e,t,n,r){t.value=n,t.getSnapshot=r,cy(t)&&uy(e)}function ly(e,t,n){return n(function(){cy(t)&&uy(e)})}function cy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jt(e,n)}catch{return!0}}function uy(e){var t=An(e,1);t!==null&&Xt(t,e,1,-1)}function Ch(e){var t=nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ls,lastRenderedState:e},t.queue=e,e=e.dispatch=s_.bind(null,Ne,e),[t.memoizedState,e]}function Us(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ne.updateQueue,t===null?(t={lastEffect:null,stores:null},Ne.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 dy(){return Ut().memoizedState}function Ji(e,t,n,r){var o=nn();Ne.flags|=e,o.memoizedState=Us(1|t,n,void 0,r===void 0?null:r)}function _l(e,t,n,r){var o=Ut();r=r===void 0?null:r;var s=void 0;if(Fe!==null){var i=Fe.memoizedState;if(s=i.destroy,r!==null&&pf(r,i.deps)){o.memoizedState=Us(t,n,s,r);return}}Ne.flags|=e,o.memoizedState=Us(1|t,n,s,r)}function jh(e,t){return Ji(8390656,8,e,t)}function gf(e,t){return _l(2048,8,e,t)}function fy(e,t){return _l(4,2,e,t)}function py(e,t){return _l(4,4,e,t)}function hy(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 my(e,t,n){return n=n!=null?n.concat([e]):null,_l(4,4,hy.bind(null,t,e),n)}function vf(){}function gy(e,t){var n=Ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pf(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vy(e,t){var n=Ut();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&pf(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function yy(e,t,n){return Or&21?(Jt(n,t)||(n=wv(),Ne.lanes|=n,Tr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,pt=!0),e.memoizedState=n)}function r_(e,t){var n=ve;ve=n!==0&&4>n?n:4,e(!0);var r=jc.transition;jc.transition={};try{e(!1),t()}finally{ve=n,jc.transition=r}}function xy(){return Ut().memoizedState}function o_(e,t,n){var r=ir(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},by(e))wy(t,n);else if(n=Xv(e,t,n,r),n!==null){var o=at();Xt(n,e,r,o),Sy(n,t,r)}}function s_(e,t,n){var r=ir(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(by(e))wy(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,Jt(l,i)){var c=t.interleaved;c===null?(o.next=o,lf(t)):(o.next=c.next,c.next=o),t.interleaved=o;return}}catch{}finally{}n=Xv(e,t,o,r),n!==null&&(o=at(),Xt(n,e,r,o),Sy(n,t,r))}}function by(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function wy(e,t){ys=Fa=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Sy(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Kd(e,n)}}var La={readContext:Lt,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useInsertionEffect:Je,useLayoutEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useMutableSource:Je,useSyncExternalStore:Je,useId:Je,unstable_isNewReconciler:!1},i_={readContext:Lt,useCallback:function(e,t){return nn().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:jh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ji(4194308,4,hy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ji(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ji(4,2,e,t)},useMemo:function(e,t){var n=nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nn();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=o_.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var t=nn();return e={current:e},t.memoizedState=e},useState:Ch,useDebugValue:vf,useDeferredValue:function(e){return nn().memoizedState=e},useTransition:function(){var e=Ch(!1),t=e[0];return e=r_.bind(null,e[1]),nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ne,o=nn();if(je){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),qe===null)throw Error(I(349));Or&30||iy(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,jh(ly.bind(null,r,s,e),[e]),r.flags|=2048,Us(9,ay.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=nn(),t=qe.identifierPrefix;if(je){var n=Rn,r=En;n=(r&~(1<<32-Qt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=n_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},a_={readContext:Lt,useCallback:gy,useContext:Lt,useEffect:gf,useImperativeHandle:my,useInsertionEffect:fy,useLayoutEffect:py,useMemo:vy,useReducer:Ec,useRef:dy,useState:function(){return Ec(Ls)},useDebugValue:vf,useDeferredValue:function(e){var t=Ut();return yy(t,Fe.memoizedState,e)},useTransition:function(){var e=Ec(Ls)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:oy,useSyncExternalStore:sy,useId:xy,unstable_isNewReconciler:!1},l_={readContext:Lt,useCallback:gy,useContext:Lt,useEffect:gf,useImperativeHandle:my,useInsertionEffect:fy,useLayoutEffect:py,useMemo:vy,useReducer:Rc,useRef:dy,useState:function(){return Rc(Ls)},useDebugValue:vf,useDeferredValue:function(e){var t=Ut();return Fe===null?t.memoizedState=e:yy(t,Fe.memoizedState,e)},useTransition:function(){var e=Rc(Ls)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:oy,useSyncExternalStore:sy,useId:xy,unstable_isNewReconciler:!1};function Co(e,t){try{var n="",r=t;do n+=M1(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 Nc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $u(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var aj=typeof WeakMap=="function"?WeakMap:Map;function Sy(e,t,n){n=kn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Va||(Va=!0,qu=r),$u(e,t)},n}function jy(e,t,n){n=kn(-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(){$u(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){$u(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 Ch(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new aj;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=wj.bind(null,e,t,n),t.then(e,e))}function Eh(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 Rh(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=kn(-1,1),t.tag=2,or(n,t,1))),n.lanes|=1),e)}var lj=Vn.ReactCurrentOwner,pt=!1;function st(e,t,n,r){t.child=e===null?ty(t,null,n,r):So(t,e.child,n,r)}function Nh(e,t,n,r,o){n=n.render;var s=t.ref;return po(t,o),r=hf(e,t,n,r,s,o),n=mf(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,An(e,t,o)):(Ce&&n&&tf(t),t.flags|=1,st(e,t,r,o),t.child)}function kh(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!Cf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,_y(e,t,s,r,o)):(e=na(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:Ps,n(i,r)&&e.ref===t.ref)return An(e,t,o)}return t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e}function _y(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Ps(s,r)&&e.ref===t.ref)if(pt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(pt=!0);else return t.lanes=e.lanes,An(e,t,o)}return Mu(e,t,n,r,o)}function Cy(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},xe(io,St),St|=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,xe(io,St),St|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(io,St),St|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(io,St),St|=r;return st(e,t,o,n),t.child}function Ey(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Mu(e,t,n,r,o){var s=mt(n)?Nr:nt.current;return s=bo(t,s),po(t,o),n=hf(e,t,n,r,s,o),r=mf(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,An(e,t,o)):(Ce&&r&&tf(t),t.flags|=1,st(e,t,n,o),t.child)}function Oh(e,t,n,r,o){if(mt(n)){var s=!0;Ta(t)}else s=!1;if(po(t,o),t.stateNode===null)Ji(e,t),Jv(t,n,r),Iu(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=mt(n)?Nr:nt.current,u=bo(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)&&wh(t,i,r,u),Kn=!1;var p=t.memoizedState;i.state=p,Aa(t,r,i,o),c=t.memoizedState,l!==r||p!==c||ht.current||Kn?(typeof d=="function"&&(Pu(t,n,d,r),c=t.memoizedState),(l=Kn||bh(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,Xv(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Kt(t.type,l),i.props=u,f=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ut(c):(c=mt(n)?Nr:nt.current,c=bo(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||p!==c)&&wh(t,i,r,c),Kn=!1,p=t.memoizedState,i.state=p,Aa(t,r,i,o);var x=t.memoizedState;l!==f||p!==x||ht.current||Kn?(typeof m=="function"&&(Pu(t,n,m,r),x=t.memoizedState),(u=Kn||bh(t,n,u,r,p,x,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,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=x),i.props=r,i.state=x,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 Au(e,t,n,r,s,o)}function Au(e,t,n,r,o,s){Ey(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&mh(t,n,!1),An(e,t,s);r=t.stateNode,lj.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=So(t,e.child,null,s),t.child=So(t,null,l,s)):st(e,t,l,s),t.memoizedState=r.state,o&&mh(t,n,!0),t.child}function Ry(e){var t=e.stateNode;t.pendingContext?hh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&hh(e,t.context,!1),uf(e,t.containerInfo)}function Th(e,t,n,r,o){return wo(),rf(o),t.flags|=256,st(e,t,n,r),t.child}var Du={dehydrated:null,treeContext:null,retryLane:0};function Fu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ny(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),xe(Ee,o&1),e===null)return Ou(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=Cl(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=Fu(n),t.memoizedState=Du,e):yf(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return cj(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=_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?Fu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Du,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 yf(e,t){return t=Cl({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ni(e,t,n,r){return r!==null&&rf(r),So(t,e.child,null,n),e=yf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cj(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Nc(Error(I(422))),Ni(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=Cl({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&&So(t,e.child,null,i),t.child.memoizedState=Fu(i),t.memoizedState=Du,s);if(!(t.mode&1))return Ni(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=Nc(s,r,void 0),Ni(e,t,i,r)}if(l=(i&e.childLanes)!==0,pt||l){if(r=qe,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,Mn(e,o),Zt(r,e,o,-1))}return _f(),r=Nc(Error(I(421))),Ni(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Sj.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,jt=rr(o.nextSibling),_t=t,Ce=!0,Yt=null,e!==null&&(Mt[At++]=En,Mt[At++]=Rn,Mt[At++]=kr,En=e.id,Rn=e.overflow,kr=t),t=yf(t,r.children),t.flags|=4096,t)}function Ph(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Tu(e.return,t,n)}function kc(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 ky(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(st(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&&Ph(e,n,t);else if(e.tag===19)Ph(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(xe(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&&Da(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),kc(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&&Da(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}kc(t,!0,n,null,s);break;case"together":kc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ji(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function An(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tr|=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 uj(e,t,n){switch(t.tag){case 3:Ry(t),wo();break;case 5:ny(t);break;case 1:mt(t.type)&&Ta(t);break;case 4:uf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;xe($a,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(Ee,Ee.current&1),t.flags|=128,null):n&t.child.childLanes?Ny(e,t,n):(xe(Ee,Ee.current&1),e=An(e,t,n),e!==null?e.sibling:null);xe(Ee,Ee.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return ky(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),xe(Ee,Ee.current),r)break;return null;case 22:case 23:return t.lanes=0,Cy(e,t,n)}return An(e,t,n)}var Oy,Lu,Ty,Py;Oy=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}};Lu=function(){};Ty=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,wr(un.current);var s=null;switch(n){case"input":o=au(e,o),r=au(e,r),s=[];break;case"select":o=ke({},o,{value:void 0}),r=ke({},r,{value:void 0}),s=[];break;case"textarea":o=uu(e,o),r=uu(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ka)}fu(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"&&(Cs.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"&&(Cs.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&we("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)}};Py=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zo(e,t){if(!Ce)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 Je(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 dj(e,t,n){var r=t.pendingProps;switch(nf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return mt(t.type)&&Oa(),Je(t),null;case 3:return r=t.stateNode,jo(),je(ht),je(nt),ff(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ei(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Yt!==null&&(Ku(Yt),Yt=null))),Lu(e,t),Je(t),null;case 5:df(t);var o=wr(Ds.current);if(n=t.type,e!==null&&t.stateNode!=null)Ty(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 Je(t),null}if(e=wr(un.current),Ei(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ln]=t,r[Ms]=s,e=(t.mode&1)!==0,n){case"dialog":we("cancel",r),we("close",r);break;case"iframe":case"object":case"embed":we("load",r);break;case"video":case"audio":for(o=0;o<us.length;o++)we(us[o],r);break;case"source":we("error",r);break;case"img":case"image":case"link":we("error",r),we("load",r);break;case"details":we("toggle",r);break;case"input":Vp(r,s),we("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},we("invalid",r);break;case"textarea":Bp(r,s),we("invalid",r)}fu(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&&Ci(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Ci(r.textContent,l,e),o=["children",""+l]):Cs.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&we("scroll",r)}switch(n){case"input":vi(r),zp(r,s,!0);break;case"textarea":vi(r),qp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ka)}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=sv(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[Ms]=r,Oy(e,t,!1,!1),t.stateNode=e;e:{switch(i=pu(n,r),n){case"dialog":we("cancel",e),we("close",e),o=r;break;case"iframe":case"object":case"embed":we("load",e),o=r;break;case"video":case"audio":for(o=0;o<us.length;o++)we(us[o],e);o=r;break;case"source":we("error",e),o=r;break;case"img":case"image":case"link":we("error",e),we("load",e),o=r;break;case"details":we("toggle",e),o=r;break;case"input":Vp(e,r),o=au(e,r),we("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ke({},r,{value:void 0}),we("invalid",e);break;case"textarea":Bp(e,r),o=uu(e,r),we("invalid",e);break;default:o=r}fu(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?lv(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&iv(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Es(e,c):typeof c=="number"&&Es(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Cs.hasOwnProperty(s)?c!=null&&s==="onScroll"&&we("scroll",e):c!=null&&Vd(e,s,c,i))}switch(n){case"input":vi(e),zp(e,r,!1);break;case"textarea":vi(e),qp(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?lo(e,!!r.multiple,s,!1):r.defaultValue!=null&&lo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ka)}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 Je(t),null;case 6:if(e&&t.stateNode!=null)Py(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=wr(Ds.current),wr(un.current),Ei(t)){if(r=t.stateNode,n=t.memoizedProps,r[ln]=t,(s=r.nodeValue!==n)&&(e=_t,e!==null))switch(e.tag){case 3:Ci(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ci(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 Je(t),null;case 13:if(je(Ee),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ce&&jt!==null&&t.mode&1&&!(t.flags&128))Yv(),wo(),t.flags|=98560,s=!1;else if(s=Ei(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 wo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),s=!1}else Yt!==null&&(Ku(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?Le===0&&(Le=3):_f())),t.updateQueue!==null&&(t.flags|=4),Je(t),null);case 4:return jo(),Lu(e,t),e===null&&Is(t.stateNode.containerInfo),Je(t),null;case 10:return af(t.type._context),Je(t),null;case 17:return mt(t.type)&&Oa(),Je(t),null;case 19:if(je(Ee),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Zo(s,!1);else{if(Le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Da(e),i!==null){for(t.flags|=128,Zo(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 xe(Ee,Ee.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>Co&&(t.flags|=128,r=!0,Zo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Da(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!Ce)return Je(t),null}else 2*$e()-s.renderingStartTime>Co&&n!==1073741824&&(t.flags|=128,r=!0,Zo(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=$e(),t.sibling=null,n=Ee.current,xe(Ee,r?n&1|2:n&1),t):(Je(t),null);case 22:case 23:return jf(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?St&1073741824&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function fj(e,t){switch(nf(t),t.tag){case 1:return mt(t.type)&&Oa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jo(),je(ht),je(nt),ff(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return df(t),null;case 13:if(je(Ee),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return je(Ee),null;case 4:return jo(),null;case 10:return af(t.type._context),null;case 22:case 23:return jf(),null;case 24:return null;default:return null}}var ki=!1,tt=!1,pj=typeof WeakSet=="function"?WeakSet:Set,z=null;function so(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Oe(e,t,r)}else n.current=null}function Uu(e,t,n){try{n()}catch(r){Oe(e,t,r)}}var Ih=!1;function hj(e,t){if(ju=Ea,e=Av(),ef(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 m;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),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=i),p===s&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(_u={focusedElem:e,selectionRange:n},Ea=!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 x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var y=x.memoizedProps,g=x.memoizedState,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?y:Kt(t.type,y),g);h.__reactInternalSnapshotBeforeUpdate=v}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){Oe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return x=Ih,Ih=!1,x}function xs(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&&Uu(t,n,s)}o=o.next}while(o!==r)}}function jl(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 Vu(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 Iy(e){var t=e.alternate;t!==null&&(e.alternate=null,Iy(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ln],delete t[Ms],delete t[Ru],delete t[QS],delete t[XS])),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 $y(e){return e.tag===5||e.tag===3||e.tag===4}function $h(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$y(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 zu(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=ka));else if(r!==4&&(e=e.child,e!==null))for(zu(e,t,n),e=e.sibling;e!==null;)zu(e,t,n),e=e.sibling}function Bu(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(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}var Ke=null,Gt=!1;function Hn(e,t,n){for(n=n.child;n!==null;)My(e,t,n),n=n.sibling}function My(e,t,n){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(ml,n)}catch{}switch(n.tag){case 5:tt||so(n,t);case 6:var r=Ke,o=Gt;Ke=null,Hn(e,t,n),Ke=r,Gt=o,Ke!==null&&(Gt?(e=Ke,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ke.removeChild(n.stateNode));break;case 18:Ke!==null&&(Gt?(e=Ke,n=n.stateNode,e.nodeType===8?Sc(e.parentNode,n):e.nodeType===1&&Sc(e,n),Os(e)):Sc(Ke,n.stateNode));break;case 4:r=Ke,o=Gt,Ke=n.stateNode.containerInfo,Gt=!0,Hn(e,t,n),Ke=r,Gt=o;break;case 0:case 11:case 14:case 15:if(!tt&&(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)&&Uu(n,t,i),o=o.next}while(o!==r)}Hn(e,t,n);break;case 1:if(!tt&&(so(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Oe(n,t,l)}Hn(e,t,n);break;case 21:Hn(e,t,n);break;case 22:n.mode&1?(tt=(r=tt)||n.memoizedState!==null,Hn(e,t,n),tt=r):Hn(e,t,n);break;default:Hn(e,t,n)}}function Mh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new pj),t.forEach(function(r){var o=jj.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ht(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:Ke=l.stateNode,Gt=!1;break e;case 3:Ke=l.stateNode.containerInfo,Gt=!0;break e;case 4:Ke=l.stateNode.containerInfo,Gt=!0;break e}l=l.return}if(Ke===null)throw Error(I(160));My(s,i,o),Ke=null,Gt=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){Oe(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ay(t,e),t=t.sibling}function Ay(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(t,e),tn(e),r&4){try{xs(3,e,e.return),jl(3,e)}catch(y){Oe(e,e.return,y)}try{xs(5,e,e.return)}catch(y){Oe(e,e.return,y)}}break;case 1:Ht(t,e),tn(e),r&512&&n!==null&&so(n,n.return);break;case 5:if(Ht(t,e),tn(e),r&512&&n!==null&&so(n,n.return),e.flags&32){var o=e.stateNode;try{Es(o,"")}catch(y){Oe(e,e.return,y)}}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&&rv(o,s),pu(l,i);var u=pu(l,s);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?lv(o,f):d==="dangerouslySetInnerHTML"?iv(o,f):d==="children"?Es(o,f):Vd(o,d,f,u)}switch(l){case"input":lu(o,s);break;case"textarea":ov(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?lo(o,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?lo(o,!!s.multiple,s.defaultValue,!0):lo(o,!!s.multiple,s.multiple?[]:"",!1))}o[Ms]=s}catch(y){Oe(e,e.return,y)}}break;case 6:if(Ht(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(y){Oe(e,e.return,y)}}break;case 3:if(Ht(t,e),tn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Os(t.containerInfo)}catch(y){Oe(e,e.return,y)}break;case 4:Ht(t,e),tn(e);break;case 13:Ht(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||(wf=$e())),r&4&&Mh(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(tt=(u=tt)||d,Ht(t,e),tt=u):Ht(t,e),tn(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,m=p.child,p.tag){case 0:case 11:case 14:case 15:xs(4,p,p.return);break;case 1:so(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(y){Oe(r,n,y)}}break;case 5:so(p,p.return);break;case 22:if(p.memoizedState!==null){Dh(f);continue}}m!==null?(m.return=p,z=m):Dh(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=av("display",i))}catch(y){Oe(e,e.return,y)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){Oe(e,e.return,y)}}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:Ht(t,e),tn(e),r&4&&Mh(e);break;case 21:break;default:Ht(t,e),tn(e)}}function tn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if($y(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&&(Es(o,""),r.flags&=-33);var s=$h(e);Bu(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=$h(e);zu(e,l,i);break;default:throw Error(I(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function mj(e,t,n){z=e,Dy(e)}function Dy(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||ki;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||tt;l=ki;var u=tt;if(ki=i,(tt=c)&&!u)for(z=o;z!==null;)i=z,c=i.child,i.tag===22&&i.memoizedState!==null?Fh(o):c!==null?(c.return=i,z=c):Fh(o);for(;s!==null;)z=s,Dy(s),s=s.sibling;z=o,ki=l,tt=u}Ah(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,z=s):Ah(e)}}function Ah(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:tt||jl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!tt)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kt(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&xh(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}xh(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&&Os(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}tt||t.flags&512&&Vu(t)}catch(p){Oe(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 Dh(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 Fh(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{jl(4,t)}catch(c){Oe(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){Oe(t,o,c)}}var s=t.return;try{Vu(t)}catch(c){Oe(t,s,c)}break;case 5:var i=t.return;try{Vu(t)}catch(c){Oe(t,i,c)}}}catch(c){Oe(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 gj=Math.ceil,Ua=Vn.ReactCurrentDispatcher,xf=Vn.ReactCurrentOwner,Lt=Vn.ReactCurrentBatchConfig,le=0,qe=null,Ae=null,Ye=0,St=0,io=pr(0),Le=0,Vs=null,Tr=0,_l=0,bf=0,bs=null,ft=null,wf=0,Co=1/0,wn=null,Va=!1,qu=null,sr=null,Oi=!1,Jn=null,za=0,ws=0,Hu=null,ea=-1,ta=0;function at(){return le&6?$e():ea!==-1?ea:ea=$e()}function ir(e){return e.mode&1?le&2&&Ye!==0?Ye&-Ye:JS.transition!==null?(ta===0&&(ta=bv()),ta):(e=ve,e!==0||(e=window.event,e=e===void 0?16:Rv(e.type)),e):1}function Zt(e,t,n,r){if(50<ws)throw ws=0,Hu=null,Error(I(185));ti(e,n,r),(!(le&2)||e!==qe)&&(e===qe&&(!(le&2)&&(_l|=n),Le===4&&Qn(e,Ye)),gt(e,r),n===1&&le===0&&!(t.mode&1)&&(Co=$e()+500,bl&&hr()))}function gt(e,t){var n=e.callbackNode;J1(e,t);var r=Ca(e,e===qe?Ye:0);if(r===0)n!==null&&Kp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Kp(n),t===1)e.tag===0?ZS(Lh.bind(null,e)):Wv(Lh.bind(null,e)),GS(function(){!(le&6)&&hr()}),n=null;else{switch(wv(r)){case 1:n=Wd;break;case 4:n=yv;break;case 16:n=_a;break;case 536870912:n=xv;break;default:n=_a}n=Hy(n,Fy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fy(e,t){if(ea=-1,ta=0,le&6)throw Error(I(327));var n=e.callbackNode;if(ho()&&e.callbackNode!==n)return null;var r=Ca(e,e===qe?Ye:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ba(e,r);else{t=r;var o=le;le|=2;var s=Uy();(qe!==e||Ye!==t)&&(wn=null,Co=$e()+500,jr(e,t));do try{xj();break}catch(l){Ly(e,l)}while(!0);sf(),Ua.current=s,le=o,Ae!==null?t=0:(qe=null,Ye=0,t=Le)}if(t!==0){if(t===2&&(o=yu(e),o!==0&&(r=o,t=Wu(e,o))),t===1)throw n=Vs,jr(e,0),Qn(e,r),gt(e,$e()),n;if(t===6)Qn(e,r);else{if(o=e.current.alternate,!(r&30)&&!vj(o)&&(t=Ba(e,r),t===2&&(s=yu(e),s!==0&&(r=s,t=Wu(e,s))),t===1))throw n=Vs,jr(e,0),Qn(e,r),gt(e,$e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:vr(e,ft,wn);break;case 3:if(Qn(e,r),(r&130023424)===r&&(t=wf+500-$e(),10<t)){if(Ca(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){at(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Eu(vr.bind(null,e,ft,wn),t);break}vr(e,ft,wn);break;case 4:if(Qn(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=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gj(r/1960))-r,10<r){e.timeoutHandle=Eu(vr.bind(null,e,ft,wn),r);break}vr(e,ft,wn);break;case 5:vr(e,ft,wn);break;default:throw Error(I(329))}}}return gt(e,$e()),e.callbackNode===n?Fy.bind(null,e):null}function Wu(e,t){var n=bs;return e.current.memoizedState.isDehydrated&&(jr(e,t).flags|=256),e=Ba(e,t),e!==2&&(t=ft,ft=n,t!==null&&Ku(t)),e}function Ku(e){ft===null?ft=e:ft.push.apply(ft,e)}function vj(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 Qn(e,t){for(t&=~bf,t&=~_l,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 Lh(e){if(le&6)throw Error(I(327));ho();var t=Ca(e,0);if(!(t&1))return gt(e,$e()),null;var n=Ba(e,t);if(e.tag!==0&&n===2){var r=yu(e);r!==0&&(t=r,n=Wu(e,r))}if(n===1)throw n=Vs,jr(e,0),Qn(e,t),gt(e,$e()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,ft,wn),gt(e,$e()),null}function Sf(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(Co=$e()+500,bl&&hr())}}function Pr(e){Jn!==null&&Jn.tag===0&&!(le&6)&&ho();var t=le;le|=1;var n=Lt.transition,r=ve;try{if(Lt.transition=null,ve=1,e)return e()}finally{ve=r,Lt.transition=n,le=t,!(le&6)&&hr()}}function jf(){St=io.current,je(io)}function jr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,KS(n)),Ae!==null)for(n=Ae.return;n!==null;){var r=n;switch(nf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Oa();break;case 3:jo(),je(ht),je(nt),ff();break;case 5:df(r);break;case 4:jo();break;case 13:je(Ee);break;case 19:je(Ee);break;case 10:af(r.type._context);break;case 22:case 23:jf()}n=n.return}if(qe=e,Ae=e=ar(e.current,null),Ye=St=t,Le=0,Vs=null,bf=_l=Tr=0,ft=bs=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 Ly(e,t){do{var n=Ae;try{if(sf(),Xi.current=La,Fa){for(var r=Ne.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Fa=!1}if(Or=0,Be=Fe=Ne=null,ys=!1,Fs=0,xf.current=null,n===null||n.return===null){Le=1,Vs=t,Ae=null;break}e:{var s=e,i=n.return,l=n,c=t;if(t=Ye,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 m=Eh(i);if(m!==null){m.flags&=-257,Rh(m,i,l,s,t),m.mode&1&&Ch(s,u,t),t=m,c=u;var x=t.updateQueue;if(x===null){var y=new Set;y.add(c),t.updateQueue=y}else x.add(c);break e}else{if(!(t&1)){Ch(s,u,t),_f();break e}c=Error(I(426))}}else if(Ce&&l.mode&1){var g=Eh(i);if(g!==null){!(g.flags&65536)&&(g.flags|=256),Rh(g,i,l,s,t),rf(_o(c,l));break e}}s=c=_o(c,l),Le!==4&&(Le=2),bs===null?bs=[s]:bs.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var h=Sy(s,c,t);yh(s,h);break e;case 1:l=c;var v=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof v.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(sr===null||!sr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=jy(s,l,t);yh(s,S);break e}}s=s.return}while(s!==null)}zy(n)}catch(j){t=j,Ae===n&&n!==null&&(Ae=n=n.return);continue}break}while(!0)}function Uy(){var e=Ua.current;return Ua.current=La,e===null?La:e}function _f(){(Le===0||Le===3||Le===2)&&(Le=4),qe===null||!(Tr&268435455)&&!(_l&268435455)||Qn(qe,Ye)}function Ba(e,t){var n=le;le|=2;var r=Uy();(qe!==e||Ye!==t)&&(wn=null,jr(e,t));do try{yj();break}catch(o){Ly(e,o)}while(!0);if(sf(),le=n,Ua.current=r,Ae!==null)throw Error(I(261));return qe=null,Ye=0,Le}function yj(){for(;Ae!==null;)Vy(Ae)}function xj(){for(;Ae!==null&&!q1();)Vy(Ae)}function Vy(e){var t=qy(e.alternate,e,St);e.memoizedProps=e.pendingProps,t===null?zy(e):Ae=t,xf.current=null}function zy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=fj(n,t),n!==null){n.flags&=32767,Ae=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Le=6,Ae=null;return}}else if(n=dj(n,t,St),n!==null){Ae=n;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);Le===0&&(Le=5)}function vr(e,t,n){var r=ve,o=Lt.transition;try{Lt.transition=null,ve=1,bj(e,t,n,r)}finally{Lt.transition=o,ve=r}return null}function bj(e,t,n,r){do ho();while(Jn!==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(eS(e,s),e===qe&&(Ae=qe=null,Ye=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Oi||(Oi=!0,Hy(_a,function(){return ho(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Lt.transition,Lt.transition=null;var i=ve;ve=1;var l=le;le|=4,xf.current=null,hj(e,n),Ay(n,e),US(_u),Ea=!!ju,_u=ju=null,e.current=n,mj(n),H1(),le=l,ve=i,Lt.transition=s}else e.current=n;if(Oi&&(Oi=!1,Jn=e,za=o),s=e.pendingLanes,s===0&&(sr=null),G1(n.stateNode),gt(e,$e()),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(Va)throw Va=!1,e=qu,qu=null,e;return za&1&&e.tag!==0&&ho(),s=e.pendingLanes,s&1?e===Hu?ws++:(ws=0,Hu=e):ws=0,hr(),null}function ho(){if(Jn!==null){var e=wv(za),t=Lt.transition,n=ve;try{if(Lt.transition=null,ve=16>e?16:e,Jn===null)var r=!1;else{if(e=Jn,Jn=null,za=0,le&6)throw Error(I(331));var o=le;for(le|=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:xs(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,m=d.return;if(Iy(d),d===u){z=null;break}if(p!==null){p.return=m,z=p;break}z=m}}}var x=s.alternate;if(x!==null){var y=x.child;if(y!==null){x.child=null;do{var g=y.sibling;y.sibling=null,y=g}while(y!==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:xs(9,s,s.return)}var h=s.sibling;if(h!==null){h.return=s.return,z=h;break e}z=s.return}}var v=e.current;for(z=v;z!==null;){i=z;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,z=b;else e:for(i=v;z!==null;){if(l=z,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:jl(9,l)}}catch(j){Oe(l,l.return,j)}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(le=o,hr(),cn&&typeof cn.onPostCommitFiberRoot=="function")try{cn.onPostCommitFiberRoot(ml,e)}catch{}r=!0}return r}finally{ve=n,Lt.transition=t}}return!1}function Uh(e,t,n){t=_o(n,t),t=Sy(e,t,1),e=or(e,t,1),t=at(),e!==null&&(ti(e,1,t),gt(e,t))}function Oe(e,t,n){if(e.tag===3)Uh(e,e,n);else for(;t!==null;){if(t.tag===3){Uh(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=_o(n,e),e=jy(t,e,1),t=or(t,e,1),e=at(),t!==null&&(ti(t,1,e),gt(t,e));break}}t=t.return}}function wj(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=at(),e.pingedLanes|=e.suspendedLanes&n,qe===e&&(Ye&n)===n&&(Le===4||Le===3&&(Ye&130023424)===Ye&&500>$e()-wf?jr(e,0):bf|=n),gt(e,t)}function By(e,t){t===0&&(e.mode&1?(t=bi,bi<<=1,!(bi&130023424)&&(bi=4194304)):t=1);var n=at();e=Mn(e,t),e!==null&&(ti(e,t,n),gt(e,n))}function Sj(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),By(e,n)}function jj(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),By(e,n)}var qy;qy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ht.current)pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return pt=!1,uj(e,t,n);pt=!!(e.flags&131072)}else pt=!1,Ce&&t.flags&1048576&&Kv(t,Ia,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ji(e,t),e=t.pendingProps;var o=bo(t,nt.current);po(t,n),o=hf(null,t,r,e,o,n);var s=mf();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,mt(r)?(s=!0,Ta(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,cf(t),o.updater=wl,t.stateNode=o,o._reactInternals=t,Iu(t,r,e,n),t=Au(null,t,r,!0,s,n)):(t.tag=0,Ce&&s&&tf(t),st(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ji(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Cj(r),e=Kt(r,e),o){case 0:t=Mu(null,t,r,e,n);break e;case 1:t=Oh(null,t,r,e,n);break e;case 11:t=Nh(null,t,r,e,n);break e;case 14:t=kh(null,t,r,Kt(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:Kt(r,o),Mu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kt(r,o),Oh(e,t,r,o,n);case 3:e:{if(Ry(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Xv(e,t),Aa(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=_o(Error(I(423)),t),t=Th(e,t,r,n,o);break e}else if(r!==o){o=_o(Error(I(424)),t),t=Th(e,t,r,n,o);break e}else for(jt=rr(t.stateNode.containerInfo.firstChild),_t=t,Ce=!0,Yt=null,n=ty(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wo(),r===o){t=An(e,t,n);break e}st(e,t,r,n)}t=t.child}return t;case 5:return ny(t),e===null&&Ou(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,Cu(r,o)?i=null:s!==null&&Cu(r,s)&&(t.flags|=32),Ey(e,t),st(e,t,i,n),t.child;case 6:return e===null&&Ou(t),null;case 13:return Ny(e,t,n);case 4:return uf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=So(t,null,r,n):st(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kt(r,o),Nh(e,t,r,o,n);case 7:return st(e,t,t.pendingProps,n),t.child;case 8:return st(e,t,t.pendingProps.children,n),t.child;case 12:return st(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,xe($a,r._currentValue),r._currentValue=i,s!==null)if(en(s.value,i)){if(s.children===o.children&&!ht.current){t=An(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=kn(-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),Tu(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),Tu(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}st(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,po(t,n),o=Ut(o),r=r(o),t.flags|=1,st(e,t,r,n),t.child;case 14:return r=t.type,o=Kt(r,t.pendingProps),o=Kt(r.type,o),kh(e,t,r,o,n);case 15:return _y(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kt(r,o),Ji(e,t),t.tag=1,mt(r)?(e=!0,Ta(t)):e=!1,po(t,n),Jv(t,r,o),Iu(t,r,o,n),Au(null,t,r,!0,e,n);case 19:return ky(e,t,n);case 22:return Cy(e,t,n)}throw Error(I(156,t.tag))};function Hy(e,t){return vv(e,t)}function _j(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 _j(e,t,n,r)}function Cf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cj(e){if(typeof e=="function")return Cf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bd)return 11;if(e===qd)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 na(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")Cf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Qr:return _r(n.children,o,s,t);case zd:i=8,o|=8;break;case ru:return e=Ft(12,n,t,o|2),e.elementType=ru,e.lanes=s,e;case ou:return e=Ft(13,n,t,o),e.elementType=ou,e.lanes=s,e;case su:return e=Ft(19,n,t,o),e.elementType=su,e.lanes=s,e;case ev:return Cl(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Zg:i=10;break e;case Jg:i=9;break e;case Bd:i=11;break e;case qd:i=14;break e;case Wn: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 _r(e,t,n,r){return e=Ft(7,e,r,t),e.lanes=n,e}function Cl(e,t,n,r){return e=Ft(22,e,r,t),e.elementType=ev,e.lanes=n,e.stateNode={isHidden:!1},e}function Oc(e,t,n){return e=Ft(6,e,null,t),e.lanes=n,e}function Tc(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 Ej(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=dc(0),this.expirationTimes=dc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dc(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ef(e,t,n,r,o,s,i,l,c){return e=new Ej(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},cf(s),e}function Rj(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Wy(e){if(!e)return cr;e=e._reactInternals;e:{if(Fr(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(mt(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(mt(n))return Hv(e,n,t)}return t}function Ky(e,t,n,r,o,s,i,l,c){return e=Ef(n,r,!0,e,o,s,i,l,c),e.context=Wy(null),n=e.current,r=at(),o=ir(n),s=kn(r,o),s.callback=t??null,or(n,s,o),e.current.lanes=o,ti(e,o,r),gt(e,r),e}function El(e,t,n,r){var o=t.current,s=at(),i=ir(o);return n=Wy(n),t.context===null?t.context=n:t.pendingContext=n,t=kn(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),Qi(e,o,i)),i}function qa(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 Vh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Rf(e,t){Vh(e,t),(e=e.alternate)&&Vh(e,t)}function Nj(){return null}var Gy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nf(e){this._internalRoot=e}Rl.prototype.render=Nf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));El(e,t,null,null)};Rl.prototype.unmount=Nf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pr(function(){El(null,e,null,null)}),t[$n]=null}};function Rl(e){this._internalRoot=e}Rl.prototype.unstable_scheduleHydration=function(e){if(e){var t=_v();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yn.length&&t!==0&&t<Yn[n].priority;n++);Yn.splice(n,0,e),n===0&&Ev(e)}};function kf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function zh(){}function kj(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=qa(i);s.call(u)}}var i=Ky(t,r,e,0,null,!1,!1,"",zh);return e._reactRootContainer=i,e[$n]=i.current,Is(e.nodeType===8?e.parentNode:e),Pr(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=qa(c);l.call(u)}}var c=Ef(e,0,!1,null,null,!1,!1,"",zh);return e._reactRootContainer=c,e[$n]=c.current,Is(e.nodeType===8?e.parentNode:e),Pr(function(){El(t,c,n,r)}),c}function kl(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=qa(i);l.call(c)}}El(t,i,e,o)}else i=kj(n,t,e,o,r);return qa(i)}Sv=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cs(t.pendingLanes);n!==0&&(Kd(t,n|1),gt(t,$e()),!(le&6)&&(Co=$e()+500,hr()))}break;case 13:Pr(function(){var r=Mn(e,1);if(r!==null){var o=at();Zt(r,e,1,o)}}),Rf(e,1)}};Gd=function(e){if(e.tag===13){var t=Mn(e,134217728);if(t!==null){var n=at();Zt(t,e,134217728,n)}Rf(e,134217728)}};jv=function(e){if(e.tag===13){var t=ir(e),n=Mn(e,t);if(n!==null){var r=at();Zt(n,e,t,r)}Rf(e,t)}};_v=function(){return ve};Cv=function(e,t){var n=ve;try{return ve=e,t()}finally{ve=n}};mu=function(e,t,n){switch(t){case"input":if(lu(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=xl(r);if(!o)throw Error(I(90));nv(r),lu(r,o)}}}break;case"textarea":ov(e,n);break;case"select":t=n.value,t!=null&&lo(e,!!n.multiple,t,!1)}};dv=Sf;fv=Pr;var Oj={usingClientEntryPoint:!1,Events:[ri,eo,xl,cv,uv,Sf]},Jo={findFiberByHostInstance:xr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Tj={bundleType:Jo.bundleType,version:Jo.version,rendererPackageName:Jo.rendererPackageName,rendererConfig:Jo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=mv(e),e===null?null:e.stateNode},findFiberByHostInstance:Jo.findFiberByHostInstance||Nj,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 Ti=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ti.isDisabled&&Ti.supportsFiber)try{ml=Ti.inject(Tj),cn=Ti}catch{}}Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Oj;Tt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kf(t))throw Error(I(200));return Rj(e,t,null,n)};Tt.createRoot=function(e,t){if(!kf(e))throw Error(I(299));var n=!1,r="",o=Gy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Ef(e,1,!1,null,null,n,!1,r,o),e[$n]=t.current,Is(e.nodeType===8?e.parentNode:e),new Nf(t)};Tt.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=mv(t),e=e===null?null:e.stateNode,e};Tt.flushSync=function(e){return Pr(e)};Tt.hydrate=function(e,t,n){if(!Nl(t))throw Error(I(200));return kl(null,e,t,!0,n)};Tt.hydrateRoot=function(e,t,n){if(!kf(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Gy;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Ky(t,null,e,1,n??null,o,!1,s,i),e[$n]=t.current,Is(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 Rl(t)};Tt.render=function(e,t,n){if(!Nl(t))throw Error(I(200));return kl(null,e,t,!1,n)};Tt.unmountComponentAtNode=function(e){if(!Nl(e))throw Error(I(40));return e._reactRootContainer?(Pr(function(){kl(null,null,e,!1,function(){e._reactRootContainer=null,e[$n]=null})}),!0):!1};Tt.unstable_batchedUpdates=Sf;Tt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Nl(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return kl(e,t,n,!1,r)};Tt.version="18.2.0-next-9e3b772b8-20220608";function Yy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Yy)}catch(e){console.error(e)}}Yy(),Kg.exports=Tt;var Of=Kg.exports;const Sr=Js(Of);var Bh=Of;bt.createRoot=Bh.createRoot,bt.hydrateRoot=Bh.hydrateRoot;function We(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 Pj=typeof Symbol=="function"&&Symbol.observable||"@@observable",qh=Pj,Pc=()=>Math.random().toString(36).substring(7).split("").join("."),Ij={INIT:`@@redux/INIT${Pc()}`,REPLACE:`@@redux/REPLACE${Pc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Pc()}`},Ha=Ij;function Tf(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 Qy(e,t,n){if(typeof e!="function")throw new Error(We(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(We(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(We(1));return n(Qy)(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((g,h)=>{i.set(h,g)}))}function d(){if(c)throw new Error(We(3));return o}function f(g){if(typeof g!="function")throw new Error(We(4));if(c)throw new Error(We(5));let h=!0;u();const v=l++;return i.set(v,g),function(){if(h){if(c)throw new Error(We(6));h=!1,u(),i.delete(v),s=null}}}function p(g){if(!Tf(g))throw new Error(We(7));if(typeof g.type>"u")throw new Error(We(8));if(typeof g.type!="string")throw new Error(We(17));if(c)throw new Error(We(9));try{c=!0,o=r(o,g)}finally{c=!1}return(s=i).forEach(v=>{v()}),g}function m(g){if(typeof g!="function")throw new Error(We(10));r=g,p({type:Ha.REPLACE})}function x(){const g=f;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(We(11));function v(){const S=h;S.next&&S.next(d())}return v(),{unsubscribe:g(v)}},[qh](){return this}}}return p({type:Ha.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[qh]:x}}function $j(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ha.INIT})>"u")throw new Error(We(12));if(typeof n(void 0,{type:Ha.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(We(13))})}function Mj(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{$j(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],m=i[f],x=p(m,l);if(typeof x>"u")throw l&&l.type,new Error(We(14));u[f]=x,c=c||x!==m}return c=c||r.length!==Object.keys(i).length,c?u:i}}function Wa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Aj(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(We(15))};const i={getState:o.getState,dispatch:(c,...u)=>s(c,...u)},l=e.map(c=>c(i));return s=Wa(...l)(o.dispatch),{...o,dispatch:s}}}function Dj(e){return Tf(e)&&"type"in e&&typeof e.type=="string"}var Xy=Symbol.for("immer-nothing"),Hh=Symbol.for("immer-draftable"),Rt=Symbol.for("immer-state");function Qt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Eo=Object.getPrototypeOf;function ur(e){return!!e&&!!e[Rt]}function Dn(e){var t;return e?Zy(e)||Array.isArray(e)||!!e[Hh]||!!((t=e.constructor)!=null&&t[Hh])||Tl(e)||Pl(e):!1}var Fj=Object.prototype.constructor.toString();function Zy(e){if(!e||typeof e!="object")return!1;const t=Eo(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)===Fj}function zs(e,t){Ol(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Ol(e){const t=e[Rt];return t?t.type_:Array.isArray(e)?1:Tl(e)?2:Pl(e)?3:0}function Gu(e,t){return Ol(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Jy(e,t,n){const r=Ol(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Lj(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Tl(e){return e instanceof Map}function Pl(e){return e instanceof Set}function yr(e){return e.copy_||e.base_}function Yu(e,t){if(Tl(e))return new Map(e);if(Pl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Zy(e))return Eo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Rt];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(Eo(e),n)}function Pf(e,t=!1){return Il(e)||ur(e)||!Dn(e)||(Ol(e)>1&&(e.set=e.add=e.clear=e.delete=Uj),Object.freeze(e),t&&zs(e,(n,r)=>Pf(r,!0))),e}function Uj(){Qt(2)}function Il(e){return Object.isFrozen(e)}var Vj={};function Ir(e){const t=Vj[e];return t||Qt(0,e),t}var Bs;function ex(){return Bs}function zj(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Wh(e,t){t&&(Ir("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qu(e){Xu(e),e.drafts_.forEach(Bj),e.drafts_=null}function Xu(e){e===Bs&&(Bs=e.parent_)}function Kh(e){return Bs=zj(Bs,e)}function Bj(e){const t=e[Rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Gh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Rt].modified_&&(Qu(t),Qt(4)),Dn(e)&&(e=Ka(t,e),t.parent_||Ga(t,e)),t.patches_&&Ir("Patches").generateReplacementPatches_(n[Rt].base_,e,t.patches_,t.inversePatches_)):e=Ka(t,n,[]),Qu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Xy?e:void 0}function Ka(e,t,n){if(Il(t))return t;const r=t[Rt];if(!r)return zs(t,(o,s)=>Yh(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ga(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),zs(s,(l,c)=>Yh(e,r,o,l,c,n,i)),Ga(e,o,!1),n&&e.patches_&&Ir("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Yh(e,t,n,r,o,s,i){if(ur(o)){const l=s&&t&&t.type_!==3&&!Gu(t.assigned_,r)?s.concat(r):void 0,c=Ka(e,o,l);if(Jy(n,r,c),ur(c))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(Dn(o)&&!Il(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ka(e,o),(!t||!t.scope_.parent_)&&Ga(e,o)}}function Ga(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Pf(t,n)}function qj(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:ex(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=If;n&&(o=[r],s=qs);const{revoke:i,proxy:l}=Proxy.revocable(o,s);return r.draft_=l,r.revoke_=i,l}var If={get(e,t){if(t===Rt)return e;const n=yr(e);if(!Gu(n,t))return Hj(e,n,t);const r=n[t];return e.finalized_||!Dn(r)?r:r===Ic(e.base_,t)?($c(e),e.copy_[t]=Ju(r,e)):r},has(e,t){return t in yr(e)},ownKeys(e){return Reflect.ownKeys(yr(e))},set(e,t,n){const r=tx(yr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Ic(yr(e),t),s=o==null?void 0:o[Rt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Lj(n,o)&&(n!==void 0||Gu(e.base_,t)))return!0;$c(e),Zu(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 Ic(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$c(e),Zu(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 Eo(e.base_)},setPrototypeOf(){Qt(12)}},qs={};zs(If,(e,t)=>{qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)};qs.set=function(e,t,n){return If.set.call(this,e[0],t,n,e[0])};function Ic(e,t){const n=e[Rt];return(n?yr(n):e)[t]}function Hj(e,t,n){var o;const r=tx(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function tx(e,t){if(!(t in e))return;let n=Eo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Eo(n)}}function Zu(e){e.modified_||(e.modified_=!0,e.parent_&&Zu(e.parent_))}function $c(e){e.copy_||(e.copy_=Yu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Wj=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(Dn(t)){const s=Kh(this),i=Ju(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Qu(s):Xu(s)}return Wh(s,r),Gh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Xy&&(o=void 0),this.autoFreeze_&&Pf(o,!0),r){const s=[],i=[];Ir("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){Dn(e)||Qt(8),ur(e)&&(e=nx(e));const t=Kh(this),n=Ju(e,void 0);return n[Rt].isManual_=!0,Xu(t),n}finishDraft(e,t){const n=e&&e[Rt];(!n||!n.isManual_)&&Qt(9);const{scope_:r}=n;return Wh(r,t),Gh(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=Ir("Patches").applyPatches_;return ur(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ju(e,t){const n=Tl(e)?Ir("MapSet").proxyMap_(e,t):Pl(e)?Ir("MapSet").proxySet_(e,t):qj(e,t);return(t?t.scope_:ex()).drafts_.push(n),n}function nx(e){return ur(e)||Qt(10,e),rx(e)}function rx(e){if(!Dn(e)||Il(e))return e;const t=e[Rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Yu(e,!0);return zs(n,(r,o)=>{Jy(n,r,rx(o))}),t&&(t.finalized_=!1),n}var Nt=new Wj,ox=Nt.produce;Nt.produceWithPatches.bind(Nt);Nt.setAutoFreeze.bind(Nt);Nt.setUseStrictShallowCopy.bind(Nt);Nt.applyPatches.bind(Nt);Nt.createDraft.bind(Nt);Nt.finishDraft.bind(Nt);function Kj(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Gj(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Yj(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 Qj(e){const t=Array.isArray(e[0])?e[0]:e;return Yj(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Xj(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Zj=class{constructor(e){this.value=e}deref(){return this.value}},Jj=typeof WeakRef<"u"?WeakRef:Zj,e_=0,Xh=1;function Pi(){return{s:e_,v:void 0,o:null,p:null}}function $f(e,t={}){let n=Pi();const{resultEqualityCheck:r}=t;let o,s=0;function i(){var f;let l=n;const{length:c}=arguments;for(let p=0,m=c;p<m;p++){const x=arguments[p];if(typeof x=="function"||typeof x=="object"&&x!==null){let y=l.o;y===null&&(l.o=y=new WeakMap);const g=y.get(x);g===void 0?(l=Pi(),y.set(x,l)):l=g}else{let y=l.p;y===null&&(l.p=y=new Map);const g=y.get(x);g===void 0?(l=Pi(),y.set(x,l)):l=g}}const u=l;let d;if(l.s===Xh?d=l.v:(d=e.apply(null,arguments),s++),u.s=Xh,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 Jj(d):d}return u.v=d,d}return i.clearCache=()=>{n=Pi(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function sx(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()),Kj(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:m=$f,argsMemoizeOptions:x=[],devModeChecks:y={}}=d,g=Qh(p),h=Qh(x),v=Qj(o),b=f(function(){return s++,u.apply(null,arguments)},...g),S=m(function(){i++;const _=Xj(v,arguments);return l=b.apply(null,_),l},...h);return Object.assign(S,{resultFunc:u,memoizedResultFunc:b,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var $l=sx($f),t_=Object.assign((e,t=$l)=>{Gj(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:()=>t_});function ix(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var n_=ix(),r_=ix,o_=(...e)=>{const t=sx(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(ur(i)?nx(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};o_($f);var s_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Wa:Wa.apply(null,arguments)},i_=e=>e&&typeof e.match=="function";function On(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(vt(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=>Dj(r)&&r.type===e,n}var ax=class ds extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ds.prototype)}static get[Symbol.species](){return ds}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ds(...t[0].concat(this)):new ds(...t.concat(this))}};function Zh(e){return Dn(e)?ox(e,()=>{}):e}function Jh(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(vt(10));const r=n.insert(t,e);return e.set(t,r),r}function a_(e){return typeof e=="boolean"}var l_=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new ax;return n&&(a_(n)?i.push(n_):i.push(r_(n.extraArgument))),i},c_="RTK_autoBatch",lx=e=>t=>{setTimeout(t,e)},u_=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:lx(10),d_=(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"?u_:e.type==="callback"?e.queueNotification:lx(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[c_]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},f_=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new ax(e);return r&&o.push(d_(typeof r=="object"?r:void 0)),o},p_=!0;function zn(e){const t=l_(),{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(Tf(n))l=Mj(n);else throw new Error(vt(1));let c;typeof r=="function"?c=r(t):c=t();let u=Wa;o&&(u=s_({trace:!p_,...typeof o=="object"&&o}));const d=Aj(...c),f=f_(d);let p=typeof i=="function"?i(f):f();const m=u(...p);return Qy(l,s,m)}function cx(e){const t={},n=[];let r;const o={addCase(s,i){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(vt(28));if(l in t)throw new Error(vt(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 h_(e){return typeof e=="function"}function m_(e,t){let[n,r,o]=cx(t),s;if(h_(e))s=()=>Zh(e());else{const l=Zh(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 m=f(d,c);return m===void 0?d:m}else{if(Dn(d))return ox(d,p=>f(p,c));{const p=f(d,c);if(p===void 0){if(d===null)return d;throw new Error(vt(9))}return p}}return d},l)}return i.getInitialState=s,i}var g_="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ux=(e=21)=>{let t="",n=e;for(;n--;)t+=g_[Math.random()*64|0];return t},v_=(e,t)=>i_(e)?e.match(t):e(t);function y_(...e){return t=>e.some(n=>v_(n,t))}var x_=["name","message","stack","code"],Mc=class{constructor(e,t){sc(this,"_type");this.payload=e,this.meta=t}},em=class{constructor(e,t){sc(this,"_type");this.payload=e,this.meta=t}},b_=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of x_)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},rt=(()=>{function e(t,n,r){const o=On(t+"/fulfilled",(c,u,d,f)=>({payload:c,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),s=On(t+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=On(t+"/rejected",(c,u,d,f,p)=>({payload:f,error:(r&&r.serializeError||b_)(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):ux(),m=new AbortController;let x,y;function g(v){y=v,m.abort()}const h=async function(){var S,j;let v;try{let _=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,c,{getState:d,extra:f});if(S_(_)&&(_=await _),_===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,N)=>{x=()=>{N({name:"AbortError",message:y||"Aborted"})},m.signal.addEventListener("abort",x)});u(s(p,c,(j=r==null?void 0:r.getPendingMeta)==null?void 0:j.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),v=await Promise.race([E,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:m.signal,abort:g,rejectWithValue:(C,N)=>new Mc(C,N),fulfillWithValue:(C,N)=>new em(C,N)})).then(C=>{if(C instanceof Mc)throw C;return C instanceof em?o(C.payload,p,c,C.meta):o(C,p,c)})])}catch(_){v=_ instanceof Mc?i(null,p,c,_.payload,_.meta):i(_,p,c)}finally{x&&m.signal.removeEventListener("abort",x)}return r&&!r.dispatchConditionRejection&&i.match(v)&&v.meta.condition||u(v),v}();return Object.assign(h,{abort:g,requestId:p,arg:c,unwrap(){return h.then(w_)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:y_(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function w_(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function S_(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var j_=Symbol.for("rtk-slice-createasyncthunk");function __(e,t){return`${e}/${t}`}function C_({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[j_];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(vt(11));typeof process<"u";const l=(typeof o.reducers=="function"?o.reducers(R_()):o.reducers)||{},c=Object.keys(l),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(b,S){const j=typeof b=="string"?b:b.type;if(!j)throw new Error(vt(12));if(j in u.sliceCaseReducersByType)throw new Error(vt(13));return u.sliceCaseReducersByType[j]=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],j={reducerName:b,type:__(s,b),createNotation:typeof o.reducers=="function"};k_(S)?T_(j,S,d,t):N_(j,S,d)});function f(){const[b={},S=[],j=void 0]=typeof o.extraReducers=="function"?cx(o.extraReducers):[o.extraReducers],_={...b,...u.sliceCaseReducersByType};return m_(o.initialState,E=>{for(let C in _)E.addCase(C,_[C]);for(let C of u.sliceMatchers)E.addMatcher(C.matcher,C.reducer);for(let C of S)E.addMatcher(C.matcher,C.reducer);j&&E.addDefaultCase(j)})}const p=b=>b,m=new Map;let x;function y(b,S){return x||(x=f()),x(b,S)}function g(){return x||(x=f()),x.getInitialState()}function h(b,S=!1){function j(E){let C=E[b];return typeof C>"u"&&S&&(C=g()),C}function _(E=p){const C=Jh(m,S,{insert:()=>new WeakMap});return Jh(C,E,{insert:()=>{const N={};for(const[R,O]of Object.entries(o.selectors??{}))N[R]=E_(O,E,g,S);return N}})}return{reducerPath:b,getSelectors:_,get selectors(){return _(j)},selectSlice:j}}const v={name:s,reducer:y,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...h(i),injectInto(b,{reducerPath:S,...j}={}){const _=S??i;return b.inject({reducerPath:_,reducer:y},j),{...v,...h(_,!0)}}};return v}}function E_(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 Lr=C_();function R_(){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 N_({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!O_(r))throw new Error(vt(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?On(e,i):On(e))}function k_(e){return e._reducerDefinitionType==="asyncThunk"}function O_(e){return e._reducerDefinitionType==="reducerWithPrepare"}function T_({type:e,reducerName:t},n,r,o){if(!o)throw new Error(vt(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||Ii,pending:l||Ii,rejected:c||Ii,settled:u||Ii})}function Ii(){}var P_=(e,t)=>{if(typeof e!="function")throw new Error(vt(32))},Mf="listenerMiddleware",I_=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=On(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(vt(21));return P_(s),{predicate:o,type:t,effect:s}},$_=Object.assign(e=>{const{type:t,predicate:n,effect:r}=I_(e);return{id:ux(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(vt(22))}}},{withTypes:()=>$_}),M_=Object.assign(On(`${Mf}/add`),{withTypes:()=>M_});On(`${Mf}/removeAll`);var A_=Object.assign(On(`${Mf}/remove`),{withTypes:()=>A_});function vt(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 dx={exports:{}},fx={};/**
|
|
40
|
+
`+s.stack}return{value:e,source:t,stack:o,digest:null}}function Nc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $u(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var c_=typeof WeakMap=="function"?WeakMap:Map;function _y(e,t,n){n=kn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Va||(Va=!0,qu=r),$u(e,t)},n}function Cy(e,t,n){n=kn(-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(){$u(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){$u(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 Eh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new c_;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=__.bind(null,e,t,n),t.then(e,e))}function Rh(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 Nh(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=kn(-1,1),t.tag=2,or(n,t,1))),n.lanes|=1),e)}var u_=Vn.ReactCurrentOwner,pt=!1;function st(e,t,n,r){t.child=e===null?ny(t,null,n,r):So(t,e.child,n,r)}function kh(e,t,n,r,o){n=n.render;var s=t.ref;return po(t,o),r=hf(e,t,n,r,s,o),n=mf(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Mn(e,t,o)):(je&&n&&tf(t),t.flags|=1,st(e,t,r,o),t.child)}function Oh(e,t,n,r,o){if(e===null){var s=n.type;return typeof s=="function"&&!jf(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,jy(e,t,s,r,o)):(e=ra(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:Ps,n(i,r)&&e.ref===t.ref)return Mn(e,t,o)}return t.flags|=1,e=ar(s,r),e.ref=t.ref,e.return=t,t.child=e}function jy(e,t,n,r,o){if(e!==null){var s=e.memoizedProps;if(Ps(s,r)&&e.ref===t.ref)if(pt=!1,t.pendingProps=r=s,(e.lanes&o)!==0)e.flags&131072&&(pt=!0);else return t.lanes=e.lanes,Mn(e,t,o)}return Au(e,t,n,r,o)}function Ey(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},xe(io,St),St|=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,xe(io,St),St|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,xe(io,St),St|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,xe(io,St),St|=r;return st(e,t,o,n),t.child}function Ry(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Au(e,t,n,r,o){var s=mt(n)?Nr:rt.current;return s=bo(t,s),po(t,o),n=hf(e,t,n,r,s,o),r=mf(),e!==null&&!pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Mn(e,t,o)):(je&&r&&tf(t),t.flags|=1,st(e,t,n,o),t.child)}function Th(e,t,n,r,o){if(mt(n)){var s=!0;Ta(t)}else s=!1;if(po(t,o),t.stateNode===null)ea(e,t),ey(t,n,r),Iu(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=Lt(u):(u=mt(n)?Nr:rt.current,u=bo(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)&&Sh(t,i,r,u),Kn=!1;var p=t.memoizedState;i.state=p,Ma(t,r,i,o),c=t.memoizedState,l!==r||p!==c||ht.current||Kn?(typeof d=="function"&&(Pu(t,n,d,r),c=t.memoizedState),(l=Kn||wh(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:Wt(t.type,l),i.props=u,f=t.pendingProps,p=i.context,c=n.contextType,typeof c=="object"&&c!==null?c=Lt(c):(c=mt(n)?Nr:rt.current,c=bo(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||p!==c)&&Sh(t,i,r,c),Kn=!1,p=t.memoizedState,i.state=p,Ma(t,r,i,o);var v=t.memoizedState;l!==f||p!==v||ht.current||Kn?(typeof m=="function"&&(Pu(t,n,m,r),v=t.memoizedState),(u=Kn||wh(t,n,u,r,p,v,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,v,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,v,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=v),i.props=r,i.state=v,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 Mu(e,t,n,r,s,o)}function Mu(e,t,n,r,o,s){Ry(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&gh(t,n,!1),Mn(e,t,s);r=t.stateNode,u_.current=t;var l=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=So(t,e.child,null,s),t.child=So(t,null,l,s)):st(e,t,l,s),t.memoizedState=r.state,o&&gh(t,n,!0),t.child}function Ny(e){var t=e.stateNode;t.pendingContext?mh(e,t.pendingContext,t.pendingContext!==t.context):t.context&&mh(e,t.context,!1),uf(e,t.containerInfo)}function Ph(e,t,n,r,o){return wo(),rf(o),t.flags|=256,st(e,t,n,r),t.child}var Du={dehydrated:null,treeContext:null,retryLane:0};function Fu(e){return{baseLanes:e,cachePool:null,transitions:null}}function ky(e,t,n){var r=t.pendingProps,o=Re.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),xe(Re,o&1),e===null)return Ou(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=El(i,r,0,null),e=Cr(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Fu(n),t.memoizedState=Du,e):yf(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return d_(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=Cr(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?Fu(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Du,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 yf(e,t){return t=El({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ki(e,t,n,r){return r!==null&&rf(r),So(t,e.child,null,n),e=yf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function d_(e,t,n,r,o,s,i){if(n)return t.flags&256?(t.flags&=-257,r=Nc(Error(I(422))),ki(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,o=t.mode,r=El({mode:"visible",children:r.children},o,0,null),s=Cr(s,o,i,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&So(t,e.child,null,i),t.child.memoizedState=Fu(i),t.memoizedState=Du,s);if(!(t.mode&1))return ki(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=Nc(s,r,void 0),ki(e,t,i,r)}if(l=(i&e.childLanes)!==0,pt||l){if(r=qe,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,An(e,o),Xt(r,e,o,-1))}return Cf(),r=Nc(Error(I(421))),ki(e,t,i,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=C_.bind(null,e),o._reactRetry=t,null):(e=s.treeContext,_t=rr(o.nextSibling),Ct=t,je=!0,Gt=null,e!==null&&(At[Mt++]=En,At[Mt++]=Rn,At[Mt++]=kr,En=e.id,Rn=e.overflow,kr=t),t=yf(t,r.children),t.flags|=4096,t)}function Ih(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Tu(e.return,t,n)}function kc(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 Oy(e,t,n){var r=t.pendingProps,o=r.revealOrder,s=r.tail;if(st(e,t,r.children,n),r=Re.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&&Ih(e,n,t);else if(e.tag===19)Ih(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(xe(Re,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&&Da(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),kc(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&&Da(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}kc(t,!0,n,null,s);break;case"together":kc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ea(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Mn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tr|=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 f_(e,t,n){switch(t.tag){case 3:Ny(t),wo();break;case 5:ry(t);break;case 1:mt(t.type)&&Ta(t);break;case 4:uf(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;xe($a,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xe(Re,Re.current&1),t.flags|=128,null):n&t.child.childLanes?ky(e,t,n):(xe(Re,Re.current&1),e=Mn(e,t,n),e!==null?e.sibling:null);xe(Re,Re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Oy(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),xe(Re,Re.current),r)break;return null;case 22:case 23:return t.lanes=0,Ey(e,t,n)}return Mn(e,t,n)}var Ty,Lu,Py,Iy;Ty=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}};Lu=function(){};Py=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,wr(cn.current);var s=null;switch(n){case"input":o=au(e,o),r=au(e,r),s=[];break;case"select":o=ke({},o,{value:void 0}),r=ke({},r,{value:void 0}),s=[];break;case"textarea":o=uu(e,o),r=uu(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ka)}fu(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"&&we("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)}};Iy=function(e,t,n,r){n!==r&&(t.flags|=4)};function Zo(e,t){if(!je)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 et(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 p_(e,t,n){var r=t.pendingProps;switch(nf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return mt(t.type)&&Oa(),et(t),null;case 3:return r=t.stateNode,_o(),_e(ht),_e(rt),ff(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gt!==null&&(Ku(Gt),Gt=null))),Lu(e,t),et(t),null;case 5:df(t);var o=wr(Ds.current);if(n=t.type,e!==null&&t.stateNode!=null)Py(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 et(t),null}if(e=wr(cn.current),Ri(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[an]=t,r[As]=s,e=(t.mode&1)!==0,n){case"dialog":we("cancel",r),we("close",r);break;case"iframe":case"object":case"embed":we("load",r);break;case"video":case"audio":for(o=0;o<us.length;o++)we(us[o],r);break;case"source":we("error",r);break;case"img":case"image":case"link":we("error",r),we("load",r);break;case"details":we("toggle",r);break;case"input":zp(r,s),we("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},we("invalid",r);break;case"textarea":qp(r,s),we("invalid",r)}fu(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&&Ei(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Ei(r.textContent,l,e),o=["children",""+l]):js.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&we("scroll",r)}switch(n){case"input":yi(r),Bp(r,s,!0);break;case"textarea":yi(r),Hp(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=ka)}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=iv(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[an]=t,e[As]=r,Ty(e,t,!1,!1),t.stateNode=e;e:{switch(i=pu(n,r),n){case"dialog":we("cancel",e),we("close",e),o=r;break;case"iframe":case"object":case"embed":we("load",e),o=r;break;case"video":case"audio":for(o=0;o<us.length;o++)we(us[o],e);o=r;break;case"source":we("error",e),o=r;break;case"img":case"image":case"link":we("error",e),we("load",e),o=r;break;case"details":we("toggle",e),o=r;break;case"input":zp(e,r),o=au(e,r),we("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=ke({},r,{value:void 0}),we("invalid",e);break;case"textarea":qp(e,r),o=uu(e,r),we("invalid",e);break;default:o=r}fu(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?cv(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&av(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Es(e,c):typeof c=="number"&&Es(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(js.hasOwnProperty(s)?c!=null&&s==="onScroll"&&we("scroll",e):c!=null&&Vd(e,s,c,i))}switch(n){case"input":yi(e),Bp(e,r,!1);break;case"textarea":yi(e),Hp(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?lo(e,!!r.multiple,s,!1):r.defaultValue!=null&&lo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=ka)}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 et(t),null;case 6:if(e&&t.stateNode!=null)Iy(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(I(166));if(n=wr(Ds.current),wr(cn.current),Ri(t)){if(r=t.stateNode,n=t.memoizedProps,r[an]=t,(s=r.nodeValue!==n)&&(e=Ct,e!==null))switch(e.tag){case 3:Ei(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ei(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[an]=t,t.stateNode=r}return et(t),null;case 13:if(_e(Re),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(je&&_t!==null&&t.mode&1&&!(t.flags&128))Qv(),wo(),t.flags|=98560,s=!1;else if(s=Ri(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[an]=t}else wo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;et(t),s=!1}else Gt!==null&&(Ku(Gt),Gt=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||Re.current&1?Le===0&&(Le=3):Cf())),t.updateQueue!==null&&(t.flags|=4),et(t),null);case 4:return _o(),Lu(e,t),e===null&&Is(t.stateNode.containerInfo),et(t),null;case 10:return af(t.type._context),et(t),null;case 17:return mt(t.type)&&Oa(),et(t),null;case 19:if(_e(Re),s=t.memoizedState,s===null)return et(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Zo(s,!1);else{if(Le!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Da(e),i!==null){for(t.flags|=128,Zo(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 xe(Re,Re.current&1|2),t.child}e=e.sibling}s.tail!==null&&$e()>jo&&(t.flags|=128,r=!0,Zo(s,!1),t.lanes=4194304)}else{if(!r)if(e=Da(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Zo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!je)return et(t),null}else 2*$e()-s.renderingStartTime>jo&&n!==1073741824&&(t.flags|=128,r=!0,Zo(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=$e(),t.sibling=null,n=Re.current,xe(Re,r?n&1|2:n&1),t):(et(t),null);case 22:case 23:return _f(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?St&1073741824&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error(I(156,t.tag))}function h_(e,t){switch(nf(t),t.tag){case 1:return mt(t.type)&&Oa(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return _o(),_e(ht),_e(rt),ff(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return df(t),null;case 13:if(_e(Re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));wo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(Re),null;case 4:return _o(),null;case 10:return af(t.type._context),null;case 22:case 23:return _f(),null;case 24:return null;default:return null}}var Oi=!1,nt=!1,m_=typeof WeakSet=="function"?WeakSet:Set,z=null;function so(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Oe(e,t,r)}else n.current=null}function Uu(e,t,n){try{n()}catch(r){Oe(e,t,r)}}var $h=!1;function g_(e,t){if(_u=Ea,e=Dv(),ef(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 m;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),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===n&&++u===o&&(l=i),p===s&&++d===r&&(c=i),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Cu={focusedElem:e,selectionRange:n},Ea=!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 v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var y=v.memoizedProps,g=v.memoizedState,h=t.stateNode,x=h.getSnapshotBeforeUpdate(t.elementType===t.type?y:Wt(t.type,y),g);h.__reactInternalSnapshotBeforeUpdate=x}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){Oe(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return v=$h,$h=!1,v}function xs(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&&Uu(t,n,s)}o=o.next}while(o!==r)}}function Cl(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 Vu(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 $y(e){var t=e.alternate;t!==null&&(e.alternate=null,$y(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[an],delete t[As],delete t[Ru],delete t[ZS],delete t[JS])),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 Ay(e){return e.tag===5||e.tag===3||e.tag===4}function Ah(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ay(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 zu(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=ka));else if(r!==4&&(e=e.child,e!==null))for(zu(e,t,n),e=e.sibling;e!==null;)zu(e,t,n),e=e.sibling}function Bu(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(Bu(e,t,n),e=e.sibling;e!==null;)Bu(e,t,n),e=e.sibling}var Ge=null,Kt=!1;function Hn(e,t,n){for(n=n.child;n!==null;)My(e,t,n),n=n.sibling}function My(e,t,n){if(ln&&typeof ln.onCommitFiberUnmount=="function")try{ln.onCommitFiberUnmount(gl,n)}catch{}switch(n.tag){case 5:nt||so(n,t);case 6:var r=Ge,o=Kt;Ge=null,Hn(e,t,n),Ge=r,Kt=o,Ge!==null&&(Kt?(e=Ge,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ge.removeChild(n.stateNode));break;case 18:Ge!==null&&(Kt?(e=Ge,n=n.stateNode,e.nodeType===8?Sc(e.parentNode,n):e.nodeType===1&&Sc(e,n),Os(e)):Sc(Ge,n.stateNode));break;case 4:r=Ge,o=Kt,Ge=n.stateNode.containerInfo,Kt=!0,Hn(e,t,n),Ge=r,Kt=o;break;case 0:case 11:case 14:case 15:if(!nt&&(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)&&Uu(n,t,i),o=o.next}while(o!==r)}Hn(e,t,n);break;case 1:if(!nt&&(so(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Oe(n,t,l)}Hn(e,t,n);break;case 21:Hn(e,t,n);break;case 22:n.mode&1?(nt=(r=nt)||n.memoizedState!==null,Hn(e,t,n),nt=r):Hn(e,t,n);break;default:Hn(e,t,n)}}function Mh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new m_),t.forEach(function(r){var o=j_.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:Ge=l.stateNode,Kt=!1;break e;case 3:Ge=l.stateNode.containerInfo,Kt=!0;break e;case 4:Ge=l.stateNode.containerInfo,Kt=!0;break e}l=l.return}if(Ge===null)throw Error(I(160));My(s,i,o),Ge=null,Kt=!1;var c=o.alternate;c!==null&&(c.return=null),o.return=null}catch(u){Oe(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Dy(t,e),t=t.sibling}function Dy(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qt(t,e),en(e),r&4){try{xs(3,e,e.return),Cl(3,e)}catch(y){Oe(e,e.return,y)}try{xs(5,e,e.return)}catch(y){Oe(e,e.return,y)}}break;case 1:qt(t,e),en(e),r&512&&n!==null&&so(n,n.return);break;case 5:if(qt(t,e),en(e),r&512&&n!==null&&so(n,n.return),e.flags&32){var o=e.stateNode;try{Es(o,"")}catch(y){Oe(e,e.return,y)}}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&&ov(o,s),pu(l,i);var u=pu(l,s);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?cv(o,f):d==="dangerouslySetInnerHTML"?av(o,f):d==="children"?Es(o,f):Vd(o,d,f,u)}switch(l){case"input":lu(o,s);break;case"textarea":sv(o,s);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?lo(o,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?lo(o,!!s.multiple,s.defaultValue,!0):lo(o,!!s.multiple,s.multiple?[]:"",!1))}o[As]=s}catch(y){Oe(e,e.return,y)}}break;case 6:if(qt(t,e),en(e),r&4){if(e.stateNode===null)throw Error(I(162));o=e.stateNode,s=e.memoizedProps;try{o.nodeValue=s}catch(y){Oe(e,e.return,y)}}break;case 3:if(qt(t,e),en(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Os(t.containerInfo)}catch(y){Oe(e,e.return,y)}break;case 4:qt(t,e),en(e);break;case 13:qt(t,e),en(e),o=e.child,o.flags&8192&&(s=o.memoizedState!==null,o.stateNode.isHidden=s,!s||o.alternate!==null&&o.alternate.memoizedState!==null||(wf=$e())),r&4&&Mh(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(nt=(u=nt)||d,qt(t,e),nt=u):qt(t,e),en(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,m=p.child,p.tag){case 0:case 11:case 14:case 15:xs(4,p,p.return);break;case 1:so(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(y){Oe(r,n,y)}}break;case 5:so(p,p.return);break;case 22:if(p.memoizedState!==null){Fh(f);continue}}m!==null?(m.return=p,z=m):Fh(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=lv("display",i))}catch(y){Oe(e,e.return,y)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(y){Oe(e,e.return,y)}}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),en(e),r&4&&Mh(e);break;case 21:break;default:qt(t,e),en(e)}}function en(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ay(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&&(Es(o,""),r.flags&=-33);var s=Ah(e);Bu(e,s,o);break;case 3:case 4:var i=r.stateNode.containerInfo,l=Ah(e);zu(e,l,i);break;default:throw Error(I(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function v_(e,t,n){z=e,Fy(e)}function Fy(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||Oi;if(!i){var l=o.alternate,c=l!==null&&l.memoizedState!==null||nt;l=Oi;var u=nt;if(Oi=i,(nt=c)&&!u)for(z=o;z!==null;)i=z,c=i.child,i.tag===22&&i.memoizedState!==null?Lh(o):c!==null?(c.return=i,z=c):Lh(o);for(;s!==null;)z=s,Fy(s),s=s.sibling;z=o,Oi=l,nt=u}Dh(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,z=s):Dh(e)}}function Dh(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:nt||Cl(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!nt)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&&bh(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}bh(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&&Os(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}nt||t.flags&512&&Vu(t)}catch(p){Oe(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 Fh(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 Lh(e){for(;z!==null;){var t=z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Cl(4,t)}catch(c){Oe(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(c){Oe(t,o,c)}}var s=t.return;try{Vu(t)}catch(c){Oe(t,s,c)}break;case 5:var i=t.return;try{Vu(t)}catch(c){Oe(t,i,c)}}}catch(c){Oe(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 y_=Math.ceil,Ua=Vn.ReactCurrentDispatcher,xf=Vn.ReactCurrentOwner,Ft=Vn.ReactCurrentBatchConfig,le=0,qe=null,Me=null,Qe=0,St=0,io=pr(0),Le=0,Vs=null,Tr=0,jl=0,bf=0,bs=null,ft=null,wf=0,jo=1/0,bn=null,Va=!1,qu=null,sr=null,Ti=!1,Jn=null,za=0,ws=0,Hu=null,ta=-1,na=0;function at(){return le&6?$e():ta!==-1?ta:ta=$e()}function ir(e){return e.mode&1?le&2&&Qe!==0?Qe&-Qe:t_.transition!==null?(na===0&&(na=wv()),na):(e=ve,e!==0||(e=window.event,e=e===void 0?16:Nv(e.type)),e):1}function Xt(e,t,n,r){if(50<ws)throw ws=0,Hu=null,Error(I(185));ti(e,n,r),(!(le&2)||e!==qe)&&(e===qe&&(!(le&2)&&(jl|=n),Le===4&&Qn(e,Qe)),gt(e,r),n===1&&le===0&&!(t.mode&1)&&(jo=$e()+500,wl&&hr()))}function gt(e,t){var n=e.callbackNode;tS(e,t);var r=ja(e,e===qe?Qe:0);if(r===0)n!==null&&Gp(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Gp(n),t===1)e.tag===0?e_(Uh.bind(null,e)):Kv(Uh.bind(null,e)),QS(function(){!(le&6)&&hr()}),n=null;else{switch(Sv(r)){case 1:n=Wd;break;case 4:n=xv;break;case 16:n=Ca;break;case 536870912:n=bv;break;default:n=Ca}n=Wy(n,Ly.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ly(e,t){if(ta=-1,na=0,le&6)throw Error(I(327));var n=e.callbackNode;if(ho()&&e.callbackNode!==n)return null;var r=ja(e,e===qe?Qe:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ba(e,r);else{t=r;var o=le;le|=2;var s=Vy();(qe!==e||Qe!==t)&&(bn=null,jo=$e()+500,_r(e,t));do try{w_();break}catch(l){Uy(e,l)}while(!0);sf(),Ua.current=s,le=o,Me!==null?t=0:(qe=null,Qe=0,t=Le)}if(t!==0){if(t===2&&(o=yu(e),o!==0&&(r=o,t=Wu(e,o))),t===1)throw n=Vs,_r(e,0),Qn(e,r),gt(e,$e()),n;if(t===6)Qn(e,r);else{if(o=e.current.alternate,!(r&30)&&!x_(o)&&(t=Ba(e,r),t===2&&(s=yu(e),s!==0&&(r=s,t=Wu(e,s))),t===1))throw n=Vs,_r(e,0),Qn(e,r),gt(e,$e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(I(345));case 2:vr(e,ft,bn);break;case 3:if(Qn(e,r),(r&130023424)===r&&(t=wf+500-$e(),10<t)){if(ja(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){at(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Eu(vr.bind(null,e,ft,bn),t);break}vr(e,ft,bn);break;case 4:if(Qn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-Qt(r);s=1<<i,i=t[i],i>o&&(o=i),r&=~s}if(r=o,r=$e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*y_(r/1960))-r,10<r){e.timeoutHandle=Eu(vr.bind(null,e,ft,bn),r);break}vr(e,ft,bn);break;case 5:vr(e,ft,bn);break;default:throw Error(I(329))}}}return gt(e,$e()),e.callbackNode===n?Ly.bind(null,e):null}function Wu(e,t){var n=bs;return e.current.memoizedState.isDehydrated&&(_r(e,t).flags|=256),e=Ba(e,t),e!==2&&(t=ft,ft=n,t!==null&&Ku(t)),e}function Ku(e){ft===null?ft=e:ft.push.apply(ft,e)}function x_(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(!Jt(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 Qn(e,t){for(t&=~bf,t&=~jl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Qt(t),r=1<<n;e[n]=-1,t&=~r}}function Uh(e){if(le&6)throw Error(I(327));ho();var t=ja(e,0);if(!(t&1))return gt(e,$e()),null;var n=Ba(e,t);if(e.tag!==0&&n===2){var r=yu(e);r!==0&&(t=r,n=Wu(e,r))}if(n===1)throw n=Vs,_r(e,0),Qn(e,t),gt(e,$e()),n;if(n===6)throw Error(I(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vr(e,ft,bn),gt(e,$e()),null}function Sf(e,t){var n=le;le|=1;try{return e(t)}finally{le=n,le===0&&(jo=$e()+500,wl&&hr())}}function Pr(e){Jn!==null&&Jn.tag===0&&!(le&6)&&ho();var t=le;le|=1;var n=Ft.transition,r=ve;try{if(Ft.transition=null,ve=1,e)return e()}finally{ve=r,Ft.transition=n,le=t,!(le&6)&&hr()}}function _f(){St=io.current,_e(io)}function _r(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,YS(n)),Me!==null)for(n=Me.return;n!==null;){var r=n;switch(nf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Oa();break;case 3:_o(),_e(ht),_e(rt),ff();break;case 5:df(r);break;case 4:_o();break;case 13:_e(Re);break;case 19:_e(Re);break;case 10:af(r.type._context);break;case 22:case 23:_f()}n=n.return}if(qe=e,Me=e=ar(e.current,null),Qe=St=t,Le=0,Vs=null,bf=jl=Tr=0,ft=bs=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 Uy(e,t){do{var n=Me;try{if(sf(),Zi.current=La,Fa){for(var r=Ne.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Fa=!1}if(Or=0,Be=Fe=Ne=null,ys=!1,Fs=0,xf.current=null,n===null||n.return===null){Le=1,Vs=t,Me=null;break}e:{var s=e,i=n.return,l=n,c=t;if(t=Qe,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 m=Rh(i);if(m!==null){m.flags&=-257,Nh(m,i,l,s,t),m.mode&1&&Eh(s,u,t),t=m,c=u;var v=t.updateQueue;if(v===null){var y=new Set;y.add(c),t.updateQueue=y}else v.add(c);break e}else{if(!(t&1)){Eh(s,u,t),Cf();break e}c=Error(I(426))}}else if(je&&l.mode&1){var g=Rh(i);if(g!==null){!(g.flags&65536)&&(g.flags|=256),Nh(g,i,l,s,t),rf(Co(c,l));break e}}s=c=Co(c,l),Le!==4&&(Le=2),bs===null?bs=[s]:bs.push(s),s=i;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var h=_y(s,c,t);xh(s,h);break e;case 1:l=c;var x=s.type,b=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(sr===null||!sr.has(b)))){s.flags|=65536,t&=-t,s.lanes|=t;var S=Cy(s,l,t);xh(s,S);break e}}s=s.return}while(s!==null)}By(n)}catch(_){t=_,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function Vy(){var e=Ua.current;return Ua.current=La,e===null?La:e}function Cf(){(Le===0||Le===3||Le===2)&&(Le=4),qe===null||!(Tr&268435455)&&!(jl&268435455)||Qn(qe,Qe)}function Ba(e,t){var n=le;le|=2;var r=Vy();(qe!==e||Qe!==t)&&(bn=null,_r(e,t));do try{b_();break}catch(o){Uy(e,o)}while(!0);if(sf(),le=n,Ua.current=r,Me!==null)throw Error(I(261));return qe=null,Qe=0,Le}function b_(){for(;Me!==null;)zy(Me)}function w_(){for(;Me!==null&&!W1();)zy(Me)}function zy(e){var t=Hy(e.alternate,e,St);e.memoizedProps=e.pendingProps,t===null?By(e):Me=t,xf.current=null}function By(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=h_(n,t),n!==null){n.flags&=32767,Me=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Le=6,Me=null;return}}else if(n=p_(n,t,St),n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);Le===0&&(Le=5)}function vr(e,t,n){var r=ve,o=Ft.transition;try{Ft.transition=null,ve=1,S_(e,t,n,r)}finally{Ft.transition=o,ve=r}return null}function S_(e,t,n,r){do ho();while(Jn!==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(nS(e,s),e===qe&&(Me=qe=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ti||(Ti=!0,Wy(Ca,function(){return ho(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Ft.transition,Ft.transition=null;var i=ve;ve=1;var l=le;le|=4,xf.current=null,g_(e,n),Dy(n,e),zS(Cu),Ea=!!_u,Cu=_u=null,e.current=n,v_(n),K1(),le=l,ve=i,Ft.transition=s}else e.current=n;if(Ti&&(Ti=!1,Jn=e,za=o),s=e.pendingLanes,s===0&&(sr=null),Q1(n.stateNode),gt(e,$e()),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(Va)throw Va=!1,e=qu,qu=null,e;return za&1&&e.tag!==0&&ho(),s=e.pendingLanes,s&1?e===Hu?ws++:(ws=0,Hu=e):ws=0,hr(),null}function ho(){if(Jn!==null){var e=Sv(za),t=Ft.transition,n=ve;try{if(Ft.transition=null,ve=16>e?16:e,Jn===null)var r=!1;else{if(e=Jn,Jn=null,za=0,le&6)throw Error(I(331));var o=le;for(le|=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:xs(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,m=d.return;if($y(d),d===u){z=null;break}if(p!==null){p.return=m,z=p;break}z=m}}}var v=s.alternate;if(v!==null){var y=v.child;if(y!==null){v.child=null;do{var g=y.sibling;y.sibling=null,y=g}while(y!==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:xs(9,s,s.return)}var h=s.sibling;if(h!==null){h.return=s.return,z=h;break e}z=s.return}}var x=e.current;for(z=x;z!==null;){i=z;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,z=b;else e:for(i=x;z!==null;){if(l=z,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Cl(9,l)}}catch(_){Oe(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(le=o,hr(),ln&&typeof ln.onPostCommitFiberRoot=="function")try{ln.onPostCommitFiberRoot(gl,e)}catch{}r=!0}return r}finally{ve=n,Ft.transition=t}}return!1}function Vh(e,t,n){t=Co(n,t),t=_y(e,t,1),e=or(e,t,1),t=at(),e!==null&&(ti(e,1,t),gt(e,t))}function Oe(e,t,n){if(e.tag===3)Vh(e,e,n);else for(;t!==null;){if(t.tag===3){Vh(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=Co(n,e),e=Cy(t,e,1),t=or(t,e,1),e=at(),t!==null&&(ti(t,1,e),gt(t,e));break}}t=t.return}}function __(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=at(),e.pingedLanes|=e.suspendedLanes&n,qe===e&&(Qe&n)===n&&(Le===4||Le===3&&(Qe&130023424)===Qe&&500>$e()-wf?_r(e,0):bf|=n),gt(e,t)}function qy(e,t){t===0&&(e.mode&1?(t=wi,wi<<=1,!(wi&130023424)&&(wi=4194304)):t=1);var n=at();e=An(e,t),e!==null&&(ti(e,t,n),gt(e,n))}function C_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qy(e,n)}function j_(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),qy(e,n)}var Hy;Hy=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ht.current)pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return pt=!1,f_(e,t,n);pt=!!(e.flags&131072)}else pt=!1,je&&t.flags&1048576&&Gv(t,Ia,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ea(e,t),e=t.pendingProps;var o=bo(t,rt.current);po(t,n),o=hf(null,t,r,e,o,n);var s=mf();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,mt(r)?(s=!0,Ta(t)):s=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,cf(t),o.updater=Sl,t.stateNode=o,o._reactInternals=t,Iu(t,r,e,n),t=Mu(null,t,r,!0,s,n)):(t.tag=0,je&&s&&tf(t),st(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ea(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=R_(r),e=Wt(r,e),o){case 0:t=Au(null,t,r,e,n);break e;case 1:t=Th(null,t,r,e,n);break e;case 11:t=kh(null,t,r,e,n);break e;case 14:t=Oh(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),Au(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),Th(e,t,r,o,n);case 3:e:{if(Ny(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,Zv(e,t),Ma(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=Co(Error(I(423)),t),t=Ph(e,t,r,n,o);break e}else if(r!==o){o=Co(Error(I(424)),t),t=Ph(e,t,r,n,o);break e}else for(_t=rr(t.stateNode.containerInfo.firstChild),Ct=t,je=!0,Gt=null,n=ny(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(wo(),r===o){t=Mn(e,t,n);break e}st(e,t,r,n)}t=t.child}return t;case 5:return ry(t),e===null&&Ou(t),r=t.type,o=t.pendingProps,s=e!==null?e.memoizedProps:null,i=o.children,ju(r,o)?i=null:s!==null&&ju(r,s)&&(t.flags|=32),Ry(e,t),st(e,t,i,n),t.child;case 6:return e===null&&Ou(t),null;case 13:return ky(e,t,n);case 4:return uf(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=So(t,null,r,n):st(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),kh(e,t,r,o,n);case 7:return st(e,t,t.pendingProps,n),t.child;case 8:return st(e,t,t.pendingProps.children,n),t.child;case 12:return st(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,xe($a,r._currentValue),r._currentValue=i,s!==null)if(Jt(s.value,i)){if(s.children===o.children&&!ht.current){t=Mn(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=kn(-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),Tu(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),Tu(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}st(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,po(t,n),o=Lt(o),r=r(o),t.flags|=1,st(e,t,r,n),t.child;case 14:return r=t.type,o=Wt(r,t.pendingProps),o=Wt(r.type,o),Oh(e,t,r,o,n);case 15:return jy(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Wt(r,o),ea(e,t),t.tag=1,mt(r)?(e=!0,Ta(t)):e=!1,po(t,n),ey(t,r,o),Iu(t,r,o,n),Mu(null,t,r,!0,e,n);case 19:return Oy(e,t,n);case 22:return Ey(e,t,n)}throw Error(I(156,t.tag))};function Wy(e,t){return yv(e,t)}function E_(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 Dt(e,t,n,r){return new E_(e,t,n,r)}function jf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R_(e){if(typeof e=="function")return jf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Bd)return 11;if(e===qd)return 14}return 2}function ar(e,t){var n=e.alternate;return n===null?(n=Dt(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 ra(e,t,n,r,o,s){var i=2;if(r=e,typeof e=="function")jf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Qr:return Cr(n.children,o,s,t);case zd:i=8,o|=8;break;case ru:return e=Dt(12,n,t,o|2),e.elementType=ru,e.lanes=s,e;case ou:return e=Dt(13,n,t,o),e.elementType=ou,e.lanes=s,e;case su:return e=Dt(19,n,t,o),e.elementType=su,e.lanes=s,e;case tv:return El(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jg:i=10;break e;case ev:i=9;break e;case Bd:i=11;break e;case qd:i=14;break e;case Wn:i=16,r=null;break e}throw Error(I(130,e==null?e:typeof e,""))}return t=Dt(i,n,t,o),t.elementType=e,t.type=r,t.lanes=s,t}function Cr(e,t,n,r){return e=Dt(7,e,r,t),e.lanes=n,e}function El(e,t,n,r){return e=Dt(22,e,r,t),e.elementType=tv,e.lanes=n,e.stateNode={isHidden:!1},e}function Oc(e,t,n){return e=Dt(6,e,null,t),e.lanes=n,e}function Tc(e,t,n){return t=Dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function N_(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=dc(0),this.expirationTimes=dc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dc(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ef(e,t,n,r,o,s,i,l,c){return e=new N_(e,t,n,l,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Dt(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},cf(s),e}function k_(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Ky(e){if(!e)return cr;e=e._reactInternals;e:{if(Fr(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(mt(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(mt(n))return Wv(e,n,t)}return t}function Gy(e,t,n,r,o,s,i,l,c){return e=Ef(n,r,!0,e,o,s,i,l,c),e.context=Ky(null),n=e.current,r=at(),o=ir(n),s=kn(r,o),s.callback=t??null,or(n,s,o),e.current.lanes=o,ti(e,o,r),gt(e,r),e}function Rl(e,t,n,r){var o=t.current,s=at(),i=ir(o);return n=Ky(n),t.context===null?t.context=n:t.pendingContext=n,t=kn(s,i),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=or(o,t,i),e!==null&&(Xt(e,o,i,s),Xi(e,o,i)),i}function qa(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 zh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Rf(e,t){zh(e,t),(e=e.alternate)&&zh(e,t)}function O_(){return null}var Yy=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nf(e){this._internalRoot=e}Nl.prototype.render=Nf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));Rl(e,t,null,null)};Nl.prototype.unmount=Nf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Pr(function(){Rl(null,e,null,null)}),t[$n]=null}};function Nl(e){this._internalRoot=e}Nl.prototype.unstable_scheduleHydration=function(e){if(e){var t=jv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yn.length&&t!==0&&t<Yn[n].priority;n++);Yn.splice(n,0,e),n===0&&Rv(e)}};function kf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function kl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Bh(){}function T_(e,t,n,r,o){if(o){if(typeof r=="function"){var s=r;r=function(){var u=qa(i);s.call(u)}}var i=Gy(t,r,e,0,null,!1,!1,"",Bh);return e._reactRootContainer=i,e[$n]=i.current,Is(e.nodeType===8?e.parentNode:e),Pr(),i}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=qa(c);l.call(u)}}var c=Ef(e,0,!1,null,null,!1,!1,"",Bh);return e._reactRootContainer=c,e[$n]=c.current,Is(e.nodeType===8?e.parentNode:e),Pr(function(){Rl(t,c,n,r)}),c}function Ol(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=qa(i);l.call(c)}}Rl(t,i,e,o)}else i=T_(n,t,e,o,r);return qa(i)}_v=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=cs(t.pendingLanes);n!==0&&(Kd(t,n|1),gt(t,$e()),!(le&6)&&(jo=$e()+500,hr()))}break;case 13:Pr(function(){var r=An(e,1);if(r!==null){var o=at();Xt(r,e,1,o)}}),Rf(e,1)}};Gd=function(e){if(e.tag===13){var t=An(e,134217728);if(t!==null){var n=at();Xt(t,e,134217728,n)}Rf(e,134217728)}};Cv=function(e){if(e.tag===13){var t=ir(e),n=An(e,t);if(n!==null){var r=at();Xt(n,e,t,r)}Rf(e,t)}};jv=function(){return ve};Ev=function(e,t){var n=ve;try{return ve=e,t()}finally{ve=n}};mu=function(e,t,n){switch(t){case"input":if(lu(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=bl(r);if(!o)throw Error(I(90));rv(r),lu(r,o)}}}break;case"textarea":sv(e,n);break;case"select":t=n.value,t!=null&&lo(e,!!n.multiple,t,!1)}};fv=Sf;pv=Pr;var P_={usingClientEntryPoint:!1,Events:[ri,eo,bl,uv,dv,Sf]},Jo={findFiberByHostInstance:xr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},I_={bundleType:Jo.bundleType,version:Jo.version,rendererPackageName:Jo.rendererPackageName,rendererConfig:Jo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=gv(e),e===null?null:e.stateNode},findFiberByHostInstance:Jo.findFiberByHostInstance||O_,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 Pi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pi.isDisabled&&Pi.supportsFiber)try{gl=Pi.inject(I_),ln=Pi}catch{}}Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=P_;Tt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!kf(t))throw Error(I(200));return k_(e,t,null,n)};Tt.createRoot=function(e,t){if(!kf(e))throw Error(I(299));var n=!1,r="",o=Yy;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Ef(e,1,!1,null,null,n,!1,r,o),e[$n]=t.current,Is(e.nodeType===8?e.parentNode:e),new Nf(t)};Tt.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=gv(t),e=e===null?null:e.stateNode,e};Tt.flushSync=function(e){return Pr(e)};Tt.hydrate=function(e,t,n){if(!kl(t))throw Error(I(200));return Ol(null,e,t,!0,n)};Tt.hydrateRoot=function(e,t,n){if(!kf(e))throw Error(I(405));var r=n!=null&&n.hydratedSources||null,o=!1,s="",i=Yy;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Gy(t,null,e,1,n??null,o,!1,s,i),e[$n]=t.current,Is(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 Nl(t)};Tt.render=function(e,t,n){if(!kl(t))throw Error(I(200));return Ol(null,e,t,!1,n)};Tt.unmountComponentAtNode=function(e){if(!kl(e))throw Error(I(40));return e._reactRootContainer?(Pr(function(){Ol(null,null,e,!1,function(){e._reactRootContainer=null,e[$n]=null})}),!0):!1};Tt.unstable_batchedUpdates=Sf;Tt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!kl(n))throw Error(I(200));if(e==null||e._reactInternals===void 0)throw Error(I(38));return Ol(e,t,n,!1,r)};Tt.version="18.2.0-next-9e3b772b8-20220608";function Qy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qy)}catch(e){console.error(e)}}Qy(),Gg.exports=Tt;var Of=Gg.exports;const Sr=Js(Of);var qh=Of;bt.createRoot=qh.createRoot,bt.hydrateRoot=qh.hydrateRoot;function Ke(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 $_=typeof Symbol=="function"&&Symbol.observable||"@@observable",Hh=$_,Pc=()=>Math.random().toString(36).substring(7).split("").join("."),A_={INIT:`@@redux/INIT${Pc()}`,REPLACE:`@@redux/REPLACE${Pc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Pc()}`},Ha=A_;function Tf(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 Xy(e,t,n){if(typeof e!="function")throw new Error(Ke(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Ke(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Ke(1));return n(Xy)(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((g,h)=>{i.set(h,g)}))}function d(){if(c)throw new Error(Ke(3));return o}function f(g){if(typeof g!="function")throw new Error(Ke(4));if(c)throw new Error(Ke(5));let h=!0;u();const x=l++;return i.set(x,g),function(){if(h){if(c)throw new Error(Ke(6));h=!1,u(),i.delete(x),s=null}}}function p(g){if(!Tf(g))throw new Error(Ke(7));if(typeof g.type>"u")throw new Error(Ke(8));if(typeof g.type!="string")throw new Error(Ke(17));if(c)throw new Error(Ke(9));try{c=!0,o=r(o,g)}finally{c=!1}return(s=i).forEach(x=>{x()}),g}function m(g){if(typeof g!="function")throw new Error(Ke(10));r=g,p({type:Ha.REPLACE})}function v(){const g=f;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Ke(11));function x(){const S=h;S.next&&S.next(d())}return x(),{unsubscribe:g(x)}},[Hh](){return this}}}return p({type:Ha.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[Hh]:v}}function M_(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ha.INIT})>"u")throw new Error(Ke(12));if(typeof n(void 0,{type:Ha.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Ke(13))})}function D_(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{M_(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],m=i[f],v=p(m,l);if(typeof v>"u")throw l&&l.type,new Error(Ke(14));u[f]=v,c=c||v!==m}return c=c||r.length!==Object.keys(i).length,c?u:i}}function Wa(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function F_(...e){return t=>(n,r)=>{const o=t(n,r);let s=()=>{throw new Error(Ke(15))};const i={getState:o.getState,dispatch:(c,...u)=>s(c,...u)},l=e.map(c=>c(i));return s=Wa(...l)(o.dispatch),{...o,dispatch:s}}}function L_(e){return Tf(e)&&"type"in e&&typeof e.type=="string"}var Zy=Symbol.for("immer-nothing"),Wh=Symbol.for("immer-draftable"),Rt=Symbol.for("immer-state");function Yt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Eo=Object.getPrototypeOf;function ur(e){return!!e&&!!e[Rt]}function Dn(e){var t;return e?Jy(e)||Array.isArray(e)||!!e[Wh]||!!((t=e.constructor)!=null&&t[Wh])||Pl(e)||Il(e):!1}var U_=Object.prototype.constructor.toString();function Jy(e){if(!e||typeof e!="object")return!1;const t=Eo(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)===U_}function zs(e,t){Tl(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Tl(e){const t=e[Rt];return t?t.type_:Array.isArray(e)?1:Pl(e)?2:Il(e)?3:0}function Gu(e,t){return Tl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ex(e,t,n){const r=Tl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function V_(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Pl(e){return e instanceof Map}function Il(e){return e instanceof Set}function yr(e){return e.copy_||e.base_}function Yu(e,t){if(Pl(e))return new Map(e);if(Il(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&Jy(e))return Eo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Rt];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(Eo(e),n)}function Pf(e,t=!1){return $l(e)||ur(e)||!Dn(e)||(Tl(e)>1&&(e.set=e.add=e.clear=e.delete=z_),Object.freeze(e),t&&zs(e,(n,r)=>Pf(r,!0))),e}function z_(){Yt(2)}function $l(e){return Object.isFrozen(e)}var B_={};function Ir(e){const t=B_[e];return t||Yt(0,e),t}var Bs;function tx(){return Bs}function q_(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Kh(e,t){t&&(Ir("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qu(e){Xu(e),e.drafts_.forEach(H_),e.drafts_=null}function Xu(e){e===Bs&&(Bs=e.parent_)}function Gh(e){return Bs=q_(Bs,e)}function H_(e){const t=e[Rt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Yh(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Rt].modified_&&(Qu(t),Yt(4)),Dn(e)&&(e=Ka(t,e),t.parent_||Ga(t,e)),t.patches_&&Ir("Patches").generateReplacementPatches_(n[Rt].base_,e,t.patches_,t.inversePatches_)):e=Ka(t,n,[]),Qu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Zy?e:void 0}function Ka(e,t,n){if($l(t))return t;const r=t[Rt];if(!r)return zs(t,(o,s)=>Qh(e,r,t,o,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ga(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),zs(s,(l,c)=>Qh(e,r,o,l,c,n,i)),Ga(e,o,!1),n&&e.patches_&&Ir("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Qh(e,t,n,r,o,s,i){if(ur(o)){const l=s&&t&&t.type_!==3&&!Gu(t.assigned_,r)?s.concat(r):void 0,c=Ka(e,o,l);if(ex(n,r,c),ur(c))e.canAutoFreeze_=!1;else return}else i&&n.add(o);if(Dn(o)&&!$l(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ka(e,o),(!t||!t.scope_.parent_)&&Ga(e,o)}}function Ga(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Pf(t,n)}function W_(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:tx(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,s=If;n&&(o=[r],s=qs);const{revoke:i,proxy:l}=Proxy.revocable(o,s);return r.draft_=l,r.revoke_=i,l}var If={get(e,t){if(t===Rt)return e;const n=yr(e);if(!Gu(n,t))return K_(e,n,t);const r=n[t];return e.finalized_||!Dn(r)?r:r===Ic(e.base_,t)?($c(e),e.copy_[t]=Ju(r,e)):r},has(e,t){return t in yr(e)},ownKeys(e){return Reflect.ownKeys(yr(e))},set(e,t,n){const r=nx(yr(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=Ic(yr(e),t),s=o==null?void 0:o[Rt];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(V_(n,o)&&(n!==void 0||Gu(e.base_,t)))return!0;$c(e),Zu(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 Ic(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,$c(e),Zu(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(){Yt(11)},getPrototypeOf(e){return Eo(e.base_)},setPrototypeOf(){Yt(12)}},qs={};zs(If,(e,t)=>{qs[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qs.deleteProperty=function(e,t){return qs.set.call(this,e,t,void 0)};qs.set=function(e,t,n){return If.set.call(this,e[0],t,n,e[0])};function Ic(e,t){const n=e[Rt];return(n?yr(n):e)[t]}function K_(e,t,n){var o;const r=nx(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function nx(e,t){if(!(t in e))return;let n=Eo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Eo(n)}}function Zu(e){e.modified_||(e.modified_=!0,e.parent_&&Zu(e.parent_))}function $c(e){e.copy_||(e.copy_=Yu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var G_=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"&&Yt(6),r!==void 0&&typeof r!="function"&&Yt(7);let o;if(Dn(t)){const s=Gh(this),i=Ju(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Qu(s):Xu(s)}return Kh(s,r),Yh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Zy&&(o=void 0),this.autoFreeze_&&Pf(o,!0),r){const s=[],i=[];Ir("Patches").generateReplacementPatches_(t,o,s,i),r(s,i)}return o}else Yt(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){Dn(e)||Yt(8),ur(e)&&(e=rx(e));const t=Gh(this),n=Ju(e,void 0);return n[Rt].isManual_=!0,Xu(t),n}finishDraft(e,t){const n=e&&e[Rt];(!n||!n.isManual_)&&Yt(9);const{scope_:r}=n;return Kh(r,t),Yh(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=Ir("Patches").applyPatches_;return ur(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ju(e,t){const n=Pl(e)?Ir("MapSet").proxyMap_(e,t):Il(e)?Ir("MapSet").proxySet_(e,t):W_(e,t);return(t?t.scope_:tx()).drafts_.push(n),n}function rx(e){return ur(e)||Yt(10,e),ox(e)}function ox(e){if(!Dn(e)||$l(e))return e;const t=e[Rt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Yu(e,!0);return zs(n,(r,o)=>{ex(n,r,ox(o))}),t&&(t.finalized_=!1),n}var Nt=new G_,sx=Nt.produce;Nt.produceWithPatches.bind(Nt);Nt.setAutoFreeze.bind(Nt);Nt.setUseStrictShallowCopy.bind(Nt);Nt.applyPatches.bind(Nt);Nt.createDraft.bind(Nt);Nt.finishDraft.bind(Nt);function Y_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Q_(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function X_(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 Xh=e=>Array.isArray(e)?e:[e];function Z_(e){const t=Array.isArray(e[0])?e[0]:e;return X_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function J_(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var eC=class{constructor(e){this.value=e}deref(){return this.value}},tC=typeof WeakRef<"u"?WeakRef:eC,nC=0,Zh=1;function Ii(){return{s:nC,v:void 0,o:null,p:null}}function $f(e,t={}){let n=Ii();const{resultEqualityCheck:r}=t;let o,s=0;function i(){var f;let l=n;const{length:c}=arguments;for(let p=0,m=c;p<m;p++){const v=arguments[p];if(typeof v=="function"||typeof v=="object"&&v!==null){let y=l.o;y===null&&(l.o=y=new WeakMap);const g=y.get(v);g===void 0?(l=Ii(),y.set(v,l)):l=g}else{let y=l.p;y===null&&(l.p=y=new Map);const g=y.get(v);g===void 0?(l=Ii(),y.set(v,l)):l=g}}const u=l;let d;if(l.s===Zh?d=l.v:(d=e.apply(null,arguments),s++),u.s=Zh,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 tC(d):d}return u.v=d,d}return i.clearCache=()=>{n=Ii(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function ix(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()),Y_(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...c},{memoize:f,memoizeOptions:p=[],argsMemoize:m=$f,argsMemoizeOptions:v=[],devModeChecks:y={}}=d,g=Xh(p),h=Xh(v),x=Z_(o),b=f(function(){return s++,u.apply(null,arguments)},...g),S=m(function(){i++;const j=J_(x,arguments);return l=b.apply(null,j),l},...h);return Object.assign(S,{resultFunc:u,memoizedResultFunc:b,dependencies:x,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>l,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var si=ix($f),rC=Object.assign((e,t=si)=>{Q_(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:()=>rC});function ax(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var oC=ax(),sC=ax,iC=(...e)=>{const t=ix(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(ur(i)?rx(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};iC($f);var aC=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Wa:Wa.apply(null,arguments)},lC=e=>e&&typeof e.match=="function";function On(e,t){function n(...r){if(t){let o=t(...r);if(!o)throw new Error(vt(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=>L_(r)&&r.type===e,n}var lx=class ds extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ds.prototype)}static get[Symbol.species](){return ds}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ds(...t[0].concat(this)):new ds(...t.concat(this))}};function Jh(e){return Dn(e)?sx(e,()=>{}):e}function em(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(vt(10));const r=n.insert(t,e);return e.set(t,r),r}function cC(e){return typeof e=="boolean"}var uC=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new lx;return n&&(cC(n)?i.push(oC):i.push(sC(n.extraArgument))),i},dC="RTK_autoBatch",cx=e=>t=>{setTimeout(t,e)},fC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:cx(10),pC=(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"?fC:e.type==="callback"?e.queueNotification:cx(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[dC]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},hC=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new lx(e);return r&&o.push(pC(typeof r=="object"?r:void 0)),o},mC=!0;function zn(e){const t=uC(),{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(Tf(n))l=D_(n);else throw new Error(vt(1));let c;typeof r=="function"?c=r(t):c=t();let u=Wa;o&&(u=aC({trace:!mC,...typeof o=="object"&&o}));const d=F_(...c),f=hC(d);let p=typeof i=="function"?i(f):f();const m=u(...p);return Xy(l,s,m)}function ux(e){const t={},n=[];let r;const o={addCase(s,i){const l=typeof s=="string"?s:s.type;if(!l)throw new Error(vt(28));if(l in t)throw new Error(vt(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 gC(e){return typeof e=="function"}function vC(e,t){let[n,r,o]=ux(t),s;if(gC(e))s=()=>Jh(e());else{const l=Jh(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 m=f(d,c);return m===void 0?d:m}else{if(Dn(d))return sx(d,p=>f(p,c));{const p=f(d,c);if(p===void 0){if(d===null)return d;throw new Error(vt(9))}return p}}return d},l)}return i.getInitialState=s,i}var yC="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",dx=(e=21)=>{let t="",n=e;for(;n--;)t+=yC[Math.random()*64|0];return t},xC=(e,t)=>lC(e)?e.match(t):e(t);function bC(...e){return t=>e.some(n=>xC(n,t))}var wC=["name","message","stack","code"],Ac=class{constructor(e,t){sc(this,"_type");this.payload=e,this.meta=t}},tm=class{constructor(e,t){sc(this,"_type");this.payload=e,this.meta=t}},SC=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of wC)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},He=(()=>{function e(t,n,r){const o=On(t+"/fulfilled",(c,u,d,f)=>({payload:c,meta:{...f||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),s=On(t+"/pending",(c,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:c,requestStatus:"pending"}})),i=On(t+"/rejected",(c,u,d,f,p)=>({payload:f,error:(r&&r.serializeError||SC)(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):dx(),m=new AbortController;let v,y;function g(x){y=x,m.abort()}const h=async function(){var S,_;let x;try{let j=(S=r==null?void 0:r.condition)==null?void 0:S.call(r,c,{getState:d,extra:f});if(CC(j)&&(j=await j),j===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,N)=>{v=()=>{N({name:"AbortError",message:y||"Aborted"})},m.signal.addEventListener("abort",v)});u(s(p,c,(_=r==null?void 0:r.getPendingMeta)==null?void 0:_.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),x=await Promise.race([E,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:m.signal,abort:g,rejectWithValue:(C,N)=>new Ac(C,N),fulfillWithValue:(C,N)=>new tm(C,N)})).then(C=>{if(C instanceof Ac)throw C;return C instanceof tm?o(C.payload,p,c,C.meta):o(C,p,c)})])}catch(j){x=j instanceof Ac?i(null,p,c,j.payload,j.meta):i(j,p,c)}finally{v&&m.signal.removeEventListener("abort",v)}return r&&!r.dispatchConditionRejection&&i.match(x)&&x.meta.condition||u(x),x}();return Object.assign(h,{abort:g,requestId:p,arg:c,unwrap(){return h.then(_C)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:bC(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function _C(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function CC(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var jC=Symbol.for("rtk-slice-createasyncthunk");function EC(e,t){return`${e}/${t}`}function RC({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[jC];return function(o){const{name:s,reducerPath:i=s}=o;if(!s)throw new Error(vt(11));typeof process<"u";const l=(typeof o.reducers=="function"?o.reducers(kC()):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(vt(12));if(_ in u.sliceCaseReducersByType)throw new Error(vt(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:EC(s,b),createNotation:typeof o.reducers=="function"};TC(S)?IC(_,S,d,t):OC(_,S,d)});function f(){const[b={},S=[],_=void 0]=typeof o.extraReducers=="function"?ux(o.extraReducers):[o.extraReducers],j={...b,...u.sliceCaseReducersByType};return vC(o.initialState,E=>{for(let C in j)E.addCase(C,j[C]);for(let C of u.sliceMatchers)E.addMatcher(C.matcher,C.reducer);for(let C of S)E.addMatcher(C.matcher,C.reducer);_&&E.addDefaultCase(_)})}const p=b=>b,m=new Map;let v;function y(b,S){return v||(v=f()),v(b,S)}function g(){return v||(v=f()),v.getInitialState()}function h(b,S=!1){function _(E){let C=E[b];return typeof C>"u"&&S&&(C=g()),C}function j(E=p){const C=em(m,S,{insert:()=>new WeakMap});return em(C,E,{insert:()=>{const N={};for(const[R,O]of Object.entries(o.selectors??{}))N[R]=NC(O,E,g,S);return N}})}return{reducerPath:b,getSelectors:j,get selectors(){return j(_)},selectSlice:_}}const x={name:s,reducer:y,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...h(i),injectInto(b,{reducerPath:S,..._}={}){const j=S??i;return b.inject({reducerPath:j,reducer:y},_),{...x,...h(j,!0)}}};return x}}function NC(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 Lr=RC();function kC(){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 OC({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!PC(r))throw new Error(vt(17));s=r.reducer,i=r.prepare}else s=r;o.addCase(e,s).exposeCaseReducer(t,s).exposeAction(t,i?On(e,i):On(e))}function TC(e){return e._reducerDefinitionType==="asyncThunk"}function PC(e){return e._reducerDefinitionType==="reducerWithPrepare"}function IC({type:e,reducerName:t},n,r,o){if(!o)throw new Error(vt(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||$i,pending:l||$i,rejected:c||$i,settled:u||$i})}function $i(){}var $C=(e,t)=>{if(typeof e!="function")throw new Error(vt(32))},Af="listenerMiddleware",AC=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:s}=e;if(t)o=On(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(vt(21));return $C(s),{predicate:o,type:t,effect:s}},MC=Object.assign(e=>{const{type:t,predicate:n,effect:r}=AC(e);return{id:dx(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(vt(22))}}},{withTypes:()=>MC}),DC=Object.assign(On(`${Af}/add`),{withTypes:()=>DC});On(`${Af}/removeAll`);var FC=Object.assign(On(`${Af}/remove`),{withTypes:()=>FC});function vt(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 fx={exports:{}},px={};/**
|
|
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
|
|
48
|
+
*/var ii=w;function LC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var UC=typeof Object.is=="function"?Object.is:LC,VC=ii.useSyncExternalStore,zC=ii.useRef,BC=ii.useEffect,qC=ii.useMemo,HC=ii.useDebugValue;px.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=zC(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=qC(function(){function c(m){if(!u){if(u=!0,d=m,m=r(m),o!==void 0&&i.hasValue){var v=i.value;if(o(v,m))return f=v}return f=m}if(v=f,UC(d,m))return v;var y=r(m);return o!==void 0&&o(v,y)?v:(d=m,f=y)}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=VC(e,s[0],s[1]);return BC(function(){i.hasValue=!0,i.value=l},[l]),HC(l),l};fx.exports=px;var WC=fx.exports,ie="default"in ba?Ee:ba,nm=Symbol.for("react-redux-context"),rm=typeof globalThis<"u"?globalThis:{};function KC(){if(!ie.createContext)return{};const e=rm[nm]??(rm[nm]=new Map);let t=e.get(ie.createContext);return t||(t=ie.createContext(null),e.set(ie.createContext,t)),t}var Fn=KC(),hx=()=>{throw new Error("uSES not initialized!")};function Mf(e=Fn){return function(){return ie.useContext(e)}}var mx=Mf(),gx=hx,GC=e=>{gx=e},YC=(e,t)=>e===t;function QC(e=Fn){const t=e===Fn?mx:Mf(e),n=(r,o={})=>{const{equalityFn:s=YC,devModeChecks:i={}}=typeof o=="function"?{equalityFn:o}:o,{store:l,subscription:c,getServerState:u,stabilityCheck:d,identityFunctionCheck:f}=t();ie.useRef(!0);const p=ie.useCallback({[r.name](v){return r(v)}}[r.name],[r,d,i.stabilityCheck]),m=gx(c.addNestedSub,l.getState,u||l.getState,p,s);return ie.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var H=QC(),XC=Symbol.for("react.element"),ZC=Symbol.for("react.portal"),JC=Symbol.for("react.fragment"),ej=Symbol.for("react.strict_mode"),tj=Symbol.for("react.profiler"),nj=Symbol.for("react.provider"),rj=Symbol.for("react.context"),oj=Symbol.for("react.server_context"),vx=Symbol.for("react.forward_ref"),sj=Symbol.for("react.suspense"),ij=Symbol.for("react.suspense_list"),Df=Symbol.for("react.memo"),aj=Symbol.for("react.lazy"),lj=vx,cj=Df;function uj(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case XC:{const n=e.type;switch(n){case JC:case tj:case ej:case sj:case ij:return n;default:{const r=n&&n.$$typeof;switch(r){case oj:case rj:case vx:case aj:case Df:case nj:return r;default:return t}}}}case ZC:return t}}}function dj(e){return uj(e)===Df}function fj(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:s,areStatePropsEqual:i}){let l=!1,c,u,d,f,p;function m(x,b){return c=x,u=b,d=e(c,u),f=t(r,u),p=n(d,f,u),l=!0,p}function v(){return d=e(c,u),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function y(){return e.dependsOnOwnProps&&(d=e(c,u)),t.dependsOnOwnProps&&(f=t(r,u)),p=n(d,f,u),p}function g(){const x=e(c,u),b=!i(x,d);return d=x,b&&(p=n(d,f,u)),p}function h(x,b){const S=!s(b,u),_=!o(x,c,b,u);return c=x,u=b,S&&_?v():S?y():_?g():p}return function(b,S){return l?h(b,S):m(b,S)}}function pj(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const s=t(e,o),i=n(e,o),l=r(e,o);return fj(s,i,l,e,o)}function hj(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 ed(e){return function(n){const r=e(n);function o(){return r}return o.dependsOnOwnProps=!1,o}}function om(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function yx(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=om(e);let u=s(l,c);return typeof u=="function"&&(s.mapToProps=u,s.dependsOnOwnProps=om(u),u=s(l,c)),u},s}}function Ff(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function mj(e){return e&&typeof e=="object"?ed(t=>hj(e,t)):e?typeof e=="function"?yx(e):Ff(e,"mapDispatchToProps"):ed(t=>({dispatch:t}))}function gj(e){return e?typeof e=="function"?yx(e):Ff(e,"mapStateToProps"):ed(()=>({}))}function vj(e,t,n){return{...n,...e,...t}}function yj(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 xj(e){return e?typeof e=="function"?yj(e):Ff(e,"mergeProps"):()=>vj}function bj(e){e()}function wj(){let e=null,t=null;return{clear(){e=null,t=null},notify(){bj(()=>{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 sm={notify(){},get:()=>[]};function xx(e,t){let n,r=sm,o=0,s=!1;function i(y){d();const g=r.subscribe(y);let h=!1;return()=>{h||(h=!0,g(),f())}}function l(){r.notify()}function c(){v.onStateChange&&v.onStateChange()}function u(){return s}function d(){o++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=wj())}function f(){o--,n&&o===0&&(n(),n=void 0,r.clear(),r=sm)}function p(){s||(s=!0,d())}function m(){s&&(s=!1,f())}const v={addNestedSub:i,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return v}var Sj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ya=Sj?ie.useLayoutEffect:ie.useEffect;function im(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Mc(e,t){if(im(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])||!im(e[n[o]],t[n[o]]))return!1;return!0}var _j={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Cj={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},jj={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ej={[lj]:jj,[cj]:bx};function am(e){return dj(e)?bx:Ej[e.$$typeof]||_j}var Rj=Object.defineProperty,Nj=Object.getOwnPropertyNames,lm=Object.getOwnPropertySymbols,kj=Object.getOwnPropertyDescriptor,Oj=Object.getPrototypeOf,cm=Object.prototype;function td(e,t){if(typeof t!="string"){if(cm){const s=Oj(t);s&&s!==cm&&td(e,s)}let n=Nj(t);lm&&(n=n.concat(lm(t)));const r=am(e),o=am(t);for(let s=0;s<n.length;++s){const i=n[s];if(!Cj[i]&&!(o&&o[i])&&!(r&&r[i])){const l=kj(t,i);try{Rj(e,i,l)}catch{}}}}return e}var wx=hx,Tj=e=>{wx=e},Pj=[null,null];function Ij(e,t,n){Ya(()=>e(...t),n)}function $j(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function Aj(e,t,n,r,o,s,i,l,c,u,d){if(!e)return()=>{};let f=!1,p=null;const m=()=>{if(f||!l.current)return;const y=t.getState();let g,h;try{g=r(y,o.current)}catch(x){h=x,p=x}h||(p=null),g===s.current?i.current||u():(s.current=g,c.current=g,i.current=!0,d())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(f=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function Mj(e,t){return e===t}function Dj(e,t,n,{pure:r,areStatesEqual:o=Mj,areOwnPropsEqual:s=Mc,areStatePropsEqual:i=Mc,areMergedPropsEqual:l=Mc,forwardRef:c=!1,context:u=Fn}={}){const d=u,f=gj(e),p=mj(t),m=xj(n),v=!!e;return g=>{const h=g.displayName||g.name||"Component",x=`Connect(${h})`,b={shouldHandleStateChanges:v,displayName:x,wrappedComponentName:h,WrappedComponent:g,initMapStateToProps:f,initMapDispatchToProps:p,initMergeProps:m,areStatesEqual:o,areStatePropsEqual:i,areOwnPropsEqual:s,areMergedPropsEqual:l};function S(E){const[C,N,R]=ie.useMemo(()=>{const{reactReduxForwardedRef:me,...Ie}=E;return[E.context,me,Ie]},[E]),O=ie.useMemo(()=>{let me=d;return C!=null&&C.Consumer,me},[C,d]),k=ie.useContext(O),P=!!E.store&&!!E.store.getState&&!!E.store.dispatch,U=!!k&&!!k.store,F=P?E.store:k.store,V=U?k.getServerState:F.getState,Z=ie.useMemo(()=>pj(F.dispatch,b),[F]),[T,L]=ie.useMemo(()=>{if(!v)return Pj;const me=xx(F,P?void 0:k.subscription),Ie=me.notifyNestedSubs.bind(me);return[me,Ie]},[F,P,k]),M=ie.useMemo(()=>P?k:{...k,subscription:T},[P,k,T]),W=ie.useRef(),B=ie.useRef(R),X=ie.useRef(),J=ie.useRef(!1);ie.useRef(!1);const ee=ie.useRef(!1),Q=ie.useRef();Ya(()=>(ee.current=!0,()=>{ee.current=!1}),[]);const te=ie.useMemo(()=>()=>X.current&&R===B.current?X.current:Z(F.getState(),R),[F,R]),ue=ie.useMemo(()=>Ie=>T?Aj(v,F,T,Z,B,W,J,ee,X,L,Ie):()=>{},[T]);Ij($j,[B,W,J,R,X,L]);let Ce;try{Ce=wx(ue,te,V?()=>Z(V(),R):te)}catch(me){throw Q.current&&(me.message+=`
|
|
49
49
|
The error may be correlated with this previous error:
|
|
50
50
|
${Q.current.stack}
|
|
51
51
|
|
|
52
|
-
`),me}Ya(()=>{Q.current=void 0,X.current=void 0,H.current=_e});const De=ie.useMemo(()=>ie.createElement(g,{..._e,ref:N}),[N,g,_e]);return ie.useMemo(()=>x?ie.createElement(O.Provider,{value:A},De):De,[O,De,A])}const _=ie.memo(S);if(_.WrappedComponent=g,_.displayName=S.displayName=v,c){const C=ie.forwardRef(function(R,O){return ie.createElement(_,{...R,reactReduxForwardedRef:O})});return C.displayName=v,C.WrappedComponent=g,td(C,g)}return td(_,g)}}var AC=MC;function DC({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=ie.useMemo(()=>{const u=yx(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),l=ie.useMemo(()=>e.getState(),[e]);Ya(()=>{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||Fn;return ie.createElement(c.Provider,{value:i},n)}var Bn=DC;function wx(e=Fn){const t=e===Fn?hx:Af(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var FC=wx();function LC(e=Fn){const t=e===Fn?FC:wx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ge=LC();W_(q_.useSyncExternalStoreWithSelector);kC(w.useSyncExternalStore);const nn="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:()=>`${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"}},mo=(e,t,n="round")=>{const r=Math.pow(10,t||0);return Math[n](e*r)/r},UC=e=>new Date(`${e}T00:00:00`),VC={year:"numeric",month:"short",day:"numeric"},go=(e,t)=>UC(e).toLocaleString("en-us",t||VC),it=(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})},Lf=(e,t)=>{if(e.startDate&&e.endDate){const o=go(e.startDate,t),s=go(e.endDate,t);return`${e.allocationType}: ${o} to ${s}`}const n=go(e.entryDate,t),r=e.status=="Incomplete"?"Started":"Submitted";return`${e.allocationType}: ${r} ${n}`},Tn=e=>a.jsx("i",{className:`bi bi-${e}`}),ii=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},cm=e=>{const t=ii(e.name);return t.short||t.full},Qa=(e,t)=>e.isCredit>t.isCredit||e.isActive>t.isActive||cm(e)<cm(t)?-1:1,um=(...e)=>{for(let t of e)if(t!=null)return t;return null},Sx=(e,t="and",n=", ")=>e.reduce((r,o,s)=>a.jsxs(a.Fragment,{children:[r,e.length-1>s?n:` ${t} `,o]})),Uf=e=>e?a.jsxs(a.Fragment,{children:[Tn("check-circle")," Yes"]}):a.jsxs(a.Fragment,{children:[Tn("x-circle")," No"]}),Vf=e=>Sx(e.users.filter(({role:t})=>["pi","co_pi","allocation_manager"].includes(t)).map(t=>`${t.firstName} ${t.lastName}`),"or"),dm=(e,t)=>t==1&&e.endsWith("s")?e.slice(0,-1):e,zC=(e,t,n)=>`${it(t)} ${dm(n,t)} / ${dm(e,1)}`,jx=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},Ml=[{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"}],_x={};for(let e of Ml)_x[e.role]=e;const nd={};for(let{role:e,xrasRole:t}of Ml)nd[e]=t;const rd=["info","success","secondary","warning","danger"];function od(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 ai(e){e&&(ne.routes={...ne.routes,...e})}const sd={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Dc={};function Cx(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 BC(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function qC(e){if(Dc[e])return Dc[e];const t=document.location,n=`${t.protocol}//${t.host}${t.pathname}`,o=await(await fetch(`${n}/${e}`)).json();return Dc[e]=o,o}function HC(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:pm(t),points:pm(n)}}function fm({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`,m=`${u}Credits`;i.organizations={type:"geojson",data:d};const x={user:[],rp:[]},y=[];n.points.forEach((h,v)=>{Object.keys(sd).forEach(b=>{x[b].push(h[1],sd[b].colors[v])}),y.push(h[1],5*(v+1))});const g=[];if(n.lines.forEach((h,v)=>{g.push(h[1],1*(v+1))}),l.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",p],...y],"circle-color":["interpolate",["linear"],["get",p],...x[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 h=["get",e.id.toString(),["get",`${m}Map`]];l.push({id:"opp",type:"circle",source:"opp",filter:["has",e.id.toString(),["get",`${m}Map`]],paint:{"circle-radius":["interpolate",["linear"],h,...y],"circle-color":["interpolate",["linear"],h,...x[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"],...g]}})}}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 WC(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 KC(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:WC(...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 pm(e,t=[0,.3,.6,.9]){return t.map((n,r)=>{const o=GC(e,n),s=r===t.length-1?"+":"";return[`${Cx(Math.round(o))}${s}`,o]})}function GC(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 YC="_fullscreen_1iid9_6",QC="_map_1iid9_14",$i={"allocations-map":"_allocations-map_1iid9_1",fullscreen:YC,map:QC},XC="_group_11k83_1",ZC="_button_11k83_6",JC="_icon_11k83_16",Fc={group:XC,button:ZC,icon:JC};function hm({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 ${Fc.button}`,htmlFor:i,disabled:t.includes(i),children:[r===i?a.jsx("i",{className:`bi bi-check ${Fc.icon}`}):null," ",l]},`${i}-label`))),a.jsx("div",{className:"mb-2",children:a.jsx("div",{className:`btn-group ${Fc.group}`,role:"group","aria-label":n,children:s})})}const eE="_controls_1be4t_1",tE={controls:eE};function nE({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:tE.controls,children:[a.jsx("h2",{children:"ACCESS Allocations"}),a.jsx(hm,{choices:[["allocated","Allocations"],["exchanged","Exchanges"],["used","Usage"]],label:"Credit Type",value:e,setValue:n}),a.jsx(hm,{choices:[["user","By Research Institution"],["rp","By Resource Provider"]],disabledValues:e==="allocated"?["rp"]:[],label:"Organization Type",value:t,setValue:r})]})}const rE="_legend_odgg9_1",oE="_symbols_odgg9_17",sE="_symbol_odgg9_17",ra={legend:rE,symbols:oE,symbol:sE};function iE(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 aE({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:ra.symbol,children:[iE(5*(s+1),sd[n].colors[s]),a.jsx("br",{}),a.jsx("span",{className:"label",children:o[0]})]},o[0]));return a.jsxs("div",{className:ra.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:ra.symbols,children:r})]})}const lE="_info_oxxoh_1",cE="_user_oxxoh_7",uE="_rp_oxxoh_10",dE="_credits_oxxoh_15",oa={info:lE,user:cE,rp:uE,credits:dE};function mm(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 ${oa[t]}`,children:s},s),[""," and ",", "][l.length-i-1]],[])}function fE({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:`${ra.legend} ${oa.info}`,children:a.jsxs("p",{className:oa[r],children:["Researchers at ",mm(c.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",a.jsxs("span",{className:oa.credits,children:[Cx(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",mm(c.rp,"rp","resource provider")]}):"","."]})})}function pE(){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,m]=w.useState(null),[x,y]=w.useState(null),[g,h]=w.useState("user"),[v,b]=w.useState("exchanged");return w.useEffect(()=>{(async()=>s(await BC()))()},[]),w.useEffect(()=>{(async S=>{const[j,_]=await Promise.all(["organizations",`credits_${S}`].map(qC));if(!x){const C={};j.features.forEach(N=>C[N.id.toString()]=N.properties.name),y(C)}const E=KC(j,_,v);f(E),S==="exchanged"&&!i&&l(HC(E))})(v)},[v]),w.useEffect(()=>{p&&p.setStyle(fm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:v,geoJSON:d,organizationType:g}))},[n,d,p,g]),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(()=>{v==="allocated"&&h("user")},[v]),w.useLayoutEffect(()=>m(new maplibregl.Map({container:t.current,style:fm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:v,geoJSON:d,organizationType:g}),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:`${$i["allocations-map"]} ${c?$i.fullscreen:"border border-3 border-primary"}`,ref:e,children:[a.jsx("div",{className:$i.map,ref:t}),a.jsx(nE,{creditType:v,fullscreen:c,organizationType:g,setCreditType:b,setFullscreen:u,setOrganizationType:h}),a.jsx(aE,{activeOrg:n,creditLevels:i,organizationType:g}),a.jsx(fE,{activeOrg:n,creditType:v,organizationMap:x,organizationType:g}),a.jsx("button",{title:`${c?"Exit":"Enter"} Fullscreen`,className:$i.fullscreen,onClick:()=>u(!c),children:a.jsx("i",{className:`bi ${c?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const hE=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)}},gm=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),vm=(e,t)=>{t.current||(t.current=setInterval(()=>{window.scrollBy(0,e*10)},16))},Lc=e=>{e.current&&(clearInterval(e.current),e.current=null)},mE="_dragging_1vb1t_45",Wt={"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:mE,"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 Ex={exports:{}},gE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vE=gE,yE=vE;function Rx(){}function Nx(){}Nx.resetWarningCache=Rx;var xE=function(){function e(r,o,s,i,l,c){if(c!==yE){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:Nx,resetWarningCache:Rx};return n.PropTypes=n,n};Ex.exports=xE();var bE=Ex.exports;const q=Js(bE),wE=(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}},id=e=>({type:"SET_RESOURCE_DATA",payload:e}),SE=e=>({type:"SET_LOADING",payload:e}),ym=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Br=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),Uc=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),jE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),_E=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(wE,{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 jE(e,t);r(id(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}},zf=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)||[]}},EE=(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(m=>{var x;(x=m.required_resources)==null||x.forEach(y=>{f.add(y.resource_name)})}),Array.from(f).sort((m,x)=>m.localeCompare(x)).map(m=>({key:m,name:`Require ${m}`,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:m=>o(f.allocation_type_id,m)},comment:{value:f.comment||"",onChange:m=>s(f.allocation_type_id,m)},...Object.fromEntries(c.map(m=>{var x;return[m.key,{checked:((x=f.required_resources)==null?void 0:x.some(y=>y.resource_name===m.key))||!1,onChange:y=>i(f.allocation_type_id,m.key,y,f)}]}))}}):[],requiredResourcesColumns:c}},RE=(e,t,n)=>{const{availableResources:r,availableAllocationTypes:o,allowedActionsOptions:s}=zf(e),[i,l]=w.useState(!1),[c,u]=w.useState(!1),[d,f]=w.useState([]),[p,m]=w.useState(""),x=w.useCallback((j,_)=>{n(Uc(j,{allowed_action:{resource_state_type_id:_}}))},[n]),y=w.useCallback((j,_)=>{n(Uc(j,{comment:_}))},[n]),g=w.useCallback((j,_,E,C)=>{const N=E?[...C.required_resources||[],{resource_name:_,required_resource_id:e.required_resources_available.find(R=>R.resource_name===_).resource_id}]:(C.required_resources||[]).filter(R=>R.resource_name!==_);n(Uc(j,{required_resources:N}))},[e,n]);w.useEffect(()=>{if(i&&t){const j=t.allocation_types.flatMap(_=>_.required_resources||[]).map(_=>_.required_resource_id);f(j)}},[i,t]);const h=w.useCallback((j,_)=>{f(E=>_?[...E,j]:E.filter(C=>C!==j))},[]),v=w.useCallback(()=>{const j=t.allocation_types.flatMap(N=>N.required_resources||[]).map(N=>N.required_resource_id),_=d.filter(N=>!j.includes(N)),E=j.filter(N=>!d.includes(N)),C=t.allocation_types.map(N=>{const R=N.required_resources||[],O=_.map(P=>{const U=r.find(F=>F.resource_id===P);return{resource_name:U.resource_name,required_resource_id:U.resource_id}}),k=R.filter(P=>!E.includes(P.required_resource_id)).concat(O.filter(P=>!R.some(U=>U.required_resource_id===P.required_resource_id)));return{...N,required_resources:k}});n(id({...e,resource_details:{...t,allocation_types:C}})),f([]),l(!1)},[d,r,t,e,n]),b=w.useCallback(j=>{const _=j.target.value;m(_)},[]),S=w.useCallback(()=>{var E,C;if(!p)return;const j=o.find(N=>N.allocation_type_id.toString()===p),_=(E=t.allocation_types)==null?void 0:E.some(N=>N.allocation_type_id===j.allocation_type_id);if(j&&!_){const N=(C=s[0])==null?void 0:C.value,R=[...t.allocation_types||[],{allocation_type_id:j.allocation_type_id,display_name:j.display_name,allowed_action:{resource_state_type_id:N},comment:"",required_resources:[]}];n(id({...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:h,handleSaveResources:v,selectedNewAllocationType:p,handleSelectNewAllocationType:b,handleSaveAllocationType:S,handleAllowedActionChange:x,handleCommentChange:y,handleRequiredResourceChange:g}},NE=(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,min_exchange:e.min_exchange,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 _E(t,n,i,l);if(f.ok){const p=await f.json();return s(ym(p.message||"Resource updated successfully!","success")),await r(),!0}else return await o(f,"Failed to update resource"),!1}catch{return s(ym("Error updating resource. Please try again later.","danger")),!1}},[e,t,n,r,o]),kE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},OE={"form-wrapper":"_form-wrapper_mu0yh_1"},Xa=({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;Xa.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 Se=({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:"×"})})]}),Ro=({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))})]});Ro.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 Gr({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 TE="_blurred_16xcy_16",xn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:TE,"warning-banner":"_warning-banner_16xcy_21","alt-warning-banner":"_alt-warning-banner_16xcy_40 _warning-banner_16xcy_21"},Bf=({headerText:e,header:t,children:n,isEditing:r=!1,onEditingChange:o,warningMessage:s=""})=>{const i=e&&e.type==="label";return a.jsxs("div",{className:xn["advanced-settings"],children:[(e||t)&&a.jsxs("div",{className:xn["header-wrapper"],children:[e,t&&a.jsx("div",{className:`${xn["header-buttons-container"]} ${r?"":xn.blurred}`,children:t})]}),a.jsxs("div",{style:{width:"100%"},children:[!r&&a.jsxs("div",{className:i?`${xn["alt-warning-banner"]}`:xn["warning-banner"],children:[a.jsxs("span",{className:xn["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:`${xn["content-container"]} ${r?"":xn.blurred}`,children:n})]})]})};Bf.propTypes={headerText:q.node,header:q.node,children:q.node.isRequired,isEditing:q.bool,onEditingChange:q.func.isRequired,warningMessage:q.string};const qf=Re.memo(function({resourceDetails:t,resourceTypesOptions:n,unitTypesOptions:r,dispatch:o,isDollarValueEditing:s,onDollarValueEditingChange:i,showDollarValue:l=!0,showResourceId:c=!0,useAdvancedSettings:u=!0}){var p;const d="Dollar Value per SUs",f=l?a.jsx(Gr,{label:u?null:d,value:t.dollar_value,onChange:m=>o(Br("dollar_value",m.target.value)),type:"number",inputAddon:"$",inputClassName:"span4"}):null;return a.jsxs(a.Fragment,{children:[a.jsx(Gr,{label:"Resource Name",value:t.resource_name,onChange:m=>o(Br("resource_name",m.target.value)),inputClassName:"span8"}),c&&a.jsx(Gr,{label:"Resource Repository Key",value:t.resource_repository_key,disabled:!0,inputClassName:"span8"}),u&&l?a.jsx(Bf,{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(Gr,{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:m=>o(Br("description",m.target.value)),inputClassName:"span8"}),a.jsx(Ro,{label:"Resource Type",options:n,value:t.resource_type_id,onChange:m=>o(Br("resource_type_id",m.target.value)),className:"span8"}),a.jsx(Ro,{label:"Unit Type",options:r,value:t.unit_type_id,onChange:m=>o(Br("unit_type_id",m.target.value)),className:"span8"}),a.jsx(Gr,{label:`Minimum exchange amount, in ${(p=r.find(m=>m.value.toString()===t.unit_type_id.toString()))==null?void 0:p.label}`,value:t.min_exchange,onChange:m=>o(Br("min_exchange",m.target.value)),inputClassName:"span8"})]})});qf.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 kx({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=zf(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 v=await fetch("/resources/addable.json");n(!1),v.status==200?o(await v.json()):i("Error retrieving resource list.")})()},[]),w.useEffect(()=>{if(l===-1)return d(null);(async()=>{const v=await fetch(`/resources/addable/${l}.json`);v.status==200?d(await v.json()):i("Error retrieving resource details.")})()},[l]);let p=null;t?p=a.jsx("p",{children:"Loading…"}):s!==null?p=a.jsx(Se,{color:"danger",children:s}):r.length==0&&(p=a.jsx(Se,{children:"There are currently no resources available to add."}));const m=[{value:-1,label:"Select a resource..."}].concat(r.map(v=>({value:v.xras_cider_resource_id,label:v.resource_descriptive_name}))),x=u?u.resource_details:null,y=!s&&x&&x.resource_name.length>0&&x.resource_type_id>0&&x.unit_type_id>0,g=v=>{v.type=="UPDATE_RESOURCE_FIELD"&&d({...u,resource_details:{...u.resource_details,[v.field]:v.value}})},h=()=>{(async()=>{const v=await fetch("/resources",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({...x,resource_repository_key:l})});if(v.status==200){const b=await v.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(Ro,{options:m,onChange:v=>c(parseInt(v.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:OE["form-wrapper"],children:a.jsx(qf,{resourceDetails:x,resourceTypesOptions:f.resourceTypesOptions,unitTypesOptions:f.unitTypesOptions,showResourceId:!1,showDollarValue:!1,dispatch:g})})]})]})),a.jsx(Xa,{show:!0,onClose:e,title:"Add a Resource from CIDeR",onSave:h,buttonText:"Save",canSave:y,children:p})}kx.propTypes={onClose:q.func.isRequired};function PE({availableResources:e,unavailableResources:t=[],canAdd:n=!1,relativeUrlRoot:r}){const o=w.useMemo(()=>gm(e),[e]),s=w.useMemo(()=>gm(t),[t]),[i,l]=w.useState(o),[c,u]=w.useState(!1),d=w.useRef(null),f=w.useRef(null),p="Active",m="Inactive",[x,y]=w.useState(p),g=j=>{y(j),console.log(j),j==p?l(o):l(s)};function h(j,_){_.preventDefault(),y(j),g(j)}w.useEffect(()=>{l(o)},[o]);const v=(j,_)=>{d.current=_},b=(j,_)=>{if(j.preventDefault(),d.current===_)return;const E=[...i],C=E[d.current];E.splice(d.current,1),E.splice(_,0,C),d.current=_,l(E);const{clientY:N}=j,R=130;N<R?vm(-1,f):window.innerHeight-N<R?vm(1,f):Lc(f)},S=()=>{d.current=null,Lc(f),hE(r,i)};return w.useEffect(()=>()=>Lc(f),[]),a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:Wt["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:Wt["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 ${x===p?"active":""}`,"data-toggle":x===p?"tab":void 0,style:{cursor:"default",...x===p?{border:"1px solid #ddd",borderBottomColor:"transparent",color:"#555",backgroundColor:"#fff"}:{}},onClick:j=>h(p,j),children:p})}),a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${x===m?"active":""}`,"data-toggle":x===m?"tab":void 0,style:{cursor:"default"},onClick:j=>h(m,j),children:m})})]}),a.jsxs("div",{className:Wt["resources-list"],children:[a.jsxs("div",{className:Wt["resources-header"],children:[a.jsx("span",{className:Wt["header-name"],children:"Resource Name"}),a.jsx("span",{className:Wt["header-repo"],children:"Repository Key"})]}),i.map((j,_)=>a.jsxs("div",{className:`${Wt["resources-item"]}`,draggable:!0,onDragStart:E=>v(E,_),onDragOver:E=>b(E,_),onDrop:S,children:[a.jsx("span",{className:Wt["drag-handle"]}),a.jsx("span",{className:Wt["resource-name"],children:a.jsx("a",{href:`${r}/resources/${j.resource_id}`,className:Wt["resource-link"],children:j.display_resource_name})}),a.jsx("span",{className:Wt["resource-repo"],children:j.resource_repository_key||"N/A"})]},j.resource_id))]})]})]}),c&&a.jsx(kx,{onClose:()=>u(!1)})]})}function Ur(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const IE="_grid_afccc_1",$E="_important_afccc_30",ME="_input_afccc_34",AE="_edited_afccc_38",DE="_disabled_afccc_46",FE="_scroll_afccc_59",Cr={grid:IE,important:$E,input:ME,edited:AE,disabled:DE,scroll:FE};function LE({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 Hf=({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}));Hf.propTypes={title:q.string.isRequired,placement:q.oneOf(["top","bottom","left","right"]),children:q.node.isRequired};Hf.defaultProps={placement:"top"};const UE="_datepicker_19wnv_1",VE="_error_19wnv_1",xm={datepicker:UE,error:VE},zE=({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:`${xm.datepicker} ${c?xm.error:""}`,value:e||"",onChange:u=>t(u.target.value),disabled:n,min:s||"1900-01-01",max:i||"2100-12-31"})})},es=(e,t,n)=>{if(t.onChange){t.onChange(n,e);return}const r=e[t.key];r!=null&&r.onChange&&r.onChange(n)},BE={text:LE,select:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(Ro,{label:"",options:t[e.key].options,value:t[e.key].value,onChange:r=>es(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(Gr,{label:"",type:"text",disabled:t[e.key].disabled,value:t[e.key].value,onChange:r=>es(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=>es(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(zE,{value:r.value,onChange:o=>es(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 es(t,e,(r=t[e.key])==null?void 0:r.id)},children:a.jsx("i",{className:"fa fa-trash"})})})};function mn({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 y=u.current.querySelector(`tbody tr:nth-child(${c+1})`);y&&y.scrollIntoView({behavior:l,block:"nearest",inline:"nearest"})},[i,c,l]);const d=[0];for(let y=0;y<r;y++)d[y+1]=d[y]+(e[y].width||100);const f=(y,g)=>y<r?{position:"sticky",left:`${d[y]}px`,minWidth:`${e[y].width||100}px`,width:`${e[y].width||100}px`,zIndex:g||1}:{},p=e.map((y,g)=>a.jsxs("th",{className:y.headerClass||y.class||"",style:f(g,100),children:[y.formatHeader?y.formatHeader(y.name,y):y.name,y.tooltip&&a.jsx(Hf,{title:y.tooltip,placement:"bottom",children:a.jsx("i",{className:"icon-info-sign"})})]},y.key)),m=t.map((y,g)=>{const h=e.map((v,b)=>{const S=BE[v.type||"text"];return a.jsx(S,{column:v,row:y,style:f(b)},v.key)});return a.jsx("tr",{className:s[g]||"",children:h},g)}),x={};return o&&(x.minWidth=o),a.jsx("div",{className:`${Cr.grid} ${i?Cr.scroll:""} ${n||""}`,ref:u,children:a.jsxs("table",{className:"table table-bordered",style:x,children:[a.jsx("thead",{children:a.jsx("tr",{children:p})}),a.jsx("tbody",{children:m})]})})}const ad={"header-buttons":"_header-buttons_15oxx_1","allocation-types-grid":"_allocation-types-grid_15oxx_6","vertical-align-center":"_vertical-align-center_15oxx_10"},Ox=({onAddAllocationType:e,onAddRequiredResource:t})=>a.jsxs("div",{className:ad["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"]})]});Ox.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const Tx=Re.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:ad["allocation-types-grid"],children:[a.jsx(mn,{columns:t,rows:n,rowClasses:Array(n.length).fill(ad["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."})]})});Tx.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"},Px=Re.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(mn,{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))})})]})});Px.propTypes={columns:q.array.isRequired,rows:q.array.isRequired,onAddDiscountRate:q.func.isRequired,dateErrors:q.array};const qE=(e,t)=>{const n=w.useCallback(m=>{var y,g;t({type:"DELETE_EXCHANGE_RATE",payload:m}),(((g=(y=e==null?void 0:e.resource_details)==null?void 0:y.exchange_rates)==null?void 0:g.discount_rates.filter(h=>h.id!==m))||[]).forEach(h=>{h.begin_date&&h.end_date&&t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:h.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=m=>{t({type:"UPDATE_BASE_RATE",payload:m})},s=(m,x)=>{const y={exchange_rate:x},g={};x?g.rate_error="":g.rate_error="Exchange Rate cannot be empty",t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...y,...g}}})},i=()=>{var y,g;const m=[];return(((g=(y=e==null?void 0:e.resource_details)==null?void 0:y.exchange_rates)==null?void 0:g.discount_rates)||[]).forEach(h=>{h.start_date_error&&m.push(h.start_date_error),h.end_date_error&&m.push(h.end_date_error),h.rate_error&&m.push(h.rate_error)}),m.filter((h,v)=>h&&h!==""&&(!h.includes("overlaps")||m.indexOf(h)===v))},l=m=>{const x=new Date(m);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(x)},c=(m,x,y,g)=>{const h=new Date(m).getTime(),v=new Date(x).getTime(),b=new Date(y).getTime(),S=new Date(g).getTime();return h<=S&&b<=v},u=(m,x)=>{let y="";if(m.begin_date&&m.end_date){const g=x.filter(h=>h.id!==m.id);for(const h of g)if(h.begin_date&&h.end_date&&c(m.begin_date,m.end_date,h.begin_date,h.end_date)){y=`The selected date range (${l(m.begin_date)} to ${l(m.end_date)}) overlaps with an existing discount rate (${l(h.begin_date)} to ${l(h.end_date)})`;break}}return y},d=(m,x,y)=>{var R,O;const g={start_date:"begin_date",end_date:"end_date"},h=k=>{const P=new Date(k);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(P)},v=((O=(R=e==null?void 0:e.resource_details)==null?void 0:R.exchange_rates)==null?void 0:O.discount_rates)||[],b=v.find(k=>k.id===m);if(!b)return;const S={[g[x]]:y},j={},_=x==="end_date",E=()=>{if(!y)return j[`${x}_error`]="Date cannot be empty or invalid",!1;const k=r.find(V=>V.key===x),P=(k==null?void 0:k.minDate)||"1900-01-01",U=(k==null?void 0:k.maxDate)||"2100-12-31",F=_&&b.begin_date?b.begin_date:P;return y<F?(j[`${x}_error`]=`${x.replace("_"," ")} ${h(y)} cannot be before ${h(F)}`,!1):y>U?(j[`${x}_error`]=`${x.replace("_"," ")} cannot be after ${h(U)}`,!1):(j[`${x}_error`]="",!0)},C=()=>{const k=x==="end_date"?y:b.end_date;if(x==="start_date"&&k){if(y>k)return j.end_date_error=`end date ${h(k)} cannot be before ${h(y)}`,!1;j.end_date_error=j.end_date_error||""}return!0},N=()=>{console.log("validating overlaps");const k=x==="start_date"?y:b.begin_date,P=x==="end_date"?y:b.end_date;if(k&&P){const U=u({...b,begin_date:k,end_date:P},v);return j.start_date_error=U,j.end_date_error=U,!U}return!0};if(!E()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,...j}}});return}C(),N(),_&&!b.begin_date?j.start_date_error="Date cannot be empty or invalid":!_&&!b.end_date&&(j.end_date_error="Date cannot be empty or invalid"),t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,...j}}})},f=()=>{var j,_;const m=((_=(j=e==null?void 0:e.resource_details)==null?void 0:j.exchange_rates)==null?void 0:_.discount_rates)||[];let y=new Date;m.forEach(E=>{if(E.end_date){const C=new Date(E.end_date);C>y&&(y=C)}});const g=new Date(y);g.setDate(g.getDate()+1);const h=g.toISOString().split("T")[0],v=new Date(g);v.setDate(v.getDate()+15);const b=v.toISOString().split("T")[0],S={id:Date.now(),exchange_rate:"1.0",begin_date:h,end_date:b,is_new:!0};t({type:"ADD_EXCHANGE_RATE",payload:S})};return{exchangeRateColumns:r,exchangeRateRows:(()=>{var b,S;const m=(b=e==null?void 0:e.resource_details)==null?void 0:b.exchange_rates,x=(m==null?void 0:m.base_rate)??"",y=(m==null?void 0:m.discount_rates)||[],g=new Date().toISOString().split("T")[0],h=((S=e==null?void 0:e.resource_details)==null?void 0:S.unit_type)||"Resource Units",v=j=>!j||Number(j)===0?"-":`${(1/Number(j)).toFixed(2)} ${h}`;return[{rate_type:"Base Rate",rate:{value:x.toString(),onChange:j=>o(j)},conversion:v(x)},...y.map(j=>{var N;const _=j.is_new||j.begin_date>g,E=_||j.begin_date==="",C=j.is_new||j.end_date>=g||j.end_date==="";return{rate_type:"Discount",rate:{value:((N=j.exchange_rate)==null?void 0:N.toString())||"",onChange:_?R=>s(j.id,R):null,disabled:!_},conversion:v(j.exchange_rate),start_date:{value:j.begin_date||"",onChange:R=>d(j.id,"start_date",R),error:j.start_date_error,disabled:!E},end_date:{value:j.end_date||"",onChange:R=>d(j.id,"end_date",R),error:j.end_date_error,disabled:!C},actions:{id:j.id}}})]})(),handleAddDiscountRate:f,handleDeleteRate:n,dateErrors:i()}};function Ix({resourceId:e,relativeUrlRoot:t,setExternalSubmit:n}){const{state:r,dispatch:o,handleError:s,fetchData:i}=CE(e,t),{isEditing:l,handleEditingChange:c}=kE(),{resourceData:u,loading:d,errors:f,successMessage:p}=r,m=u==null?void 0:u.resource_details,x=u==null?void 0:u.uses_exchange_rates,{allowedActionsOptions:y,resourceTypesOptions:g,unitTypesOptions:h,availableResources:v,availableAllocationTypes:b}=zf(u),{showAddResourceModal:S,setShowAddResourceModal:j,showAddAllocationTypeModal:_,setShowAddAllocationTypeModal:E,selectedNewResource:C,handleSelectNewResource:N,handleSaveResources:R,selectedNewAllocationType:O,handleSelectNewAllocationType:k,handleSaveAllocationType:P,handleAllowedActionChange:U,handleCommentChange:F,handleRequiredResourceChange:V}=RE(u,m,o),{exchangeRateColumns:Z,exchangeRateRows:T,handleAddDiscountRate:L,dateErrors:A}=qE(u,o),H=NE(m,e,t,i,s,o);w.useEffect(()=>{n&&A.length==0?n(H):n(null)},[H,n,A]);const{allocationColumns:B,allocationRows:X}=EE(m,v,C,y,U,F,V),[J,ee]=w.useState(!1);return d?a.jsx(Ur,{}):f.length>0?a.jsx("div",{children:f.map((Q,te)=>a.jsx(Se,{color:"danger",dismissable:!0,children:Q},te))}):u?a.jsxs("div",{className:"edit-resource",children:[p.message&&a.jsx(Se,{color:p.color,dismissable:!0,children:p.message}),a.jsxs("div",{children:[a.jsx("h2",{children:"Resource Properties"}),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(qf,{resourceDetails:m,resourceTypesOptions:g,unitTypesOptions:h,dispatch:o,isDollarValueEditing:J,onDollarValueEditingChange:ee})]}),x&&a.jsx(Px,{columns:Z,rows:T,onAddDiscountRate:L,dateErrors:A}),a.jsx(Bf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(Ox,{onAddAllocationType:()=>l&&E(!0),onAddRequiredResource:()=>l&&j(!0)}),isEditing:l,onEditingChange:c,warningMessage:`Incorrect allocations
|
|
52
|
+
`),me}Ya(()=>{Q.current=void 0,X.current=void 0,W.current=Ce});const De=ie.useMemo(()=>ie.createElement(g,{...Ce,ref:N}),[N,g,Ce]);return ie.useMemo(()=>v?ie.createElement(O.Provider,{value:M},De):De,[O,De,M])}const j=ie.memo(S);if(j.WrappedComponent=g,j.displayName=S.displayName=x,c){const C=ie.forwardRef(function(R,O){return ie.createElement(j,{...R,reactReduxForwardedRef:O})});return C.displayName=x,C.WrappedComponent=g,td(C,g)}return td(j,g)}}var Fj=Dj;function Lj({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=ie.useMemo(()=>{const u=xx(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0,stabilityCheck:o,identityFunctionCheck:s}},[e,r,o,s]),l=ie.useMemo(()=>e.getState(),[e]);Ya(()=>{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||Fn;return ie.createElement(c.Provider,{value:i},n)}var Bn=Lj;function Sx(e=Fn){const t=e===Fn?mx:Mf(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Uj=Sx();function Vj(e=Fn){const t=e===Fn?Uj:Sx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var ge=Vj();GC(WC.useSyncExternalStoreWithSelector);Tj(w.useSyncExternalStore);const tn="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:()=>`${tn}/get-your-first-project`,profile_path:()=>`${tn}/profile`,project_types_path:()=>`${tn}/project-types`,projects_path:()=>`${tn}/projects`,projects_save_users_path:()=>"/projects/save_users",renew_request_path:e=>`${tn}/requests/${e}/renew`,request_action_path:(e,t)=>`${tn}/requests/${e}/actions/${t}`,request_actions_path:e=>`${tn}/requests/${e}/actions`,request_path:e=>`${tn}/requests/${e}`,resources_path:()=>`${tn}/resources`,search_people_path:()=>`${tn}/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"}},mo=(e,t,n="round")=>{const r=Math.pow(10,t||0);return Math[n](e*r)/r},zj=e=>new Date(`${e}T00:00:00`),Bj={year:"numeric",month:"short",day:"numeric"},go=(e,t)=>zj(e).toLocaleString("en-us",t||Bj),it=(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})},Lf=(e,t)=>{if(e.startDate&&e.endDate){const o=go(e.startDate,t),s=go(e.endDate,t);return`${e.allocationType}: ${o} to ${s}`}const n=go(e.entryDate,t),r=e.status=="Incomplete"?"Started":"Submitted";return`${e.allocationType}: ${r} ${n}`},Tn=e=>a.jsx("i",{className:`bi bi-${e}`}),ai=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},um=e=>{const t=ai(e.name);return t.short||t.full},Qa=(e,t)=>e.isCredit>t.isCredit||e.isActive>t.isActive||um(e)<um(t)?-1:1,dm=(...e)=>{for(let t of e)if(t!=null)return t;return null},_x=(e,t="and",n=", ")=>e.reduce((r,o,s)=>a.jsxs(a.Fragment,{children:[r,e.length-1>s?n:` ${t} `,o]})),Uf=e=>e?a.jsxs(a.Fragment,{children:[Tn("check-circle")," Yes"]}):a.jsxs(a.Fragment,{children:[Tn("x-circle")," No"]}),Vf=e=>_x(e.users.filter(({role:t})=>["pi","co_pi","allocation_manager"].includes(t)).map(t=>`${t.firstName} ${t.lastName}`),"or"),fm=(e,t)=>t==1&&e.endsWith("s")?e.slice(0,-1):e,qj=(e,t,n)=>`${it(t)} ${fm(n,t)} / ${fm(e,1)}`,Cx=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},Al=[{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"}],jx={};for(let e of Al)jx[e.role]=e;const nd={};for(let{role:e,xrasRole:t}of Al)nd[e]=t;const rd=["info","success","secondary","warning","danger"];function od(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 li(e){e&&(ne.routes={...ne.routes,...e})}const sd={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Dc={};function Ex(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 Hj(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function Wj(e){if(Dc[e])return Dc[e];const t=document.location,n=`${t.protocol}//${t.host}${t.pathname}`,o=await(await fetch(`${n}/${e}`)).json();return Dc[e]=o,o}function Kj(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:hm(t),points:hm(n)}}function pm({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`,m=`${u}Credits`;i.organizations={type:"geojson",data:d};const v={user:[],rp:[]},y=[];n.points.forEach((h,x)=>{Object.keys(sd).forEach(b=>{v[b].push(h[1],sd[b].colors[x])}),y.push(h[1],5*(x+1))});const g=[];if(n.lines.forEach((h,x)=>{g.push(h[1],1*(x+1))}),l.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",p],...y],"circle-color":["interpolate",["linear"],["get",p],...v[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 h=["get",e.id.toString(),["get",`${m}Map`]];l.push({id:"opp",type:"circle",source:"opp",filter:["has",e.id.toString(),["get",`${m}Map`]],paint:{"circle-radius":["interpolate",["linear"],h,...y],"circle-color":["interpolate",["linear"],h,...v[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"],...g]}})}}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 Gj(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 Yj(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:Gj(...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 hm(e,t=[0,.3,.6,.9]){return t.map((n,r)=>{const o=Qj(e,n),s=r===t.length-1?"+":"";return[`${Ex(Math.round(o))}${s}`,o]})}function Qj(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 Xj="_fullscreen_1iid9_6",Zj="_map_1iid9_14",Ai={"allocations-map":"_allocations-map_1iid9_1",fullscreen:Xj,map:Zj},Jj="_group_11k83_1",eE="_button_11k83_6",tE="_icon_11k83_16",Fc={group:Jj,button:eE,icon:tE};function mm({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 ${Fc.button}`,htmlFor:i,disabled:t.includes(i),children:[r===i?a.jsx("i",{className:`bi bi-check ${Fc.icon}`}):null," ",l]},`${i}-label`))),a.jsx("div",{className:"mb-2",children:a.jsx("div",{className:`btn-group ${Fc.group}`,role:"group","aria-label":n,children:s})})}const nE="_controls_1be4t_1",rE={controls:nE};function oE({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:rE.controls,children:[a.jsx("h2",{children:"ACCESS Allocations"}),a.jsx(mm,{choices:[["allocated","Allocations"],["exchanged","Exchanges"],["used","Usage"]],label:"Credit Type",value:e,setValue:n}),a.jsx(mm,{choices:[["user","By Research Institution"],["rp","By Resource Provider"]],disabledValues:e==="allocated"?["rp"]:[],label:"Organization Type",value:t,setValue:r})]})}const sE="_legend_odgg9_1",iE="_symbols_odgg9_17",aE="_symbol_odgg9_17",oa={legend:sE,symbols:iE,symbol:aE};function lE(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 cE({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:oa.symbol,children:[lE(5*(s+1),sd[n].colors[s]),a.jsx("br",{}),a.jsx("span",{className:"label",children:o[0]})]},o[0]));return a.jsxs("div",{className:oa.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:oa.symbols,children:r})]})}const uE="_info_oxxoh_1",dE="_user_oxxoh_7",fE="_rp_oxxoh_10",pE="_credits_oxxoh_15",sa={info:uE,user:dE,rp:fE,credits:pE};function gm(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 ${sa[t]}`,children:s},s),[""," and ",", "][l.length-i-1]],[])}function hE({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:`${oa.legend} ${sa.info}`,children:a.jsxs("p",{className:sa[r],children:["Researchers at ",gm(c.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",a.jsxs("span",{className:sa.credits,children:[Ex(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",gm(c.rp,"rp","resource provider")]}):"","."]})})}function mE(){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,m]=w.useState(null),[v,y]=w.useState(null),[g,h]=w.useState("user"),[x,b]=w.useState("exchanged");return w.useEffect(()=>{(async()=>s(await Hj()))()},[]),w.useEffect(()=>{(async S=>{const[_,j]=await Promise.all(["organizations",`credits_${S}`].map(Wj));if(!v){const C={};_.features.forEach(N=>C[N.id.toString()]=N.properties.name),y(C)}const E=Yj(_,j,x);f(E),S==="exchanged"&&!i&&l(Kj(E))})(x)},[x]),w.useEffect(()=>{p&&p.setStyle(pm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:x,geoJSON:d,organizationType:g}))},[n,d,p,g]),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(()=>{x==="allocated"&&h("user")},[x]),w.useLayoutEffect(()=>m(new maplibregl.Map({container:t.current,style:pm({activeOrg:n,basemapStyle:o,creditLevels:i,creditType:x,geoJSON:d,organizationType:g}),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:`${Ai["allocations-map"]} ${c?Ai.fullscreen:"border border-3 border-primary"}`,ref:e,children:[a.jsx("div",{className:Ai.map,ref:t}),a.jsx(oE,{creditType:x,fullscreen:c,organizationType:g,setCreditType:b,setFullscreen:u,setOrganizationType:h}),a.jsx(cE,{activeOrg:n,creditLevels:i,organizationType:g}),a.jsx(hE,{activeOrg:n,creditType:x,organizationMap:v,organizationType:g}),a.jsx("button",{title:`${c?"Exit":"Enter"} Fullscreen`,className:Ai.fullscreen,onClick:()=>u(!c),children:a.jsx("i",{className:`bi ${c?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const gE=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)}},vm=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),ym=(e,t)=>{t.current||(t.current=setInterval(()=>{window.scrollBy(0,e*10)},16))},Lc=e=>{e.current&&(clearInterval(e.current),e.current=null)},vE="_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:vE,"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 Rx={exports:{}},yE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",xE=yE,bE=xE;function Nx(){}function kx(){}kx.resetWarningCache=Nx;var wE=function(){function e(r,o,s,i,l,c){if(c!==bE){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:kx,resetWarningCache:Nx};return n.PropTypes=n,n};Rx.exports=wE();var SE=Rx.exports;const q=Js(SE),_E=(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}},id=e=>({type:"SET_RESOURCE_DATA",payload:e}),CE=e=>({type:"SET_LOADING",payload:e}),xm=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Br=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),Uc=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),jE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),EE=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})})),RE=(e,t)=>{const[n,r]=w.useReducer(_E,{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(CE(!0));try{const i=await jE(e,t);r(id(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}},zf=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)||[]}},NE=(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(m=>{var v;(v=m.required_resources)==null||v.forEach(y=>{f.add(y.resource_name)})}),Array.from(f).sort((m,v)=>m.localeCompare(v)).map(m=>({key:m,name:`Require ${m}`,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:m=>o(f.allocation_type_id,m)},comment:{value:f.comment||"",onChange:m=>s(f.allocation_type_id,m)},...Object.fromEntries(c.map(m=>{var v;return[m.key,{checked:((v=f.required_resources)==null?void 0:v.some(y=>y.resource_name===m.key))||!1,onChange:y=>i(f.allocation_type_id,m.key,y,f)}]}))}}):[],requiredResourcesColumns:c}},kE=(e,t,n)=>{const{availableResources:r,availableAllocationTypes:o,allowedActionsOptions:s}=zf(e),[i,l]=w.useState(!1),[c,u]=w.useState(!1),[d,f]=w.useState([]),[p,m]=w.useState(""),v=w.useCallback((_,j)=>{n(Uc(_,{allowed_action:{resource_state_type_id:j}}))},[n]),y=w.useCallback((_,j)=>{n(Uc(_,{comment:j}))},[n]),g=w.useCallback((_,j,E,C)=>{const N=E?[...C.required_resources||[],{resource_name:j,required_resource_id:e.required_resources_available.find(R=>R.resource_name===j).resource_id}]:(C.required_resources||[]).filter(R=>R.resource_name!==j);n(Uc(_,{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 h=w.useCallback((_,j)=>{f(E=>j?[...E,_]:E.filter(C=>C!==_))},[]),x=w.useCallback(()=>{const _=t.allocation_types.flatMap(N=>N.required_resources||[]).map(N=>N.required_resource_id),j=d.filter(N=>!_.includes(N)),E=_.filter(N=>!d.includes(N)),C=t.allocation_types.map(N=>{const R=N.required_resources||[],O=j.map(P=>{const U=r.find(F=>F.resource_id===P);return{resource_name:U.resource_name,required_resource_id:U.resource_id}}),k=R.filter(P=>!E.includes(P.required_resource_id)).concat(O.filter(P=>!R.some(U=>U.required_resource_id===P.required_resource_id)));return{...N,required_resources:k}});n(id({...e,resource_details:{...t,allocation_types:C}})),f([]),l(!1)},[d,r,t,e,n]),b=w.useCallback(_=>{const j=_.target.value;m(j)},[]),S=w.useCallback(()=>{var E,C;if(!p)return;const _=o.find(N=>N.allocation_type_id.toString()===p),j=(E=t.allocation_types)==null?void 0:E.some(N=>N.allocation_type_id===_.allocation_type_id);if(_&&!j){const N=(C=s[0])==null?void 0:C.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(id({...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:h,handleSaveResources:x,selectedNewAllocationType:p,handleSelectNewAllocationType:b,handleSaveAllocationType:S,handleAllowedActionChange:v,handleCommentChange:y,handleRequiredResourceChange:g}},OE=(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,min_exchange:e.min_exchange,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 EE(t,n,i,l);if(f.ok){const p=await f.json();return s(xm(p.message||"Resource updated successfully!","success")),await r(),!0}else return await o(f,"Failed to update resource"),!1}catch{return s(xm("Error updating resource. Please try again later.","danger")),!1}},[e,t,n,r,o]),TE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},PE={"form-wrapper":"_form-wrapper_mu0yh_1"},Xa=({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;Xa.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 Se=({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:"×"})})]}),Ro=({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))})]});Ro.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 Gr({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 IE="_blurred_16xcy_16",yn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:IE,"warning-banner":"_warning-banner_16xcy_21","alt-warning-banner":"_alt-warning-banner_16xcy_40 _warning-banner_16xcy_21"},Bf=({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})]})]})};Bf.propTypes={headerText:q.node,header:q.node,children:q.node.isRequired,isEditing:q.bool,onEditingChange:q.func.isRequired,warningMessage:q.string};const qf=Ee.memo(function({resourceDetails:t,resourceTypesOptions:n,unitTypesOptions:r,dispatch:o,isDollarValueEditing:s,onDollarValueEditingChange:i,showDollarValue:l=!0,showResourceId:c=!0,useAdvancedSettings:u=!0}){var p;const d="Dollar Value per SUs",f=l?a.jsx(Gr,{label:u?null:d,value:t.dollar_value,onChange:m=>o(Br("dollar_value",m.target.value)),type:"number",inputAddon:"$",inputClassName:"span4"}):null;return a.jsxs(a.Fragment,{children:[a.jsx(Gr,{label:"Resource Name",value:t.resource_name,onChange:m=>o(Br("resource_name",m.target.value)),inputClassName:"span8"}),c&&a.jsx(Gr,{label:"Resource Repository Key",value:t.resource_repository_key,disabled:!0,inputClassName:"span8"}),u&&l?a.jsx(Bf,{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(Gr,{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:m=>o(Br("description",m.target.value)),inputClassName:"span8"}),a.jsx(Ro,{label:"Resource Type",options:n,value:t.resource_type_id,onChange:m=>o(Br("resource_type_id",m.target.value)),className:"span8"}),a.jsx(Ro,{label:"Unit Type",options:r,value:t.unit_type_id,onChange:m=>o(Br("unit_type_id",m.target.value)),className:"span8"}),a.jsx(Gr,{label:`Minimum exchange amount, in ${(p=r.find(m=>m.value.toString()===t.unit_type_id.toString()))==null?void 0:p.label}`,value:t.min_exchange,onChange:m=>o(Br("min_exchange",m.target.value)),inputClassName:"span8"})]})});qf.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 Ox({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=zf(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 x=await fetch("/resources/addable.json");n(!1),x.status==200?o(await x.json()):i("Error retrieving resource list.")})()},[]),w.useEffect(()=>{if(l===-1)return d(null);(async()=>{const x=await fetch(`/resources/addable/${l}.json`);x.status==200?d(await x.json()):i("Error retrieving resource details.")})()},[l]);let p=null;t?p=a.jsx("p",{children:"Loading…"}):s!==null?p=a.jsx(Se,{color:"danger",children:s}):r.length==0&&(p=a.jsx(Se,{children:"There are currently no resources available to add."}));const m=[{value:-1,label:"Select a resource..."}].concat(r.map(x=>({value:x.xras_cider_resource_id,label:x.resource_descriptive_name}))),v=u?u.resource_details:null,y=!s&&v&&v.resource_name.length>0&&v.resource_type_id>0&&v.unit_type_id>0,g=x=>{x.type=="UPDATE_RESOURCE_FIELD"&&d({...u,resource_details:{...u.resource_details,[x.field]:x.value}})},h=()=>{(async()=>{const x=await fetch("/resources",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({...v,resource_repository_key:l})});if(x.status==200){const b=await x.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(Ro,{options:m,onChange:x=>c(parseInt(x.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(qf,{resourceDetails:v,resourceTypesOptions:f.resourceTypesOptions,unitTypesOptions:f.unitTypesOptions,showResourceId:!1,showDollarValue:!1,dispatch:g})})]})]})),a.jsx(Xa,{show:!0,onClose:e,title:"Add a Resource from CIDeR",onSave:h,buttonText:"Save",canSave:y,children:p})}Ox.propTypes={onClose:q.func.isRequired};function $E({availableResources:e,unavailableResources:t=[],canAdd:n=!1,relativeUrlRoot:r}){const o=w.useMemo(()=>vm(e),[e]),s=w.useMemo(()=>vm(t),[t]),[i,l]=w.useState(o),[c,u]=w.useState(!1),d=w.useRef(null),f=w.useRef(null),p="Active",m="Inactive",[v,y]=w.useState(p),g=_=>{y(_),console.log(_),_==p?l(o):l(s)};function h(_,j){j.preventDefault(),y(_),g(_)}w.useEffect(()=>{l(o)},[o]);const x=(_,j)=>{d.current=j},b=(_,j)=>{if(_.preventDefault(),d.current===j)return;const E=[...i],C=E[d.current];E.splice(d.current,1),E.splice(j,0,C),d.current=j,l(E);const{clientY:N}=_,R=130;N<R?ym(-1,f):window.innerHeight-N<R?ym(1,f):Lc(f)},S=()=>{d.current=null,Lc(f),gE(r,i)};return w.useEffect(()=>()=>Lc(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 ${v===p?"active":""}`,"data-toggle":v===p?"tab":void 0,style:{cursor:"default",...v===p?{border:"1px solid #ddd",borderBottomColor:"transparent",color:"#555",backgroundColor:"#fff"}:{}},onClick:_=>h(p,_),children:p})}),a.jsx("li",{className:"nav-item",children:a.jsx("a",{className:`nav-link ${v===m?"active":""}`,"data-toggle":v===m?"tab":void 0,style:{cursor:"default"},onClick:_=>h(m,_),children:m})})]}),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:E=>x(E,j),onDragOver:E=>b(E,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(Ox,{onClose:()=>u(!1)})]})}function Ur(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const AE="_grid_afccc_1",ME="_important_afccc_30",DE="_input_afccc_34",FE="_edited_afccc_38",LE="_disabled_afccc_46",UE="_scroll_afccc_59",jr={grid:AE,important:ME,input:DE,edited:FE,disabled:LE,scroll:UE};function VE({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 Hf=({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}));Hf.propTypes={title:q.string.isRequired,placement:q.oneOf(["top","bottom","left","right"]),children:q.node.isRequired};Hf.defaultProps={placement:"top"};const zE="_datepicker_19wnv_1",BE="_error_19wnv_1",bm={datepicker:zE,error:BE},qE=({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:`${bm.datepicker} ${c?bm.error:""}`,value:e||"",onChange:u=>t(u.target.value),disabled:n,min:s||"1900-01-01",max:i||"2100-12-31"})})},es=(e,t,n)=>{if(t.onChange){t.onChange(n,e);return}const r=e[t.key];r!=null&&r.onChange&&r.onChange(n)},HE={text:VE,select:({column:e,row:t,style:n})=>a.jsx("td",{style:n,children:a.jsx(Ro,{label:"",options:t[e.key].options,value:t[e.key].value,onChange:r=>es(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(Gr,{label:"",type:"text",disabled:t[e.key].disabled,value:t[e.key].value,onChange:r=>es(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=>es(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(qE,{value:r.value,onChange:o=>es(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 es(t,e,(r=t[e.key])==null?void 0:r.id)},children:a.jsx("i",{className:"fa fa-trash"})})})};function hn({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 y=u.current.querySelector(`tbody tr:nth-child(${c+1})`);y&&y.scrollIntoView({behavior:l,block:"nearest",inline:"nearest"})},[i,c,l]);const d=[0];for(let y=0;y<r;y++)d[y+1]=d[y]+(e[y].width||100);const f=(y,g)=>y<r?{position:"sticky",left:`${d[y]}px`,minWidth:`${e[y].width||100}px`,width:`${e[y].width||100}px`,zIndex:g||1}:{},p=e.map((y,g)=>a.jsxs("th",{className:y.headerClass||y.class||"",style:f(g,100),children:[y.formatHeader?y.formatHeader(y.name,y):y.name,y.tooltip&&a.jsx(Hf,{title:y.tooltip,placement:"bottom",children:a.jsx("i",{className:"icon-info-sign"})})]},y.key)),m=t.map((y,g)=>{const h=e.map((x,b)=>{const S=HE[x.type||"text"];return a.jsx(S,{column:x,row:y,style:f(b)},x.key)});return a.jsx("tr",{className:s[g]||"",children:h},g)}),v={};return o&&(v.minWidth=o),a.jsx("div",{className:`${jr.grid} ${i?jr.scroll:""} ${n||""}`,ref:u,children:a.jsxs("table",{className:"table table-bordered",style:v,children:[a.jsx("thead",{children:a.jsx("tr",{children:p})}),a.jsx("tbody",{children:m})]})})}const ad={"header-buttons":"_header-buttons_15oxx_1","allocation-types-grid":"_allocation-types-grid_15oxx_6","vertical-align-center":"_vertical-align-center_15oxx_10"},Tx=({onAddAllocationType:e,onAddRequiredResource:t})=>a.jsxs("div",{className:ad["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"]})]});Tx.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const Px=Ee.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:ad["allocation-types-grid"],children:[a.jsx(hn,{columns:t,rows:n,rowClasses:Array(n.length).fill(ad["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."})]})});Px.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"},Ix=Ee.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(hn,{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))})})]})});Ix.propTypes={columns:q.array.isRequired,rows:q.array.isRequired,onAddDiscountRate:q.func.isRequired,dateErrors:q.array};const WE=(e,t)=>{const n=w.useCallback(m=>{var y,g;t({type:"DELETE_EXCHANGE_RATE",payload:m}),(((g=(y=e==null?void 0:e.resource_details)==null?void 0:y.exchange_rates)==null?void 0:g.discount_rates.filter(h=>h.id!==m))||[]).forEach(h=>{h.begin_date&&h.end_date&&t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:h.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=m=>{t({type:"UPDATE_BASE_RATE",payload:m})},s=(m,v)=>{const y={exchange_rate:v},g={};v?g.rate_error="":g.rate_error="Exchange Rate cannot be empty",t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...y,...g}}})},i=()=>{var y,g;const m=[];return(((g=(y=e==null?void 0:e.resource_details)==null?void 0:y.exchange_rates)==null?void 0:g.discount_rates)||[]).forEach(h=>{h.start_date_error&&m.push(h.start_date_error),h.end_date_error&&m.push(h.end_date_error),h.rate_error&&m.push(h.rate_error)}),m.filter((h,x)=>h&&h!==""&&(!h.includes("overlaps")||m.indexOf(h)===x))},l=m=>{const v=new Date(m);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(v)},c=(m,v,y,g)=>{const h=new Date(m).getTime(),x=new Date(v).getTime(),b=new Date(y).getTime(),S=new Date(g).getTime();return h<=S&&b<=x},u=(m,v)=>{let y="";if(m.begin_date&&m.end_date){const g=v.filter(h=>h.id!==m.id);for(const h of g)if(h.begin_date&&h.end_date&&c(m.begin_date,m.end_date,h.begin_date,h.end_date)){y=`The selected date range (${l(m.begin_date)} to ${l(m.end_date)}) overlaps with an existing discount rate (${l(h.begin_date)} to ${l(h.end_date)})`;break}}return y},d=(m,v,y)=>{var R,O;const g={start_date:"begin_date",end_date:"end_date"},h=k=>{const P=new Date(k);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(P)},x=((O=(R=e==null?void 0:e.resource_details)==null?void 0:R.exchange_rates)==null?void 0:O.discount_rates)||[],b=x.find(k=>k.id===m);if(!b)return;const S={[g[v]]:y},_={},j=v==="end_date",E=()=>{if(!y)return _[`${v}_error`]="Date cannot be empty or invalid",!1;const k=r.find(V=>V.key===v),P=(k==null?void 0:k.minDate)||"1900-01-01",U=(k==null?void 0:k.maxDate)||"2100-12-31",F=j&&b.begin_date?b.begin_date:P;return y<F?(_[`${v}_error`]=`${v.replace("_"," ")} ${h(y)} cannot be before ${h(F)}`,!1):y>U?(_[`${v}_error`]=`${v.replace("_"," ")} cannot be after ${h(U)}`,!1):(_[`${v}_error`]="",!0)},C=()=>{const k=v==="end_date"?y:b.end_date;if(v==="start_date"&&k){if(y>k)return _.end_date_error=`end date ${h(k)} cannot be before ${h(y)}`,!1;_.end_date_error=_.end_date_error||""}return!0},N=()=>{console.log("validating overlaps");const k=v==="start_date"?y:b.begin_date,P=v==="end_date"?y:b.end_date;if(k&&P){const U=u({...b,begin_date:k,end_date:P},x);return _.start_date_error=U,_.end_date_error=U,!U}return!0};if(!E()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:m,changes:{...S,..._}}});return}C(),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:m,changes:{...S,..._}}})},f=()=>{var _,j;const m=((j=(_=e==null?void 0:e.resource_details)==null?void 0:_.exchange_rates)==null?void 0:j.discount_rates)||[];let y=new Date;m.forEach(E=>{if(E.end_date){const C=new Date(E.end_date);C>y&&(y=C)}});const g=new Date(y);g.setDate(g.getDate()+1);const h=g.toISOString().split("T")[0],x=new Date(g);x.setDate(x.getDate()+15);const b=x.toISOString().split("T")[0],S={id:Date.now(),exchange_rate:"1.0",begin_date:h,end_date:b,is_new:!0};t({type:"ADD_EXCHANGE_RATE",payload:S})};return{exchangeRateColumns:r,exchangeRateRows:(()=>{var b,S;const m=(b=e==null?void 0:e.resource_details)==null?void 0:b.exchange_rates,v=(m==null?void 0:m.base_rate)??"",y=(m==null?void 0:m.discount_rates)||[],g=new Date().toISOString().split("T")[0],h=((S=e==null?void 0:e.resource_details)==null?void 0:S.unit_type)||"Resource Units",x=_=>!_||Number(_)===0?"-":`${(1/Number(_)).toFixed(2)} ${h}`;return[{rate_type:"Base Rate",rate:{value:v.toString(),onChange:_=>o(_)},conversion:x(v)},...y.map(_=>{var N;const j=_.is_new||_.begin_date>g,E=j||_.begin_date==="",C=_.is_new||_.end_date>=g||_.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:x(_.exchange_rate),start_date:{value:_.begin_date||"",onChange:R=>d(_.id,"start_date",R),error:_.start_date_error,disabled:!E},end_date:{value:_.end_date||"",onChange:R=>d(_.id,"end_date",R),error:_.end_date_error,disabled:!C},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}=RE(e,t),{isEditing:l,handleEditingChange:c}=TE(),{resourceData:u,loading:d,errors:f,successMessage:p}=r,m=u==null?void 0:u.resource_details,v=u==null?void 0:u.uses_exchange_rates,{allowedActionsOptions:y,resourceTypesOptions:g,unitTypesOptions:h,availableResources:x,availableAllocationTypes:b}=zf(u),{showAddResourceModal:S,setShowAddResourceModal:_,showAddAllocationTypeModal:j,setShowAddAllocationTypeModal:E,selectedNewResource:C,handleSelectNewResource:N,handleSaveResources:R,selectedNewAllocationType:O,handleSelectNewAllocationType:k,handleSaveAllocationType:P,handleAllowedActionChange:U,handleCommentChange:F,handleRequiredResourceChange:V}=kE(u,m,o),{exchangeRateColumns:Z,exchangeRateRows:T,handleAddDiscountRate:L,dateErrors:M}=WE(u,o),W=OE(m,e,t,i,s,o);w.useEffect(()=>{n&&M.length==0?n(W):n(null)},[W,n,M]);const{allocationColumns:B,allocationRows:X}=NE(m,x,C,y,U,F,V),[J,ee]=w.useState(!1);return d?a.jsx(Ur,{}):f.length>0?a.jsx("div",{children:f.map((Q,te)=>a.jsx(Se,{color:"danger",dismissable:!0,children:Q},te))}):u?a.jsxs("div",{className:"edit-resource",children:[p.message&&a.jsx(Se,{color:p.color,dismissable:!0,children:p.message}),a.jsxs("div",{children:[a.jsx("h2",{children:"Resource Properties"}),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(qf,{resourceDetails:m,resourceTypesOptions:g,unitTypesOptions:h,dispatch:o,isDollarValueEditing:J,onDollarValueEditingChange:ee})]}),v&&a.jsx(Ix,{columns:Z,rows:T,onAddDiscountRate:L,dateErrors:M}),a.jsx(Bf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(Tx,{onAddAllocationType:()=>l&&E(!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(Tx,{columns:B,rows:X})}),a.jsx(Xa,{show:S,onClose:()=>j(!1),title:"Add Required Resource",onSave:R,buttonText:"Save",children:a.jsx("div",{children:v.map(Q=>a.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[a.jsx("input",{type:"checkbox",style:{margin:0},checked:C.includes(Q.resource_id),onChange:te=>N(Q.resource_id,te.target.checked)}),Q.resource_name]},Q.resource_id))})}),a.jsx(Xa,{show:_,onClose:()=>E(!1),title:"Add Allocation Type",onSave:P,buttonText:"Save",children:a.jsx(Ro,{label:"Select Allocation Type",options:[{value:"",label:"Select an allocation type to add",disabled:!0},...b.map(Q=>({value:Q.allocation_type_id,label:Q.display_name}))],value:O,onChange:k})})]}):a.jsx("div",{children:"No resource data available."})}Ix.propTypes={resourceId:q.number.isRequired,relativeUrlRoot:q.string.isRequired,setExternalSubmit:q.func};const Ve={error:"error",pending:"pending",success:"success"},Za=e=>e.endDate||e.startDate||(e.actions[0]||{}).entryDate,bm=e=>`${{pi:"01",co_pi:"02",allocation_manager:"03"}[e.role]||"04"} ${e.lastName}, ${e.firstName}`,HE=(e,{grantNumber:t,projectManager:n,requestMasterId:r,requests:o,title:s,users:i},l)=>{t=t||r,o.sort((d,f)=>Za(d)>Za(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:m,requestId:x,startDate:y,status:g}=d,h=f.map(({entryDate:v})=>v).sort()[0].split("T")[0];return WE(e,d,{entryDate:h,grantNumber:t}),{allocationType:p,endDate:m,entryDate:h,requestId:x,startDate:y,status:g}}),selectedRequestId:u||o[0].requestId,status:l,tab:"overview",title:s,users:i.map(({eligibleReason:d,email:f,firstName:p,isEligible:m,lastName:x,organization:y,resources:g,role:h,username:v})=>{const b=g.filter(C=>C.userAccountState=="active"&&C.unitType!="ACCESS Credits"),S=b.map(C=>C.xrasResourceId),j=b.filter(C=>C.resourceProviderState=="pending-active").map(C=>C.xrasResourceId),_=g.filter(C=>C.userAccountState!="active").map(C=>C.xrasResourceId),E={};for(let C of b)E[C.xrasResourceId]=C.resourceUsername;return{eligibility:m,eligibilityReason:d,email:f,firstName:p,initialResourceIds:[...S],initialRole:h,lastName:x,organization:y,resourceAccountPendingIds:j,resourceAccountInactiveIds:_,resourceIds:S,resourceUsernames:E,role:h,username:v}}).sort((d,f)=>bm(d)<bm(f)?-1:1),usersNewRowIndex:0,usersStatus:null},e.projects[t].currentUser=e.projects[t].users.find(({username:d})=>d==e.username)},WE=(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 m={actions:t.map(({actionId:g,actionStatusType:h,actionType:v,allowedOperations:b,approvedStartDate:S,detailAvailable:j,entryDate:_,isRequest:E,requestedStartDate:C,resources:N})=>({actionId:g,allowedOperations:b,detailAvailable:j,date:(_||S||C).split("T")[0],deleteStatus:null,isRequest:E,resources:N.map(ld).sort(Qa),showDeleteModal:!1,status:h,type:v})),allocationType:n,allowedActions:KE(r),endDate:o,entryDate:f,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:p,isMaximize:n=="Maximize",requestId:s,resources:l.map(ld).filter(g=>g.isCredit||g.allocated>0).sort(Qa),resourcesReason:"",returnedForCorrections:!!t.find(g=>g.returnedForCorrections),returnedForCorrectionsNotes:t.map(g=>g.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 x={};for(let g of m.actions)if(["Exchange","Transfer"].includes(g.type)&&["Submitted","Under Review","Incomplete"].includes(g.status)){m.exchangeActionId=g.actionId,m.exchangeActionEditable=g.status==="Incomplete";for(let h of g.resources)x[h.resourceId]=h;for(let h of m.resources)h.resourceId in x&&(h.requested+=x[h.resourceId].requested,delete x[h.resourceId]);m.resources.push(...Object.values(x).map(h=>({...h,isNew:!0})));break}const y=m.allowedActions.Exchange||m.allowedActions.Transfer;if(y){x={};for(let g of y.resources)x[g.resourceId]=g;for(let g of m.resources)g.resourceId in x&&(g.questions=x[g.resourceId].questions||[],g.requires=x[g.resourceId].requires||[])}m.resources.length&&!m.resources.find(g=>g.isCredit)&&m.resources.push(y&&y.resources.find(g=>g.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]=m},KE=e=>{const t={};for(let{actionType:n,allowedResources:r,opportunityId:o,opportunityName:s}of e){let i={name:n,resources:r.map(ld).sort(Qa),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},wm=(e,t)=>e.relativeOrder<t.relativeOrder?-1:1,ld=({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:m,minimumExchange:x,organizationId:y,organizationFaviconUrl:g,organizationName:h,resourceRepositoryKey:v,resourceType:b,startDate:S,unitType:j,userGuideUrl:_,xrasResourceId:E})=>{const C=j=="Yes / No",N=j=="ACCESS Credits";return{allocated:mo(um(t,n)||0,0,"floor"),decimalPlaces:0,endDate:p,exchangeRates:{base:{type:"base",unitCost:C?0:i||m},current:{endDate:c,type:(u||"base").toLowerCase(),unitCost:C?0:l||m}},icon:N?"credit":b.toLowerCase(),isActive:e=="active",isBoolean:C,isCredit:N,isFake:!1,isUnderReview:!1,isNew:!1,minimumExchange:x,name:f.trim(),questions:(s||[]).filter(({isActive:R})=>R).sort(wm).map(R=>({attributeSetId:R.attributeSetId,attributes:R.attributes.sort(wm).map(O=>({required:O.isRequired,resourceAttributeId:O.resourceAttributeId,label:O.attributeName})),fieldType:R.attributeSetRelationType,label:R.attributeSetName,resourceId:E,values:[]})),resourceProvider:{organizationId:y,name:h,favicon:g},requested:mo(um(r,t)||0,0,"floor"),requires:d||[],resourceId:E,resourceRepositoryKey:v,startDate:S,type:b,unit:j,used:mo(o||0,0,"ceil"),userGuideUrl:_}},Sm=(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})))},$x=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Mi=(e,t)=>{const n=Ue(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},on=(e,t)=>e.projects[t.payload.grantNumber],Ue=(e,t)=>e.requests[t.payload.requestId],GE=(e,t)=>on(e,t).users.find(({username:n})=>n==t.payload.username),cd=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,jm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!$x(e.resourceIds,e.initialResourceIds),Mx=()=>document.querySelector("meta[name=csrf-token]").content,YE=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}))},sa=rt("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({})}),Ax=rt("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),Dx=rt("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),ia=rt("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})}),aa=rt("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:Mx()};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})}),la=rt("api/saveResources",async({requestId:e},{getState:t,rejectWithValue:n})=>{const r=t().api.requests[e],o={},s={};for(let{allocated:f,isFake:p,questions:m,requested:x,resourceId:y}of r.resources)if(x!=f&&!p){o[y]={resource_id:y,requested:1,amount:x-f};for(let{attributes:g,values:h,fieldType:v}of m)if(h.length){let b=g[0].resourceAttributeId,S=["drop_down","single_sel","multi_sel"].includes(v),_={resource_attribute_id:v=="multi_sel"?h:S?h[0]:b};S||(_.attribute_value=h[0]),s[b]=_}}const i={authenticity_token:Mx(),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})}),ca=rt("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!$x(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:nd[u.role],initialRole:nd[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})}),Fx=Lr({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null},reducers:{addResource:(e,t)=>{const{resourceId:n}=t.payload,r=Ue(e,t);Sm(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(cd).map(s=>s.resourceId),role:"user",initialResourceIds:[],initialRole:"user",hasChanges:!0,isNew:!0}),n.usersNewRowIndex=n.users.length-1)},closeUsageDetailModal:(e,t)=>{const n=Ue(e,t);n.usageDetail=null,n.usageDetailStatus=null},resetResources:(e,t)=>{const n=Ue(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=Ue(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=Ue(e,t);let s,i=0;for(let l of o.resources)l.resourceId==n&&(l.requested=r,l.requested!=l.allocated&&Sm(l.resourceId,o)),l.isCredit?(s=l,i+=l.allocated*l.exchangeRates.base.unitCost):i-=od(l,"difference");s&&(s.requested=mo(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=Ue(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=GE(e,t);n.role=t.payload.role,jm(n)},toggleActionsModal:(e,t)=>{const n=Ue(e,t);n.showActionsModal=!n.showActionsModal},toggleConfirmModal:(e,t)=>{const n=Ue(e,t);n.showConfirmModal=!n.showConfirmModal},toggleDeleteModal:(e,t)=>{const n=Mi(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=Ue(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(cd).map(({resourceId:u})=>u):[];jm(c)}}},extraReducers:e=>{e.addCase(sa.pending,t=>{t.projectListLoading=!0}).addCase(sa.fulfilled,(t,n)=>{n.payload.projectsList.sort((r,o)=>Za(r.requests[0])>Za(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&&HE(t,r,d),{grantNumber:o||s,status:d,title:c}}),t.projectListLoading=!1}).addCase(sa.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(Ax.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase(Dx.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(ia.pending,(t,n)=>{const r=Ue(t,{payload:n.meta.arg});r.usageDetailStatus=Ve.pending}).addCase(ia.fulfilled,(t,n)=>{const r=Ue(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Ve.success}).addCase(ia.rejected,(t,n)=>{const r=Ue(t,n);r.usageDetailStatus=Ve.error}).addCase(aa.pending,(t,n)=>{const r=Mi(t,{payload:n.meta.arg});r.deleteStatus=Ve.pending}).addCase(aa.fulfilled,(t,n)=>{const r=Ue(t,n),o=Mi(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=Ve.success,o.showDeleteModal=!1}).addCase(aa.rejected,(t,n)=>{const r=Mi(t,n);r.deleteStatus=Ve.error}).addCase(la.pending,(t,n)=>{const r=Ue(t,{payload:n.meta.arg});r.exchangeStatus=Ve.pending,r.showResourcesModal=!1}).addCase(la.fulfilled,(t,n)=>{const r=Ue(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Ve.success}).addCase(la.rejected,(t,n)=>{const r=Ue(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!0,r.exchangeErrors=n.payload.errors,r.exchangeStatus=Ve.error}).addCase(ca.pending,(t,n)=>{const r=on(t,{payload:n.meta.arg});r.usersStatus=Ve.pending}).addCase(ca.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=Ve.success}).addCase(ca.rejected,(t,n)=>{const r=on(t,n);r.usersStatus=Ve.error})}}),QE=e=>e.api.error,XE=e=>e.api.projectsList,ZE=e=>e.api.projectListLoading,JE=(e,t)=>on(e.api,{payload:{grantNumber:t}}),eR=(e,t)=>Ue(e.api,{payload:{requestId:t}}),tR=e=>e.api.username,{addResource:nR,addUser:rR,closeUsageDetailModal:oR,hideAlert:oD,resetResources:sR,resetUsers:iR,setRequest:aR,setResourceQuestionValues:lR,setResourceRequest:cR,setResourcesReason:uR,setTab:dR,setUserRole:fR,toggleActionsModal:pR,toggleConfirmModal:hR,toggleDeleteModal:mR,toggleResourcesModal:gR,toggleUsersResources:vR}=Fx.actions,yR=Fx.reducer,xR=e=>{const t=K(QE),n=K(ZE),r=K(XE),o=ge();return w.useEffect(()=>{o(sa(e))},[]),{error:t,loading:n,projects:r}},kt=(e,t)=>{const n=K(s=>JE(s,e)),r=K(tR),o=ge();return w.useEffect(()=>{!n&&!t&&o(Ax({grantNumber:e}))},[t]),{project:n,addUser:s=>o(rR({grantNumber:e,user:s})),resetUsers:()=>o(iR({grantNumber:e})),saveUsers:()=>o(ca({grantNumber:e})),setRequest:s=>o(aR({grantNumber:e,requestId:s})),setTab:s=>o(dR({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(fR({grantNumber:e,username:s,role:i})),statuses:Ve,toggleUsersResources:(s,i,l)=>o(vR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},ut=(e,t)=>{const n=K(o=>eR(o,e)),r=ge();return w.useEffect(()=>{n||r(Dx({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(nR({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(oR({requestId:e})),deleteAction:o=>r(aa({actionId:o,requestId:e})),openUsageDetailModal:o=>r(ia({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(sR({requestId:e})),saveResources:()=>r(la({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(lR({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(cR({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(uR({requestId:e,reason:o})),statuses:Ve,toggleActionsModal:()=>r(pR({requestId:e})),toggleConfirmModal:()=>r(hR({requestId:e})),toggleDeleteModal:o=>r(mR({requestId:e,actionId:o})),toggleResourcesModal:()=>r(gR({requestId:e}))}},bR="_project_qqnbz_1",wR="_expand_qqnbz_5",_m={project:bR,expand:wR},SR="_returnedForCorrectionsNotes_jujbd_1",jR={returnedForCorrectionsNotes:SR};function Lx(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 Ja={prefix:String(Math.round(Math.random()*1e10)),current:0},Ux=Re.createContext(Ja),_R=Re.createContext(!1);let CR=!!(typeof window<"u"&&window.document&&window.document.createElement),Vc=new WeakMap;function ER(e=!1){let t=w.useContext(Ux),n=w.useRef(null);if(n.current===null&&!e){var r,o;let s=(o=Re.__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=Vc.get(s);i==null?Vc.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==i.state&&(t.current=i.id,Vc.delete(s))}n.current=++t.current}return n.current}function RR(e){let t=w.useContext(Ux);t===Ja&&!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=ER(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function NR(e){let t=Re.useId(),[n]=w.useState(PR()),r=n?"react-aria":`react-aria${Ja.prefix}`;return e||`${r}-${t}`}const Vx=typeof Re.useId=="function"?NR:RR;function kR(){return!1}function OR(){return!0}function TR(e){return()=>{}}function PR(){return typeof Re.useSyncExternalStore=="function"?Re.useSyncExternalStore(TR,kR,OR):w.useContext(_R)}const IR=w.createContext(null),Uo=IR,$R=w.createContext(null),$r=(e,t=null)=>e!=null?String(e):t||null,Ln=$R;function MR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function Te(e){const t=MR(e);return w.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const Cm=e=>!e||typeof e=="function"?e:t=>{e.current=t};function AR(e,t){const n=Cm(e),r=Cm(t);return o=>{n&&n(o),r&&r(o)}}function gn(e,t){return w.useMemo(()=>AR(e,t),[e,t])}function Wf({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=gn(s,e.ref),u=w.cloneElement(e,{ref:c});return t?u:o||!i.current&&r?null:u}const DR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],FR=["activeKey","getControlledId","getControllerId"],LR=["as"];function ud(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 zx(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,m=ud(e,DR);const x=w.useContext(Uo);if(!x)return[Object.assign({},m,{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:y,getControlledId:g,getControllerId:h}=x,v=ud(x,FR),b=$r(n);return[Object.assign({},m,{role:i,id:g(n),"aria-labelledby":h(n)}),{eventKey:n,isActive:t==null&&b!=null?$r(y)===b:t,transition:o||v.transition,mountOnEnter:r??v.mountOnEnter,unmountOnExit:s??v.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}]}const Bx=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=ud(e,LR);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,transition:x=Wf}]=zx(r);return a.jsx(Uo.Provider,{value:null,children:a.jsx(Ln.Provider,{value:null,children:a.jsx(x,{in:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,children:a.jsx(n,Object.assign({},o,{ref:t,hidden:!s,"aria-hidden":!s}))})})})});Bx.displayName="TabPanel";const qx=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=Lx(o,s,r),p=Vx(t),m=w.useMemo(()=>n||((y,g)=>p?`${p}-${g}-${y}`:null),[p,n]),x=w.useMemo(()=>({onSelect:f,activeKey:d,transition:i,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:y=>m(y,"tabpane"),getControllerId:y=>m(y,"tab")}),[f,d,i,l,c,m]);return a.jsx(Uo.Provider,{value:x,children:a.jsx(Ln.Provider,{value:f||null,children:u})})};qx.Panel=Bx;const Hx=qx;var Wx={exports:{}};/*!
|
|
54
|
+
Please proceed with caution.`,children:a.jsx(Px,{columns:B,rows:X})}),a.jsx(Xa,{show:S,onClose:()=>_(!1),title:"Add Required Resource",onSave:R,buttonText:"Save",children:a.jsx("div",{children:x.map(Q=>a.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[a.jsx("input",{type:"checkbox",style:{margin:0},checked:C.includes(Q.resource_id),onChange:te=>N(Q.resource_id,te.target.checked)}),Q.resource_name]},Q.resource_id))})}),a.jsx(Xa,{show:j,onClose:()=>E(!1),title:"Add Allocation Type",onSave:P,buttonText:"Save",children:a.jsx(Ro,{label:"Select Allocation Type",options:[{value:"",label:"Select an allocation type to add",disabled:!0},...b.map(Q=>({value:Q.allocation_type_id,label:Q.display_name}))],value:O,onChange:k})})]}):a.jsx("div",{children:"No resource data available."})}$x.propTypes={resourceId:q.number.isRequired,relativeUrlRoot:q.string.isRequired,setExternalSubmit:q.func};const Ve={error:"error",pending:"pending",success:"success"},Za=e=>e.endDate||e.startDate||(e.actions[0]||{}).entryDate,wm=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)=>Za(d)>Za(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:m,requestId:v,startDate:y,status:g}=d,h=f.map(({entryDate:x})=>x).sort()[0].split("T")[0];return GE(e,d,{entryDate:h,grantNumber:t}),{allocationType:p,endDate:m,entryDate:h,requestId:v,startDate:y,status:g}}),selectedRequestId:u||o[0].requestId,status:l,tab:"overview",title:s,users:i.map(({eligibleReason:d,email:f,firstName:p,isEligible:m,lastName:v,organization:y,resources:g,role:h,username:x})=>{const b=g.filter(C=>C.userAccountState=="active"&&C.unitType!="ACCESS Credits"),S=b.map(C=>C.xrasResourceId),_=b.filter(C=>C.resourceProviderState=="pending-active").map(C=>C.xrasResourceId),j=g.filter(C=>C.userAccountState!="active").map(C=>C.xrasResourceId),E={};for(let C of b)E[C.xrasResourceId]=C.resourceUsername;return{eligibility:m,eligibilityReason:d,email:f,firstName:p,initialResourceIds:[...S],initialRole:h,lastName:v,organization:y,resourceAccountPendingIds:_,resourceAccountInactiveIds:j,resourceIds:S,resourceUsernames:E,role:h,username:x}}).sort((d,f)=>wm(d)<wm(f)?-1:1),usersNewRowIndex:0,usersStatus:null},e.projects[t].currentUser=e.projects[t].users.find(({username:d})=>d==e.username)},GE=(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 m={actions:t.map(({actionId:g,actionStatusType:h,actionType:x,allowedOperations:b,approvedStartDate:S,detailAvailable:_,entryDate:j,isRequest:E,requestedStartDate:C,resources:N})=>({actionId:g,allowedOperations:b,detailAvailable:_,date:(j||S||C).split("T")[0],deleteStatus:null,isRequest:E,resources:N.map(ld).sort(Qa),showDeleteModal:!1,status:h,type:x})),allocationType:n,allowedActions:YE(r),endDate:o,entryDate:f,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:p,isMaximize:n=="Maximize",requestId:s,resources:l.map(ld).filter(g=>g.isCredit||g.allocated>0).sort(Qa),resourcesReason:"",returnedForCorrections:!!t.find(g=>g.returnedForCorrections),returnedForCorrectionsNotes:t.map(g=>g.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 v={};for(let g of m.actions)if(["Exchange","Transfer"].includes(g.type)&&["Submitted","Under Review","Incomplete"].includes(g.status)){m.exchangeActionId=g.actionId,m.exchangeActionEditable=g.status==="Incomplete";for(let h of g.resources)v[h.resourceId]=h;for(let h of m.resources)h.resourceId in v&&(h.requested+=v[h.resourceId].requested,delete v[h.resourceId]);m.resources.push(...Object.values(v).map(h=>({...h,isNew:!0})));break}const y=m.allowedActions.Exchange||m.allowedActions.Transfer;if(y){v={};for(let g of y.resources)v[g.resourceId]=g;for(let g of m.resources)g.resourceId in v&&(g.questions=v[g.resourceId].questions||[],g.requires=v[g.resourceId].requires||[])}m.resources.length&&!m.resources.find(g=>g.isCredit)&&m.resources.push(y&&y.resources.find(g=>g.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]=m},YE=e=>{const t={};for(let{actionType:n,allowedResources:r,opportunityId:o,opportunityName:s}of e){let i={name:n,resources:r.map(ld).sort(Qa),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},Sm=(e,t)=>e.relativeOrder<t.relativeOrder?-1:1,ld=({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:m,minimumExchange:v,organizationId:y,organizationFaviconUrl:g,organizationName:h,resourceRepositoryKey:x,resourceType:b,startDate:S,unitType:_,userGuideUrl:j,xrasResourceId:E})=>{const C=_=="Yes / No",N=_=="ACCESS Credits";return{allocated:mo(dm(t,n)||0,0,"floor"),decimalPlaces:0,endDate:p,exchangeRates:{base:{type:"base",unitCost:C?0:i||m},current:{endDate:c,type:(u||"base").toLowerCase(),unitCost:C?0:l||m}},icon:N?"credit":b.toLowerCase(),isActive:e=="active",isBoolean:C,isCredit:N,isFake:!1,isUnderReview:!1,isNew:!1,minimumExchange:v,name:f.trim(),questions:(s||[]).filter(({isActive:R})=>R).sort(Sm).map(R=>({attributeSetId:R.attributeSetId,attributes:R.attributes.sort(Sm).map(O=>({required:O.isRequired,resourceAttributeId:O.resourceAttributeId,label:O.attributeName})),fieldType:R.attributeSetRelationType,label:R.attributeSetName,resourceId:E,values:[]})),resourceProvider:{organizationId:y,name:h,favicon:g},requested:mo(dm(r,t)||0,0,"floor"),requires:d||[],resourceId:E,resourceRepositoryKey:x,startDate:S,type:b,unit:_,used:mo(o||0,0,"ceil"),userGuideUrl:j}},_m=(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})))},Ax=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Mi=(e,t)=>{const n=Ue(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},rn=(e,t)=>e.projects[t.payload.grantNumber],Ue=(e,t)=>e.requests[t.payload.requestId],QE=(e,t)=>rn(e,t).users.find(({username:n})=>n==t.payload.username),cd=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,Cm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!Ax(e.resourceIds,e.initialResourceIds),Mx=()=>document.querySelector("meta[name=csrf-token]").content,XE=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}))},ia=He("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({})}),Dx=He("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),Fx=He("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),aa=He("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})}),la=He("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:Mx()};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})}),ca=He("api/saveResources",async({requestId:e},{getState:t,rejectWithValue:n})=>{const r=t().api.requests[e],o={},s={};for(let{allocated:f,isFake:p,questions:m,requested:v,resourceId:y}of r.resources)if(v!=f&&!p){o[y]={resource_id:y,requested:1,amount:v-f};for(let{attributes:g,values:h,fieldType:x}of m)if(h.length){let b=g[0].resourceAttributeId,S=["drop_down","single_sel","multi_sel"].includes(x),j={resource_attribute_id:x=="multi_sel"?h:S?h[0]:b};S||(j.attribute_value=h[0]),s[b]=j}}const i={authenticity_token:Mx(),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})}),ua=He("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!Ax(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:nd[u.role],initialRole:nd[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})}),Lx=Lr({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null},reducers:{addResource:(e,t)=>{const{resourceId:n}=t.payload,r=Ue(e,t);_m(n,r)},addUser:(e,t)=>{const n=rn(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(cd).map(s=>s.resourceId),role:"user",initialResourceIds:[],initialRole:"user",hasChanges:!0,isNew:!0}),n.usersNewRowIndex=n.users.length-1)},closeUsageDetailModal:(e,t)=>{const n=Ue(e,t);n.usageDetail=null,n.usageDetailStatus=null},resetResources:(e,t)=>{const n=Ue(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=rn(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=rn(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=Ue(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=Ue(e,t);let s,i=0;for(let l of o.resources)l.resourceId==n&&(l.requested=r,l.requested!=l.allocated&&_m(l.resourceId,o)),l.isCredit?(s=l,i+=l.allocated*l.exchangeRates.base.unitCost):i-=od(l,"difference");s&&(s.requested=mo(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=Ue(e,t);n.resourcesReason=t.payload.reason},setTab:(e,t)=>{const n=rn(e,t);n&&(n.tab=t.payload.tab)},setUserRole:(e,t)=>{const n=QE(e,t);n.role=t.payload.role,Cm(n)},toggleActionsModal:(e,t)=>{const n=Ue(e,t);n.showActionsModal=!n.showActionsModal},toggleConfirmModal:(e,t)=>{const n=Ue(e,t);n.showConfirmModal=!n.showConfirmModal},toggleDeleteModal:(e,t)=>{const n=Mi(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=Ue(e,t);n.showResourcesModal=!n.showResourcesModal},toggleUsersResources:(e,t)=>{const n=rn(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(cd).map(({resourceId:u})=>u):[];Cm(c)}}},extraReducers:e=>{e.addCase(ia.pending,t=>{t.projectListLoading=!0}).addCase(ia.fulfilled,(t,n)=>{n.payload.projectsList.sort((r,o)=>Za(r.requests[0])>Za(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(ia.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(Dx.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase(Fx.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(aa.pending,(t,n)=>{const r=Ue(t,{payload:n.meta.arg});r.usageDetailStatus=Ve.pending}).addCase(aa.fulfilled,(t,n)=>{const r=Ue(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Ve.success}).addCase(aa.rejected,(t,n)=>{const r=Ue(t,n);r.usageDetailStatus=Ve.error}).addCase(la.pending,(t,n)=>{const r=Mi(t,{payload:n.meta.arg});r.deleteStatus=Ve.pending}).addCase(la.fulfilled,(t,n)=>{const r=Ue(t,n),o=Mi(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=Ve.success,o.showDeleteModal=!1}).addCase(la.rejected,(t,n)=>{const r=Mi(t,n);r.deleteStatus=Ve.error}).addCase(ca.pending,(t,n)=>{const r=Ue(t,{payload:n.meta.arg});r.exchangeStatus=Ve.pending,r.showResourcesModal=!1}).addCase(ca.fulfilled,(t,n)=>{const r=Ue(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Ve.success}).addCase(ca.rejected,(t,n)=>{const r=Ue(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!0,r.exchangeErrors=n.payload.errors,r.exchangeStatus=Ve.error}).addCase(ua.pending,(t,n)=>{const r=rn(t,{payload:n.meta.arg});r.usersStatus=Ve.pending}).addCase(ua.fulfilled,(t,n)=>{const r=rn(t,n);r.users=r.users.map(o=>({...o,initialResourceIds:[...o.resourceIds],initialRole:o.role,hasChanges:!1,isNew:!1})),r.usersStatus=Ve.success}).addCase(ua.rejected,(t,n)=>{const r=rn(t,n);r.usersStatus=Ve.error})}}),ZE=e=>e.api.error,JE=e=>e.api.projectsList,eR=e=>e.api.projectListLoading,tR=(e,t)=>rn(e.api,{payload:{grantNumber:t}}),nR=(e,t)=>Ue(e.api,{payload:{requestId:t}}),rR=e=>e.api.username,{addResource:oR,addUser:sR,closeUsageDetailModal:iR,hideAlert:uD,resetResources:aR,resetUsers:lR,setRequest:cR,setResourceQuestionValues:uR,setResourceRequest:dR,setResourcesReason:fR,setTab:pR,setUserRole:hR,toggleActionsModal:mR,toggleConfirmModal:gR,toggleDeleteModal:vR,toggleResourcesModal:yR,toggleUsersResources:xR}=Lx.actions,bR=Lx.reducer,wR=e=>{const t=H(ZE),n=H(eR),r=H(JE),o=ge();return w.useEffect(()=>{o(ia(e))},[]),{error:t,loading:n,projects:r}},kt=(e,t)=>{const n=H(s=>tR(s,e)),r=H(rR),o=ge();return w.useEffect(()=>{!n&&!t&&o(Dx({grantNumber:e}))},[t]),{project:n,addUser:s=>o(sR({grantNumber:e,user:s})),resetUsers:()=>o(lR({grantNumber:e})),saveUsers:()=>o(ua({grantNumber:e})),setRequest:s=>o(cR({grantNumber:e,requestId:s})),setTab:s=>o(pR({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(hR({grantNumber:e,username:s,role:i})),statuses:Ve,toggleUsersResources:(s,i,l)=>o(xR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},ut=(e,t)=>{const n=H(o=>nR(o,e)),r=ge();return w.useEffect(()=>{n||r(Fx({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(oR({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(iR({requestId:e})),deleteAction:o=>r(la({actionId:o,requestId:e})),openUsageDetailModal:o=>r(aa({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(aR({requestId:e})),saveResources:()=>r(ca({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(uR({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(dR({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(fR({requestId:e,reason:o})),statuses:Ve,toggleActionsModal:()=>r(mR({requestId:e})),toggleConfirmModal:()=>r(gR({requestId:e})),toggleDeleteModal:o=>r(vR({requestId:e,actionId:o})),toggleResourcesModal:()=>r(yR({requestId:e}))}},SR="_project_qqnbz_1",_R="_expand_qqnbz_5",jm={project:SR,expand:_R},CR="_returnedForCorrectionsNotes_jujbd_1",jR={returnedForCorrectionsNotes:CR};function Ux(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 Ja={prefix:String(Math.round(Math.random()*1e10)),current:0},Vx=Ee.createContext(Ja),ER=Ee.createContext(!1);let RR=!!(typeof window<"u"&&window.document&&window.document.createElement),Vc=new WeakMap;function NR(e=!1){let t=w.useContext(Vx),n=w.useRef(null);if(n.current===null&&!e){var r,o;let s=(o=Ee.__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=Vc.get(s);i==null?Vc.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==i.state&&(t.current=i.id,Vc.delete(s))}n.current=++t.current}return n.current}function kR(e){let t=w.useContext(Vx);t===Ja&&!RR&&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=NR(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function OR(e){let t=Ee.useId(),[n]=w.useState($R()),r=n?"react-aria":`react-aria${Ja.prefix}`;return e||`${r}-${t}`}const zx=typeof Ee.useId=="function"?OR:kR;function TR(){return!1}function PR(){return!0}function IR(e){return()=>{}}function $R(){return typeof Ee.useSyncExternalStore=="function"?Ee.useSyncExternalStore(IR,TR,PR):w.useContext(ER)}const AR=w.createContext(null),Uo=AR,MR=w.createContext(null),$r=(e,t=null)=>e!=null?String(e):t||null,Ln=MR;function DR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function Te(e){const t=DR(e);return w.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const Em=e=>!e||typeof e=="function"?e:t=>{e.current=t};function FR(e,t){const n=Em(e),r=Em(t);return o=>{n&&n(o),r&&r(o)}}function mn(e,t){return w.useMemo(()=>FR(e,t),[e,t])}function Wf({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 LR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],UR=["activeKey","getControlledId","getControllerId"],VR=["as"];function ud(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 Bx(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,m=ud(e,LR);const v=w.useContext(Uo);if(!v)return[Object.assign({},m,{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:y,getControlledId:g,getControllerId:h}=v,x=ud(v,UR),b=$r(n);return[Object.assign({},m,{role:i,id:g(n),"aria-labelledby":h(n)}),{eventKey:n,isActive:t==null&&b!=null?$r(y)===b:t,transition:o||x.transition,mountOnEnter:r??x.mountOnEnter,unmountOnExit:s??x.unmountOnExit,onEnter:l,onEntering:c,onEntered:u,onExit:d,onExiting:f,onExited:p}]}const qx=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=ud(e,VR);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,transition:v=Wf}]=Bx(r);return a.jsx(Uo.Provider,{value:null,children:a.jsx(Ln.Provider,{value:null,children:a.jsx(v,{in:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,children:a.jsx(n,Object.assign({},o,{ref:t,hidden:!s,"aria-hidden":!s}))})})})});qx.displayName="TabPanel";const Hx=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=Ux(o,s,r),p=zx(t),m=w.useMemo(()=>n||((y,g)=>p?`${p}-${g}-${y}`:null),[p,n]),v=w.useMemo(()=>({onSelect:f,activeKey:d,transition:i,mountOnEnter:l||!1,unmountOnExit:c||!1,getControlledId:y=>m(y,"tabpane"),getControllerId:y=>m(y,"tab")}),[f,d,i,l,c,m]);return a.jsx(Uo.Provider,{value:v,children:a.jsx(Ln.Provider,{value:f||null,children:u})})};Hx.Panel=qx;const Wx=Hx;var Kx={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})()})(Wx);var UR=Wx.exports;const oe=Js(UR);function Kf(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 el(e,t){return el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},el(e,t)}function VR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,el(e,t)}const Em={disabled:!1},Kx=Re.createContext(null);var zR=function(t){return t.scrollTop},fs="unmounted",Gn="exited",jn="entering",Xn="entered",tl="exiting",qn=function(e){VR(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=Gn,s.appearStatus=jn):c=Xn:r.unmountOnExit||r.mountOnEnter?c=fs:c=Gn,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===fs?{status:Gn}: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!==jn&&i!==Xn&&(s=jn):(i===jn||i===Xn)&&(s=tl)}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===jn){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Sr.findDOMNode(this);i&&zR(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Gn&&this.setState({status:fs})},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||Em.disabled){this.safeSetState({status:Xn},function(){s.props.onEntered(u)});return}this.props.onEnter(u,d),this.safeSetState({status:jn},function(){s.props.onEntering(u,d),s.onTransitionEnd(p,function(){s.safeSetState({status:Xn},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||Em.disabled){this.safeSetState({status:Gn},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:tl},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Gn},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===fs)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=Kf(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Re.createElement(Kx.Provider,{value:null},typeof i=="function"?i(o,l):Re.cloneElement(Re.Children.only(i),l))},t}(Re.Component);qn.contextType=Kx;qn.propTypes={};function Hr(){}qn.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};qn.UNMOUNTED=fs;qn.EXITED=Gn;qn.ENTERING=jn;qn.ENTERED=Xn;qn.EXITING=tl;const BR=qn;function Vo(e){return e&&e.ownerDocument||document}function qR(e){var t=Vo(e);return t&&t.defaultView||window}function HR(e,t){return qR(e).getComputedStyle(e,t)}var WR=/([A-Z])/g;function KR(e){return e.replace(WR,"-$1").toLowerCase()}var GR=/^ms-/;function Ai(e){return KR(e).replace(GR,"-ms-")}var YR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function QR(e){return!!(e&&YR.test(e))}function Pn(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Ai(t))||HR(e).getPropertyValue(Ai(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Ai(o)):QR(o)?r+=o+"("+s+") ":n+=Ai(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const zo=!!(typeof window<"u"&&window.document&&window.document.createElement);var dd=!1,fd=!1;try{var zc={get passive(){return dd=!0},get once(){return fd=dd=!0}};zo&&(window.addEventListener("test",zc,zc),window.removeEventListener("test",zc,!0))}catch{}function Gf(e,t,n,r){if(r&&typeof r!="boolean"&&!fd){var o=r.once,s=r.capture,i=n;!fd&&o&&(i=n.__once||function l(c){this.removeEventListener(t,l,s),n.call(this,c)},n.__once=i),e.addEventListener(t,i,dd?r:s)}e.addEventListener(t,n,r)}function pd(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 Nn(e,t,n,r){return Gf(e,t,n,r),function(){pd(e,t,n,r)}}function XR(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 ZR(e){var t=Pn(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function JR(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||XR(e,"transitionend",!0)},t+n),s=Nn(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Gx(e,t,n,r){n==null&&(n=ZR(e)||0);var o=JR(e,n,r),s=Nn(e,"transitionend",t);return function(){o(),s()}}function Rm(e,t){const n=Pn(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Yx(e,t){const n=Rm(e,"transitionDuration"),r=Rm(e,"transitionDelay"),o=Gx(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Qx(e){e.offsetHeight}function nl(e){return e&&"setState"in e?Sr.findDOMNode(e):e??null}const eN=Re.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=gn(f,c),m=_=>{p(nl(_))},x=_=>E=>{_&&f.current&&_(f.current,E)},y=w.useCallback(x(e),[e]),g=w.useCallback(x(t),[t]),h=w.useCallback(x(n),[n]),v=w.useCallback(x(r),[r]),b=w.useCallback(x(o),[o]),S=w.useCallback(x(s),[s]),j=w.useCallback(x(i),[i]);return a.jsx(BR,{ref:d,...u,onEnter:y,onEntered:h,onEntering:g,onExit:v,onExited:S,onExiting:b,addEndListener:j,nodeRef:f,children:typeof l=="function"?(_,E)=>l(_,{...E,ref:m}):Re.cloneElement(l,{ref:m})})}),Xx=eN,tN={[jn]:"show",[Xn]:"show"},Zx=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)=>{Qx(c),r==null||r(c,u)},[r]);return a.jsx(Xx,{ref:s,addEndListener:Yx,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:oe("fade",e,t.props.className,tN[c],n[c])})})});Zx.displayName="Fade";const No=Zx;function Yf(e){return typeof e=="boolean"?e?No:Wf:e}const Jx=({transition:e,...t})=>a.jsx(Hx,{...t,transition:Yf(e)});Jx.displayName="TabContainer";const nN=Jx,rN=["xxl","xl","lg","md","sm","xs"],oN="xs",e0=w.createContext({prefixes:{},breakpoints:rN,minBreakpoint:oN});function he(e,t){const{prefixes:n}=w.useContext(e0);return e||n[t]||t}function Al(){const{dir:e}=w.useContext(e0);return e==="rtl"}const t0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"tab-content"),a.jsx(n,{ref:o,className:oe(e,t),...r})));t0.displayName="TabContent";const n0=t0,r0=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:m,mountOnEnter:x,unmountOnExit:y,transition:g=No}]=zx({...n,transition:Yf(t)}),h=he(e,"tab-pane");return a.jsx(Uo.Provider,{value:null,children:a.jsx(Ln.Provider,{value:null,children:a.jsx(g,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,mountOnEnter:x,unmountOnExit:y,children:a.jsx(s,{...i,ref:r,className:oe(o,h,l&&"active")})})})})});r0.displayName="TabPane";const o0=r0,sN={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},s0=()=>{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")};s0.propTypes=sN;const ts=Object.assign(s0,{Container:nN,Content:n0,Pane:o0});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 Nm(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function iN(e){var t=aN(e,"string");return typeof t=="symbol"?t:String(t)}function aN(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 i0(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 Dl(e,t){return Object.keys(t).reduce(function(n,r){var o,s=n,i=s[Nm(r)],l=s[r],c=Kf(s,[Nm(r),r].map(iN)),u=t[r],d=i0(l,i,e[u]),f=d[0],p=d[1];return Y({},c,(o={},o[r]=f,o[u]=p,o))},e)}var km={exports:{}},hd={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>>",m=f||c;if(l[c]==null)return i?new Error("Required "+d+" `"+m+"` was not specified "+("in `"+p+"`.")):null;for(var x=arguments.length,y=Array(x>6?x-6:0),g=6;g<x;g++)y[g-6]=arguments[g];return r.apply(void 0,[l,c,p,d,m].concat(y))}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}e.exports=t.default})(hd,hd.exports);var lN=hd.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=lN,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 m=null;return l.forEach(function(x){if(m==null){var y=x.apply(void 0,f);y!=null&&(m=y)}}),m}return(0,r.default)(u)}e.exports=t.default})(km,km.exports);var cN=Function.prototype.bind.call(Function.prototype.call,[].slice);function _n(e,t){return cN(e.querySelectorAll(t))}function a0(){const[,e]=w.useReducer(t=>!t,!1);return e}const l0=w.createContext(null);l0.displayName="NavContext";const Qf=l0,uN="data-rr-ui-",dN="rrUi";function Bo(e){return`${uN}${e}`}function fN(e){return`${dN}${e}`}const pN=["as","disabled"];function hN(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 mN(e){return!e||e.trim()==="#"}function Xf({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"&&mN(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 Zf=w.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=hN(e,pN);const[s,{tagName:i}]=Xf(Object.assign({tagName:n,disabled:r},o));return a.jsx(i,Object.assign({},o,s,{ref:t}))});Zf.displayName="Button";const gN=["as","active","eventKey"];function vN(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 c0({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=w.useContext(Ln),l=w.useContext(Qf),c=w.useContext(Uo);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[Bo("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 u0=w.forwardRef((e,t)=>{let{as:n=Zf,active:r,eventKey:o}=e,s=vN(e,gN);const[i,l]=c0(Object.assign({key:$r(o,s.href),active:r},s));return i[Bo("active")]=l.isActive,a.jsx(n,Object.assign({},s,i,{ref:t}))});u0.displayName="NavItem";const yN=u0,xN=["as","onSelect","activeKey","role","onKeyDown"];function bN(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 Om=()=>{},Tm=Bo("event-key"),d0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=bN(e,xN);const c=a0(),u=w.useRef(!1),d=w.useContext(Ln),f=w.useContext(Uo);let p,m;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,m=f.getControllerId);const x=w.useRef(null),y=b=>{const S=x.current;if(!S)return null;const j=_n(S,`[${Tm}]:not([aria-disabled=true])`),_=S.querySelector("[aria-selected=true]");if(!_||_!==document.activeElement)return null;const E=j.indexOf(_);if(E===-1)return null;let C=E+b;return C>=j.length&&(C=0),C<0&&(C=j.length-1),j[C]},g=(b,S)=>{b!=null&&(r==null||r(b,S),d==null||d(b,S))},h=b=>{if(i==null||i(b),!f)return;let S;switch(b.key){case"ArrowLeft":case"ArrowUp":S=y(-1);break;case"ArrowRight":case"ArrowDown":S=y(1);break;default:return}S&&(b.preventDefault(),g(S.dataset[fN("EventKey")]||null,b),u.current=!0,c())};w.useEffect(()=>{if(x.current&&u.current){const b=x.current.querySelector(`[${Tm}][aria-selected=true]`);b==null||b.focus()}u.current=!1});const v=gn(t,x);return a.jsx(Ln.Provider,{value:g,children:a.jsx(Qf.Provider,{value:{role:s,activeKey:$r(o),getControlledId:p||Om,getControllerId:m||Om},children:a.jsx(n,Object.assign({},l,{onKeyDown:h,ref:v,role:s}))})})});d0.displayName="Nav";const wN=Object.assign(d0,{Item:yN}),f0=w.createContext(null);f0.displayName="NavbarContext";const p0=f0,h0=w.createContext(null);h0.displayName="CardHeaderContext";const SN=h0,m0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"nav-item"),a.jsx(n,{ref:o,className:oe(e,t),...r})));m0.displayName="NavItem";const g0=m0;function rl(){return w.useState(null)}function jN(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 Jf(){const e=w.useRef(!0),t=w.useRef(()=>e.current);return w.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function v0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const _N=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",CN=typeof document<"u",ol=CN||_N?w.useLayoutEffect:w.useEffect,EN=["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}function NN(e){return!e||e.trim()==="#"}const y0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=RN(e,EN);const[o]=Xf(Object.assign({tagName:"a"},r)),s=Te(i=>{o.onKeyDown(i),n==null||n(i)});return NN(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}))});y0.displayName="Anchor";const x0=y0,b0=w.forwardRef(({bsPrefix:e,className:t,as:n=x0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=he(e,"nav-link");const[c,u]=c0({key:$r(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")})});b0.displayName="NavLink";const w0=b0,S0=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}=Dl(e,{activeKey:"onSelect"}),p=he(r,"nav");let m,x,y=!1;const g=w.useContext(p0),h=w.useContext(SN);return g?(m=g.bsPrefix,y=l??!0):h&&({cardHeaderBsPrefix:x}=h),a.jsx(wN,{as:n,ref:t,activeKey:d,className:oe(u,{[p]:!y,[`${m}-nav`]:y,[`${m}-nav-scroll`]:y&&c,[`${x}-${o}`]:!!x,[`${p}-${o}`]:!!o,[`${p}-fill`]:s,[`${p}-justified`]:i}),...f})});S0.displayName="Nav";const kN=Object.assign(S0,{Item:g0,Link:w0});function Pm(e,t){let n=0;return w.Children.map(e,r=>w.isValidElement(r)?t(r,n++):r)}function ON(e,t){let n=0;w.Children.forEach(e,r=>{w.isValidElement(r)&&t(r,n++)})}function TN(e){let t;return ON(e,n=>{t==null&&(t=n.props.eventKey)}),t}function PN(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(g0,{as:"li",role:"presentation",children:a.jsx(w0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const j0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=TN(l),...u}=Dl(e,{activeKey:"onSelect"});return a.jsxs(Hx,{id:t,activeKey:c,onSelect:n,transition:Yf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(kN,{...u,role:"tablist",as:"ul",variant:i,children:Pm(l,PN)}),a.jsx(n0,{children:Pm(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(o0,{...f})})})]})};j0.displayName="Tabs";const IN=j0,$N=w.createContext(null),Fl=$N;var Im=Object.prototype.hasOwnProperty;function $m(e,t,n){for(n of e.keys())if(Ss(n,t))return n}function Ss(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--&&Ss(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=$m(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=$m(t,o),!o)||!Ss(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(Im.call(e,n)&&++r&&!Im.call(t,n)||!(n in t)||!Ss(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function MN(e){const t=Jf();return[e[0],w.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var yt="top",zt="bottom",Bt="right",xt="left",ep="auto",li=[yt,zt,Bt,xt],ko="start",Hs="end",AN="clippingParents",_0="viewport",ns="popper",DN="reference",Mm=li.reduce(function(e,t){return e.concat([t+"-"+ko,t+"-"+Hs])},[]),C0=[].concat(li,[ep]).reduce(function(e,t){return e.concat([t,t+"-"+ko,t+"-"+Hs])},[]),FN="beforeRead",LN="read",UN="afterRead",VN="beforeMain",zN="main",BN="afterMain",qN="beforeWrite",HN="write",WN="afterWrite",KN=[FN,LN,UN,VN,zN,BN,qN,HN,WN];function dn(e){return e.split("-")[0]}function Ot(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=Ot(e).Element;return e instanceof t||e instanceof Element}function fn(e){var t=Ot(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function tp(e){if(typeof ShadowRoot>"u")return!1;var t=Ot(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Er=Math.max,sl=Math.min,Oo=Math.round;function md(){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 E0(){return!/^((?!chrome|android).)*safari/i.test(md())}function To(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&&Oo(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Oo(r.height)/e.offsetHeight||1);var i=Mr(e)?Ot(e):window,l=i.visualViewport,c=!E0()&&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 np(e){var t=To(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 R0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&tp(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 Un(e){return Ot(e).getComputedStyle(e)}function GN(e){return["table","td","th"].indexOf(dr(e))>=0}function mr(e){return((Mr(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ll(e){return dr(e)==="html"?e:e.assignedSlot||e.parentNode||(tp(e)?e.host:null)||mr(e)}function Am(e){return!fn(e)||Un(e).position==="fixed"?null:e.offsetParent}function YN(e){var t=/firefox/i.test(md()),n=/Trident/i.test(md());if(n&&fn(e)){var r=Un(e);if(r.position==="fixed")return null}var o=Ll(e);for(tp(o)&&(o=o.host);fn(o)&&["html","body"].indexOf(dr(o))<0;){var s=Un(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 ci(e){for(var t=Ot(e),n=Am(e);n&&GN(n)&&Un(n).position==="static";)n=Am(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Un(n).position==="static")?t:n||YN(e)||t}function rp(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function js(e,t,n){return Er(e,sl(t,n))}function QN(e,t,n){var r=js(e,t,n);return r>n?n:r}function N0(){return{top:0,right:0,bottom:0,left:0}}function k0(e){return Object.assign({},N0(),e)}function O0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var XN=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,k0(typeof t!="number"?t:O0(t,li))};function ZN(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=rp(l),u=[xt,Bt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=XN(o.padding,n),p=np(s),m=c==="y"?yt:xt,x=c==="y"?zt:Bt,y=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],g=i[c]-n.rects.reference[c],h=ci(s),v=h?c==="y"?h.clientHeight||0:h.clientWidth||0:0,b=y/2-g/2,S=f[m],j=v-p[d]-f[x],_=v/2-p[d]/2+b,E=js(S,_,j),C=c;n.modifiersData[r]=(t={},t[C]=E,t.centerOffset=E-_,t)}}function JN(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)||R0(t.elements.popper,o)&&(t.elements.arrow=o))}const ek={name:"arrow",enabled:!0,phase:"main",fn:ZN,effect:JN,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Po(e){return e.split("-")[1]}var tk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nk(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Oo(n*o)/o||0,y:Oo(r*o)/o||0}}function Dm(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,m=p===void 0?0:p,x=i.y,y=x===void 0?0:x,g=typeof d=="function"?d({x:m,y}):{x:m,y};m=g.x,y=g.y;var h=i.hasOwnProperty("x"),v=i.hasOwnProperty("y"),b=xt,S=yt,j=window;if(u){var _=ci(n),E="clientHeight",C="clientWidth";if(_===Ot(n)&&(_=mr(n),Un(_).position!=="static"&&l==="absolute"&&(E="scrollHeight",C="scrollWidth")),_=_,o===yt||(o===xt||o===Bt)&&s===Hs){S=zt;var N=f&&_===j&&j.visualViewport?j.visualViewport.height:_[E];y-=N-r.height,y*=c?1:-1}if(o===xt||(o===yt||o===zt)&&s===Hs){b=Bt;var R=f&&_===j&&j.visualViewport?j.visualViewport.width:_[C];m-=R-r.width,m*=c?1:-1}}var O=Object.assign({position:l},u&&tk),k=d===!0?nk({x:m,y},Ot(n)):{x:m,y};if(m=k.x,y=k.y,c){var P;return Object.assign({},O,(P={},P[S]=v?"0":"",P[b]=h?"0":"",P.transform=(j.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",P))}return Object.assign({},O,(t={},t[S]=v?y+"px":"",t[b]=h?m+"px":"",t.transform="",t))}function rk(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:Po(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,Dm(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,Dm(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 ok={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rk,data:{}};var Di={passive:!0};function sk(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=Ot(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,Di)}),l&&c.addEventListener("resize",n.update,Di),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Di)}),l&&c.removeEventListener("resize",n.update,Di)}}const ik={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:sk,data:{}};var ak={left:"right",right:"left",bottom:"top",top:"bottom"};function ua(e){return e.replace(/left|right|bottom|top/g,function(t){return ak[t]})}var lk={start:"end",end:"start"};function Fm(e){return e.replace(/start|end/g,function(t){return lk[t]})}function op(e){var t=Ot(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function sp(e){return To(mr(e)).left+op(e).scrollLeft}function ck(e,t){var n=Ot(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=E0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+sp(e),y:c}}function uk(e){var t,n=mr(e),r=op(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+sp(e),c=-r.scrollTop;return Un(o||n).direction==="rtl"&&(l+=Er(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function ip(e){var t=Un(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function T0(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:fn(e)&&ip(e)?e:T0(Ll(e))}function _s(e,t){var n;t===void 0&&(t=[]);var r=T0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Ot(r),i=o?[s].concat(s.visualViewport||[],ip(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(_s(Ll(i)))}function gd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function dk(e,t){var n=To(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 Lm(e,t,n){return t===_0?gd(ck(e,n)):Mr(t)?dk(t,n):gd(uk(mr(e)))}function fk(e){var t=_s(Ll(e)),n=["absolute","fixed"].indexOf(Un(e).position)>=0,r=n&&fn(e)?ci(e):e;return Mr(r)?t.filter(function(o){return Mr(o)&&R0(o,r)&&dr(o)!=="body"}):[]}function pk(e,t,n,r){var o=t==="clippingParents"?fk(e):[].concat(t),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(c,u){var d=Lm(e,u,r);return c.top=Er(d.top,c.top),c.right=sl(d.right,c.right),c.bottom=sl(d.bottom,c.bottom),c.left=Er(d.left,c.left),c},Lm(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 P0(e){var t=e.reference,n=e.element,r=e.placement,o=r?dn(r):null,s=r?Po(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case yt:c={x:i,y:t.y-n.height};break;case zt:c={x:i,y:t.y+t.height};break;case Bt:c={x:t.x+t.width,y:l};break;case xt:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=o?rp(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case ko:c[u]=c[u]-(t[d]/2-n[d]/2);break;case Hs:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Ws(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?AN:l,u=n.rootBoundary,d=u===void 0?_0:u,f=n.elementContext,p=f===void 0?ns:f,m=n.altBoundary,x=m===void 0?!1:m,y=n.padding,g=y===void 0?0:y,h=k0(typeof g!="number"?g:O0(g,li)),v=p===ns?DN:ns,b=e.rects.popper,S=e.elements[x?v:p],j=pk(Mr(S)?S:S.contextElement||mr(e.elements.popper),c,d,i),_=To(e.elements.reference),E=P0({reference:_,element:b,strategy:"absolute",placement:o}),C=gd(Object.assign({},b,E)),N=p===ns?C:_,R={top:j.top-N.top+h.top,bottom:N.bottom-j.bottom+h.bottom,left:j.left-N.left+h.left,right:N.right-j.right+h.right},O=e.modifiersData.offset;if(p===ns&&O){var k=O[o];Object.keys(R).forEach(function(P){var U=[Bt,zt].indexOf(P)>=0?1:-1,F=[yt,zt].indexOf(P)>=0?"y":"x";R[P]+=k[F]*U})}return R}function hk(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?C0:c,d=Po(r),f=d?l?Mm:Mm.filter(function(x){return Po(x)===d}):li,p=f.filter(function(x){return u.indexOf(x)>=0});p.length===0&&(p=f);var m=p.reduce(function(x,y){return x[y]=Ws(e,{placement:y,boundary:o,rootBoundary:s,padding:i})[dn(y)],x},{});return Object.keys(m).sort(function(x,y){return m[x]-m[y]})}function mk(e){if(dn(e)===ep)return[];var t=ua(e);return[Fm(e),t,Fm(t)]}function gk(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,m=n.flipVariations,x=m===void 0?!0:m,y=n.allowedAutoPlacements,g=t.options.placement,h=dn(g),v=h===g,b=c||(v||!x?[ua(g)]:mk(g)),S=[g].concat(b).reduce(function(J,ee){return J.concat(dn(ee)===ep?hk(t,{placement:ee,boundary:d,rootBoundary:f,padding:u,flipVariations:x,allowedAutoPlacements:y}):ee)},[]),j=t.rects.reference,_=t.rects.popper,E=new Map,C=!0,N=S[0],R=0;R<S.length;R++){var O=S[R],k=dn(O),P=Po(O)===ko,U=[yt,zt].indexOf(k)>=0,F=U?"width":"height",V=Ws(t,{placement:O,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),Z=U?P?Bt:xt:P?zt:yt;j[F]>_[F]&&(Z=ua(Z));var T=ua(Z),L=[];if(s&&L.push(V[k]<=0),l&&L.push(V[Z]<=0,V[T]<=0),L.every(function(J){return J})){N=O,C=!1;break}E.set(O,L)}if(C)for(var A=x?3:1,H=function(ee){var Q=S.find(function(te){var ue=E.get(te);if(ue)return ue.slice(0,ee).every(function(_e){return _e})});if(Q)return N=Q,"break"},B=A;B>0;B--){var X=H(B);if(X==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}const vk={name:"flip",enabled:!0,phase:"main",fn:gk,requiresIfExists:["offset"],data:{_skip:!1}};function Um(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 Vm(e){return[yt,Bt,zt,xt].some(function(t){return e[t]>=0})}function yk(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Ws(t,{elementContext:"reference"}),l=Ws(t,{altBoundary:!0}),c=Um(i,r),u=Um(l,o,s),d=Vm(c),f=Vm(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 xk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yk};function bk(e,t,n){var r=dn(e),o=[xt,yt].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,[xt,Bt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function wk(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=C0.reduce(function(d,f){return d[f]=bk(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:wk};function jk(e){var t=e.state,n=e.name;t.modifiersData[n]=P0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const _k={name:"popperOffsets",enabled:!0,phase:"read",fn:jk,data:{}};function Ck(e){return e==="x"?"y":"x"}function Ek(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,m=p===void 0?!0:p,x=n.tetherOffset,y=x===void 0?0:x,g=Ws(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),h=dn(t.placement),v=Po(t.placement),b=!v,S=rp(h),j=Ck(S),_=t.modifiersData.popperOffsets,E=t.rects.reference,C=t.rects.popper,N=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(_){if(s){var P,U=S==="y"?yt:xt,F=S==="y"?zt:Bt,V=S==="y"?"height":"width",Z=_[S],T=Z+g[U],L=Z-g[F],A=m?-C[V]/2:0,H=v===ko?E[V]:C[V],B=v===ko?-C[V]:-E[V],X=t.elements.arrow,J=m&&X?np(X):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:N0(),Q=ee[U],te=ee[F],ue=js(0,E[V],J[V]),_e=b?E[V]/2-A-ue-Q-R.mainAxis:H-ue-Q-R.mainAxis,De=b?-E[V]/2+A+ue+te+R.mainAxis:B+ue+te+R.mainAxis,Xe=t.elements.arrow&&ci(t.elements.arrow),me=Xe?S==="y"?Xe.clientTop||0:Xe.clientLeft||0:0,Ie=(P=O==null?void 0:O[S])!=null?P:0,M=Z+_e-Ie-me,D=Z+De-Ie,de=js(m?sl(T,M):T,Z,m?Er(L,D):L);_[S]=de,k[S]=de-Z}if(l){var re,dt=S==="x"?yt:xt,ot=S==="x"?zt:Bt,be=_[j],qt=j==="y"?"height":"width",$t=be+g[dt],pi=be-g[ot],Vr=[yt,xt].indexOf(h)!==-1,hi=(re=O==null?void 0:O[j])!=null?re:0,ae=Vr?$t:be-E[qt]-C[qt]-hi+R.altAxis,yn=Vr?be+E[qt]+C[qt]-hi-R.altAxis:pi,Ho=m&&Vr?QN(ae,be,yn):js(m?ae:$t,be,m?yn:pi);_[j]=Ho,k[j]=Ho-be}t.modifiersData[r]=k}}const Rk={name:"preventOverflow",enabled:!0,phase:"main",fn:Ek,requiresIfExists:["offset"]};function Nk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function kk(e){return e===Ot(e)||!fn(e)?op(e):Nk(e)}function Ok(e){var t=e.getBoundingClientRect(),n=Oo(t.width)/e.offsetWidth||1,r=Oo(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Tk(e,t,n){n===void 0&&(n=!1);var r=fn(t),o=fn(t)&&Ok(t),s=mr(t),i=To(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((dr(t)!=="body"||ip(s))&&(l=kk(t)),fn(t)?(c=To(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=sp(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function Pk(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 Ik(e){var t=Pk(e);return KN.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function $k(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Mk(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 zm={placement:"bottom",modifiers:[],strategy:"absolute"};function Bm(){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 Ak(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?zm:o;return function(l,c,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},zm,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],p=!1,m={state:d,setOptions:function(h){var v=typeof h=="function"?h(d.options):h;y(),d.options=Object.assign({},s,d.options,v),d.scrollParents={reference:Mr(l)?_s(l):l.contextElement?_s(l.contextElement):[],popper:_s(c)};var b=Ik(Mk([].concat(r,d.options.modifiers)));return d.orderedModifiers=b.filter(function(S){return S.enabled}),x(),m.update()},forceUpdate:function(){if(!p){var h=d.elements,v=h.reference,b=h.popper;if(Bm(v,b)){d.rects={reference:Tk(v,ci(b),d.options.strategy==="fixed"),popper:np(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 j=d.orderedModifiers[S],_=j.fn,E=j.options,C=E===void 0?{}:E,N=j.name;typeof _=="function"&&(d=_({state:d,options:C,name:N,instance:m})||d)}}}},update:$k(function(){return new Promise(function(g){m.forceUpdate(),g(d)})}),destroy:function(){y(),p=!0}};if(!Bm(l,c))return m;m.setOptions(u).then(function(g){!p&&u.onFirstUpdate&&u.onFirstUpdate(g)});function x(){d.orderedModifiers.forEach(function(g){var h=g.name,v=g.options,b=v===void 0?{}:v,S=g.effect;if(typeof S=="function"){var j=S({state:d,name:h,instance:m,options:b}),_=function(){};f.push(j||_)}})}function y(){f.forEach(function(g){return g()}),f=[]}return m}}const Dk=Ak({defaultModifiers:[xk,_k,ok,ik,Sk,vk,Rk,ek]}),Fk=["enabled","placement","strategy","modifiers"];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}const Uk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Vk={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)}}},zk=[];function I0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=zk}=n,l=Lk(n,Fk);const c=w.useRef(i),u=w.useRef(),d=w.useCallback(()=>{var g;(g=u.current)==null||g.update()},[]),f=w.useCallback(()=>{var g;(g=u.current)==null||g.forceUpdate()},[]),[p,m]=MN(w.useState({placement:o,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),x=w.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:g})=>{const h={},v={};Object.keys(g.elements).forEach(b=>{h[b]=g.styles[b],v[b]=g.attributes[b]}),m({state:g,styles:h,attributes:v,update:d,forceUpdate:f,placement:g.placement})}}),[d,f,m]),y=w.useMemo(()=>(Ss(c.current,i)||(c.current=i),c.current),[i]);return w.useEffect(()=>{!u.current||!r||u.current.setOptions({placement:o,strategy:s,modifiers:[...y,x,Uk]})},[s,o,x,r,y]),w.useEffect(()=>{if(!(!r||e==null||t==null))return u.current=Dk(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...y,Vk,x]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,m(g=>Object.assign({},g,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function Ks(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Bk=function(){},qk=Bk;const Hk=Js(qk),qm=()=>{};function Wk(e){return e.button===0}function Kk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const da=e=>e&&("current"in e?e.current:e),Hm={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function $0(e,t=qm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=da(e);Hk(!!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||Kk(u)||!Wk(u)||!!Ks(d,u.target)||s.current,s.current=!1},[e]),l=Te(u=>{const d=da(e);d&&Ks(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=Vo(da(e)),p=f.defaultView||window;let m=(u=p.event)!=null?u:(d=p.parent)==null?void 0:d.event,x=null;Hm[r]&&(x=Nn(f,Hm[r],l,!0));const y=Nn(f,r,i,!0),g=Nn(f,r,v=>{if(v===m){m=void 0;return}c(v)});let h=[];return"ontouchstart"in f.documentElement&&(h=[].slice.call(f.body.children).map(v=>Nn(v,"mousemove",qm))),()=>{x==null||x(),y(),g(),h.forEach(v=>v())}},[e,n,r,i,l,c])}function Gk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function Yk(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function M0({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:s,containerPadding:i,arrowElement:l,popperConfig:c={}}){var u,d,f,p,m;const x=Gk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:Yk(Object.assign({},x,{eventListeners:{enabled:t,options:(u=x.eventListeners)==null?void 0:u.options},preventOverflow:Object.assign({},x.preventOverflow,{options:i?Object.assign({padding:i},(d=x.preventOverflow)==null?void 0:d.options):(f=x.preventOverflow)==null?void 0:f.options}),offset:{options:Object.assign({offset:o},(p=x.offset)==null?void 0:p.options)},arrow:Object.assign({},x.arrow,{enabled:!!l,options:Object.assign({},(m=x.arrow)==null?void 0:m.options,{element:l})}),flip:Object.assign({enabled:!!r},x.flip)}))})}const Qk=["children"];function Xk(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 Zk=()=>{};function A0(e={}){const t=w.useContext(Fl),[n,r]=rl(),o=w.useRef(!1),{flip:s,offset:i,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:f=!0,usePopper:p=!!t}=e,m=(t==null?void 0:t.show)==null?!!e.show:t.show;m&&!o.current&&(o.current=!0);const x=_=>{t==null||t.toggle(!1,_)},{placement:y,setMenu:g,menuElement:h,toggleElement:v}=t||{},b=I0(v,h,M0({placement:u||y||"bottom-start",enabled:p,enableEvents:f??m,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),S=Object.assign({ref:g||Zk,"aria-labelledby":v==null?void 0:v.id},b.attributes.popper,{style:b.styles.popper}),j={show:m,placement:y,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 $0(h,x,{clickTrigger:l,disabled:!m}),[S,j]}const Jk={usePopper:!0};function ap(e){let{children:t}=e,n=Xk(e,Qk);const[r,o]=A0(n);return a.jsx(a.Fragment,{children:t(r,o)})}ap.displayName="DropdownMenu";ap.defaultProps=Jk;const D0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Wm=()=>{};function F0(){const e=Vx(),{show:t=!1,toggle:n=Wm,setToggle:r,menuElement:o}=w.useContext(Fl)||{},s=w.useCallback(l=>{n(!t,l)},[t,n]),i={id:e,ref:r||Wm,onClick:s,"aria-expanded":!!t};return o&&D0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function L0({children:e}){const[t,n]=F0();return a.jsx(a.Fragment,{children:e(t,n)})}L0.displayName="DropdownToggle";const eO=["eventKey","disabled","onClick","active","as"];function tO(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 U0({key:e,href:t,active:n,disabled:r,onClick:o}){const s=w.useContext(Ln),i=w.useContext(Qf),{activeKey:l}=i||{},c=$r(e,t),u=n==null&&e!=null?$r(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,[Bo("dropdown-item")]:""},{isActive:u}]}const V0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Zf}=e,l=tO(e,eO);const[c]=U0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});V0.displayName="DropdownItem";const z0=w.createContext(zo?window:void 0);z0.Provider;function Ul(){return w.useContext(z0)}function Km(){const e=a0(),t=w.useRef(null),n=w.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function ui({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${Bo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Ul(),[u,d]=Lx(t,e,r),[f,p]=Km(),m=f.current,[x,y]=Km(),g=x.current,h=v0(u),v=w.useRef(null),b=w.useRef(!1),S=w.useContext(Ln),j=w.useCallback((O,k,P=k==null?void 0:k.type)=>{d(O,{originalEvent:k,source:P})},[d]),_=Te((O,k)=>{n==null||n(O,k),j(!1,k,"select"),k.isPropagationStopped()||S==null||S(O,k)}),E=w.useMemo(()=>({toggle:j,placement:i,show:u,menuElement:m,toggleElement:g,setMenu:p,setToggle:y}),[j,i,u,m,g,p,y]);m&&h&&!u&&(b.current=m.contains(m.ownerDocument.activeElement));const C=Te(()=>{g&&g.focus&&g.focus()}),N=Te(()=>{const O=v.current;let k=s;if(k==null&&(k=f.current&&D0(f.current)?"keyboard":!1),k===!1||k==="keyboard"&&!/^key.+$/.test(O))return;const P=_n(f.current,o)[0];P&&P.focus&&P.focus()});w.useEffect(()=>{u?N():b.current&&(b.current=!1,C())},[u,b,C,N]),w.useEffect(()=>{v.current=null});const R=(O,k)=>{if(!f.current)return null;const P=_n(f.current,o);let U=P.indexOf(O)+k;return U=Math.max(0,Math.min(U,P.length)),P[U]};return jN(w.useCallback(()=>c.document,[c]),"keydown",O=>{var k,P;const{key:U}=O,F=O.target,V=(k=f.current)==null?void 0:k.contains(F),Z=(P=x.current)==null?void 0:P.contains(F);if(/input|textarea/i.test(F.tagName)&&(U===" "||U!=="Escape"&&V||U==="Escape"&&F.type==="search")||!V&&!Z||U==="Tab"&&(!f.current||!u))return;v.current=O.type;const L={originalEvent:O,source:O.type};switch(U){case"ArrowUp":{const A=R(F,-1);A&&A.focus&&A.focus(),O.preventDefault();return}case"ArrowDown":if(O.preventDefault(),!u)d(!0,L);else{const A=R(F,1);A&&A.focus&&A.focus()}return;case"Tab":Gf(F.ownerDocument,"keyup",A=>{var H;(A.key==="Tab"&&!A.target||!((H=f.current)!=null&&H.contains(A.target)))&&d(!1,L)},{once:!0});break;case"Escape":U==="Escape"&&(O.preventDefault(),O.stopPropagation()),d(!1,L);break}}),a.jsx(Ln.Provider,{value:_,children:a.jsx(Fl.Provider,{value:E,children:l})})}ui.displayName="Dropdown";ui.Menu=ap;ui.Toggle=L0;ui.Item=V0;const B0=w.createContext({});B0.displayName="DropdownContext";const q0=B0,H0=w.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},s)=>(t=he(t,"dropdown-divider"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));H0.displayName="DropdownDivider";const nO=H0,W0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},s)=>(t=he(t,"dropdown-header"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));W0.displayName="DropdownHeader";const rO=W0,K0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=x0,...l},c)=>{const u=he(e,"dropdown-item"),[d,f]=U0({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")})});K0.displayName="DropdownItem";const oO=K0,G0=w.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=he(t,"dropdown-item-text"),a.jsx(n,{ref:o,className:oe(e,t),...r})));G0.displayName="DropdownItemText";const sO=G0,Y0=w.createContext(null);Y0.displayName="InputGroupContext";const Q0=Y0;function X0(e,t){return e}function Z0(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 J0=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 m=w.useContext(p0),x=he(e,"dropdown-menu"),{align:y,drop:g,isRTL:h}=w.useContext(q0);n=n||y;const v=w.useContext(Q0),b=[];if(n)if(typeof n=="object"){const O=Object.keys(n);if(O.length){const k=O[0],P=n[k];p=P==="start",b.push(`${x}-${k}-${P}`)}}else n==="end"&&(p=!0);const S=Z0(p,g,h),[j,{hasShown:_,popper:E,show:C,toggle:N}]=A0({flip:o,rootCloseEvent:r,show:s,usePopper:!m&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(j.ref=gn(X0(f),j.ref),ol(()=>{C&&(E==null||E.update())},[C]),!_&&!i&&!v)return null;typeof l!="string"&&(j.show=C,j.close=()=>N==null?void 0:N(!1),j.align=n);let R=d.style;return E!=null&&E.placement&&(R={...d.style,...j.style},d["x-placement"]=E.placement),a.jsx(l,{...d,...j,style:R,...(b.length||m)&&{"data-bs-popper":"static"},className:oe(t,x,C&&"show",p&&`${x}-end`,u&&`${x}-${u}`,...b)})});J0.displayName="DropdownMenu";const iO=J0,eb=w.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:s=!1,className:i,...l},c)=>{const u=he(t,"btn"),[d,{tagName:f}]=Xf({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")})});eb.displayName="Button";const aO=eb,tb=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=aO,...s},i)=>{const l=he(e,"dropdown-toggle"),c=w.useContext(Fl);r!==void 0&&(s.bsPrefix=r);const[u]=F0();return u.ref=gn(u.ref,X0(i)),a.jsx(o,{className:oe(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});tb.displayName="DropdownToggle";const lO=tb,nb=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,...m}=Dl(e,{show:"onToggle"}),x=w.useContext(Q0),y=he(n,"dropdown"),g=Al(),h=E=>p===!1?E==="click":p==="inside"?E!=="rootClose":p==="outside"?E!=="select":!0,v=Te((E,C)=>{var N,R;!((N=C.originalEvent)==null||(R=N.target)==null)&&R.classList.contains("dropdown-toggle")&&C.source==="mousedown"||(C.originalEvent.currentTarget===document&&(C.source!=="keydown"||C.originalEvent.key==="Escape")&&(C.source="rootClose"),h(C.source)&&(c==null||c(E,C)))}),S=Z0(i==="end",r,g),j=w.useMemo(()=>({align:i,drop:r,isRTL:g}),[i,r,g]),_={down:y,"down-centered":`${y}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return a.jsx(q0.Provider,{value:j,children:a.jsx(ui,{placement:S,show:o,onSelect:l,onToggle:v,focusFirstItemOnShow:u,itemSelector:`.${y}-item:not(.disabled):not(:disabled)`,children:x?m.children:a.jsx(d,{...m,ref:t,className:oe(s,o&&"show",_[r])})})})});nb.displayName="Dropdown";const Fi=Object.assign(nb,{Toggle:lO,Menu:iO,Item:oO,ItemText:sO,Divider:nO,Header:rO});var Li;function Gm(e){if((!Li&&Li!==0||e)&&zo){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),Li=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Li}function cO(e){const t=w.useRef(e);return t.current=e,t}function lp(e){const t=cO(e);w.useEffect(()=>()=>t.current(),[])}function Bc(e){e===void 0&&(e=Vo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function uO(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Ym=Bo("modal-open");class dO{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return uO(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(Pn(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Ym,""),Pn(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Ym),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 cp=dO,qc=(e,t)=>zo?e==null?(t||Vo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function vd(e,t){const n=Ul(),[r,o]=w.useState(()=>qc(e,n==null?void 0:n.document));if(!r){const s=qc(e);s&&o(s)}return w.useEffect(()=>{t&&r&&t(r)},[t,r]),w.useEffect(()=>{const s=qc(e);s!==r&&o(s)},[e,r]),r}function fO({in:e,onTransition:t}){const n=w.useRef(null),r=w.useRef(!0),o=Te(t);return ol(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),ol(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function pO({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=fO({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=gn(l,e.ref);return s&&!t?null:w.cloneElement(e,{ref:c})}function yd(e,t,n){return e?a.jsx(e,Object.assign({},n)):t?a.jsx(pO,Object.assign({},n,{transition:t})):a.jsx(Wf,Object.assign({},n))}function rb(e){return e.code==="Escape"||e.keyCode===27}const hO=["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 mO(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 Hc;function gO(e){return Hc||(Hc=new cp({ownerDocument:e==null?void 0:e.document})),Hc}function vO(e){const t=Ul(),n=e||gO(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 ob=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:m,runBackdropTransition:x,autoFocus:y=!0,enforceFocus:g=!0,restoreFocus:h=!0,restoreFocusOptions:v,renderDialog:b,renderBackdrop:S=D=>a.jsx("div",Object.assign({},D)),manager:j,container:_,onShow:E,onHide:C=()=>{},onExit:N,onExited:R,onExiting:O,onEnter:k,onEntering:P,onEntered:U}=e,F=mO(e,hO);const V=Ul(),Z=vd(_),T=vO(j),L=Jf(),A=v0(n),[H,B]=w.useState(!n),X=w.useRef(null);w.useImperativeHandle(t,()=>T,[T]),zo&&!A&&n&&(X.current=Bc(V==null?void 0:V.document)),n&&H&&B(!1);const J=Te(()=>{if(T.add(),De.current=Nn(document,"keydown",ue),_e.current=Nn(document,"focus",()=>setTimeout(Q),!0),E&&E(),y){var D,de;const re=Bc((D=(de=T.dialog)==null?void 0:de.ownerDocument)!=null?D:V==null?void 0:V.document);T.dialog&&re&&!Ks(T.dialog,re)&&(X.current=re,T.dialog.focus())}}),ee=Te(()=>{if(T.remove(),De.current==null||De.current(),_e.current==null||_e.current(),h){var D;(D=X.current)==null||D.focus==null||D.focus(v),X.current=null}});w.useEffect(()=>{!n||!Z||J()},[n,Z,J]),w.useEffect(()=>{H&&ee()},[H,ee]),lp(()=>{ee()});const Q=Te(()=>{if(!g||!L()||!T.isTopModal())return;const D=Bc(V==null?void 0:V.document);T.dialog&&D&&!Ks(T.dialog,D)&&T.dialog.focus()}),te=Te(D=>{D.target===D.currentTarget&&(u==null||u(D),l===!0&&C())}),ue=Te(D=>{c&&rb(D)&&T.isTopModal()&&(d==null||d(D),D.defaultPrevented||C())}),_e=w.useRef(),De=w.useRef(),Xe=(...D)=>{B(!0),R==null||R(...D)};if(!Z)return null;const me=Object.assign({role:r,ref:T.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},F,{style:s,className:o,tabIndex:-1});let Ie=b?b(me):a.jsx("div",Object.assign({},me,{children:w.cloneElement(i,{role:"document"})}));Ie=yd(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:N,onExiting:O,onExited:Xe,onEnter:k,onEntering:P,onEntered:U,children:Ie});let M=null;return l&&(M=S({ref:T.setBackdropRef,onClick:te}),M=yd(m,x,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:M})),a.jsx(a.Fragment,{children:Sr.createPortal(a.jsxs(a.Fragment,{children:[M,Ie]}),Z)})});ob.displayName="Modal";const yO=Object.assign(ob,{Manager:cp});function xd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function xO(e,t){e.classList?e.classList.add(t):xd(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Qm(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function bO(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Qm(e.className,t):e.setAttribute("class",Qm(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 wO extends cp{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,Pn(n,{[t]:`${parseFloat(Pn(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],Pn(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(xO(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();bO(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 Wc;function SO(e){return Wc||(Wc=new wO(e)),Wc}const sb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"modal-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));sb.displayName="ModalBody";const jO=sb,_O=w.createContext({onHide(){}}),ib=_O,ab=w.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=he(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})})});ab.displayName="ModalDialog";const lb=ab,cb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"modal-footer"),a.jsx(n,{ref:o,className:oe(e,t),...r})));cb.displayName="ModalFooter";const CO=cb,EO={"aria-label":q.string,onClick:q.func,variant:q.oneOf(["white"])},up=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}));up.displayName="CloseButton";up.propTypes=EO;const RO=up,NO=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(ib),c=Te(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(RO,{"aria-label":e,variant:t,onClick:c})]})}),kO=NO,ub=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=he(e,"modal-header"),a.jsx(kO,{ref:s,...o,className:oe(t,e),closeLabel:n,closeButton:r})));ub.displayName="ModalHeader";const OO=ub,TO=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:oe(t.className,e)})),PO=TO("h4"),db=w.forwardRef(({className:e,bsPrefix:t,as:n=PO,...r},o)=>(t=he(t,"modal-title"),a.jsx(n,{ref:o,className:oe(e,t),...r})));db.displayName="ModalTitle";const IO=db;function $O(e){return a.jsx(No,{...e,timeout:null})}function MO(e){return a.jsx(No,{...e,timeout:null})}const fb=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=lb,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":d,show:f=!1,animation:p=!0,backdrop:m=!0,keyboard:x=!0,onEscapeKeyDown:y,onShow:g,onHide:h,container:v,autoFocus:b=!0,enforceFocus:S=!0,restoreFocus:j=!0,restoreFocusOptions:_,onEntered:E,onExit:C,onExiting:N,onEnter:R,onEntering:O,onExited:k,backdropClassName:P,manager:U,...F},V)=>{const[Z,T]=w.useState({}),[L,A]=w.useState(!1),H=w.useRef(!1),B=w.useRef(!1),X=w.useRef(null),[J,ee]=rl(),Q=gn(V,ee),te=Te(h),ue=Al();e=he(e,"modal");const _e=w.useMemo(()=>({onHide:te}),[te]);function De(){return U||SO({isRTL:ue})}function Xe(ae){if(!zo)return;const yn=De().getScrollbarWidth()>0,Ho=ae.scrollHeight>Vo(ae).documentElement.clientHeight;T({paddingRight:yn&&!Ho?Gm():void 0,paddingLeft:!yn&&Ho?Gm():void 0})}const me=Te(()=>{J&&Xe(J.dialog)});lp(()=>{pd(window,"resize",me),X.current==null||X.current()});const Ie=()=>{H.current=!0},M=ae=>{H.current&&J&&ae.target===J.dialog&&(B.current=!0),H.current=!1},D=()=>{A(!0),X.current=Gx(J.dialog,()=>{A(!1)})},de=ae=>{ae.target===ae.currentTarget&&D()},re=ae=>{if(m==="static"){de(ae);return}if(B.current||ae.target!==ae.currentTarget){B.current=!1;return}h==null||h()},dt=ae=>{x?y==null||y(ae):(ae.preventDefault(),m==="static"&&D())},ot=(ae,yn)=>{ae&&Xe(ae),R==null||R(ae,yn)},be=ae=>{X.current==null||X.current(),C==null||C(ae)},qt=(ae,yn)=>{O==null||O(ae,yn),Gf(window,"resize",me)},$t=ae=>{ae&&(ae.style.display=""),k==null||k(ae),pd(window,"resize",me)},pi=w.useCallback(ae=>a.jsx("div",{...ae,className:oe(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),Vr={...n,...Z};Vr.display="block";const hi=ae=>a.jsx("div",{role:"dialog",...ae,style:Vr,className:oe(t,e,L&&`${e}-static`,!p&&"show"),onClick:m?re:void 0,onMouseUp:M,"data-bs-theme":l,"aria-label":d,"aria-labelledby":c,"aria-describedby":u,children:a.jsx(i,{...F,onMouseDown:Ie,className:r,contentClassName:o,children:s})});return a.jsx(ib.Provider,{value:_e,children:a.jsx(yO,{show:f,ref:Q,backdrop:m,container:v,keyboard:!0,autoFocus:b,enforceFocus:S,restoreFocus:j,restoreFocusOptions:_,onEscapeKeyDown:dt,onShow:g,onHide:h,onEnter:ot,onEntering:qt,onEntered:E,onExit:be,onExiting:N,onExited:$t,manager:De(),transition:p?$O:void 0,backdropTransition:p?MO:void 0,renderBackdrop:pi,renderDialog:hi})})});fb.displayName="Modal";const ce=Object.assign(fb,{Body:jO,Header:OO,Title:IO,Footer:CO,Dialog:lb,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),AO=Re.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 DO({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r}=ut(e,t),{project:o}=kt(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:m,disabled:x})=>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(Fi,{className:"d-flex flex-column",children:[a.jsx(Fi.Toggle,{as:AO,children:p}),a.jsx(Fi.Menu,{children:d.map(([y,g,h])=>a.jsx(Fi.Item,{href:g,onClick:v=>{h!=="get"&&(v.preventDefault(),v.target.dataset.method=h,$&&$.rails&&$.rails.handleMethod($(v.target)))},children:y},g))})]}):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?m:x})]},u));return a.jsxs(ce,{size:"lg",show:n.showActionsModal,onHide:r,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Manage Your Project"})}),a.jsxs(ce.Body,{children:[a.jsxs("p",{children:["Please select an action to manage your project"," ",a.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),c]})]})}function FO({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleConfirmModal:o}=ut(e,t),{project:s}=kt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=n.usesCredits?"credits":"units",l=(1-jx(n))*100;return a.jsxs(ce,{size:"lg",show:n.showConfirmModal,onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Consider Requesting an Exchange"})}),a.jsx(ce.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(ce.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 LO({requestId:e,grantNumber:t,actionId:n}){const{deleteAction:r,request:o,toggleDeleteModal:s}=ut(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==Ve.pending,d=l==Ve.error,f=()=>s(n);return a.jsxs(ce,{show:i.showDeleteModal,onHide:f,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Confirm Deletion"})}),a.jsxs(ce.Body,{children:[d&&a.jsxs(Se,{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,": ",go(i.date)]})," ","on"," "]}),"request ",a.jsx("strong",{children:Lf(o)}),"? Deletions cannot be undone."]})]}),a.jsx(ce.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 Io({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 pb({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(Io,{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(Io,{color:"danger",icon:"trash",onClick:()=>n(e.actionId),title:"Edit action"},"delete"));const i=`${e.type}: ${go(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 Cn({resource:e,userGuide:t=!0}){const{full:n,short:r}=ii(e.name),o=r?a.jsx("abbr",{title:n,children:r}):n;return a.jsxs(a.Fragment,{children:[Tn(ne.resourceTypeIcons[e.icon])," ",o,!e.isCredit&&e.userGuideUrl&&t?a.jsx(Io,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function $o({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 UO=e=>a.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function VO({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=ut(e,t),{project:o,setRequest:s}=kt(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=(y,g)=>y?a.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>s(y.requestId),children:[g=="prev"?a.jsx("i",{className:"bi bi-chevron-left"}):null,Lf(y),g=="next"?a.jsx("i",{className:"bi bi-chevron-right"}):null]}):a.jsx("span",{}),f=new Set,p=[];for(let y of n.actions)for(let g of y.resources)f.has(g.resourceId)||(f.add(g.resourceId),p.push(g));p.sort(Qa);const m=[{key:"action",name:"Action Details",format:(y,g)=>a.jsx(pb,{action:g,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:y=>a.jsx($o,{status:y})},...p.map(y=>({key:`resource${y.resourceId}`,name:y.name,icon:y.icon,class:"text-end",format:y.isBoolean?g=>g?Uf(g):null:UO,formatHeader:(g,h)=>a.jsx(Cn,{resource:h,userGuide:!1})}))],x=n.actions.map(y=>{const g={...y};for(let{resourceId:h}of p)g[`resource${h}`]=0;for(let{resourceId:h,approved:v,requested:b}of y.resources)g[`resource${h}`]=v||b||0;return g});return a.jsxs("div",{className:"history",children:[a.jsx(mn,{columns:m,rows:x}),a.jsxs("div",{className:"buttons d-flex justify-content-between",children:[d(c,"prev"),d(u,"next")]})]})}function zO({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=ut(e,t);if(!n)return;const o=[{key:"type",name:"Action Details",format:(s,i)=>a.jsx(pb,{action:i,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:s=>a.jsx($o,{status:s})}];if(n.actions&&n.actions.length)return a.jsx(mn,{rows:n.actions,columns:o})}function rs(...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 BO={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function qO(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=BO[e];return r+parseInt(Pn(t,o[0]),10)+parseInt(Pn(t,o[1]),10)}const HO={[Gn]:"collapse",[tl]:"collapsing",[jn]:"collapsing",[Xn]:"collapse show"},WO=Re.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:m=qO,...x},y)=>{const g=typeof l=="function"?l():l,h=w.useMemo(()=>rs(_=>{_.style[g]="0"},e),[g,e]),v=w.useMemo(()=>rs(_=>{const E=`scroll${g[0].toUpperCase()}${g.slice(1)}`;_.style[g]=`${_[E]}px`},t),[g,t]),b=w.useMemo(()=>rs(_=>{_.style[g]=null},n),[g,n]),S=w.useMemo(()=>rs(_=>{_.style[g]=`${m(g,_)}px`,Qx(_)},r),[r,m,g]),j=w.useMemo(()=>rs(_=>{_.style[g]=null},o),[g,o]);return a.jsx(Xx,{ref:y,addEndListener:Yx,...x,"aria-expanded":x.role?c:null,onEnter:h,onEntering:v,onEntered:b,onExit:S,onExiting:j,childRef:i.ref,in:c,timeout:u,mountOnEnter:d,unmountOnExit:f,appear:p,children:(_,E)=>Re.cloneElement(i,{...E,className:oe(s,i.props.className,HO[_],g==="width"&&"collapse-horizontal")})})}),KO=WO;function hb(e,t){return Array.isArray(e)?e.includes(t):e===t}const mb=w.createContext({});mb.displayName="AccordionContext";const Vl=mb,gb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(Vl);return t=he(t,"accordion-collapse"),a.jsx(KO,{ref:i,in:hb(l,o),...s,className:oe(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});gb.displayName="AccordionCollapse";const vb=gb,yb=w.createContext({eventKey:""});yb.displayName="AccordionItemContext";const dp=yb,xb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,...u},d)=>{t=he(t,"accordion-body");const{eventKey:f}=w.useContext(dp);return a.jsx(vb,{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)})})});xb.displayName="AccordionBody";const GO=xb;function YO(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:o}=w.useContext(Vl);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 bb=w.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...o},s)=>{t=he(t,"accordion-button");const{eventKey:i}=w.useContext(dp),l=YO(i,r),{activeEventKey:c}=w.useContext(Vl);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,!hb(c,i)&&"collapsed")})});bb.displayName="AccordionButton";const wb=bb,Sb=w.forwardRef(({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...s},i)=>(t=he(t,"accordion-header"),a.jsx(e,{ref:i,...s,className:oe(n,t),children:a.jsx(wb,{onClick:o,children:r})})));Sb.displayName="AccordionHeader";const QO=Sb,jb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...o},s)=>{t=he(t,"accordion-item");const i=w.useMemo(()=>({eventKey:r}),[r]);return a.jsx(dp.Provider,{value:i,children:a.jsx(e,{ref:s,...o,className:oe(n,t)})})});jb.displayName="AccordionItem";const XO=jb,_b=w.forwardRef((e,t)=>{const{as:n="div",activeKey:r,bsPrefix:o,className:s,onSelect:i,flush:l,alwaysOpen:c,...u}=Dl(e,{activeKey:"onSelect"}),d=he(o,"accordion"),f=w.useMemo(()=>({activeEventKey:r,onSelect:i,alwaysOpen:c}),[r,i,c]);return a.jsx(Vl.Provider,{value:f,children:a.jsx(n,{ref:t,...u,className:oe(s,d,l&&`${d}-flush`)})})});_b.displayName="Accordion";const fa=Object.assign(_b,{Button:wb,Collapse:vb,Item:XO,Header:QO,Body:GO}),bd=2**31-1;function Cb(e,t,n){const r=n-Date.now();e.current=r<=bd?setTimeout(t,r):setTimeout(()=>Cb(e,t,n),bd)}function ZO(){const e=Jf(),t=w.useRef();return lp(()=>clearTimeout(t.current)),w.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(o,s=0){e()&&(n(),s<=bd?t.current=setTimeout(o,s):Cb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const JO=()=>{};function eT(e,t,{disabled:n,clickTrigger:r}={}){const o=t||JO;$0(e,o,{disabled:n,clickTrigger:r});const s=Te(i=>{rb(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=Vo(da(e));let l=(i.defaultView||window).event;const c=Nn(i,"keyup",u=>{if(u===l){l=void 0;return}s(u)});return()=>{c()}},[e,n,s])}const Eb=w.forwardRef((e,t)=>{const{flip:n,offset:r,placement:o,containerPadding:s,popperConfig:i={},transition:l,runTransition:c}=e,[u,d]=rl(),[f,p]=rl(),m=gn(d,t),x=vd(e.container),y=vd(e.target),[g,h]=w.useState(!e.show),v=I0(y,u,M0({placement:o,enableEvents:!!e.show,containerPadding:s||5,flip:n,offset:r,arrowElement:f,popperConfig:i}));e.show&&g&&h(!1);const b=(...O)=>{h(!0),e.onExited&&e.onExited(...O)},S=e.show||!g;if(eT(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:j,onExiting:_,onEnter:E,onEntering:C,onEntered:N}=e;let R=e.children(Object.assign({},v.attributes.popper,{style:v.styles.popper,ref:m}),{popper:v,placement:o,show:!!e.show,arrowProps:Object.assign({},v.attributes.arrow,{style:v.styles.arrow,ref:p})});return R=yd(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:j,onExiting:_,onExited:b,onEnter:E,onEntering:C,onEntered:N}),x?Sr.createPortal(R,x):null});Eb.displayName="Overlay";const tT=Eb,Rb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"popover-header"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Rb.displayName="PopoverHeader";const nT=Rb,Nb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"popover-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Nb.displayName="PopoverBody";const kb=Nb;function Ob(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function Tb(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const rT=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=he(e,"popover"),m=Al(),[x]=(t==null?void 0:t.split("-"))||[],y=Ob(x,m);let g=r;return u&&!l&&(g={...r,...Tb(c==null?void 0:c.strategy)}),a.jsxs("div",{ref:f,role:"tooltip",style:g,"x-placement":x,className:oe(n,p,x&&`bs-popover-${y}`),...d,children:[a.jsx("div",{className:"popover-arrow",...i}),s?a.jsx(kb,{children:o}):o]})}),oT=Object.assign(rT,{Header:nT,Body:kb,POPPER_OFFSET:[0,8]}),Pb=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=he(e,"tooltip");const f=Al(),[p]=(t==null?void 0:t.split("-"))||[],m=Ob(p,f);let x=r;return c&&!i&&(x={...r,...Tb(l==null?void 0:l.strategy)}),a.jsxs("div",{ref:d,style:x,role:"tooltip","x-placement":p,className:oe(n,e,`bs-tooltip-${m}`),...u,children:[a.jsx("div",{className:"tooltip-arrow",...s}),a.jsx("div",{className:`${e}-inner`,children:o})]})});Pb.displayName="Tooltip";const zl=Object.assign(Pb,{TOOLTIP_OFFSET:[0,6]});function sT(e){const t=w.useRef(null),n=he(void 0,"popover"),r=he(void 0,"tooltip"),o=w.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(xd(t.current,n))return oT.POPPER_OFFSET;if(xd(t.current,r))return zl.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function iT(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=o=>n(nl(o))),t.ref=r.__wrapped||(r.__wrapped=o=>r(nl(o)))}const Ib=w.forwardRef(({children:e,transition:t=No,popperConfig:n={},rootClose:r=!1,placement:o="top",show:s=!1,...i},l)=>{const c=w.useRef({}),[u,d]=w.useState(null),[f,p]=sT(i.offset),m=gn(l,f),x=t===!0?No:t||void 0,y=Te(g=>{d(g),n==null||n.onFirstUpdate==null||n.onFirstUpdate(g)});return ol(()=>{u&&i.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[u,i.target]),w.useEffect(()=>{s||d(null)},[s]),a.jsx(tT,{...i,ref:m,popperConfig:{...n,modifiers:p.concat(n.modifiers||[]),onFirstUpdate:y},transition:x,rootClose:r,placement:o,show:s,children:(g,{arrowProps:h,popper:v,show:b})=>{var S,j;iT(g,h);const _=v==null?void 0:v.placement,E=Object.assign(c.current,{state:v==null?void 0:v.state,scheduleUpdate:v==null?void 0:v.update,placement:_,outOfBoundaries:(v==null||(S=v.state)==null||(j=S.modifiersData.hide)==null?void 0:j.isReferenceHidden)||!1,strategy:n.strategy}),C=!!u;return typeof e=="function"?e({...g,placement:_,show:b,...!t&&b&&{className:"show"},popper:E,arrowProps:h,hasDoneInitialMeasure:C}):w.cloneElement(e,{...g,placement:_,arrowProps:h,popper:E,hasDoneInitialMeasure:C,className:oe(e.props.className,!t&&b&&"show"),style:{...e.props.style,...g.style}})}})});Ib.displayName="Overlay";const $b=Ib;function aT(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function Xm(e,t,n){const[r]=t,o=r.currentTarget,s=r.relatedTarget||r.nativeEvent[n];(!s||s!==o)&&!Ks(o,s)&&e(...t)}q.oneOf(["click","hover","focus"]);const lT=({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=gn(f,n.ref),m=ZO(),x=w.useRef(""),[y,g]=i0(o,s,i),h=aT(l),{onFocus:v,onBlur:b,onClick:S}=typeof n!="function"?w.Children.only(n).props:{},j=F=>{p(nl(F))},_=w.useCallback(()=>{if(m.clear(),x.current="show",!h.show){g(!0);return}m.set(()=>{x.current==="show"&&g(!0)},h.show)},[h.show,g,m]),E=w.useCallback(()=>{if(m.clear(),x.current="hide",!h.hide){g(!1);return}m.set(()=>{x.current==="hide"&&g(!1)},h.hide)},[h.hide,g,m]),C=w.useCallback((...F)=>{_(),v==null||v(...F)},[_,v]),N=w.useCallback((...F)=>{E(),b==null||b(...F)},[E,b]),R=w.useCallback((...F)=>{g(!y),S==null||S(...F)},[S,g,y]),O=w.useCallback((...F)=>{Xm(_,F,"fromElement")},[_]),k=w.useCallback((...F)=>{Xm(E,F,"toElement")},[E]),P=e==null?[]:[].concat(e),U={ref:j};return P.indexOf("click")!==-1&&(U.onClick=R),P.indexOf("focus")!==-1&&(U.onFocus=C,U.onBlur=N),P.indexOf("hover")!==-1&&(U.onMouseOver=O,U.onMouseOut=k),a.jsxs(a.Fragment,{children:[typeof n=="function"?n(U):w.cloneElement(n,U),a.jsx($b,{...d,show:y,onHide:E,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},fp=lT;function cT({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r}=kt(t||n.grantNumber),{setTab:o}=kt(t||n.grantNumber);if(!n||!r)return;let s;const i={};for(let p of r.users||[])for(let m of p.resourceIds)i[m]=i[m]||0,i[m]+=1;const l=(n.resources||[]).filter(p=>p.isCredit?(s=p,!1):p.allocated>0).map((p,m)=>({...p,userCount:i[p.resourceId]||0,color:rd[m%rd.length]})),c=s?s.allocated:0,u="Exchange"in n.allowedActions,d=n.exchangeActionId!==null,f=[{key:"name",name:"Resource",format:(p,m)=>a.jsx(Cn,{resource:m})},{key:"isActive",name:"Status",format:p=>a.jsx($o,{status:p?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(p,m)=>{if(m.isBoolean)return Uf(m.allocated);const x=m.allocated-p,y=Math.max(x,0)*100/m.allocated;return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`usage bg-${m.color}`,style:{width:`${Math.min(y,100)}%`}}),it(x,{abbreviate:!0})," of"," ",it(m.allocated,{abbreviate:!0})," ",m.unit," ","remaining (",Math.round(y),"%)"]})}},{key:"endDate",name:"End Date",format:p=>go(p)}];return r.isManager&&f.push({key:"userCount",name:"Users",class:"text-end",format:it}),r.currentUser&&f.push({key:"resourceUsername",name:"My Username",format:(p,m)=>{const x=r.currentUser.resourceUsernames[m.resourceId];if(x)return x;if(r.currentUser.resourceAccountPendingIds.includes(m.resourceId))return a.jsx($o,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(r.currentUser.resourceIds.includes(m.resourceId)||!m.isActive)return a.jsx(a.Fragment,{children:"—"});if(r.isManager)return a.jsx("a",{href:"#",onClick:g=>{g.preventDefault(),o("users")},children:"Grant access"});const y=a.jsxs(zl,{children:["Please contact ",Vf(r)," to request access to this resource."]});return a.jsx(fp,{overlay:y,children:a.jsx("a",{href:"#",onClick:g=>{g.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:[Tn(ne.resourceTypeIcons[s.icon])," ",it(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:Tn("chevron-right")})]})]}):null,l.length?a.jsx(mn,{columns:f,rows:l}):null]})}const uT=[{key:"role",name:"Role",format:e=>a.jsxs(a.Fragment,{children:[Tn(ne.roleIcons[e])," ",e]})},{key:"users",name:"Users",format:e=>{const t=e.slice(0,3);return e.length>4&&(t[2]=`${it(e.length-3)} others`),t.map((n,r)=>{const o=t.length-r;return`${n}${o>2?",":o==2&&t.length>1?" and":""}`}).join(" ")}}],dT=({requestId:e,grantNumber:t})=>{const{project:n}=kt(t);if(!n)return;const r=Ml.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(mn,{rows:r,columns:uT}):null};function fT({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r,username:o}=kt(t||n.grantNumber);if(!(!n||!r||n.error||r.error)&&n)return a.jsxs("div",{className:"overview",children:[a.jsx(cT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(dT,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(zO,{requestId:e})})]}):null]})}function Ar(e){"@babel/helpers - typeof";return Ar=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},Ar(e)}function pT(e,t){if(Ar(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ar(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mb(e){var t=pT(e,"string");return Ar(t)=="symbol"?t:String(t)}function ao(e,t,n){return t=Mb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zm(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 W(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zm(Object(n),!0).forEach(function(r){ao(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hT(e){if(Array.isArray(e))return e}function mT(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 wd(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 Ab(e,t){if(e){if(typeof e=="string")return wd(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 wd(e,t)}}function gT(){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 ze(e,t){return
|
|
60
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pp(e){return _T(e)||CT(e)||Ab(e)||ET()}function RT(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 NT(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 kT=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(NT(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=RT(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}(),et="-ms-",al="-moz-",fe="-webkit-",Lb="comm",hp="rule",mp="decl",OT="@import",Ub="@keyframes",TT="@layer",PT=Math.abs,Bl=String.fromCharCode,IT=Object.assign;function $T(e,t){return Ge(e,0)^45?(((t<<2^Ge(e,0))<<2^Ge(e,1))<<2^Ge(e,2))<<2^Ge(e,3):0}function Vb(e){return e.trim()}function MT(e,t){return(e=t.exec(e))?e[0]:e}function pe(e,t,n){return e.replace(t,n)}function Sd(e,t){return e.indexOf(t)}function Ge(e,t){return e.charCodeAt(t)|0}function Gs(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function gp(e){return e.length}function Ui(e,t){return t.push(e),e}function AT(e,t){return e.map(t).join("")}var ql=1,Mo=1,zb=0,wt=0,Me=0,qo="";function Hl(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:ql,column:Mo,length:i,return:""}}function os(e,t){return IT(Hl("",null,null,"",null,null,0),e,{length:-e.length},t)}function DT(){return Me}function FT(){return Me=wt>0?Ge(qo,--wt):0,Mo--,Me===10&&(Mo=1,ql--),Me}function Ct(){return Me=wt<zb?Ge(qo,wt++):0,Mo++,Me===10&&(Mo=1,ql++),Me}function pn(){return Ge(qo,wt)}function pa(){return wt}function di(e,t){return Gs(qo,e,t)}function Ys(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 Bb(e){return ql=Mo=1,zb=sn(qo=e),wt=0,[]}function qb(e){return qo="",e}function ha(e){return Vb(di(wt-1,jd(e===91?e+2:e===40?e+1:e)))}function LT(e){for(;(Me=pn())&&Me<33;)Ct();return Ys(e)>2||Ys(Me)>3?"":" "}function UT(e,t){for(;--t&&Ct()&&!(Me<48||Me>102||Me>57&&Me<65||Me>70&&Me<97););return di(e,pa()+(t<6&&pn()==32&&Ct()==32))}function jd(e){for(;Ct();)switch(Me){case e:return wt;case 34:case 39:e!==34&&e!==39&&jd(Me);break;case 40:e===41&&jd(e);break;case 92:Ct();break}return wt}function VT(e,t){for(;Ct()&&e+Me!==57;)if(e+Me===84&&pn()===47)break;return"/*"+di(t,wt-1)+"*"+Bl(e===47?e:Ct())}function zT(e){for(;!Ys(pn());)Ct();return di(e,wt)}function BT(e){return qb(ma("",null,null,null,[""],e=Bb(e),0,[0],e))}function ma(e,t,n,r,o,s,i,l,c){for(var u=0,d=0,f=i,p=0,m=0,x=0,y=1,g=1,h=1,v=0,b="",S=o,j=s,_=r,E=b;g;)switch(x=v,v=Ct()){case 40:if(x!=108&&Ge(E,f-1)==58){Sd(E+=pe(ha(v),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:E+=ha(v);break;case 9:case 10:case 13:case 32:E+=LT(x);break;case 92:E+=UT(pa()-1,7);continue;case 47:switch(pn()){case 42:case 47:Ui(qT(VT(Ct(),pa()),t,n),c);break;default:E+="/"}break;case 123*y:l[u++]=sn(E)*h;case 125*y:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+d:h==-1&&(E=pe(E,/\f/g,"")),m>0&&sn(E)-f&&Ui(m>32?tg(E+";",r,n,f-1):tg(pe(E," ","")+";",r,n,f-2),c);break;case 59:E+=";";default:if(Ui(_=eg(E,t,n,u,d,o,l,b,S=[],j=[],f),s),v===123)if(d===0)ma(E,t,_,_,S,s,f,l,j);else switch(p===99&&Ge(E,3)===110?100:p){case 100:case 108:case 109:case 115:ma(e,_,_,r&&Ui(eg(e,_,_,0,0,o,l,b,o,S=[],f),j),o,j,f,l,r?S:j);break;default:ma(E,_,_,_,[""],j,0,l,j)}}u=d=m=0,y=h=1,b=E="",f=i;break;case 58:f=1+sn(E),m=x;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&FT()==125)continue}switch(E+=Bl(v),v*y){case 38:h=d>0?1:(E+="\f",-1);break;case 44:l[u++]=(sn(E)-1)*h,h=1;break;case 64:pn()===45&&(E+=ha(Ct())),p=pn(),d=f=sn(b=E+=zT(pa())),v++;break;case 45:x===45&&sn(E)==2&&(y=0)}}return s}function eg(e,t,n,r,o,s,i,l,c,u,d){for(var f=o-1,p=o===0?s:[""],m=gp(p),x=0,y=0,g=0;x<r;++x)for(var h=0,v=Gs(e,f+1,f=PT(y=i[x])),b=e;h<m;++h)(b=Vb(y>0?p[h]+" "+v:pe(v,/&\f/g,p[h])))&&(c[g++]=b);return Hl(e,t,n,o===0?hp:l,c,u,d)}function qT(e,t,n){return Hl(e,t,n,Lb,Bl(DT()),Gs(e,2,-2),0)}function tg(e,t,n,r){return Hl(e,t,n,mp,Gs(e,0,r),Gs(e,r+1,-1),r)}function vo(e,t){for(var n="",r=gp(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function HT(e,t,n,r){switch(e.type){case TT:if(e.children.length)break;case OT:case mp:return e.return=e.return||e.value;case Lb:return"";case Ub:return e.return=e.value+"{"+vo(e.children,r)+"}";case hp:e.value=e.props.join(",")}return sn(n=vo(e.children,r))?e.return=e.value+"{"+n+"}":""}function WT(e){var t=gp(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 KT(e){return function(t){t.root||(t=t.return)&&e(t)}}function GT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var YT=function(t,n,r){for(var o=0,s=0;o=s,s=pn(),o===38&&s===12&&(n[r]=1),!Ys(s);)Ct();return di(t,wt)},QT=function(t,n){var r=-1,o=44;do switch(Ys(o)){case 0:o===38&&pn()===12&&(n[r]=1),t[r]+=YT(wt-1,n,r);break;case 2:t[r]+=ha(o);break;case 4:if(o===44){t[++r]=pn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Bl(o)}while(o=Ct());return t},XT=function(t,n){return qb(QT(Bb(t),n))},ng=new WeakMap,ZT=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&&!ng.get(r))&&!o){ng.set(t,!0);for(var s=[],i=XT(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]}}},JT=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Hb(e,t){switch($T(e,t)){case 5103:return fe+"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 fe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return fe+e+al+e+et+e+e;case 6828:case 4268:return fe+e+et+e+e;case 6165:return fe+e+et+"flex-"+e+e;case 5187:return fe+e+pe(e,/(\w+).+(:[^]+)/,fe+"box-$1$2"+et+"flex-$1$2")+e;case 5443:return fe+e+et+"flex-item-"+pe(e,/flex-|-self/,"")+e;case 4675:return fe+e+et+"flex-line-pack"+pe(e,/align-content|flex-|-self/,"")+e;case 5548:return fe+e+et+pe(e,"shrink","negative")+e;case 5292:return fe+e+et+pe(e,"basis","preferred-size")+e;case 6060:return fe+"box-"+pe(e,"-grow","")+fe+e+et+pe(e,"grow","positive")+e;case 4554:return fe+pe(e,/([^-])(transform)/g,"$1"+fe+"$2")+e;case 6187:return pe(pe(pe(e,/(zoom-|grab)/,fe+"$1"),/(image-set)/,fe+"$1"),e,"")+e;case 5495:case 3959:return pe(e,/(image-set\([^]*)/,fe+"$1$`$1");case 4968:return pe(pe(e,/(.+:)(flex-)?(.*)/,fe+"box-pack:$3"+et+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+fe+e+e;case 4095:case 3583:case 4068:case 2532:return pe(e,/(.+)-inline(.+)/,fe+"$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(Ge(e,t+1)){case 109:if(Ge(e,t+4)!==45)break;case 102:return pe(e,/(.+:)(.+)-([^]+)/,"$1"+fe+"$2-$3$1"+al+(Ge(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Sd(e,"stretch")?Hb(pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ge(e,t+1)!==115)break;case 6444:switch(Ge(e,sn(e)-3-(~Sd(e,"!important")&&10))){case 107:return pe(e,":",":"+fe)+e;case 101:return pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+fe+(Ge(e,14)===45?"inline-":"")+"box$3$1"+fe+"$2$3$1"+et+"$2box$3")+e}break;case 5936:switch(Ge(e,t+11)){case 114:return fe+e+et+pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fe+e+et+pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fe+e+et+pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return fe+e+et+e+e}return e}var eP=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case mp:t.return=Hb(t.value,t.length);break;case Ub:return vo([os(t,{value:pe(t.value,"@","@"+fe)})],o);case hp:if(t.length)return AT(t.props,function(s){switch(MT(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return vo([os(t,{props:[pe(s,/:(read-\w+)/,":"+al+"$1")]})],o);case"::placeholder":return vo([os(t,{props:[pe(s,/:(plac\w+)/,":"+fe+"input-$1")]}),os(t,{props:[pe(s,/:(plac\w+)/,":"+al+"$1")]}),os(t,{props:[pe(s,/:(plac\w+)/,et+"input-$1")]})],o)}return""})}},tP=[eP],nP=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(y){var g=y.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||tP,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var g=y.getAttribute("data-emotion").split(" "),h=1;h<g.length;h++)s[g[h]]=!0;l.push(y)});var c,u=[ZT,JT];{var d,f=[HT,KT(function(y){d.insert(y)})],p=WT(u.concat(o,f)),m=function(g){return vo(BT(g),p)};c=function(g,h,v,b){d=v,m(g?g+"{"+h.styles+"}":h.styles),b&&(x.inserted[h.name]=!0)}}var x={key:n,sheet:new kT({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 x.sheet.hydrate(l),x},Wb={exports:{}},ye={};/** @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})()})(Kx);var zR=Kx.exports;const oe=Js(zR);function Kf(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 el(e,t){return el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},el(e,t)}function BR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,el(e,t)}const Rm={disabled:!1},Gx=Ee.createContext(null);var qR=function(t){return t.scrollTop},fs="unmounted",Gn="exited",Sn="entering",Xn="entered",tl="exiting",qn=function(e){BR(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=Gn,s.appearStatus=Sn):c=Xn:r.unmountOnExit||r.mountOnEnter?c=fs:c=Gn,s.state={status:c},s.nextCallback=null,s}t.getDerivedStateFromProps=function(o,s){var i=o.in;return i&&s.status===fs?{status:Gn}: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!==Xn&&(s=Sn):(i===Sn||i===Xn)&&(s=tl)}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&&qR(i)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Gn&&this.setState({status:fs})},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||Rm.disabled){this.safeSetState({status:Xn},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:Xn},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||Rm.disabled){this.safeSetState({status:Gn},function(){o.props.onExited(l)});return}this.props.onExit(l),this.safeSetState({status:tl},function(){o.props.onExiting(l),o.onTransitionEnd(i.exit,function(){o.safeSetState({status:Gn},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===fs)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=Kf(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ee.createElement(Gx.Provider,{value:null},typeof i=="function"?i(o,l):Ee.cloneElement(Ee.Children.only(i),l))},t}(Ee.Component);qn.contextType=Gx;qn.propTypes={};function Hr(){}qn.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};qn.UNMOUNTED=fs;qn.EXITED=Gn;qn.ENTERING=Sn;qn.ENTERED=Xn;qn.EXITING=tl;const HR=qn;function Vo(e){return e&&e.ownerDocument||document}function WR(e){var t=Vo(e);return t&&t.defaultView||window}function KR(e,t){return WR(e).getComputedStyle(e,t)}var GR=/([A-Z])/g;function YR(e){return e.replace(GR,"-$1").toLowerCase()}var QR=/^ms-/;function Di(e){return YR(e).replace(QR,"-ms-")}var XR=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function ZR(e){return!!(e&&XR.test(e))}function Pn(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Di(t))||KR(e).getPropertyValue(Di(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Di(o)):ZR(o)?r+=o+"("+s+") ":n+=Di(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const zo=!!(typeof window<"u"&&window.document&&window.document.createElement);var dd=!1,fd=!1;try{var zc={get passive(){return dd=!0},get once(){return fd=dd=!0}};zo&&(window.addEventListener("test",zc,zc),window.removeEventListener("test",zc,!0))}catch{}function Gf(e,t,n,r){if(r&&typeof r!="boolean"&&!fd){var o=r.once,s=r.capture,i=n;!fd&&o&&(i=n.__once||function l(c){this.removeEventListener(t,l,s),n.call(this,c)},n.__once=i),e.addEventListener(t,i,dd?r:s)}e.addEventListener(t,n,r)}function pd(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 Nn(e,t,n,r){return Gf(e,t,n,r),function(){pd(e,t,n,r)}}function JR(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 eN(e){var t=Pn(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function tN(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||JR(e,"transitionend",!0)},t+n),s=Nn(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Yx(e,t,n,r){n==null&&(n=eN(e)||0);var o=tN(e,n,r),s=Nn(e,"transitionend",t);return function(){o(),s()}}function Nm(e,t){const n=Pn(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Qx(e,t){const n=Nm(e,"transitionDuration"),r=Nm(e,"transitionDelay"),o=Yx(e,s=>{s.target===e&&(o(),t(s))},n+r)}function Xx(e){e.offsetHeight}function nl(e){return e&&"setState"in e?Sr.findDOMNode(e):e??null}const nN=Ee.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),m=j=>{p(nl(j))},v=j=>E=>{j&&f.current&&j(f.current,E)},y=w.useCallback(v(e),[e]),g=w.useCallback(v(t),[t]),h=w.useCallback(v(n),[n]),x=w.useCallback(v(r),[r]),b=w.useCallback(v(o),[o]),S=w.useCallback(v(s),[s]),_=w.useCallback(v(i),[i]);return a.jsx(HR,{ref:d,...u,onEnter:y,onEntered:h,onEntering:g,onExit:x,onExited:S,onExiting:b,addEndListener:_,nodeRef:f,children:typeof l=="function"?(j,E)=>l(j,{...E,ref:m}):Ee.cloneElement(l,{ref:m})})}),Zx=nN,rN={[Sn]:"show",[Xn]:"show"},Jx=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)=>{Xx(c),r==null||r(c,u)},[r]);return a.jsx(Zx,{ref:s,addEndListener:Qx,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:oe("fade",e,t.props.className,rN[c],n[c])})})});Jx.displayName="Fade";const No=Jx;function Yf(e){return typeof e=="boolean"?e?No:Wf:e}const e0=({transition:e,...t})=>a.jsx(Wx,{...t,transition:Yf(e)});e0.displayName="TabContainer";const oN=e0,sN=["xxl","xl","lg","md","sm","xs"],iN="xs",t0=w.createContext({prefixes:{},breakpoints:sN,minBreakpoint:iN});function he(e,t){const{prefixes:n}=w.useContext(t0);return e||n[t]||t}function Ml(){const{dir:e}=w.useContext(t0);return e==="rtl"}const n0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"tab-content"),a.jsx(n,{ref:o,className:oe(e,t),...r})));n0.displayName="TabContent";const r0=n0,o0=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:m,mountOnEnter:v,unmountOnExit:y,transition:g=No}]=Bx({...n,transition:Yf(t)}),h=he(e,"tab-pane");return a.jsx(Uo.Provider,{value:null,children:a.jsx(Ln.Provider,{value:null,children:a.jsx(g,{in:l,onEnter:c,onEntering:u,onEntered:d,onExit:f,onExiting:p,onExited:m,mountOnEnter:v,unmountOnExit:y,children:a.jsx(s,{...i,ref:r,className:oe(o,h,l&&"active")})})})})});o0.displayName="TabPane";const s0=o0,aN={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},i0=()=>{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")};i0.propTypes=aN;const ts=Object.assign(i0,{Container:oN,Content:r0,Pane:s0});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 km(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function lN(e){var t=cN(e,"string");return typeof t=="symbol"?t:String(t)}function cN(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 a0(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 Dl(e,t){return Object.keys(t).reduce(function(n,r){var o,s=n,i=s[km(r)],l=s[r],c=Kf(s,[km(r),r].map(lN)),u=t[r],d=a0(l,i,e[u]),f=d[0],p=d[1];return Y({},c,(o={},o[r]=f,o[u]=p,o))},e)}var Om={exports:{}},hd={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>>",m=f||c;if(l[c]==null)return i?new Error("Required "+d+" `"+m+"` was not specified "+("in `"+p+"`.")):null;for(var v=arguments.length,y=Array(v>6?v-6:0),g=6;g<v;g++)y[g-6]=arguments[g];return r.apply(void 0,[l,c,p,d,m].concat(y))}var s=o.bind(null,!1);return s.isRequired=o.bind(null,!0),s}e.exports=t.default})(hd,hd.exports);var uN=hd.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=uN,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 m=null;return l.forEach(function(v){if(m==null){var y=v.apply(void 0,f);y!=null&&(m=y)}}),m}return(0,r.default)(u)}e.exports=t.default})(Om,Om.exports);var dN=Function.prototype.bind.call(Function.prototype.call,[].slice);function _n(e,t){return dN(e.querySelectorAll(t))}function l0(){const[,e]=w.useReducer(t=>!t,!1);return e}const c0=w.createContext(null);c0.displayName="NavContext";const Qf=c0,fN="data-rr-ui-",pN="rrUi";function Bo(e){return`${fN}${e}`}function hN(e){return`${pN}${e}`}const mN=["as","disabled"];function gN(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 vN(e){return!e||e.trim()==="#"}function Xf({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"&&vN(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 Zf=w.forwardRef((e,t)=>{let{as:n,disabled:r}=e,o=gN(e,mN);const[s,{tagName:i}]=Xf(Object.assign({tagName:n,disabled:r},o));return a.jsx(i,Object.assign({},o,s,{ref:t}))});Zf.displayName="Button";const yN=["as","active","eventKey"];function xN(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 u0({key:e,onClick:t,active:n,id:r,role:o,disabled:s}){const i=w.useContext(Ln),l=w.useContext(Qf),c=w.useContext(Uo);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[Bo("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 d0=w.forwardRef((e,t)=>{let{as:n=Zf,active:r,eventKey:o}=e,s=xN(e,yN);const[i,l]=u0(Object.assign({key:$r(o,s.href),active:r},s));return i[Bo("active")]=l.isActive,a.jsx(n,Object.assign({},s,i,{ref:t}))});d0.displayName="NavItem";const bN=d0,wN=["as","onSelect","activeKey","role","onKeyDown"];function SN(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 Tm=()=>{},Pm=Bo("event-key"),f0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=SN(e,wN);const c=l0(),u=w.useRef(!1),d=w.useContext(Ln),f=w.useContext(Uo);let p,m;f&&(s=s||"tablist",o=f.activeKey,p=f.getControlledId,m=f.getControllerId);const v=w.useRef(null),y=b=>{const S=v.current;if(!S)return null;const _=_n(S,`[${Pm}]:not([aria-disabled=true])`),j=S.querySelector("[aria-selected=true]");if(!j||j!==document.activeElement)return null;const E=_.indexOf(j);if(E===-1)return null;let C=E+b;return C>=_.length&&(C=0),C<0&&(C=_.length-1),_[C]},g=(b,S)=>{b!=null&&(r==null||r(b,S),d==null||d(b,S))},h=b=>{if(i==null||i(b),!f)return;let S;switch(b.key){case"ArrowLeft":case"ArrowUp":S=y(-1);break;case"ArrowRight":case"ArrowDown":S=y(1);break;default:return}S&&(b.preventDefault(),g(S.dataset[hN("EventKey")]||null,b),u.current=!0,c())};w.useEffect(()=>{if(v.current&&u.current){const b=v.current.querySelector(`[${Pm}][aria-selected=true]`);b==null||b.focus()}u.current=!1});const x=mn(t,v);return a.jsx(Ln.Provider,{value:g,children:a.jsx(Qf.Provider,{value:{role:s,activeKey:$r(o),getControlledId:p||Tm,getControllerId:m||Tm},children:a.jsx(n,Object.assign({},l,{onKeyDown:h,ref:x,role:s}))})})});f0.displayName="Nav";const _N=Object.assign(f0,{Item:bN}),p0=w.createContext(null);p0.displayName="NavbarContext";const h0=p0,m0=w.createContext(null);m0.displayName="CardHeaderContext";const CN=m0,g0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"nav-item"),a.jsx(n,{ref:o,className:oe(e,t),...r})));g0.displayName="NavItem";const v0=g0;function rl(){return w.useState(null)}function jN(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 Jf(){const e=w.useRef(!0),t=w.useRef(()=>e.current);return w.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function y0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const EN=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",RN=typeof document<"u",ol=RN||EN?w.useLayoutEffect:w.useEffect,NN=["onKeyDown"];function kN(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 ON(e){return!e||e.trim()==="#"}const x0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=kN(e,NN);const[o]=Xf(Object.assign({tagName:"a"},r)),s=Te(i=>{o.onKeyDown(i),n==null||n(i)});return ON(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}))});x0.displayName="Anchor";const b0=x0,w0=w.forwardRef(({bsPrefix:e,className:t,as:n=b0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=he(e,"nav-link");const[c,u]=u0({key:$r(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")})});w0.displayName="NavLink";const S0=w0,_0=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}=Dl(e,{activeKey:"onSelect"}),p=he(r,"nav");let m,v,y=!1;const g=w.useContext(h0),h=w.useContext(CN);return g?(m=g.bsPrefix,y=l??!0):h&&({cardHeaderBsPrefix:v}=h),a.jsx(_N,{as:n,ref:t,activeKey:d,className:oe(u,{[p]:!y,[`${m}-nav`]:y,[`${m}-nav-scroll`]:y&&c,[`${v}-${o}`]:!!v,[`${p}-${o}`]:!!o,[`${p}-fill`]:s,[`${p}-justified`]:i}),...f})});_0.displayName="Nav";const TN=Object.assign(_0,{Item:v0,Link:S0});function Im(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 IN(e){let t;return PN(e,n=>{t==null&&(t=n.props.eventKey)}),t}function $N(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(v0,{as:"li",role:"presentation",children:a.jsx(S0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const C0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=IN(l),...u}=Dl(e,{activeKey:"onSelect"});return a.jsxs(Wx,{id:t,activeKey:c,onSelect:n,transition:Yf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(TN,{...u,role:"tablist",as:"ul",variant:i,children:Im(l,$N)}),a.jsx(r0,{children:Im(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(s0,{...f})})})]})};C0.displayName="Tabs";const AN=C0,MN=w.createContext(null),Fl=MN;var $m=Object.prototype.hasOwnProperty;function Am(e,t,n){for(n of e.keys())if(Ss(n,t))return n}function Ss(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--&&Ss(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=Am(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=Am(t,o),!o)||!Ss(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($m.call(e,n)&&++r&&!$m.call(t,n)||!(n in t)||!Ss(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function DN(e){const t=Jf();return[e[0],w.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var yt="top",Vt="bottom",zt="right",xt="left",ep="auto",ci=[yt,Vt,zt,xt],ko="start",Hs="end",FN="clippingParents",j0="viewport",ns="popper",LN="reference",Mm=ci.reduce(function(e,t){return e.concat([t+"-"+ko,t+"-"+Hs])},[]),E0=[].concat(ci,[ep]).reduce(function(e,t){return e.concat([t,t+"-"+ko,t+"-"+Hs])},[]),UN="beforeRead",VN="read",zN="afterRead",BN="beforeMain",qN="main",HN="afterMain",WN="beforeWrite",KN="write",GN="afterWrite",YN=[UN,VN,zN,BN,qN,HN,WN,KN,GN];function un(e){return e.split("-")[0]}function Ot(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ar(e){var t=Ot(e).Element;return e instanceof t||e instanceof Element}function dn(e){var t=Ot(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function tp(e){if(typeof ShadowRoot>"u")return!1;var t=Ot(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Er=Math.max,sl=Math.min,Oo=Math.round;function md(){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 R0(){return!/^((?!chrome|android).)*safari/i.test(md())}function To(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,s=1;t&&dn(e)&&(o=e.offsetWidth>0&&Oo(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Oo(r.height)/e.offsetHeight||1);var i=Ar(e)?Ot(e):window,l=i.visualViewport,c=!R0()&&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 np(e){var t=To(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 N0(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&tp(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 Un(e){return Ot(e).getComputedStyle(e)}function QN(e){return["table","td","th"].indexOf(dr(e))>=0}function mr(e){return((Ar(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ll(e){return dr(e)==="html"?e:e.assignedSlot||e.parentNode||(tp(e)?e.host:null)||mr(e)}function Dm(e){return!dn(e)||Un(e).position==="fixed"?null:e.offsetParent}function XN(e){var t=/firefox/i.test(md()),n=/Trident/i.test(md());if(n&&dn(e)){var r=Un(e);if(r.position==="fixed")return null}var o=Ll(e);for(tp(o)&&(o=o.host);dn(o)&&["html","body"].indexOf(dr(o))<0;){var s=Un(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 ui(e){for(var t=Ot(e),n=Dm(e);n&&QN(n)&&Un(n).position==="static";)n=Dm(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Un(n).position==="static")?t:n||XN(e)||t}function rp(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function _s(e,t,n){return Er(e,sl(t,n))}function ZN(e,t,n){var r=_s(e,t,n);return r>n?n:r}function k0(){return{top:0,right:0,bottom:0,left:0}}function O0(e){return Object.assign({},k0(),e)}function T0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var JN=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,O0(typeof t!="number"?t:T0(t,ci))};function ek(e){var t,n=e.state,r=e.name,o=e.options,s=n.elements.arrow,i=n.modifiersData.popperOffsets,l=un(n.placement),c=rp(l),u=[xt,zt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=JN(o.padding,n),p=np(s),m=c==="y"?yt:xt,v=c==="y"?Vt:zt,y=n.rects.reference[d]+n.rects.reference[c]-i[c]-n.rects.popper[d],g=i[c]-n.rects.reference[c],h=ui(s),x=h?c==="y"?h.clientHeight||0:h.clientWidth||0:0,b=y/2-g/2,S=f[m],_=x-p[d]-f[v],j=x/2-p[d]/2+b,E=_s(S,j,_),C=c;n.modifiersData[r]=(t={},t[C]=E,t.centerOffset=E-j,t)}}function tk(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)||N0(t.elements.popper,o)&&(t.elements.arrow=o))}const nk={name:"arrow",enabled:!0,phase:"main",fn:ek,effect:tk,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Po(e){return e.split("-")[1]}var rk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ok(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Oo(n*o)/o||0,y:Oo(r*o)/o||0}}function Fm(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,m=p===void 0?0:p,v=i.y,y=v===void 0?0:v,g=typeof d=="function"?d({x:m,y}):{x:m,y};m=g.x,y=g.y;var h=i.hasOwnProperty("x"),x=i.hasOwnProperty("y"),b=xt,S=yt,_=window;if(u){var j=ui(n),E="clientHeight",C="clientWidth";if(j===Ot(n)&&(j=mr(n),Un(j).position!=="static"&&l==="absolute"&&(E="scrollHeight",C="scrollWidth")),j=j,o===yt||(o===xt||o===zt)&&s===Hs){S=Vt;var N=f&&j===_&&_.visualViewport?_.visualViewport.height:j[E];y-=N-r.height,y*=c?1:-1}if(o===xt||(o===yt||o===Vt)&&s===Hs){b=zt;var R=f&&j===_&&_.visualViewport?_.visualViewport.width:j[C];m-=R-r.width,m*=c?1:-1}}var O=Object.assign({position:l},u&&rk),k=d===!0?ok({x:m,y},Ot(n)):{x:m,y};if(m=k.x,y=k.y,c){var P;return Object.assign({},O,(P={},P[S]=x?"0":"",P[b]=h?"0":"",P.transform=(_.devicePixelRatio||1)<=1?"translate("+m+"px, "+y+"px)":"translate3d("+m+"px, "+y+"px, 0)",P))}return Object.assign({},O,(t={},t[S]=x?y+"px":"",t[b]=h?m+"px":"",t.transform="",t))}function sk(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:un(t.placement),variation:Po(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,Fm(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,Fm(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 ik={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:sk,data:{}};var Fi={passive:!0};function ak(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=Ot(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",n.update,Fi)}),l&&c.addEventListener("resize",n.update,Fi),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Fi)}),l&&c.removeEventListener("resize",n.update,Fi)}}const lk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ak,data:{}};var ck={left:"right",right:"left",bottom:"top",top:"bottom"};function da(e){return e.replace(/left|right|bottom|top/g,function(t){return ck[t]})}var uk={start:"end",end:"start"};function Lm(e){return e.replace(/start|end/g,function(t){return uk[t]})}function op(e){var t=Ot(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function sp(e){return To(mr(e)).left+op(e).scrollLeft}function dk(e,t){var n=Ot(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=R0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+sp(e),y:c}}function fk(e){var t,n=mr(e),r=op(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+sp(e),c=-r.scrollTop;return Un(o||n).direction==="rtl"&&(l+=Er(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:c}}function ip(e){var t=Un(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function P0(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:dn(e)&&ip(e)?e:P0(Ll(e))}function Cs(e,t){var n;t===void 0&&(t=[]);var r=P0(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),s=Ot(r),i=o?[s].concat(s.visualViewport||[],ip(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(Cs(Ll(i)))}function gd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function pk(e,t){var n=To(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 Um(e,t,n){return t===j0?gd(dk(e,n)):Ar(t)?pk(t,n):gd(fk(mr(e)))}function hk(e){var t=Cs(Ll(e)),n=["absolute","fixed"].indexOf(Un(e).position)>=0,r=n&&dn(e)?ui(e):e;return Ar(r)?t.filter(function(o){return Ar(o)&&N0(o,r)&&dr(o)!=="body"}):[]}function mk(e,t,n,r){var o=t==="clippingParents"?hk(e):[].concat(t),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(c,u){var d=Um(e,u,r);return c.top=Er(d.top,c.top),c.right=sl(d.right,c.right),c.bottom=sl(d.bottom,c.bottom),c.left=Er(d.left,c.left),c},Um(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 I0(e){var t=e.reference,n=e.element,r=e.placement,o=r?un(r):null,s=r?Po(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(o){case yt:c={x:i,y:t.y-n.height};break;case Vt:c={x:i,y:t.y+t.height};break;case zt:c={x:t.x+t.width,y:l};break;case xt:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var u=o?rp(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case ko:c[u]=c[u]-(t[d]/2-n[d]/2);break;case Hs:c[u]=c[u]+(t[d]/2-n[d]/2);break}}return c}function Ws(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?FN:l,u=n.rootBoundary,d=u===void 0?j0:u,f=n.elementContext,p=f===void 0?ns:f,m=n.altBoundary,v=m===void 0?!1:m,y=n.padding,g=y===void 0?0:y,h=O0(typeof g!="number"?g:T0(g,ci)),x=p===ns?LN:ns,b=e.rects.popper,S=e.elements[v?x:p],_=mk(Ar(S)?S:S.contextElement||mr(e.elements.popper),c,d,i),j=To(e.elements.reference),E=I0({reference:j,element:b,strategy:"absolute",placement:o}),C=gd(Object.assign({},b,E)),N=p===ns?C:j,R={top:_.top-N.top+h.top,bottom:N.bottom-_.bottom+h.bottom,left:_.left-N.left+h.left,right:N.right-_.right+h.right},O=e.modifiersData.offset;if(p===ns&&O){var k=O[o];Object.keys(R).forEach(function(P){var U=[zt,Vt].indexOf(P)>=0?1:-1,F=[yt,Vt].indexOf(P)>=0?"y":"x";R[P]+=k[F]*U})}return R}function gk(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?E0:c,d=Po(r),f=d?l?Mm:Mm.filter(function(v){return Po(v)===d}):ci,p=f.filter(function(v){return u.indexOf(v)>=0});p.length===0&&(p=f);var m=p.reduce(function(v,y){return v[y]=Ws(e,{placement:y,boundary:o,rootBoundary:s,padding:i})[un(y)],v},{});return Object.keys(m).sort(function(v,y){return m[v]-m[y]})}function vk(e){if(un(e)===ep)return[];var t=da(e);return[Lm(e),t,Lm(t)]}function yk(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,m=n.flipVariations,v=m===void 0?!0:m,y=n.allowedAutoPlacements,g=t.options.placement,h=un(g),x=h===g,b=c||(x||!v?[da(g)]:vk(g)),S=[g].concat(b).reduce(function(J,ee){return J.concat(un(ee)===ep?gk(t,{placement:ee,boundary:d,rootBoundary:f,padding:u,flipVariations:v,allowedAutoPlacements:y}):ee)},[]),_=t.rects.reference,j=t.rects.popper,E=new Map,C=!0,N=S[0],R=0;R<S.length;R++){var O=S[R],k=un(O),P=Po(O)===ko,U=[yt,Vt].indexOf(k)>=0,F=U?"width":"height",V=Ws(t,{placement:O,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),Z=U?P?zt:xt:P?Vt:yt;_[F]>j[F]&&(Z=da(Z));var T=da(Z),L=[];if(s&&L.push(V[k]<=0),l&&L.push(V[Z]<=0,V[T]<=0),L.every(function(J){return J})){N=O,C=!1;break}E.set(O,L)}if(C)for(var M=v?3:1,W=function(ee){var Q=S.find(function(te){var ue=E.get(te);if(ue)return ue.slice(0,ee).every(function(Ce){return Ce})});if(Q)return N=Q,"break"},B=M;B>0;B--){var X=W(B);if(X==="break")break}t.placement!==N&&(t.modifiersData[r]._skip=!0,t.placement=N,t.reset=!0)}}const xk={name:"flip",enabled:!0,phase:"main",fn:yk,requiresIfExists:["offset"],data:{_skip:!1}};function Vm(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 zm(e){return[yt,zt,Vt,xt].some(function(t){return e[t]>=0})}function bk(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,s=t.modifiersData.preventOverflow,i=Ws(t,{elementContext:"reference"}),l=Ws(t,{altBoundary:!0}),c=Vm(i,r),u=Vm(l,o,s),d=zm(c),f=zm(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 wk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bk};function Sk(e,t,n){var r=un(e),o=[xt,yt].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,[xt,zt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function _k(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=E0.reduce(function(d,f){return d[f]=Sk(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 Ck={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_k};function jk(e){var t=e.state,n=e.name;t.modifiersData[n]=I0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Ek={name:"popperOffsets",enabled:!0,phase:"read",fn:jk,data:{}};function Rk(e){return e==="x"?"y":"x"}function Nk(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,m=p===void 0?!0:p,v=n.tetherOffset,y=v===void 0?0:v,g=Ws(t,{boundary:c,rootBoundary:u,padding:f,altBoundary:d}),h=un(t.placement),x=Po(t.placement),b=!x,S=rp(h),_=Rk(S),j=t.modifiersData.popperOffsets,E=t.rects.reference,C=t.rects.popper,N=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(j){if(s){var P,U=S==="y"?yt:xt,F=S==="y"?Vt:zt,V=S==="y"?"height":"width",Z=j[S],T=Z+g[U],L=Z-g[F],M=m?-C[V]/2:0,W=x===ko?E[V]:C[V],B=x===ko?-C[V]:-E[V],X=t.elements.arrow,J=m&&X?np(X):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:k0(),Q=ee[U],te=ee[F],ue=_s(0,E[V],J[V]),Ce=b?E[V]/2-M-ue-Q-R.mainAxis:W-ue-Q-R.mainAxis,De=b?-E[V]/2+M+ue+te+R.mainAxis:B+ue+te+R.mainAxis,Ze=t.elements.arrow&&ui(t.elements.arrow),me=Ze?S==="y"?Ze.clientTop||0:Ze.clientLeft||0:0,Ie=(P=O==null?void 0:O[S])!=null?P:0,A=Z+Ce-Ie-me,D=Z+De-Ie,de=_s(m?sl(T,A):T,Z,m?Er(L,D):L);j[S]=de,k[S]=de-Z}if(l){var re,dt=S==="x"?yt:xt,ot=S==="x"?Vt:zt,be=j[_],Bt=_==="y"?"height":"width",$t=be+g[dt],hi=be-g[ot],Vr=[yt,xt].indexOf(h)!==-1,mi=(re=O==null?void 0:O[_])!=null?re:0,ae=Vr?$t:be-E[Bt]-C[Bt]-mi+R.altAxis,vn=Vr?be+E[Bt]+C[Bt]-mi-R.altAxis:hi,Ho=m&&Vr?ZN(ae,be,vn):_s(m?ae:$t,be,m?vn:hi);j[_]=Ho,k[_]=Ho-be}t.modifiersData[r]=k}}const kk={name:"preventOverflow",enabled:!0,phase:"main",fn:Nk,requiresIfExists:["offset"]};function Ok(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Tk(e){return e===Ot(e)||!dn(e)?op(e):Ok(e)}function Pk(e){var t=e.getBoundingClientRect(),n=Oo(t.width)/e.offsetWidth||1,r=Oo(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Ik(e,t,n){n===void 0&&(n=!1);var r=dn(t),o=dn(t)&&Pk(t),s=mr(t),i=To(e,o,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((dr(t)!=="body"||ip(s))&&(l=Tk(t)),dn(t)?(c=To(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):s&&(c.x=sp(s))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function $k(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 Ak(e){var t=$k(e);return YN.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Mk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Dk(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 Bm={placement:"bottom",modifiers:[],strategy:"absolute"};function qm(){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 Fk(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?Bm:o;return function(l,c,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},Bm,s),modifiersData:{},elements:{reference:l,popper:c},attributes:{},styles:{}},f=[],p=!1,m={state:d,setOptions:function(h){var x=typeof h=="function"?h(d.options):h;y(),d.options=Object.assign({},s,d.options,x),d.scrollParents={reference:Ar(l)?Cs(l):l.contextElement?Cs(l.contextElement):[],popper:Cs(c)};var b=Ak(Dk([].concat(r,d.options.modifiers)));return d.orderedModifiers=b.filter(function(S){return S.enabled}),v(),m.update()},forceUpdate:function(){if(!p){var h=d.elements,x=h.reference,b=h.popper;if(qm(x,b)){d.rects={reference:Ik(x,ui(b),d.options.strategy==="fixed"),popper:np(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,E=_.options,C=E===void 0?{}:E,N=_.name;typeof j=="function"&&(d=j({state:d,options:C,name:N,instance:m})||d)}}}},update:Mk(function(){return new Promise(function(g){m.forceUpdate(),g(d)})}),destroy:function(){y(),p=!0}};if(!qm(l,c))return m;m.setOptions(u).then(function(g){!p&&u.onFirstUpdate&&u.onFirstUpdate(g)});function v(){d.orderedModifiers.forEach(function(g){var h=g.name,x=g.options,b=x===void 0?{}:x,S=g.effect;if(typeof S=="function"){var _=S({state:d,name:h,instance:m,options:b}),j=function(){};f.push(_||j)}})}function y(){f.forEach(function(g){return g()}),f=[]}return m}}const Lk=Fk({defaultModifiers:[wk,Ek,ik,lk,Ck,xk,kk,nk]}),Uk=["enabled","placement","strategy","modifiers"];function Vk(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 zk={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Bk={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)}}},qk=[];function $0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=qk}=n,l=Vk(n,Uk);const c=w.useRef(i),u=w.useRef(),d=w.useCallback(()=>{var g;(g=u.current)==null||g.update()},[]),f=w.useCallback(()=>{var g;(g=u.current)==null||g.forceUpdate()},[]),[p,m]=DN(w.useState({placement:o,update:d,forceUpdate:f,attributes:{},styles:{popper:{},arrow:{}}})),v=w.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:g})=>{const h={},x={};Object.keys(g.elements).forEach(b=>{h[b]=g.styles[b],x[b]=g.attributes[b]}),m({state:g,styles:h,attributes:x,update:d,forceUpdate:f,placement:g.placement})}}),[d,f,m]),y=w.useMemo(()=>(Ss(c.current,i)||(c.current=i),c.current),[i]);return w.useEffect(()=>{!u.current||!r||u.current.setOptions({placement:o,strategy:s,modifiers:[...y,v,zk]})},[s,o,v,r,y]),w.useEffect(()=>{if(!(!r||e==null||t==null))return u.current=Lk(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...y,Bk,v]})),()=>{u.current!=null&&(u.current.destroy(),u.current=void 0,m(g=>Object.assign({},g,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),p}function Ks(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var Hk=function(){},Wk=Hk;const Kk=Js(Wk),Hm=()=>{};function Gk(e){return e.button===0}function Yk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const fa=e=>e&&("current"in e?e.current:e),Wm={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function A0(e,t=Hm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=fa(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||Yk(u)||!Gk(u)||!!Ks(d,u.target)||s.current,s.current=!1},[e]),l=Te(u=>{const d=fa(e);d&&Ks(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=Vo(fa(e)),p=f.defaultView||window;let m=(u=p.event)!=null?u:(d=p.parent)==null?void 0:d.event,v=null;Wm[r]&&(v=Nn(f,Wm[r],l,!0));const y=Nn(f,r,i,!0),g=Nn(f,r,x=>{if(x===m){m=void 0;return}c(x)});let h=[];return"ontouchstart"in f.documentElement&&(h=[].slice.call(f.body.children).map(x=>Nn(x,"mousemove",Hm))),()=>{v==null||v(),y(),g(),h.forEach(x=>x())}},[e,n,r,i,l,c])}function Qk(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function Xk(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function M0({enabled:e,enableEvents:t,placement:n,flip:r,offset:o,fixed:s,containerPadding:i,arrowElement:l,popperConfig:c={}}){var u,d,f,p,m;const v=Qk(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:Xk(Object.assign({},v,{eventListeners:{enabled:t,options:(u=v.eventListeners)==null?void 0:u.options},preventOverflow:Object.assign({},v.preventOverflow,{options:i?Object.assign({padding:i},(d=v.preventOverflow)==null?void 0:d.options):(f=v.preventOverflow)==null?void 0:f.options}),offset:{options:Object.assign({offset:o},(p=v.offset)==null?void 0:p.options)},arrow:Object.assign({},v.arrow,{enabled:!!l,options:Object.assign({},(m=v.arrow)==null?void 0:m.options,{element:l})}),flip:Object.assign({enabled:!!r},v.flip)}))})}const Zk=["children"];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}const eO=()=>{};function D0(e={}){const t=w.useContext(Fl),[n,r]=rl(),o=w.useRef(!1),{flip:s,offset:i,rootCloseEvent:l,fixed:c=!1,placement:u,popperConfig:d={},enableEventListeners:f=!0,usePopper:p=!!t}=e,m=(t==null?void 0:t.show)==null?!!e.show:t.show;m&&!o.current&&(o.current=!0);const v=j=>{t==null||t.toggle(!1,j)},{placement:y,setMenu:g,menuElement:h,toggleElement:x}=t||{},b=$0(x,h,M0({placement:u||y||"bottom-start",enabled:p,enableEvents:f??m,offset:i,flip:s,fixed:c,arrowElement:n,popperConfig:d})),S=Object.assign({ref:g||eO,"aria-labelledby":x==null?void 0:x.id},b.attributes.popper,{style:b.styles.popper}),_={show:m,placement:y,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 A0(h,v,{clickTrigger:l,disabled:!m}),[S,_]}const tO={usePopper:!0};function ap(e){let{children:t}=e,n=Jk(e,Zk);const[r,o]=D0(n);return a.jsx(a.Fragment,{children:t(r,o)})}ap.displayName="DropdownMenu";ap.defaultProps=tO;const F0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Km=()=>{};function L0(){const e=zx(),{show:t=!1,toggle:n=Km,setToggle:r,menuElement:o}=w.useContext(Fl)||{},s=w.useCallback(l=>{n(!t,l)},[t,n]),i={id:e,ref:r||Km,onClick:s,"aria-expanded":!!t};return o&&F0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function U0({children:e}){const[t,n]=L0();return a.jsx(a.Fragment,{children:e(t,n)})}U0.displayName="DropdownToggle";const nO=["eventKey","disabled","onClick","active","as"];function rO(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 V0({key:e,href:t,active:n,disabled:r,onClick:o}){const s=w.useContext(Ln),i=w.useContext(Qf),{activeKey:l}=i||{},c=$r(e,t),u=n==null&&e!=null?$r(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,[Bo("dropdown-item")]:""},{isActive:u}]}const z0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Zf}=e,l=rO(e,nO);const[c]=V0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});z0.displayName="DropdownItem";const B0=w.createContext(zo?window:void 0);B0.Provider;function Ul(){return w.useContext(B0)}function Gm(){const e=l0(),t=w.useRef(null),n=w.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function di({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:o=`* [${Bo("dropdown-item")}]`,focusFirstItemOnShow:s,placement:i="bottom-start",children:l}){const c=Ul(),[u,d]=Ux(t,e,r),[f,p]=Gm(),m=f.current,[v,y]=Gm(),g=v.current,h=y0(u),x=w.useRef(null),b=w.useRef(!1),S=w.useContext(Ln),_=w.useCallback((O,k,P=k==null?void 0:k.type)=>{d(O,{originalEvent:k,source:P})},[d]),j=Te((O,k)=>{n==null||n(O,k),_(!1,k,"select"),k.isPropagationStopped()||S==null||S(O,k)}),E=w.useMemo(()=>({toggle:_,placement:i,show:u,menuElement:m,toggleElement:g,setMenu:p,setToggle:y}),[_,i,u,m,g,p,y]);m&&h&&!u&&(b.current=m.contains(m.ownerDocument.activeElement));const C=Te(()=>{g&&g.focus&&g.focus()}),N=Te(()=>{const O=x.current;let k=s;if(k==null&&(k=f.current&&F0(f.current)?"keyboard":!1),k===!1||k==="keyboard"&&!/^key.+$/.test(O))return;const P=_n(f.current,o)[0];P&&P.focus&&P.focus()});w.useEffect(()=>{u?N():b.current&&(b.current=!1,C())},[u,b,C,N]),w.useEffect(()=>{x.current=null});const R=(O,k)=>{if(!f.current)return null;const P=_n(f.current,o);let U=P.indexOf(O)+k;return U=Math.max(0,Math.min(U,P.length)),P[U]};return jN(w.useCallback(()=>c.document,[c]),"keydown",O=>{var k,P;const{key:U}=O,F=O.target,V=(k=f.current)==null?void 0:k.contains(F),Z=(P=v.current)==null?void 0:P.contains(F);if(/input|textarea/i.test(F.tagName)&&(U===" "||U!=="Escape"&&V||U==="Escape"&&F.type==="search")||!V&&!Z||U==="Tab"&&(!f.current||!u))return;x.current=O.type;const L={originalEvent:O,source:O.type};switch(U){case"ArrowUp":{const M=R(F,-1);M&&M.focus&&M.focus(),O.preventDefault();return}case"ArrowDown":if(O.preventDefault(),!u)d(!0,L);else{const M=R(F,1);M&&M.focus&&M.focus()}return;case"Tab":Gf(F.ownerDocument,"keyup",M=>{var W;(M.key==="Tab"&&!M.target||!((W=f.current)!=null&&W.contains(M.target)))&&d(!1,L)},{once:!0});break;case"Escape":U==="Escape"&&(O.preventDefault(),O.stopPropagation()),d(!1,L);break}}),a.jsx(Ln.Provider,{value:j,children:a.jsx(Fl.Provider,{value:E,children:l})})}di.displayName="Dropdown";di.Menu=ap;di.Toggle=U0;di.Item=z0;const q0=w.createContext({});q0.displayName="DropdownContext";const H0=q0,W0=w.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...o},s)=>(t=he(t,"dropdown-divider"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));W0.displayName="DropdownDivider";const oO=W0,K0=w.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...o},s)=>(t=he(t,"dropdown-header"),a.jsx(n,{ref:s,className:oe(e,t),role:r,...o})));K0.displayName="DropdownHeader";const sO=K0,G0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=b0,...l},c)=>{const u=he(e,"dropdown-item"),[d,f]=V0({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")})});G0.displayName="DropdownItem";const iO=G0,Y0=w.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},o)=>(t=he(t,"dropdown-item-text"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Y0.displayName="DropdownItemText";const aO=Y0,Q0=w.createContext(null);Q0.displayName="InputGroupContext";const X0=Q0;function Z0(e,t){return e}function J0(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 eb=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 m=w.useContext(h0),v=he(e,"dropdown-menu"),{align:y,drop:g,isRTL:h}=w.useContext(H0);n=n||y;const x=w.useContext(X0),b=[];if(n)if(typeof n=="object"){const O=Object.keys(n);if(O.length){const k=O[0],P=n[k];p=P==="start",b.push(`${v}-${k}-${P}`)}}else n==="end"&&(p=!0);const S=J0(p,g,h),[_,{hasShown:j,popper:E,show:C,toggle:N}]=D0({flip:o,rootCloseEvent:r,show:s,usePopper:!m&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(_.ref=mn(Z0(f),_.ref),ol(()=>{C&&(E==null||E.update())},[C]),!j&&!i&&!x)return null;typeof l!="string"&&(_.show=C,_.close=()=>N==null?void 0:N(!1),_.align=n);let R=d.style;return E!=null&&E.placement&&(R={...d.style,..._.style},d["x-placement"]=E.placement),a.jsx(l,{...d,..._,style:R,...(b.length||m)&&{"data-bs-popper":"static"},className:oe(t,v,C&&"show",p&&`${v}-end`,u&&`${v}-${u}`,...b)})});eb.displayName="DropdownMenu";const lO=eb,tb=w.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:o=!1,disabled:s=!1,className:i,...l},c)=>{const u=he(t,"btn"),[d,{tagName:f}]=Xf({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")})});tb.displayName="Button";const cO=tb,nb=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=cO,...s},i)=>{const l=he(e,"dropdown-toggle"),c=w.useContext(Fl);r!==void 0&&(s.bsPrefix=r);const[u]=L0();return u.ref=mn(u.ref,Z0(i)),a.jsx(o,{className:oe(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});nb.displayName="DropdownToggle";const uO=nb,rb=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,...m}=Dl(e,{show:"onToggle"}),v=w.useContext(X0),y=he(n,"dropdown"),g=Ml(),h=E=>p===!1?E==="click":p==="inside"?E!=="rootClose":p==="outside"?E!=="select":!0,x=Te((E,C)=>{var N,R;!((N=C.originalEvent)==null||(R=N.target)==null)&&R.classList.contains("dropdown-toggle")&&C.source==="mousedown"||(C.originalEvent.currentTarget===document&&(C.source!=="keydown"||C.originalEvent.key==="Escape")&&(C.source="rootClose"),h(C.source)&&(c==null||c(E,C)))}),S=J0(i==="end",r,g),_=w.useMemo(()=>({align:i,drop:r,isRTL:g}),[i,r,g]),j={down:y,"down-centered":`${y}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return a.jsx(H0.Provider,{value:_,children:a.jsx(di,{placement:S,show:o,onSelect:l,onToggle:x,focusFirstItemOnShow:u,itemSelector:`.${y}-item:not(.disabled):not(:disabled)`,children:v?m.children:a.jsx(d,{...m,ref:t,className:oe(s,o&&"show",j[r])})})})});rb.displayName="Dropdown";const Li=Object.assign(rb,{Toggle:uO,Menu:lO,Item:iO,ItemText:aO,Divider:oO,Header:sO});var Ui;function Ym(e){if((!Ui&&Ui!==0||e)&&zo){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),Ui=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ui}function dO(e){const t=w.useRef(e);return t.current=e,t}function lp(e){const t=dO(e);w.useEffect(()=>()=>t.current(),[])}function Bc(e){e===void 0&&(e=Vo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function fO(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Qm=Bo("modal-open");class pO{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return fO(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(Pn(o,r)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Qm,""),Pn(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Qm),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 cp=pO,qc=(e,t)=>zo?e==null?(t||Vo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function vd(e,t){const n=Ul(),[r,o]=w.useState(()=>qc(e,n==null?void 0:n.document));if(!r){const s=qc(e);s&&o(s)}return w.useEffect(()=>{t&&r&&t(r)},[t,r]),w.useEffect(()=>{const s=qc(e);s!==r&&o(s)},[e,r]),r}function hO({in:e,onTransition:t}){const n=w.useRef(null),r=w.useRef(!0),o=Te(t);return ol(()=>{if(!n.current)return;let s=!1;return o({in:e,element:n.current,initial:r.current,isStale:()=>s}),()=>{s=!0}},[e,o]),ol(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function mO({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=hO({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 yd(e,t,n){return e?a.jsx(e,Object.assign({},n)):t?a.jsx(mO,Object.assign({},n,{transition:t})):a.jsx(Wf,Object.assign({},n))}function ob(e){return e.code==="Escape"||e.keyCode===27}const gO=["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 vO(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 Hc;function yO(e){return Hc||(Hc=new cp({ownerDocument:e==null?void 0:e.document})),Hc}function xO(e){const t=Ul(),n=e||yO(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 sb=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:m,runBackdropTransition:v,autoFocus:y=!0,enforceFocus:g=!0,restoreFocus:h=!0,restoreFocusOptions:x,renderDialog:b,renderBackdrop:S=D=>a.jsx("div",Object.assign({},D)),manager:_,container:j,onShow:E,onHide:C=()=>{},onExit:N,onExited:R,onExiting:O,onEnter:k,onEntering:P,onEntered:U}=e,F=vO(e,gO);const V=Ul(),Z=vd(j),T=xO(_),L=Jf(),M=y0(n),[W,B]=w.useState(!n),X=w.useRef(null);w.useImperativeHandle(t,()=>T,[T]),zo&&!M&&n&&(X.current=Bc(V==null?void 0:V.document)),n&&W&&B(!1);const J=Te(()=>{if(T.add(),De.current=Nn(document,"keydown",ue),Ce.current=Nn(document,"focus",()=>setTimeout(Q),!0),E&&E(),y){var D,de;const re=Bc((D=(de=T.dialog)==null?void 0:de.ownerDocument)!=null?D:V==null?void 0:V.document);T.dialog&&re&&!Ks(T.dialog,re)&&(X.current=re,T.dialog.focus())}}),ee=Te(()=>{if(T.remove(),De.current==null||De.current(),Ce.current==null||Ce.current(),h){var D;(D=X.current)==null||D.focus==null||D.focus(x),X.current=null}});w.useEffect(()=>{!n||!Z||J()},[n,Z,J]),w.useEffect(()=>{W&&ee()},[W,ee]),lp(()=>{ee()});const Q=Te(()=>{if(!g||!L()||!T.isTopModal())return;const D=Bc(V==null?void 0:V.document);T.dialog&&D&&!Ks(T.dialog,D)&&T.dialog.focus()}),te=Te(D=>{D.target===D.currentTarget&&(u==null||u(D),l===!0&&C())}),ue=Te(D=>{c&&ob(D)&&T.isTopModal()&&(d==null||d(D),D.defaultPrevented||C())}),Ce=w.useRef(),De=w.useRef(),Ze=(...D)=>{B(!0),R==null||R(...D)};if(!Z)return null;const me=Object.assign({role:r,ref:T.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},F,{style:s,className:o,tabIndex:-1});let Ie=b?b(me):a.jsx("div",Object.assign({},me,{children:w.cloneElement(i,{role:"document"})}));Ie=yd(f,p,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:N,onExiting:O,onExited:Ze,onEnter:k,onEntering:P,onEntered:U,children:Ie});let A=null;return l&&(A=S({ref:T.setBackdropRef,onClick:te}),A=yd(m,v,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:A})),a.jsx(a.Fragment,{children:Sr.createPortal(a.jsxs(a.Fragment,{children:[A,Ie]}),Z)})});sb.displayName="Modal";const bO=Object.assign(sb,{Manager:cp});function xd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function wO(e,t){e.classList?e.classList.add(t):xd(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Xm(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function SO(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Xm(e.className,t):e.setAttribute("class",Xm(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 _O extends cp{adjustAndStore(t,n,r){const o=n.style[t];n.dataset[t]=o,Pn(n,{[t]:`${parseFloat(Pn(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],Pn(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(wO(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();SO(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 Wc;function CO(e){return Wc||(Wc=new _O(e)),Wc}const ib=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"modal-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));ib.displayName="ModalBody";const jO=ib,EO=w.createContext({onHide(){}}),ab=EO,lb=w.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:o,fullscreen:s,children:i,scrollable:l,...c},u)=>{e=he(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})})});lb.displayName="ModalDialog";const cb=lb,ub=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"modal-footer"),a.jsx(n,{ref:o,className:oe(e,t),...r})));ub.displayName="ModalFooter";const RO=ub,NO={"aria-label":q.string,onClick:q.func,variant:q.oneOf(["white"])},up=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}));up.displayName="CloseButton";up.propTypes=NO;const kO=up,OO=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(ab),c=Te(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(kO,{"aria-label":e,variant:t,onClick:c})]})}),TO=OO,db=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=he(e,"modal-header"),a.jsx(TO,{ref:s,...o,className:oe(t,e),closeLabel:n,closeButton:r})));db.displayName="ModalHeader";const PO=db,IO=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:oe(t.className,e)})),$O=IO("h4"),fb=w.forwardRef(({className:e,bsPrefix:t,as:n=$O,...r},o)=>(t=he(t,"modal-title"),a.jsx(n,{ref:o,className:oe(e,t),...r})));fb.displayName="ModalTitle";const AO=fb;function MO(e){return a.jsx(No,{...e,timeout:null})}function DO(e){return a.jsx(No,{...e,timeout:null})}const pb=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=cb,"data-bs-theme":l,"aria-labelledby":c,"aria-describedby":u,"aria-label":d,show:f=!1,animation:p=!0,backdrop:m=!0,keyboard:v=!0,onEscapeKeyDown:y,onShow:g,onHide:h,container:x,autoFocus:b=!0,enforceFocus:S=!0,restoreFocus:_=!0,restoreFocusOptions:j,onEntered:E,onExit:C,onExiting:N,onEnter:R,onEntering:O,onExited:k,backdropClassName:P,manager:U,...F},V)=>{const[Z,T]=w.useState({}),[L,M]=w.useState(!1),W=w.useRef(!1),B=w.useRef(!1),X=w.useRef(null),[J,ee]=rl(),Q=mn(V,ee),te=Te(h),ue=Ml();e=he(e,"modal");const Ce=w.useMemo(()=>({onHide:te}),[te]);function De(){return U||CO({isRTL:ue})}function Ze(ae){if(!zo)return;const vn=De().getScrollbarWidth()>0,Ho=ae.scrollHeight>Vo(ae).documentElement.clientHeight;T({paddingRight:vn&&!Ho?Ym():void 0,paddingLeft:!vn&&Ho?Ym():void 0})}const me=Te(()=>{J&&Ze(J.dialog)});lp(()=>{pd(window,"resize",me),X.current==null||X.current()});const Ie=()=>{W.current=!0},A=ae=>{W.current&&J&&ae.target===J.dialog&&(B.current=!0),W.current=!1},D=()=>{M(!0),X.current=Yx(J.dialog,()=>{M(!1)})},de=ae=>{ae.target===ae.currentTarget&&D()},re=ae=>{if(m==="static"){de(ae);return}if(B.current||ae.target!==ae.currentTarget){B.current=!1;return}h==null||h()},dt=ae=>{v?y==null||y(ae):(ae.preventDefault(),m==="static"&&D())},ot=(ae,vn)=>{ae&&Ze(ae),R==null||R(ae,vn)},be=ae=>{X.current==null||X.current(),C==null||C(ae)},Bt=(ae,vn)=>{O==null||O(ae,vn),Gf(window,"resize",me)},$t=ae=>{ae&&(ae.style.display=""),k==null||k(ae),pd(window,"resize",me)},hi=w.useCallback(ae=>a.jsx("div",{...ae,className:oe(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),Vr={...n,...Z};Vr.display="block";const mi=ae=>a.jsx("div",{role:"dialog",...ae,style:Vr,className:oe(t,e,L&&`${e}-static`,!p&&"show"),onClick:m?re:void 0,onMouseUp:A,"data-bs-theme":l,"aria-label":d,"aria-labelledby":c,"aria-describedby":u,children:a.jsx(i,{...F,onMouseDown:Ie,className:r,contentClassName:o,children:s})});return a.jsx(ab.Provider,{value:Ce,children:a.jsx(bO,{show:f,ref:Q,backdrop:m,container:x,keyboard:!0,autoFocus:b,enforceFocus:S,restoreFocus:_,restoreFocusOptions:j,onEscapeKeyDown:dt,onShow:g,onHide:h,onEnter:ot,onEntering:Bt,onEntered:E,onExit:be,onExiting:N,onExited:$t,manager:De(),transition:p?MO:void 0,backdropTransition:p?DO:void 0,renderBackdrop:hi,renderDialog:mi})})});pb.displayName="Modal";const ce=Object.assign(pb,{Body:jO,Header:PO,Title:AO,Footer:RO,Dialog:cb,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),FO=Ee.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 LO({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r}=ut(e,t),{project:o}=kt(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:m,disabled:v})=>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(Li,{className:"d-flex flex-column",children:[a.jsx(Li.Toggle,{as:FO,children:p}),a.jsx(Li.Menu,{children:d.map(([y,g,h])=>a.jsx(Li.Item,{href:g,onClick:x=>{h!=="get"&&(x.preventDefault(),x.target.dataset.method=h,$&&$.rails&&$.rails.handleMethod($(x.target)))},children:y},g))})]}):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?m:v})]},u));return a.jsxs(ce,{size:"lg",show:n.showActionsModal,onHide:r,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Manage Your Project"})}),a.jsxs(ce.Body,{children:[a.jsxs("p",{children:["Please select an action to manage your project"," ",a.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),c]})]})}function UO({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleConfirmModal:o}=ut(e,t),{project:s}=kt(t||n.grantNumber);if(!n||!s||n.error||s.error)return;const i=n.usesCredits?"credits":"units",l=(1-Cx(n))*100;return a.jsxs(ce,{size:"lg",show:n.showConfirmModal,onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Consider Requesting an Exchange"})}),a.jsx(ce.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(ce.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 VO({requestId:e,grantNumber:t,actionId:n}){const{deleteAction:r,request:o,toggleDeleteModal:s}=ut(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==Ve.pending,d=l==Ve.error,f=()=>s(n);return a.jsxs(ce,{show:i.showDeleteModal,onHide:f,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Confirm Deletion"})}),a.jsxs(ce.Body,{children:[d&&a.jsxs(Se,{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,": ",go(i.date)]})," ","on"," "]}),"request ",a.jsx("strong",{children:Lf(o)}),"? Deletions cannot be undone."]})]}),a.jsx(ce.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 Io({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 hb({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(Io,{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(Io,{color:"danger",icon:"trash",onClick:()=>n(e.actionId),title:"Edit action"},"delete"));const i=`${e.type}: ${go(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}=ai(e.name),o=r?a.jsx("abbr",{title:n,children:r}):n;return a.jsxs(a.Fragment,{children:[Tn(ne.resourceTypeIcons[e.icon])," ",o,!e.isCredit&&e.userGuideUrl&&t?a.jsx(Io,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function $o({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 zO=e=>a.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function BO({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=ut(e,t),{project:o,setRequest:s}=kt(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=(y,g)=>y?a.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>s(y.requestId),children:[g=="prev"?a.jsx("i",{className:"bi bi-chevron-left"}):null,Lf(y),g=="next"?a.jsx("i",{className:"bi bi-chevron-right"}):null]}):a.jsx("span",{}),f=new Set,p=[];for(let y of n.actions)for(let g of y.resources)f.has(g.resourceId)||(f.add(g.resourceId),p.push(g));p.sort(Qa);const m=[{key:"action",name:"Action Details",format:(y,g)=>a.jsx(hb,{action:g,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:y=>a.jsx($o,{status:y})},...p.map(y=>({key:`resource${y.resourceId}`,name:y.name,icon:y.icon,class:"text-end",format:y.isBoolean?g=>g?Uf(g):null:zO,formatHeader:(g,h)=>a.jsx(jn,{resource:h,userGuide:!1})}))],v=n.actions.map(y=>{const g={...y};for(let{resourceId:h}of p)g[`resource${h}`]=0;for(let{resourceId:h,approved:x,requested:b}of y.resources)g[`resource${h}`]=x||b||0;return g});return a.jsxs("div",{className:"history",children:[a.jsx(hn,{columns:m,rows:v}),a.jsxs("div",{className:"buttons d-flex justify-content-between",children:[d(c,"prev"),d(u,"next")]})]})}function qO({requestId:e,grantNumber:t}){const{request:n,toggleDeleteModal:r}=ut(e,t);if(!n)return;const o=[{key:"type",name:"Action Details",format:(s,i)=>a.jsx(hb,{action:i,request:n,toggleDeleteModal:r})},{key:"status",name:"Status",format:s=>a.jsx($o,{status:s})}];if(n.actions&&n.actions.length)return a.jsx(hn,{rows:n.actions,columns:o})}function rs(...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 HO={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function WO(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=HO[e];return r+parseInt(Pn(t,o[0]),10)+parseInt(Pn(t,o[1]),10)}const KO={[Gn]:"collapse",[tl]:"collapsing",[Sn]:"collapsing",[Xn]:"collapse show"},GO=Ee.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:m=WO,...v},y)=>{const g=typeof l=="function"?l():l,h=w.useMemo(()=>rs(j=>{j.style[g]="0"},e),[g,e]),x=w.useMemo(()=>rs(j=>{const E=`scroll${g[0].toUpperCase()}${g.slice(1)}`;j.style[g]=`${j[E]}px`},t),[g,t]),b=w.useMemo(()=>rs(j=>{j.style[g]=null},n),[g,n]),S=w.useMemo(()=>rs(j=>{j.style[g]=`${m(g,j)}px`,Xx(j)},r),[r,m,g]),_=w.useMemo(()=>rs(j=>{j.style[g]=null},o),[g,o]);return a.jsx(Zx,{ref:y,addEndListener:Qx,...v,"aria-expanded":v.role?c:null,onEnter:h,onEntering:x,onEntered:b,onExit:S,onExiting:_,childRef:i.ref,in:c,timeout:u,mountOnEnter:d,unmountOnExit:f,appear:p,children:(j,E)=>Ee.cloneElement(i,{...E,className:oe(s,i.props.className,KO[j],g==="width"&&"collapse-horizontal")})})}),YO=GO;function mb(e,t){return Array.isArray(e)?e.includes(t):e===t}const gb=w.createContext({});gb.displayName="AccordionContext";const Vl=gb,vb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(Vl);return t=he(t,"accordion-collapse"),a.jsx(YO,{ref:i,in:mb(l,o),...s,className:oe(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});vb.displayName="AccordionCollapse";const yb=vb,xb=w.createContext({eventKey:""});xb.displayName="AccordionItemContext";const dp=xb,bb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,onEnter:r,onEntering:o,onEntered:s,onExit:i,onExiting:l,onExited:c,...u},d)=>{t=he(t,"accordion-body");const{eventKey:f}=w.useContext(dp);return a.jsx(yb,{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)})})});bb.displayName="AccordionBody";const QO=bb;function XO(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:o}=w.useContext(Vl);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 wb=w.forwardRef(({as:e="button",bsPrefix:t,className:n,onClick:r,...o},s)=>{t=he(t,"accordion-button");const{eventKey:i}=w.useContext(dp),l=XO(i,r),{activeEventKey:c}=w.useContext(Vl);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,!mb(c,i)&&"collapsed")})});wb.displayName="AccordionButton";const Sb=wb,_b=w.forwardRef(({as:e="h2",bsPrefix:t,className:n,children:r,onClick:o,...s},i)=>(t=he(t,"accordion-header"),a.jsx(e,{ref:i,...s,className:oe(n,t),children:a.jsx(Sb,{onClick:o,children:r})})));_b.displayName="AccordionHeader";const ZO=_b,Cb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,eventKey:r,...o},s)=>{t=he(t,"accordion-item");const i=w.useMemo(()=>({eventKey:r}),[r]);return a.jsx(dp.Provider,{value:i,children:a.jsx(e,{ref:s,...o,className:oe(n,t)})})});Cb.displayName="AccordionItem";const JO=Cb,jb=w.forwardRef((e,t)=>{const{as:n="div",activeKey:r,bsPrefix:o,className:s,onSelect:i,flush:l,alwaysOpen:c,...u}=Dl(e,{activeKey:"onSelect"}),d=he(o,"accordion"),f=w.useMemo(()=>({activeEventKey:r,onSelect:i,alwaysOpen:c}),[r,i,c]);return a.jsx(Vl.Provider,{value:f,children:a.jsx(n,{ref:t,...u,className:oe(s,d,l&&`${d}-flush`)})})});jb.displayName="Accordion";const pa=Object.assign(jb,{Button:Sb,Collapse:yb,Item:JO,Header:ZO,Body:QO}),bd=2**31-1;function Eb(e,t,n){const r=n-Date.now();e.current=r<=bd?setTimeout(t,r):setTimeout(()=>Eb(e,t,n),bd)}function eT(){const e=Jf(),t=w.useRef();return lp(()=>clearTimeout(t.current)),w.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(o,s=0){e()&&(n(),s<=bd?t.current=setTimeout(o,s):Eb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const tT=()=>{};function nT(e,t,{disabled:n,clickTrigger:r}={}){const o=t||tT;A0(e,o,{disabled:n,clickTrigger:r});const s=Te(i=>{ob(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=Vo(fa(e));let l=(i.defaultView||window).event;const c=Nn(i,"keyup",u=>{if(u===l){l=void 0;return}s(u)});return()=>{c()}},[e,n,s])}const Rb=w.forwardRef((e,t)=>{const{flip:n,offset:r,placement:o,containerPadding:s,popperConfig:i={},transition:l,runTransition:c}=e,[u,d]=rl(),[f,p]=rl(),m=mn(d,t),v=vd(e.container),y=vd(e.target),[g,h]=w.useState(!e.show),x=$0(y,u,M0({placement:o,enableEvents:!!e.show,containerPadding:s||5,flip:n,offset:r,arrowElement:f,popperConfig:i}));e.show&&g&&h(!1);const b=(...O)=>{h(!0),e.onExited&&e.onExited(...O)},S=e.show||!g;if(nT(u,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:_,onExiting:j,onEnter:E,onEntering:C,onEntered:N}=e;let R=e.children(Object.assign({},x.attributes.popper,{style:x.styles.popper,ref:m}),{popper:x,placement:o,show:!!e.show,arrowProps:Object.assign({},x.attributes.arrow,{style:x.styles.arrow,ref:p})});return R=yd(l,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:R,onExit:_,onExiting:j,onExited:b,onEnter:E,onEntering:C,onEntered:N}),v?Sr.createPortal(R,v):null});Rb.displayName="Overlay";const rT=Rb,Nb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"popover-header"),a.jsx(n,{ref:o,className:oe(e,t),...r})));Nb.displayName="PopoverHeader";const oT=Nb,kb=w.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},o)=>(t=he(t,"popover-body"),a.jsx(n,{ref:o,className:oe(e,t),...r})));kb.displayName="PopoverBody";const Ob=kb;function Tb(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function Pb(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const sT=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=he(e,"popover"),m=Ml(),[v]=(t==null?void 0:t.split("-"))||[],y=Tb(v,m);let g=r;return u&&!l&&(g={...r,...Pb(c==null?void 0:c.strategy)}),a.jsxs("div",{ref:f,role:"tooltip",style:g,"x-placement":v,className:oe(n,p,v&&`bs-popover-${y}`),...d,children:[a.jsx("div",{className:"popover-arrow",...i}),s?a.jsx(Ob,{children:o}):o]})}),iT=Object.assign(sT,{Header:oT,Body:Ob,POPPER_OFFSET:[0,8]}),Ib=w.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:o,arrowProps:s,hasDoneInitialMeasure:i,popper:l,show:c,...u},d)=>{e=he(e,"tooltip");const f=Ml(),[p]=(t==null?void 0:t.split("-"))||[],m=Tb(p,f);let v=r;return c&&!i&&(v={...r,...Pb(l==null?void 0:l.strategy)}),a.jsxs("div",{ref:d,style:v,role:"tooltip","x-placement":p,className:oe(n,e,`bs-tooltip-${m}`),...u,children:[a.jsx("div",{className:"tooltip-arrow",...s}),a.jsx("div",{className:`${e}-inner`,children:o})]})});Ib.displayName="Tooltip";const zl=Object.assign(Ib,{TOOLTIP_OFFSET:[0,6]});function aT(e){const t=w.useRef(null),n=he(void 0,"popover"),r=he(void 0,"tooltip"),o=w.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(xd(t.current,n))return iT.POPPER_OFFSET;if(xd(t.current,r))return zl.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function lT(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=o=>n(nl(o))),t.ref=r.__wrapped||(r.__wrapped=o=>r(nl(o)))}const $b=w.forwardRef(({children:e,transition:t=No,popperConfig:n={},rootClose:r=!1,placement:o="top",show:s=!1,...i},l)=>{const c=w.useRef({}),[u,d]=w.useState(null),[f,p]=aT(i.offset),m=mn(l,f),v=t===!0?No:t||void 0,y=Te(g=>{d(g),n==null||n.onFirstUpdate==null||n.onFirstUpdate(g)});return ol(()=>{u&&i.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[u,i.target]),w.useEffect(()=>{s||d(null)},[s]),a.jsx(rT,{...i,ref:m,popperConfig:{...n,modifiers:p.concat(n.modifiers||[]),onFirstUpdate:y},transition:v,rootClose:r,placement:o,show:s,children:(g,{arrowProps:h,popper:x,show:b})=>{var S,_;lT(g,h);const j=x==null?void 0:x.placement,E=Object.assign(c.current,{state:x==null?void 0:x.state,scheduleUpdate:x==null?void 0:x.update,placement:j,outOfBoundaries:(x==null||(S=x.state)==null||(_=S.modifiersData.hide)==null?void 0:_.isReferenceHidden)||!1,strategy:n.strategy}),C=!!u;return typeof e=="function"?e({...g,placement:j,show:b,...!t&&b&&{className:"show"},popper:E,arrowProps:h,hasDoneInitialMeasure:C}):w.cloneElement(e,{...g,placement:j,arrowProps:h,popper:E,hasDoneInitialMeasure:C,className:oe(e.props.className,!t&&b&&"show"),style:{...e.props.style,...g.style}})}})});$b.displayName="Overlay";const Ab=$b;function cT(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function Zm(e,t,n){const[r]=t,o=r.currentTarget,s=r.relatedTarget||r.nativeEvent[n];(!s||s!==o)&&!Ks(o,s)&&e(...t)}q.oneOf(["click","hover","focus"]);const uT=({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),m=eT(),v=w.useRef(""),[y,g]=a0(o,s,i),h=cT(l),{onFocus:x,onBlur:b,onClick:S}=typeof n!="function"?w.Children.only(n).props:{},_=F=>{p(nl(F))},j=w.useCallback(()=>{if(m.clear(),v.current="show",!h.show){g(!0);return}m.set(()=>{v.current==="show"&&g(!0)},h.show)},[h.show,g,m]),E=w.useCallback(()=>{if(m.clear(),v.current="hide",!h.hide){g(!1);return}m.set(()=>{v.current==="hide"&&g(!1)},h.hide)},[h.hide,g,m]),C=w.useCallback((...F)=>{j(),x==null||x(...F)},[j,x]),N=w.useCallback((...F)=>{E(),b==null||b(...F)},[E,b]),R=w.useCallback((...F)=>{g(!y),S==null||S(...F)},[S,g,y]),O=w.useCallback((...F)=>{Zm(j,F,"fromElement")},[j]),k=w.useCallback((...F)=>{Zm(E,F,"toElement")},[E]),P=e==null?[]:[].concat(e),U={ref:_};return P.indexOf("click")!==-1&&(U.onClick=R),P.indexOf("focus")!==-1&&(U.onFocus=C,U.onBlur=N),P.indexOf("hover")!==-1&&(U.onMouseOver=O,U.onMouseOut=k),a.jsxs(a.Fragment,{children:[typeof n=="function"?n(U):w.cloneElement(n,U),a.jsx(Ab,{...d,show:y,onHide:E,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},fp=uT;function dT({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r}=kt(t||n.grantNumber),{setTab:o}=kt(t||n.grantNumber);if(!n||!r)return;let s;const i={};for(let p of r.users||[])for(let m of p.resourceIds)i[m]=i[m]||0,i[m]+=1;const l=(n.resources||[]).filter(p=>p.isCredit?(s=p,!1):p.allocated>0).map((p,m)=>({...p,userCount:i[p.resourceId]||0,color:rd[m%rd.length]})),c=s?s.allocated:0,u="Exchange"in n.allowedActions,d=n.exchangeActionId!==null,f=[{key:"name",name:"Resource",format:(p,m)=>a.jsx(jn,{resource:m})},{key:"isActive",name:"Status",format:p=>a.jsx($o,{status:p?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(p,m)=>{if(m.isBoolean)return Uf(m.allocated);const v=m.allocated-p,y=Math.max(v,0)*100/m.allocated;return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`usage bg-${m.color}`,style:{width:`${Math.min(y,100)}%`}}),it(v,{abbreviate:!0})," of"," ",it(m.allocated,{abbreviate:!0})," ",m.unit," ","remaining (",Math.round(y),"%)"]})}},{key:"endDate",name:"End Date",format:p=>go(p)}];return r.isManager&&f.push({key:"userCount",name:"Users",class:"text-end",format:it}),r.currentUser&&f.push({key:"resourceUsername",name:"My Username",format:(p,m)=>{const v=r.currentUser.resourceUsernames[m.resourceId];if(v)return v;if(r.currentUser.resourceAccountPendingIds.includes(m.resourceId))return a.jsx($o,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(r.currentUser.resourceIds.includes(m.resourceId)||!m.isActive)return a.jsx(a.Fragment,{children:"—"});if(r.isManager)return a.jsx("a",{href:"#",onClick:g=>{g.preventDefault(),o("users")},children:"Grant access"});const y=a.jsxs(zl,{children:["Please contact ",Vf(r)," to request access to this resource."]});return a.jsx(fp,{overlay:y,children:a.jsx("a",{href:"#",onClick:g=>{g.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:[Tn(ne.resourceTypeIcons[s.icon])," ",it(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:Tn("chevron-right")})]})]}):null,l.length?a.jsx(hn,{columns:f,rows:l}):null]})}const fT=[{key:"role",name:"Role",format:e=>a.jsxs(a.Fragment,{children:[Tn(ne.roleIcons[e])," ",e]})},{key:"users",name:"Users",format:e=>{const t=e.slice(0,3);return e.length>4&&(t[2]=`${it(e.length-3)} others`),t.map((n,r)=>{const o=t.length-r;return`${n}${o>2?",":o==2&&t.length>1?" and":""}`}).join(" ")}}],pT=({requestId:e,grantNumber:t})=>{const{project:n}=kt(t);if(!n)return;const r=Al.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(hn,{rows:r,columns:fT}):null};function hT({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r,username:o}=kt(t||n.grantNumber);if(!(!n||!r||n.error||r.error)&&n)return a.jsxs("div",{className:"overview",children:[a.jsx(dT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(pT,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(qO,{requestId:e})})]}):null]})}function Mr(e){"@babel/helpers - typeof";return Mr=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},Mr(e)}function mT(e,t){if(Mr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Mr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mb(e){var t=mT(e,"string");return Mr(t)=="symbol"?t:String(t)}function ao(e,t,n){return t=Mb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jm(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?Jm(Object(n),!0).forEach(function(r){ao(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jm(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gT(e){if(Array.isArray(e))return e}function vT(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 wd(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 Db(e,t){if(e){if(typeof e=="string")return wd(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 wd(e,t)}}function yT(){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 ze(e,t){return gT(e)||vT(e,t)||Db(e,t)||yT()}function gn(e,t){if(e==null)return{};var n=Kf(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 xT=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Fb(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,m=e.value,v=gn(e,xT),y=w.useState(l!==void 0?l:n),g=ze(y,2),h=g[0],x=g[1],b=w.useState(c!==void 0?c:o),S=ze(b,2),_=S[0],j=S[1],E=w.useState(m!==void 0?m:i),C=ze(E,2),N=C[0],R=C[1],O=w.useCallback(function(T,L){typeof u=="function"&&u(T,L),R(T)},[u]),k=w.useCallback(function(T,L){var M;typeof d=="function"&&(M=d(T,L)),x(M!==void 0?M:T)},[d]),P=w.useCallback(function(){typeof p=="function"&&p(),j(!0)},[p]),U=w.useCallback(function(){typeof f=="function"&&f(),j(!1)},[f]),F=l!==void 0?l:h,V=c!==void 0?c:_,Z=m!==void 0?m:N;return K(K({},v),{},{inputValue:F,menuIsOpen:V,onChange:O,onInputChange:k,onMenuClose:U,onMenuOpen:P,value:Z})}function bT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eg(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,Mb(r.key),r)}}function wT(e,t,n){return t&&eg(e.prototype,t),n&&eg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ST(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&&el(e,t)}function il(e){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},il(e)}function Lb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lb=function(){return!!e})()}function _T(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CT(e,t){if(t&&(Mr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _T(e)}function jT(e){var t=Lb();return function(){var r=il(e),o;if(t){var s=il(this).constructor;o=Reflect.construct(r,arguments,s)}else o=r.apply(this,arguments);return CT(this,o)}}function ET(e){if(Array.isArray(e))return wd(e)}function RT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NT(){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 pp(e){return ET(e)||RT(e)||Db(e)||NT()}function kT(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 OT(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 TT=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(OT(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=kT(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}(),tt="-ms-",al="-moz-",fe="-webkit-",Ub="comm",hp="rule",mp="decl",PT="@import",Vb="@keyframes",IT="@layer",$T=Math.abs,Bl=String.fromCharCode,AT=Object.assign;function MT(e,t){return Ye(e,0)^45?(((t<<2^Ye(e,0))<<2^Ye(e,1))<<2^Ye(e,2))<<2^Ye(e,3):0}function zb(e){return e.trim()}function DT(e,t){return(e=t.exec(e))?e[0]:e}function pe(e,t,n){return e.replace(t,n)}function Sd(e,t){return e.indexOf(t)}function Ye(e,t){return e.charCodeAt(t)|0}function Gs(e,t,n){return e.slice(t,n)}function on(e){return e.length}function gp(e){return e.length}function Vi(e,t){return t.push(e),e}function FT(e,t){return e.map(t).join("")}var ql=1,Ao=1,Bb=0,wt=0,Ae=0,qo="";function Hl(e,t,n,r,o,s,i){return{value:e,root:t,parent:n,type:r,props:o,children:s,line:ql,column:Ao,length:i,return:""}}function os(e,t){return AT(Hl("",null,null,"",null,null,0),e,{length:-e.length},t)}function LT(){return Ae}function UT(){return Ae=wt>0?Ye(qo,--wt):0,Ao--,Ae===10&&(Ao=1,ql--),Ae}function jt(){return Ae=wt<Bb?Ye(qo,wt++):0,Ao++,Ae===10&&(Ao=1,ql++),Ae}function fn(){return Ye(qo,wt)}function ha(){return wt}function fi(e,t){return Gs(qo,e,t)}function Ys(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 qb(e){return ql=Ao=1,Bb=on(qo=e),wt=0,[]}function Hb(e){return qo="",e}function ma(e){return zb(fi(wt-1,_d(e===91?e+2:e===40?e+1:e)))}function VT(e){for(;(Ae=fn())&&Ae<33;)jt();return Ys(e)>2||Ys(Ae)>3?"":" "}function zT(e,t){for(;--t&&jt()&&!(Ae<48||Ae>102||Ae>57&&Ae<65||Ae>70&&Ae<97););return fi(e,ha()+(t<6&&fn()==32&&jt()==32))}function _d(e){for(;jt();)switch(Ae){case e:return wt;case 34:case 39:e!==34&&e!==39&&_d(Ae);break;case 40:e===41&&_d(e);break;case 92:jt();break}return wt}function BT(e,t){for(;jt()&&e+Ae!==57;)if(e+Ae===84&&fn()===47)break;return"/*"+fi(t,wt-1)+"*"+Bl(e===47?e:jt())}function qT(e){for(;!Ys(fn());)jt();return fi(e,wt)}function HT(e){return Hb(ga("",null,null,null,[""],e=qb(e),0,[0],e))}function ga(e,t,n,r,o,s,i,l,c){for(var u=0,d=0,f=i,p=0,m=0,v=0,y=1,g=1,h=1,x=0,b="",S=o,_=s,j=r,E=b;g;)switch(v=x,x=jt()){case 40:if(v!=108&&Ye(E,f-1)==58){Sd(E+=pe(ma(x),"&","&\f"),"&\f")!=-1&&(h=-1);break}case 34:case 39:case 91:E+=ma(x);break;case 9:case 10:case 13:case 32:E+=VT(v);break;case 92:E+=zT(ha()-1,7);continue;case 47:switch(fn()){case 42:case 47:Vi(WT(BT(jt(),ha()),t,n),c);break;default:E+="/"}break;case 123*y:l[u++]=on(E)*h;case 125*y:case 59:case 0:switch(x){case 0:case 125:g=0;case 59+d:h==-1&&(E=pe(E,/\f/g,"")),m>0&&on(E)-f&&Vi(m>32?ng(E+";",r,n,f-1):ng(pe(E," ","")+";",r,n,f-2),c);break;case 59:E+=";";default:if(Vi(j=tg(E,t,n,u,d,o,l,b,S=[],_=[],f),s),x===123)if(d===0)ga(E,t,j,j,S,s,f,l,_);else switch(p===99&&Ye(E,3)===110?100:p){case 100:case 108:case 109:case 115:ga(e,j,j,r&&Vi(tg(e,j,j,0,0,o,l,b,o,S=[],f),_),o,_,f,l,r?S:_);break;default:ga(E,j,j,j,[""],_,0,l,_)}}u=d=m=0,y=h=1,b=E="",f=i;break;case 58:f=1+on(E),m=v;default:if(y<1){if(x==123)--y;else if(x==125&&y++==0&&UT()==125)continue}switch(E+=Bl(x),x*y){case 38:h=d>0?1:(E+="\f",-1);break;case 44:l[u++]=(on(E)-1)*h,h=1;break;case 64:fn()===45&&(E+=ma(jt())),p=fn(),d=f=on(b=E+=qT(ha())),x++;break;case 45:v===45&&on(E)==2&&(y=0)}}return s}function tg(e,t,n,r,o,s,i,l,c,u,d){for(var f=o-1,p=o===0?s:[""],m=gp(p),v=0,y=0,g=0;v<r;++v)for(var h=0,x=Gs(e,f+1,f=$T(y=i[v])),b=e;h<m;++h)(b=zb(y>0?p[h]+" "+x:pe(x,/&\f/g,p[h])))&&(c[g++]=b);return Hl(e,t,n,o===0?hp:l,c,u,d)}function WT(e,t,n){return Hl(e,t,n,Ub,Bl(LT()),Gs(e,2,-2),0)}function ng(e,t,n,r){return Hl(e,t,n,mp,Gs(e,0,r),Gs(e,r+1,-1),r)}function vo(e,t){for(var n="",r=gp(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function KT(e,t,n,r){switch(e.type){case IT:if(e.children.length)break;case PT:case mp:return e.return=e.return||e.value;case Ub:return"";case Vb:return e.return=e.value+"{"+vo(e.children,r)+"}";case hp:e.value=e.props.join(",")}return on(n=vo(e.children,r))?e.return=e.value+"{"+n+"}":""}function GT(e){var t=gp(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 YT(e){return function(t){t.root||(t=t.return)&&e(t)}}function QT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var XT=function(t,n,r){for(var o=0,s=0;o=s,s=fn(),o===38&&s===12&&(n[r]=1),!Ys(s);)jt();return fi(t,wt)},ZT=function(t,n){var r=-1,o=44;do switch(Ys(o)){case 0:o===38&&fn()===12&&(n[r]=1),t[r]+=XT(wt-1,n,r);break;case 2:t[r]+=ma(o);break;case 4:if(o===44){t[++r]=fn()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Bl(o)}while(o=jt());return t},JT=function(t,n){return Hb(ZT(qb(t),n))},rg=new WeakMap,eP=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&&!rg.get(r))&&!o){rg.set(t,!0);for(var s=[],i=JT(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]}}},tP=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Wb(e,t){switch(MT(e,t)){case 5103:return fe+"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 fe+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return fe+e+al+e+tt+e+e;case 6828:case 4268:return fe+e+tt+e+e;case 6165:return fe+e+tt+"flex-"+e+e;case 5187:return fe+e+pe(e,/(\w+).+(:[^]+)/,fe+"box-$1$2"+tt+"flex-$1$2")+e;case 5443:return fe+e+tt+"flex-item-"+pe(e,/flex-|-self/,"")+e;case 4675:return fe+e+tt+"flex-line-pack"+pe(e,/align-content|flex-|-self/,"")+e;case 5548:return fe+e+tt+pe(e,"shrink","negative")+e;case 5292:return fe+e+tt+pe(e,"basis","preferred-size")+e;case 6060:return fe+"box-"+pe(e,"-grow","")+fe+e+tt+pe(e,"grow","positive")+e;case 4554:return fe+pe(e,/([^-])(transform)/g,"$1"+fe+"$2")+e;case 6187:return pe(pe(pe(e,/(zoom-|grab)/,fe+"$1"),/(image-set)/,fe+"$1"),e,"")+e;case 5495:case 3959:return pe(e,/(image-set\([^]*)/,fe+"$1$`$1");case 4968:return pe(pe(e,/(.+:)(flex-)?(.*)/,fe+"box-pack:$3"+tt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+fe+e+e;case 4095:case 3583:case 4068:case 2532:return pe(e,/(.+)-inline(.+)/,fe+"$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(on(e)-1-t>6)switch(Ye(e,t+1)){case 109:if(Ye(e,t+4)!==45)break;case 102:return pe(e,/(.+:)(.+)-([^]+)/,"$1"+fe+"$2-$3$1"+al+(Ye(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Sd(e,"stretch")?Wb(pe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ye(e,t+1)!==115)break;case 6444:switch(Ye(e,on(e)-3-(~Sd(e,"!important")&&10))){case 107:return pe(e,":",":"+fe)+e;case 101:return pe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+fe+(Ye(e,14)===45?"inline-":"")+"box$3$1"+fe+"$2$3$1"+tt+"$2box$3")+e}break;case 5936:switch(Ye(e,t+11)){case 114:return fe+e+tt+pe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return fe+e+tt+pe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return fe+e+tt+pe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return fe+e+tt+e+e}return e}var nP=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case mp:t.return=Wb(t.value,t.length);break;case Vb:return vo([os(t,{value:pe(t.value,"@","@"+fe)})],o);case hp:if(t.length)return FT(t.props,function(s){switch(DT(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return vo([os(t,{props:[pe(s,/:(read-\w+)/,":"+al+"$1")]})],o);case"::placeholder":return vo([os(t,{props:[pe(s,/:(plac\w+)/,":"+fe+"input-$1")]}),os(t,{props:[pe(s,/:(plac\w+)/,":"+al+"$1")]}),os(t,{props:[pe(s,/:(plac\w+)/,tt+"input-$1")]})],o)}return""})}},rP=[nP],oP=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(y){var g=y.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||rP,s={},i,l=[];i=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(y){for(var g=y.getAttribute("data-emotion").split(" "),h=1;h<g.length;h++)s[g[h]]=!0;l.push(y)});var c,u=[eP,tP];{var d,f=[KT,YT(function(y){d.insert(y)})],p=GT(u.concat(o,f)),m=function(g){return vo(HT(g),p)};c=function(g,h,x,b){d=x,m(g?g+"{"+h.styles+"}":h.styles),b&&(v.inserted[h.name]=!0)}}var v={key:n,sheet:new TT({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 v.sheet.hydrate(l),v},Kb={exports:{}},ye={};/** @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 He=typeof Symbol=="function"&&Symbol.for,vp=He?Symbol.for("react.element"):60103,yp=He?Symbol.for("react.portal"):60106,Wl=He?Symbol.for("react.fragment"):60107,Kl=He?Symbol.for("react.strict_mode"):60108,Gl=He?Symbol.for("react.profiler"):60114,Yl=He?Symbol.for("react.provider"):60109,Ql=He?Symbol.for("react.context"):60110,xp=He?Symbol.for("react.async_mode"):60111,Xl=He?Symbol.for("react.concurrent_mode"):60111,Zl=He?Symbol.for("react.forward_ref"):60112,Jl=He?Symbol.for("react.suspense"):60113,rP=He?Symbol.for("react.suspense_list"):60120,ec=He?Symbol.for("react.memo"):60115,tc=He?Symbol.for("react.lazy"):60116,oP=He?Symbol.for("react.block"):60121,sP=He?Symbol.for("react.fundamental"):60117,iP=He?Symbol.for("react.responder"):60118,aP=He?Symbol.for("react.scope"):60119;function It(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case vp:switch(e=e.type,e){case xp:case Xl:case Wl:case Gl:case Kl:case Jl:return e;default:switch(e=e&&e.$$typeof,e){case Ql:case Zl:case tc:case ec:case Yl:return e;default:return t}}case yp:return t}}}function Kb(e){return It(e)===Xl}ye.AsyncMode=xp;ye.ConcurrentMode=Xl;ye.ContextConsumer=Ql;ye.ContextProvider=Yl;ye.Element=vp;ye.ForwardRef=Zl;ye.Fragment=Wl;ye.Lazy=tc;ye.Memo=ec;ye.Portal=yp;ye.Profiler=Gl;ye.StrictMode=Kl;ye.Suspense=Jl;ye.isAsyncMode=function(e){return Kb(e)||It(e)===xp};ye.isConcurrentMode=Kb;ye.isContextConsumer=function(e){return It(e)===Ql};ye.isContextProvider=function(e){return It(e)===Yl};ye.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===vp};ye.isForwardRef=function(e){return It(e)===Zl};ye.isFragment=function(e){return It(e)===Wl};ye.isLazy=function(e){return It(e)===tc};ye.isMemo=function(e){return It(e)===ec};ye.isPortal=function(e){return It(e)===yp};ye.isProfiler=function(e){return It(e)===Gl};ye.isStrictMode=function(e){return It(e)===Kl};ye.isSuspense=function(e){return It(e)===Jl};ye.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Wl||e===Xl||e===Gl||e===Kl||e===Jl||e===rP||typeof e=="object"&&e!==null&&(e.$$typeof===tc||e.$$typeof===ec||e.$$typeof===Yl||e.$$typeof===Ql||e.$$typeof===Zl||e.$$typeof===sP||e.$$typeof===iP||e.$$typeof===aP||e.$$typeof===oP)};ye.typeOf=It;Wb.exports=ye;var lP=Wb.exports,Gb=lP,cP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},uP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Yb={};Yb[Gb.ForwardRef]=cP;Yb[Gb.Memo]=uP;var dP=!0;function fP(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Qb=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||dP===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},pP=function(t,n,r){Qb(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 hP(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 mP={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},gP=/[A-Z]|^ms/g,vP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Xb=function(t){return t.charCodeAt(1)===45},rg=function(t){return t!=null&&typeof t!="boolean"},Kc=GT(function(e){return Xb(e)?e:e.replace(gP,"-$&").toLowerCase()}),og=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(vP,function(r,o,s){return an={name:o,styles:s,next:an},o})}return mP[t]!==1&&!Xb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Qs(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 yP(e,t,n)}case"function":{if(e!==void 0){var s=an,i=n(e);return an=s,Qs(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function yP(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Qs(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]+"}":rg(i)&&(r+=Kc(s)+":"+og(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++)rg(i[l])&&(r+=Kc(s)+":"+og(s,i[l])+";");else{var c=Qs(e,t,i);switch(s){case"animation":case"animationName":{r+=Kc(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var sg=/label:\s*([^\s;\n{]+)\s*(;|$)/g,an,Zb=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+=Qs(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=Qs(r,n,t[l]),o&&(s+=i[l]);sg.lastIndex=0;for(var c="",u;(u=sg.exec(s))!==null;)c+="-"+u[1];var d=hP(s)+c;return{name:d,styles:s,next:an}},xP=function(t){return t()},bP=ba.useInsertionEffect?ba.useInsertionEffect:!1,wP=bP||xP,bp={}.hasOwnProperty,Jb=w.createContext(typeof HTMLElement<"u"?nP({key:"css"}):null);Jb.Provider;var SP=function(t){return w.forwardRef(function(n,r){var o=w.useContext(Jb);return t(n,o,r)})},jP=w.createContext({}),_d="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",_P=function(t,n){var r={};for(var o in n)bp.call(n,o)&&(r[o]=n[o]);return r[_d]=t,r},CP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Qb(n,r,o),wP(function(){return pP(n,r,o)}),null},EP=SP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[_d],s=[r],i="";typeof e.className=="string"?i=fP(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=Zb(s,void 0,w.useContext(jP));i+=t.key+"-"+l.name;var c={};for(var u in e)bp.call(e,u)&&u!=="css"&&u!==_d&&(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))}),RP=EP,G=function(t,n){var r=arguments;if(n==null||!bp.call(n,"css"))return w.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=RP,s[1]=_P(t,n);for(var i=2;i<o;i++)s[i]=r[i];return w.createElement.apply(null,s)};function wp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zb(t)}var NP=function(){var t=wp.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 kP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const OP=Math.min,TP=Math.max,ll=Math.round,Vi=Math.floor,cl=e=>({x:e,y:e});function PP(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function ew(e){return nw(e)?(e.nodeName||"").toLowerCase():"#document"}function Jt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function tw(e){var t;return(t=(nw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function nw(e){return e instanceof Node||e instanceof Jt(e).Node}function Cd(e){return e instanceof Element||e instanceof Jt(e).Element}function Sp(e){return e instanceof HTMLElement||e instanceof Jt(e).HTMLElement}function ig(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jt(e).ShadowRoot}function rw(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=jp(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function IP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $P(e){return["html","body","#document"].includes(ew(e))}function jp(e){return Jt(e).getComputedStyle(e)}function MP(e){if(ew(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ig(e)&&e.host||tw(e);return ig(t)?t.host:t}function ow(e){const t=MP(e);return $P(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sp(t)&&rw(t)?t:ow(t)}function ul(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ow(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Jt(o);return s?t.concat(i,i.visualViewport||[],rw(o)?o:[],i.frameElement&&n?ul(i.frameElement):[]):t.concat(o,ul(o,[],n))}function AP(e){const t=jp(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Sp(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=ll(n)!==s||ll(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function _p(e){return Cd(e)?e:e.contextElement}function Gc(e){const t=_p(e);if(!Sp(t))return cl(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=AP(t);let i=(s?ll(n.width):n.width)/r,l=(s?ll(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const DP=cl(0);function FP(e){const t=Jt(e);return!IP()||!t.visualViewport?DP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jt(e)?!1:t}function ag(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=_p(e);let i=cl(1);t&&(r?Cd(r)&&(i=Gc(r)):i=Gc(e));const l=LP(s,n,r)?FP(s):cl(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),m=r&&Cd(r)?Jt(r):r;let x=p.frameElement;for(;x&&r&&m!==p;){const y=Gc(x),g=x.getBoundingClientRect(),h=jp(x),v=g.left+(x.clientLeft+parseFloat(h.paddingLeft))*y.x,b=g.top+(x.clientTop+parseFloat(h.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=v,u+=b,x=Jt(x).frameElement}}return PP({width:d,height:f,x:c,y:u})}function UP(e,t){let n=null,r;const o=tw(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 m=Vi(d),x=Vi(o.clientWidth-(u+f)),y=Vi(o.clientHeight-(d+p)),g=Vi(u),v={rootMargin:-m+"px "+-x+"px "+-y+"px "+-g+"px",threshold:TP(0,OP(1,c))||1};let b=!0;function S(j){const _=j[0].intersectionRatio;if(_!==c){if(!b)return i();_?i(!1,_):r=setTimeout(()=>{i(!1,1e-7)},100)}b=!1}try{n=new IntersectionObserver(S,{...v,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,v)}n.observe(e)}return i(!0),s}function VP(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=_p(e),d=o||s?[...u?ul(u):[],...ul(t)]:[];d.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const f=u&&l?UP(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(h=>{let[v]=h;v&&v.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let x,y=c?ag(e):null;c&&g();function g(){const h=ag(e);y&&(h.x!==y.x||h.y!==y.y||h.width!==y.width||h.height!==y.height)&&n(),y=h,x=requestAnimationFrame(g)}return n(),()=>{var h;d.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),f==null||f(),(h=m)==null||h.disconnect(),m=null,c&&cancelAnimationFrame(x)}}var Ed=w.useLayoutEffect,zP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dl=function(){};function BP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function qP(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(BP(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var lg=function(t){return eI(t)?t.filter(Boolean):Ar(t)==="object"&&t!==null?[t]:[]},sw=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=vn(t,zP);return W({},n)},Pe=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 HP(e,t,n){if(n){var r=n(e,t);if(typeof r=="string")return r}return e}function nc(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function WP(e){return nc(e)?window.innerHeight:e.clientHeight}function iw(e){return nc(e)?window.pageYOffset:e.scrollTop}function fl(e,t){if(nc(e)){window.scrollTo(0,t);return}e.scrollTop=t}function KP(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 GP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function zi(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:dl,o=iw(e),s=t-o,i=10,l=0;function c(){l+=i;var u=GP(l,o,s,n);fl(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function cg(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?fl(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&fl(e,Math.max(t.offsetTop-o,0))}function YP(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 ug(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function QP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var aw=!1,XP={get passive(){return aw=!0}},Bi=typeof window<"u"?window:{};Bi.addEventListener&&Bi.removeEventListener&&(Bi.addEventListener("p",dl,XP),Bi.removeEventListener("p",dl,!1));var ZP=aw;function JP(e){return e!=null}function eI(e){return Array.isArray(e)}function qi(e,t,n){return e?t:n}var tI=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=ze(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=ze(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},nI=["children","innerProps"],rI=["children","innerProps"];function oI(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=KP(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),m=p.bottom,x=p.height,y=p.top,g=n.offsetParent.getBoundingClientRect(),h=g.top,v=i?window.innerHeight:WP(c),b=iw(c),S=parseInt(getComputedStyle(n).marginBottom,10),j=parseInt(getComputedStyle(n).marginTop,10),_=h-j,E=v-y,C=_+b,N=f-b-y,R=m-v+b+S,O=b+y-j,k=160;switch(o){case"auto":case"bottom":if(E>=x)return{placement:"bottom",maxHeight:t};if(N>=x&&!i)return s&&zi(c,R,k),{placement:"bottom",maxHeight:t};if(!i&&N>=r||i&&E>=r){s&&zi(c,R,k);var P=i?E-S:N-S;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var U=t,F=i?_:C;return F>=r&&(U=Math.min(F-S-l,t)),{placement:"top",maxHeight:U}}if(o==="bottom")return s&&fl(c,R),{placement:"bottom",maxHeight:t};break;case"top":if(_>=x)return{placement:"top",maxHeight:t};if(C>=x&&!i)return s&&zi(c,O,k),{placement:"top",maxHeight:t};if(!i&&C>=r||i&&_>=r){var V=t;return(!i&&C>=r||i&&_>=r)&&(V=i?_-j:C-j),s&&zi(c,O,k),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function sI(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var lw=function(t){return t==="auto"?"bottom":t},iI=function(t,n){var r,o=t.placement,s=t.theme,i=s.borderRadius,l=s.spacing,c=s.colors;return W((r={label:"menu"},ao(r,sI(o),"100%"),ao(r,"position","absolute"),ao(r,"width","100%"),ao(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})},cw=w.createContext(null),aI=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(cw)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),m=ze(p,2),x=m[0],y=m[1],g=w.useState(null),h=ze(g,2),v=h[0],b=h[1],S=c.spacing.controlHeight;return Ed(function(){var j=f.current;if(j){var _=i==="fixed",E=l&&!_,C=oI({maxHeight:o,menuEl:j,minHeight:r,placement:s,shouldScroll:E,isFixedPosition:_,controlHeight:S});y(C.maxHeight),b(C.placement),d==null||d(C.placement)}},[o,s,i,l,r,d,S]),n({ref:f,placerProps:W(W({},t),{},{placement:v||lw(s),maxHeight:x})})},lI=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return G("div",Y({},Pe(t,"menu",{menu:!0}),{ref:r},o),n)},cI=lI,uI=function(t,n){var r=t.maxHeight,o=t.theme.spacing.baseUnit;return W({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:o,paddingTop:o})},dI=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return G("div",Y({},Pe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},uw=function(t,n){var r=t.theme,o=r.spacing.baseUnit,s=r.colors;return W({textAlign:"center"},n?{}:{color:s.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},fI=uw,pI=uw,hI=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=vn(t,nI);return G("div",Y({},Pe(W(W({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},mI=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=vn(t,rI);return G("div",Y({},Pe(W(W({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},gI=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}},vI=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(lw(i)),f=ze(d,2),p=f[0],m=f[1],x=w.useMemo(function(){return{setPortalPlacement:m}},[]),y=w.useState(null),g=ze(y,2),h=g[0],v=g[1],b=w.useCallback(function(){if(o){var E=YP(o),C=l==="fixed"?0:window.pageYOffset,N=E[p]+C;(N!==(h==null?void 0:h.offset)||E.left!==(h==null?void 0:h.rect.left)||E.width!==(h==null?void 0:h.rect.width))&&v({offset:N,rect:E})}},[o,l,p,h==null?void 0:h.offset,h==null?void 0:h.rect.left,h==null?void 0:h.rect.width]);Ed(function(){b()},[b]);var S=w.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&c.current&&(u.current=VP(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);Ed(function(){S()},[S]);var j=w.useCallback(function(E){c.current=E,S()},[S]);if(!n&&l!=="fixed"||!h)return null;var _=G("div",Y({ref:j},Pe(W(W({},t),{},{offset:h.offset,position:l,rect:h.rect}),"menuPortal",{"menu-portal":!0}),s),r);return G(cw.Provider,{value:x},n?Of.createPortal(_,n):_)},yI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},xI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return G("div",Y({},Pe(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},bI=function(t,n){var r=t.theme.spacing,o=t.isMulti,s=t.hasValue,i=t.selectProps.controlShouldRenderValue;return W({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")})},wI=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return G("div",Y({},Pe(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}},jI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"indicatorsContainer",{indicators:!0}),r),n)},dg,_I=["size"],CI=["innerProps","isRtl","size"],EI={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},dw=function(t){var n=t.size,r=vn(t,_I);return G("svg",Y({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:EI},r))},Cp=function(t){return G(dw,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"}))},fw=function(t){return G(dw,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"}))},pw=function(t,n){var r=t.isFocused,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return W({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?i.neutral60:i.neutral20,padding:s*2,":hover":{color:r?i.neutral80:i.neutral40}})},RI=pw,NI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||G(fw,null))},kI=pw,OI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||G(Cp,null))},TI=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing.baseUnit,i=o.colors;return W({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?i.neutral10:i.neutral20,marginBottom:s*2,marginTop:s*2})},PI=function(t){var n=t.innerProps;return G("span",Y({},n,Pe(t,"indicatorSeparator",{"indicator-separator":!0})))},II=NP(dg||(dg=kP([`
|
|
67
|
+
*/var We=typeof Symbol=="function"&&Symbol.for,vp=We?Symbol.for("react.element"):60103,yp=We?Symbol.for("react.portal"):60106,Wl=We?Symbol.for("react.fragment"):60107,Kl=We?Symbol.for("react.strict_mode"):60108,Gl=We?Symbol.for("react.profiler"):60114,Yl=We?Symbol.for("react.provider"):60109,Ql=We?Symbol.for("react.context"):60110,xp=We?Symbol.for("react.async_mode"):60111,Xl=We?Symbol.for("react.concurrent_mode"):60111,Zl=We?Symbol.for("react.forward_ref"):60112,Jl=We?Symbol.for("react.suspense"):60113,sP=We?Symbol.for("react.suspense_list"):60120,ec=We?Symbol.for("react.memo"):60115,tc=We?Symbol.for("react.lazy"):60116,iP=We?Symbol.for("react.block"):60121,aP=We?Symbol.for("react.fundamental"):60117,lP=We?Symbol.for("react.responder"):60118,cP=We?Symbol.for("react.scope"):60119;function It(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case vp:switch(e=e.type,e){case xp:case Xl:case Wl:case Gl:case Kl:case Jl:return e;default:switch(e=e&&e.$$typeof,e){case Ql:case Zl:case tc:case ec:case Yl:return e;default:return t}}case yp:return t}}}function Gb(e){return It(e)===Xl}ye.AsyncMode=xp;ye.ConcurrentMode=Xl;ye.ContextConsumer=Ql;ye.ContextProvider=Yl;ye.Element=vp;ye.ForwardRef=Zl;ye.Fragment=Wl;ye.Lazy=tc;ye.Memo=ec;ye.Portal=yp;ye.Profiler=Gl;ye.StrictMode=Kl;ye.Suspense=Jl;ye.isAsyncMode=function(e){return Gb(e)||It(e)===xp};ye.isConcurrentMode=Gb;ye.isContextConsumer=function(e){return It(e)===Ql};ye.isContextProvider=function(e){return It(e)===Yl};ye.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===vp};ye.isForwardRef=function(e){return It(e)===Zl};ye.isFragment=function(e){return It(e)===Wl};ye.isLazy=function(e){return It(e)===tc};ye.isMemo=function(e){return It(e)===ec};ye.isPortal=function(e){return It(e)===yp};ye.isProfiler=function(e){return It(e)===Gl};ye.isStrictMode=function(e){return It(e)===Kl};ye.isSuspense=function(e){return It(e)===Jl};ye.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Wl||e===Xl||e===Gl||e===Kl||e===Jl||e===sP||typeof e=="object"&&e!==null&&(e.$$typeof===tc||e.$$typeof===ec||e.$$typeof===Yl||e.$$typeof===Ql||e.$$typeof===Zl||e.$$typeof===aP||e.$$typeof===lP||e.$$typeof===cP||e.$$typeof===iP)};ye.typeOf=It;Kb.exports=ye;var uP=Kb.exports,Yb=uP,dP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},fP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Qb={};Qb[Yb.ForwardRef]=dP;Qb[Yb.Memo]=fP;var pP=!0;function hP(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var Xb=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||pP===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},mP=function(t,n,r){Xb(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 gP(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 vP={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},yP=/[A-Z]|^ms/g,xP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zb=function(t){return t.charCodeAt(1)===45},og=function(t){return t!=null&&typeof t!="boolean"},Kc=QT(function(e){return Zb(e)?e:e.replace(yP,"-$&").toLowerCase()}),sg=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(xP,function(r,o,s){return sn={name:o,styles:s,next:sn},o})}return vP[t]!==1&&!Zb(t)&&typeof n=="number"&&n!==0?n+"px":n};function Qs(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 sn={name:n.name,styles:n.styles,next:sn},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)sn={name:r.name,styles:r.styles,next:sn},r=r.next;var o=n.styles+";";return o}return bP(e,t,n)}case"function":{if(e!==void 0){var s=sn,i=n(e);return sn=s,Qs(e,t,i)}break}}if(t==null)return n;var l=t[n];return l!==void 0?l:n}function bP(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Qs(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]+"}":og(i)&&(r+=Kc(s)+":"+sg(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++)og(i[l])&&(r+=Kc(s)+":"+sg(s,i[l])+";");else{var c=Qs(e,t,i);switch(s){case"animation":case"animationName":{r+=Kc(s)+":"+c+";";break}default:r+=s+"{"+c+"}"}}}return r}var ig=/label:\s*([^\s;\n{]+)\s*(;|$)/g,sn,Jb=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="";sn=void 0;var i=t[0];i==null||i.raw===void 0?(o=!1,s+=Qs(r,n,i)):s+=i[0];for(var l=1;l<t.length;l++)s+=Qs(r,n,t[l]),o&&(s+=i[l]);ig.lastIndex=0;for(var c="",u;(u=ig.exec(s))!==null;)c+="-"+u[1];var d=gP(s)+c;return{name:d,styles:s,next:sn}},wP=function(t){return t()},SP=ba.useInsertionEffect?ba.useInsertionEffect:!1,_P=SP||wP,bp={}.hasOwnProperty,ew=w.createContext(typeof HTMLElement<"u"?oP({key:"css"}):null);ew.Provider;var CP=function(t){return w.forwardRef(function(n,r){var o=w.useContext(ew);return t(n,o,r)})},jP=w.createContext({}),Cd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",EP=function(t,n){var r={};for(var o in n)bp.call(n,o)&&(r[o]=n[o]);return r[Cd]=t,r},RP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return Xb(n,r,o),_P(function(){return mP(n,r,o)}),null},NP=CP(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var o=e[Cd],s=[r],i="";typeof e.className=="string"?i=hP(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=Jb(s,void 0,w.useContext(jP));i+=t.key+"-"+l.name;var c={};for(var u in e)bp.call(e,u)&&u!=="css"&&u!==Cd&&(c[u]=e[u]);return c.ref=n,c.className=i,w.createElement(w.Fragment,null,w.createElement(RP,{cache:t,serialized:l,isStringTag:typeof o=="string"}),w.createElement(o,c))}),kP=NP,G=function(t,n){var r=arguments;if(n==null||!bp.call(n,"css"))return w.createElement.apply(void 0,r);var o=r.length,s=new Array(o);s[0]=kP,s[1]=EP(t,n);for(var i=2;i<o;i++)s[i]=r[i];return w.createElement.apply(null,s)};function wp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Jb(t)}var OP=function(){var t=wp.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 TP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const PP=Math.min,IP=Math.max,ll=Math.round,zi=Math.floor,cl=e=>({x:e,y:e});function $P(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function tw(e){return rw(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nw(e){var t;return(t=(rw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function rw(e){return e instanceof Node||e instanceof Zt(e).Node}function jd(e){return e instanceof Element||e instanceof Zt(e).Element}function Sp(e){return e instanceof HTMLElement||e instanceof Zt(e).HTMLElement}function ag(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}function ow(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_p(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function AP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function MP(e){return["html","body","#document"].includes(tw(e))}function _p(e){return Zt(e).getComputedStyle(e)}function DP(e){if(tw(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ag(e)&&e.host||nw(e);return ag(t)?t.host:t}function sw(e){const t=DP(e);return MP(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sp(t)&&ow(t)?t:sw(t)}function ul(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sw(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Zt(o);return s?t.concat(i,i.visualViewport||[],ow(o)?o:[],i.frameElement&&n?ul(i.frameElement):[]):t.concat(o,ul(o,[],n))}function FP(e){const t=_p(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Sp(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,l=ll(n)!==s||ll(r)!==i;return l&&(n=s,r=i),{width:n,height:r,$:l}}function Cp(e){return jd(e)?e:e.contextElement}function Gc(e){const t=Cp(e);if(!Sp(t))return cl(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=FP(t);let i=(s?ll(n.width):n.width)/r,l=(s?ll(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const LP=cl(0);function UP(e){const t=Zt(e);return!AP()||!t.visualViewport?LP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zt(e)?!1:t}function lg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Cp(e);let i=cl(1);t&&(r?jd(r)&&(i=Gc(r)):i=Gc(e));const l=VP(s,n,r)?UP(s):cl(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=Zt(s),m=r&&jd(r)?Zt(r):r;let v=p.frameElement;for(;v&&r&&m!==p;){const y=Gc(v),g=v.getBoundingClientRect(),h=_p(v),x=g.left+(v.clientLeft+parseFloat(h.paddingLeft))*y.x,b=g.top+(v.clientTop+parseFloat(h.paddingTop))*y.y;c*=y.x,u*=y.y,d*=y.x,f*=y.y,c+=x,u+=b,v=Zt(v).frameElement}}return $P({width:d,height:f,x:c,y:u})}function zP(e,t){let n=null,r;const o=nw(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 m=zi(d),v=zi(o.clientWidth-(u+f)),y=zi(o.clientHeight-(d+p)),g=zi(u),x={rootMargin:-m+"px "+-v+"px "+-y+"px "+-g+"px",threshold:IP(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,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,x)}n.observe(e)}return i(!0),s}function BP(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=Cp(e),d=o||s?[...u?ul(u):[],...ul(t)]:[];d.forEach(h=>{o&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const f=u&&l?zP(u,n):null;let p=-1,m=null;i&&(m=new ResizeObserver(h=>{let[x]=h;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let v,y=c?lg(e):null;c&&g();function g(){const h=lg(e);y&&(h.x!==y.x||h.y!==y.y||h.width!==y.width||h.height!==y.height)&&n(),y=h,v=requestAnimationFrame(g)}return n(),()=>{var h;d.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f==null||f(),(h=m)==null||h.disconnect(),m=null,c&&cancelAnimationFrame(v)}}var Ed=w.useLayoutEffect,qP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dl=function(){};function HP(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function WP(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(HP(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var cg=function(t){return nI(t)?t.filter(Boolean):Mr(t)==="object"&&t!==null?[t]:[]},iw=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,qP);return K({},n)},Pe=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 nc(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function GP(e){return nc(e)?window.innerHeight:e.clientHeight}function aw(e){return nc(e)?window.pageYOffset:e.scrollTop}function fl(e,t){if(nc(e)){window.scrollTo(0,t);return}e.scrollTop=t}function YP(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 QP(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Bi(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:dl,o=aw(e),s=t-o,i=10,l=0;function c(){l+=i;var u=QP(l,o,s,n);fl(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function ug(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?fl(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&fl(e,Math.max(t.offsetTop-o,0))}function XP(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 dg(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function ZP(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var lw=!1,JP={get passive(){return lw=!0}},qi=typeof window<"u"?window:{};qi.addEventListener&&qi.removeEventListener&&(qi.addEventListener("p",dl,JP),qi.removeEventListener("p",dl,!1));var eI=lw;function tI(e){return e!=null}function nI(e){return Array.isArray(e)}function Hi(e,t,n){return e?t:n}var rI=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=ze(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=ze(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},oI=["children","innerProps"],sI=["children","innerProps"];function iI(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=YP(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var d=c.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),m=p.bottom,v=p.height,y=p.top,g=n.offsetParent.getBoundingClientRect(),h=g.top,x=i?window.innerHeight:GP(c),b=aw(c),S=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),j=h-_,E=x-y,C=j+b,N=f-b-y,R=m-x+b+S,O=b+y-_,k=160;switch(o){case"auto":case"bottom":if(E>=v)return{placement:"bottom",maxHeight:t};if(N>=v&&!i)return s&&Bi(c,R,k),{placement:"bottom",maxHeight:t};if(!i&&N>=r||i&&E>=r){s&&Bi(c,R,k);var P=i?E-S:N-S;return{placement:"bottom",maxHeight:P}}if(o==="auto"||i){var U=t,F=i?j:C;return F>=r&&(U=Math.min(F-S-l,t)),{placement:"top",maxHeight:U}}if(o==="bottom")return s&&fl(c,R),{placement:"bottom",maxHeight:t};break;case"top":if(j>=v)return{placement:"top",maxHeight:t};if(C>=v&&!i)return s&&Bi(c,O,k),{placement:"top",maxHeight:t};if(!i&&C>=r||i&&j>=r){var V=t;return(!i&&C>=r||i&&j>=r)&&(V=i?j-_:C-_),s&&Bi(c,O,k),{placement:"top",maxHeight:V}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function aI(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var cw=function(t){return t==="auto"?"bottom":t},lI=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"},ao(r,aI(o),"100%"),ao(r,"position","absolute"),ao(r,"width","100%"),ao(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})},uw=w.createContext(null),cI=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(uw)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),m=ze(p,2),v=m[0],y=m[1],g=w.useState(null),h=ze(g,2),x=h[0],b=h[1],S=c.spacing.controlHeight;return Ed(function(){var _=f.current;if(_){var j=i==="fixed",E=l&&!j,C=iI({maxHeight:o,menuEl:_,minHeight:r,placement:s,shouldScroll:E,isFixedPosition:j,controlHeight:S});y(C.maxHeight),b(C.placement),d==null||d(C.placement)}},[o,s,i,l,r,d,S]),n({ref:f,placerProps:K(K({},t),{},{placement:x||cw(s),maxHeight:v})})},uI=function(t){var n=t.children,r=t.innerRef,o=t.innerProps;return G("div",Y({},Pe(t,"menu",{menu:!0}),{ref:r},o),n)},dI=uI,fI=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})},pI=function(t){var n=t.children,r=t.innerProps,o=t.innerRef,s=t.isMulti;return G("div",Y({},Pe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":s}),{ref:o},r),n)},dw=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")})},hI=dw,mI=dw,gI=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=gn(t,oI);return G("div",Y({},Pe(K(K({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},vI=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=gn(t,sI);return G("div",Y({},Pe(K(K({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},yI=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}},xI=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(cw(i)),f=ze(d,2),p=f[0],m=f[1],v=w.useMemo(function(){return{setPortalPlacement:m}},[]),y=w.useState(null),g=ze(y,2),h=g[0],x=g[1],b=w.useCallback(function(){if(o){var E=XP(o),C=l==="fixed"?0:window.pageYOffset,N=E[p]+C;(N!==(h==null?void 0:h.offset)||E.left!==(h==null?void 0:h.rect.left)||E.width!==(h==null?void 0:h.rect.width))&&x({offset:N,rect:E})}},[o,l,p,h==null?void 0:h.offset,h==null?void 0:h.rect.left,h==null?void 0:h.rect.width]);Ed(function(){b()},[b]);var S=w.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&c.current&&(u.current=BP(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);Ed(function(){S()},[S]);var _=w.useCallback(function(E){c.current=E,S()},[S]);if(!n&&l!=="fixed"||!h)return null;var j=G("div",Y({ref:_},Pe(K(K({},t),{},{offset:h.offset,position:l,rect:h.rect}),"menuPortal",{"menu-portal":!0}),s),r);return G(uw.Provider,{value:v},n?Of.createPortal(j,n):j)},bI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},wI=function(t){var n=t.children,r=t.innerProps,o=t.isDisabled,s=t.isRtl;return G("div",Y({},Pe(t,"container",{"--is-disabled":o,"--is-rtl":s}),r),n)},SI=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")})},_I=function(t){var n=t.children,r=t.innerProps,o=t.isMulti,s=t.hasValue;return G("div",Y({},Pe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":s}),r),n)},CI=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},jI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"indicatorsContainer",{indicators:!0}),r),n)},fg,EI=["size"],RI=["innerProps","isRtl","size"],NI={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},fw=function(t){var n=t.size,r=gn(t,EI);return G("svg",Y({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:NI},r))},jp=function(t){return G(fw,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"}))},pw=function(t){return G(fw,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"}))},hw=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}})},kI=hw,OI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||G(pw,null))},TI=hw,PI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||G(jp,null))},II=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})},$I=function(t){var n=t.innerProps;return G("span",Y({},n,Pe(t,"indicatorSeparator",{"indicator-separator":!0})))},AI=OP(fg||(fg=TP([`
|
|
68
68
|
0%, 80%, 100% { opacity: 0; }
|
|
69
69
|
40% { opacity: 1; }
|
|
70
|
-
`]))),$I=function(t,n){var r=t.isFocused,o=t.size,s=t.theme,i=s.colors,l=s.spacing.baseUnit;return W({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})},Yc=function(t){var n=t.delay,r=t.offset;return G("span",{css:wp({animation:"".concat(II," 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"},"","")})},MI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=vn(t,CI);return G("div",Y({},Pe(W(W({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),G(Yc,{delay:0,offset:r}),G(Yc,{delay:160,offset:!0}),G(Yc,{delay:320,offset:!r}))},AI=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.theme,i=s.colors,l=s.borderRadius,c=s.spacing;return W({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}})},DI=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},Pe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":r||void 0}),n)},FI=DI,LI=["data"],UI=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},VI=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({},Pe(t,"group",{group:!0}),c),G(i,Y({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:s,cx:r}),u),G("div",null,n))},zI=function(t,n){var r=t.theme,o=r.colors,s=r.spacing;return W({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"})},BI=function(t){var n=sw(t);n.data;var r=vn(n,LI);return G("div",Y({},Pe(t,"groupHeading",{"group-heading":!0}),r))},qI=VI,HI=["innerRef","isDisabled","isHidden","inputClassName"],WI=function(t,n){var r=t.isDisabled,o=t.value,s=t.theme,i=s.spacing,l=s.colors;return W(W({visibility:r?"hidden":"visible",transform:o?"translateZ(0)":""},KI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},hw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},KI={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":W({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},hw)},GI=function(t){return W({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},hw)},YI=function(t){var n=t.cx,r=t.value,o=sw(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=vn(o,HI);return G("div",Y({},Pe(t,"input",{"input-container":!0}),{"data-value":r||""}),G("input",Y({className:n({input:!0},c),ref:s,style:GI(l),disabled:i},u)))},QI=YI,XI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors;return W({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:s/2,margin:o.baseUnit/2})},ZI=function(t,n){var r=t.theme,o=r.borderRadius,s=r.colors,i=t.cropWithEllipsis;return W({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})},JI=function(t,n){var r=t.theme,o=r.spacing,s=r.borderRadius,i=r.colors,l=t.isFocused;return W({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}})},mw=function(t){var n=t.children,r=t.innerProps;return G("div",r,n)},e$=mw,t$=mw;function n$(e){var t=e.children,n=e.innerProps;return G("div",Y({role:"button"},n),t||G(Cp,{size:14}))}var r$=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:W(W({},Pe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},G(d,{data:o,innerProps:W({},Pe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),G(f,{data:o,innerProps:W(W({},Pe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},o$=r$,s$=function(t,n){var r=t.isDisabled,o=t.isFocused,s=t.isSelected,i=t.theme,l=i.spacing,c=i.colors;return W({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}})},i$=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({},Pe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},l),n)},a$=i$,l$=function(t,n){var r=t.theme,o=r.spacing,s=r.colors;return W({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:s.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},c$=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"placeholder",{placeholder:!0}),r),n)},u$=c$,d$=function(t,n){var r=t.isDisabled,o=t.theme,s=o.spacing,i=o.colors;return W({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})},f$=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return G("div",Y({},Pe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},p$=f$,h$={ClearIndicator:OI,Control:FI,DropdownIndicator:NI,DownChevron:fw,CrossIcon:Cp,Group:qI,GroupHeading:BI,IndicatorsContainer:jI,IndicatorSeparator:PI,Input:QI,LoadingIndicator:MI,Menu:cI,MenuList:dI,MenuPortal:vI,LoadingMessage:mI,NoOptionsMessage:hI,MultiValue:o$,MultiValueContainer:e$,MultiValueLabel:t$,MultiValueRemove:n$,Option:a$,Placeholder:u$,SelectContainer:xI,SingleValue:p$,ValueContainer:wI},m$=function(t){return W(W({},h$),t.components)},fg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function g$(e,t){return!!(e===t||fg(e)&&fg(t))}function v$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!g$(e[n],t[n]))return!1;return!0}function y$(e,t){t===void 0&&(t=v$);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 x$={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"},b$=function(t){return G("span",Y({css:x$},t))},pg=b$,w$={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(y,g){return y&&y.length?"".concat(y.indexOf(g)+1," of ").concat(y.length):""};if(n==="value"&&l)return"value ".concat(i," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var p=c?" disabled":"",m="".concat(u?" selected":"").concat(p);return"".concat(i).concat(m,", ").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,m=c.inputValue,x=c.isMulti,y=c.isOptionDisabled,g=c.isSearchable,h=c.menuIsOpen,v=c.options,b=c.screenReaderStatus,S=c.tabSelectsValue,j=c.isLoading,_=c["aria-label"],E=c["aria-live"],C=w.useMemo(function(){return W(W({},w$),f||{})},[f]),N=w.useMemo(function(){var F="";if(n&&C.onChange){var V=n.option,Z=n.options,T=n.removedValue,L=n.removedValues,A=n.value,H=function(ue){return Array.isArray(ue)?null:ue},B=T||V||H(A),X=B?p(B):"",J=Z||L||void 0,ee=J?J.map(p):[],Q=W({isDisabled:B&&y(B,l),label:X,labels:ee},n);F=C.onChange(Q)}return F},[n,C,y,l,p]),R=w.useMemo(function(){var F="",V=r||o,Z=!!(r&&l&&l.includes(r));if(V&&C.onFocus){var T={focused:V,label:p(V),isDisabled:y(V,l),isSelected:Z,options:s,context:V===r?"menu":"value",selectValue:l,isAppleDevice:d};F=C.onFocus(T)}return F},[r,o,p,y,C,s,l,d]),O=w.useMemo(function(){var F="";if(h&&v.length&&!j&&C.onFilter){var V=b({count:s.length});F=C.onFilter({inputValue:m,resultsMessage:V})}return F},[s,m,h,C,v,b,j]),k=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var F="";if(C.guidance){var V=o?"value":h?"menu":"input";F=C.guidance({"aria-label":_,context:V,isDisabled:r&&y(r,l),isMulti:x,isSearchable:g,tabSelectsValue:S,isInitialFocus:k})}return F},[_,r,o,x,y,g,h,C,l,S,k]),U=G(w.Fragment,null,G("span",{id:"aria-selection"},N),G("span",{id:"aria-focused"},R),G("span",{id:"aria-results"},O),G("span",{id:"aria-guidance"},P));return G(w.Fragment,null,G(pg,{id:u},k&&U),G(pg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&U))},j$=S$,Rd=[{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źẑżžẓẕƶȥɀⱬꝣ"}],_$=new RegExp("["+Rd.map(function(e){return e.letters}).join("")+"]","g"),gw={};for(var Qc=0;Qc<Rd.length;Qc++)for(var Xc=Rd[Qc],Zc=0;Zc<Xc.letters.length;Zc++)gw[Xc.letters[Zc]]=Xc.base;var vw=function(t){return t.replace(_$,function(n){return gw[n]})},C$=y$(vw),hg=function(t){return t.replace(/^\s+|\s+$/g,"")},E$=function(t){return"".concat(t.label," ").concat(t.value)},R$=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=W({ignoreCase:!0,ignoreAccents:!0,stringify:E$,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,c=o.trim,u=o.matchFrom,d=c?hg(r):r,f=c?hg(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=C$(d),f=vw(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},N$=["innerRef"];function k$(e){var t=e.innerRef,n=vn(e,N$),r=tI(n,"onExited","in","enter","exit","appear");return G("input",Y({ref:t},r,{css:wp({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 O$=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function T$(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(g,h){if(u.current!==null){var v=u.current,b=v.scrollTop,S=v.scrollHeight,j=v.clientHeight,_=u.current,E=h>0,C=S-j-b,N=!1;C>h&&i.current&&(r&&r(g),i.current=!1),E&&l.current&&(s&&s(g),l.current=!1),E&&h>C?(n&&!i.current&&n(g),_.scrollTop=S,N=!0,i.current=!0):!E&&-h>b&&(o&&!l.current&&o(g),_.scrollTop=0,N=!0,l.current=!0),N&&O$(g)}},[n,r,o,s]),f=w.useCallback(function(g){d(g,g.deltaY)},[d]),p=w.useCallback(function(g){c.current=g.changedTouches[0].clientY},[]),m=w.useCallback(function(g){var h=c.current-g.changedTouches[0].clientY;d(g,h)},[d]),x=w.useCallback(function(g){if(g){var h=ZP?{passive:!1}:!1;g.addEventListener("wheel",f,h),g.addEventListener("touchstart",p,h),g.addEventListener("touchmove",m,h)}},[m,p,f]),y=w.useCallback(function(g){g&&(g.removeEventListener("wheel",f,!1),g.removeEventListener("touchstart",p,!1),g.removeEventListener("touchmove",m,!1))},[m,p,f]);return w.useEffect(function(){if(t){var g=u.current;return x(g),function(){y(g)}}},[t,x,y]),function(g){u.current=g}}var mg=["boxSizing","height","overflow","paddingRight","position"],gg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function vg(e){e.preventDefault()}function yg(e){e.stopPropagation()}function xg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function bg(){return"ontouchstart"in window||navigator.maxTouchPoints}var wg=!!(typeof window<"u"&&window.document&&window.document.createElement),ss=0,Kr={capture:!1,passive:!1};function P$(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(wg){var u=document.body,d=u&&u.style;if(r&&mg.forEach(function(x){var y=d&&d[x];o.current[x]=y}),r&&ss<1){var f=parseInt(o.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,m=window.innerWidth-p+f||0;Object.keys(gg).forEach(function(x){var y=gg[x];d&&(d[x]=y)}),d&&(d.paddingRight="".concat(m,"px"))}u&&bg()&&(u.addEventListener("touchmove",vg,Kr),c&&(c.addEventListener("touchstart",xg,Kr),c.addEventListener("touchmove",yg,Kr))),ss+=1}},[r]),l=w.useCallback(function(c){if(wg){var u=document.body,d=u&&u.style;ss=Math.max(ss-1,0),r&&ss<1&&mg.forEach(function(f){var p=o.current[f];d&&(d[f]=p)}),u&&bg()&&(u.removeEventListener("touchmove",vg,Kr),c&&(c.removeEventListener("touchstart",xg,Kr),c.removeEventListener("touchmove",yg,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 I$=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},$$={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function M$(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=T$({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=P$({isEnabled:n}),f=function(m){u(m),d(m)};return G(w.Fragment,null,n&&G("div",{onClick:I$,css:$$}),t(f))}var A$={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},D$=function(t){var n=t.name,r=t.onFocus;return G("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:A$,value:"",onChange:function(){}})},F$=D$;function Ep(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 L$(){return Ep(/^iPhone/i)}function yw(){return Ep(/^Mac/i)}function U$(){return Ep(/^iPad/i)||yw()&&navigator.maxTouchPoints>1}function V$(){return L$()||U$()}function z$(){return yw()||V$()}var B$=function(t){return t.label},q$=function(t){return t.label},H$=function(t){return t.value},W$=function(t){return!!t.isDisabled},K$={clearIndicator:kI,container:yI,control:AI,dropdownIndicator:RI,group:UI,groupHeading:zI,indicatorsContainer:SI,indicatorSeparator:TI,input:WI,loadingIndicator:$I,loadingMessage:pI,menu:iI,menuList:uI,menuPortal:gI,multiValue:XI,multiValueLabel:ZI,multiValueRemove:JI,noOptionsMessage:fI,option:s$,placeholder:l$,singleValue:d$,valueContainer:bI},G$={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%)"},Y$=4,xw=4,Q$=38,X$=xw*2,Z$={baseUnit:xw,controlHeight:Q$,menuGutter:X$},Jc={borderRadius:Y$,colors:G$,spacing:Z$},J$={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:ug(),captureMenuScroll:!ug(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:R$(),formatGroupLabel:B$,getOptionLabel:q$,getOptionValue:H$,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:W$,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!QP(),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 Sg(e,t,n,r){var o=Sw(e,t,n),s=jw(e,t,n),i=ww(e,t),l=pl(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:i,value:l,index:r}}function ga(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,l){return Sg(e,i,t,l)}).filter(function(i){return _g(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Sg(e,n,t,r);return _g(e,s)?s:void 0}).filter(JP)}function bw(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,pp(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function jg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,pp(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 e2(e,t){return bw(ga(e,t))}function _g(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!Cw(e)||!s)&&_w(e,{label:i,value:l,data:o},r)}function t2(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 n2(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var eu=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},ww=function(t,n){return t.getOptionLabel(n)},pl=function(t,n){return t.getOptionValue(n)};function Sw(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function jw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=pl(e,t);return n.some(function(o){return pl(e,o)===r})}function _w(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Cw=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},r2=1,Rp=function(e){bT(n,e);var t=jT(n);function n(r){var o;if(yT(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=z$(),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,m=f.isMulti,x=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:x}),p&&(o.setState({inputIsHiddenAfterUpdate:!m}),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,m=o.state.selectValue,x=f&&o.isOptionSelected(c,m),y=o.isOptionDisabled(c,m);if(x){var g=o.getOptionValue(c);o.setValue(m.filter(function(h){return o.getOptionValue(h)!==g}),"deselect-option",c)}else if(!y)f?o.setValue([].concat(pp(m),[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(x){return o.getOptionValue(x)!==f}),m=qi(u,p,p[0]||null);o.onChange(m,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(qi(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=qi(c,f,f[0]||null);o.onChange(p,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(c){return eu(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return jg(ga(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 qP.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return ww(o.props,c)},o.getOptionValue=function(c){return pl(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=K$[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 m$(o.props)},o.buildCategorizedOptions=function(){return ga(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return bw(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(c,u){o.setState({ariaSelection:W({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&&nc(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),m=5;o.userIsDragging=f>m||p>m}},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 Cw(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,m=u.inputValue,x=u.isClearable,y=u.isDisabled,g=u.menuIsOpen,h=u.onKeyDown,v=u.tabSelectsValue,b=u.openMenuOnFocus,S=o.state,j=S.focusedOption,_=S.focusedValue,E=S.selectValue;if(!y&&!(typeof h=="function"&&(h(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||m)return;o.focusValue("previous");break;case"ArrowRight":if(!d||m)return;o.focusValue("next");break;case"Delete":case"Backspace":if(m)return;if(_)o.removeValue(_);else{if(!f)return;d?o.popValue():x&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!g||!v||!j||b&&o.isOptionSelected(j,E))return;o.selectOption(j);break;case"Enter":if(c.keyCode===229)break;if(g){if(!j||o.isComposing)return;o.selectOption(j);break}return;case"Escape":g?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:m}),o.onMenuClose()):x&&p&&o.clearValue();break;case" ":if(m)return;if(!g){o.openMenu("first");break}if(!j)return;o.selectOption(j);break;case"ArrowUp":g?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":g?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!g)return;o.focusOption("pageup");break;case"PageDown":if(!g)return;o.focusOption("pagedown");break;case"Home":if(!g)return;o.focusOption("first");break;case"End":if(!g)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++r2),o.state.selectValue=lg(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=eu(s,i[l])}return o}return xT(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&&cg(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&&(cg(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(Jc):W(W({},Jc),this.props.theme):Jc}},{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,m=f.isRtl,x=f.options,y=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:y,isMulti:p,isRtl:m,options:x,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 Sw(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return jw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return _w(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,m=this.getComponents(),x=m.Input,y=this.state,g=y.inputIsHidden,h=y.ariaSelection,v=this.commonProps,b=l||this.getElementId("input"),S=W(W(W({"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()?(h==null?void 0:h.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?w.createElement(x,Y({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:s,isHidden:g,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c},S)):w.createElement(k$,Y({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:dl,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,m=this.props,x=m.controlShouldRenderValue,y=m.isDisabled,g=m.isMulti,h=m.inputValue,v=m.placeholder,b=this.state,S=b.selectValue,j=b.focusedValue,_=b.isFocused;if(!this.hasValue()||!x)return h?null:w.createElement(f,Y({},p,{key:"placeholder",isDisabled:y,isFocused:_,innerProps:{id:this.getElementId("placeholder")}}),v);if(g)return S.map(function(C,N){var R=C===j,O="".concat(o.getOptionLabel(C),"-").concat(o.getOptionValue(C));return w.createElement(i,Y({},p,{components:{Container:l,Label:c,Remove:u},isFocused:R,isDisabled:y,key:O,index:N,removeProps:{onClick:function(){return o.removeValue(C)},onTouchEnd:function(){return o.removeValue(C)},onMouseDown:function(P){P.preventDefault()}},data:C}),o.formatOptionLabel(C,"value"))});if(h)return null;var E=S[0];return w.createElement(d,Y({},p,{data:E,isDisabled:y}),this.formatOptionLabel(E,"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,m=s.Option,x=this.commonProps,y=this.state.focusedOption,g=this.props,h=g.captureMenuScroll,v=g.inputValue,b=g.isLoading,S=g.loadingMessage,j=g.minMenuHeight,_=g.maxMenuHeight,E=g.menuIsOpen,C=g.menuPlacement,N=g.menuPosition,R=g.menuPortalTarget,O=g.menuShouldBlockScroll,k=g.menuShouldScrollIntoView,P=g.noOptionsMessage,U=g.onMenuScrollToTop,F=g.onMenuScrollToBottom;if(!E)return null;var V=function(X,J){var ee=X.type,Q=X.data,te=X.isDisabled,ue=X.isSelected,_e=X.label,De=X.value,Xe=y===Q,me=te?void 0:function(){return o.onOptionHover(Q)},Ie=te?void 0:function(){return o.selectOption(Q)},M="".concat(o.getElementId("option"),"-").concat(J),D={id:M,onClick:Ie,onMouseMove:me,onMouseOver:me,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ue};return w.createElement(m,Y({},x,{innerProps:D,data:Q,isDisabled:te,isSelected:ue,key:M,label:_e,type:ee,value:De,isFocused:Xe,innerRef:Xe?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(X.data,"menu"))},Z;if(this.hasOptions())Z=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var X=B.data,J=B.options,ee=B.index,Q="".concat(o.getElementId("group"),"-").concat(ee),te="".concat(Q,"-heading");return w.createElement(i,Y({},x,{key:Q,data:X,options:J,Heading:l,headingProps:{id:te,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(ue){return V(ue,"".concat(ee,"-").concat(ue.index))}))}else if(B.type==="option")return V(B,"".concat(B.index))});else if(b){var T=S({inputValue:v});if(T===null)return null;Z=w.createElement(f,x,T)}else{var L=P({inputValue:v});if(L===null)return null;Z=w.createElement(p,x,L)}var A={minMenuHeight:j,maxMenuHeight:_,menuPlacement:C,menuPosition:N,menuShouldScrollIntoView:k},H=w.createElement(aI,Y({},x,A),function(B){var X=B.ref,J=B.placerProps,ee=J.placement,Q=J.maxHeight;return w.createElement(c,Y({},x,A,{innerRef:X,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:ee}),w.createElement(M$,{captureEnabled:h,onTopArrive:U,onBottomArrive:F,lockEnabled:O},function(te){return w.createElement(u,Y({},x,{innerRef:function(_e){o.getMenuListRef(_e),te(_e)},innerProps:{role:"listbox","aria-multiselectable":x.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:Q,focusedOption:y}),Z)}))});return R||N==="fixed"?w.createElement(d,Y({},x,{appendTo:R,controlElement:this.controlRef,menuPlacement:C,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(F$,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(c)if(i){var p=f.map(function(y){return o.getOptionValue(y)}).join(i);return w.createElement("input",{name:u,type:"hidden",value:p})}else{var m=f.length>0?f.map(function(y,g){return w.createElement("input",{key:"i-".concat(g),name:u,type:"hidden",value:o.getOptionValue(y)})}):w.createElement("input",{name:u,type:"hidden",value:""});return w.createElement("div",null,m)}else{var x=f[0]?this.getOptionValue(f[0]):"";return w.createElement("input",{name:u,type:"hidden",value:x})}}},{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(j$,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,m=u.menuIsOpen,x=this.state.isFocused,y=this.commonProps=this.getCommonProps();return w.createElement(l,Y({},y,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:x}),this.renderLiveRegion(),w.createElement(s,Y({},y,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:x,menuIsOpen:m}),w.createElement(c,Y({},y,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(i,Y({},y,{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,m=o.options,x=o.value,y=o.menuIsOpen,g=o.inputValue,h=o.isMulti,v=lg(x),b={};if(i&&(x!==i.value||m!==i.options||y!==i.menuIsOpen||g!==i.inputValue)){var S=y?e2(o,v):[],j=y?jg(ga(o,v),"".concat(p,"-option")):[],_=l?t2(s,v):null,E=n2(s,S),C=eu(j,E);b={selectValue:v,focusedOption:E,focusedOptionId:C,focusableOptionsWithIds:j,focusedValue:_,clearFocusValueOnUpdate:!1}}var N=c!=null&&o!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=u,O=d&&f;return d&&!O&&(R={value:qi(h,v,v[0]||null),options:v,action:"initial-input-focus"},O=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(R=null),W(W(W({},b),N),{},{prevProps:o,ariaSelection:R,prevWasFocused:O})}}]),n}(w.Component);Rp.defaultProps=J$;var o2=w.forwardRef(function(e,t){var n=Db(e);return w.createElement(Rp,Y({ref:t},n))}),Ew=o2;function yo({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,[m,x]=w.useState(p?localStorage.getItem(s)!="true":s),[y,g]=w.useState(!1);w.useEffect(()=>{setTimeout(()=>g(!0),100)},[]);const h=()=>{p&&localStorage.setItem(s,"true")},v=a.jsxs(zl,{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:()=>{h(),x(!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($b,{target:u.current,placement:c,show:m&&f&&y,children:v}):a.jsx(fp,{placement:c,onToggle:b=>{h(),x(b)},overlay:v,show:m&&f&&y,trigger:d,children:a.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:a.jsx("i",{className:`bi bi-${o}`})})})}const s2="_items_c2dbg_1",i2="_item_c2dbg_1",a2="_details_c2dbg_14",l2="_text_c2dbg_20",c2="_number_c2dbg_35",u2="_outer_c2dbg_50",d2="_inner_c2dbg_61",bn={items:s2,item:i2,details:a2,text:l2,number:c2,outer:u2,inner:d2},is=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function f2({requestId:e,grantNumber:t,creditColorClass:n="gray-300",colorClasses:r=rd}){const{request:o}=ut(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+=od(p));const c=[],u=[];let d=-.25;const f=[...l,i].map((p,m)=>{if(!p)return null;const x=m+1,g=od(p)/s,h=p.requested-p.used,v=Math.max(0,h),b=p.isCredit?s/p.exchangeRates.base.unitCost:p.requested,S=b==0?0:100*v/b,_=`var(--bs-${p.isCredit?n:r[m%r.length]})`;if(g>0){const E=d,C=d+g/2,N=d+=g,R=g>.5?1:0,O=[`M ${is(E,100)}`,`A 100 100 0 ${R} 1 ${is(N,100)}`,`L ${is(N,50)}`,`A 50 50 0 ${R} 0 ${is(E,50)}`].join(" "),[k,P]=is(C,75).split(" ").map(U=>parseFloat(U));c.push(a.jsx("path",{d:O,style:{fill:_}},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:bn.number,children:x},`${p.resourceId}-text`))}return p.isCredit&&u.push(a.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:a.jsx("div",{className:bn.text,children:a.jsxs("div",{children:[a.jsx("strong",{children:it(v,{abbreviate:!0})}),p.unit," available"]})})},"center-text")),a.jsxs("li",{className:bn.item,children:[a.jsx("span",{className:bn.number,children:x}),a.jsx("span",{className:`${bn.outer} ms-2 me-2`,style:{borderColor:_},children:a.jsx("span",{className:bn.inner,style:{backgroundColor:_,width:`${S}%`}})}),a.jsxs("strong",{className:bn.name,children:[a.jsx(Cn,{resource:p,userGuide:!1}),": "]}),a.jsxs("span",{className:bn.details,children:[it(h,{abbreviate:!0})," ",p.isCredit?null:a.jsxs(a.Fragment,{children:["of ",it(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:bn.items,children:f})})]})}const Cg=e=>e;function p2({classes:e,clean:t=Cg,format:n=Cg,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 h2({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}=ut(e,t),{project:p}=kt(t||n&&n.grantNumber),m=w.useRef(null),x=w.useRef(null);if(!n||!p)return;const y="Exchange"in n.allowedActions,g="Renewal"in n.allowedActions,h="Supplement"in n.allowedActions,v=n.exchangeStatus==c.pending,b=n.exchangeStatus==c.success,S=n.exchangeStatus==c.error,j=n.exchangeErrors,_=n.exchangeActionId!==null,E=n.exchangeActionEditable,C=n.resources,N=n.resourcesReason,R={};for(let M of C)R[M.resourceId]=M;const O=()=>{jx(n)>=.75?u():d()},k=[];for(let M of C){let D=[];if(M.requested>0){for(let de of M.requires||[]){let re=R[de];if(re){if(re.requested>0){D=[];break}D.push(re)}}D.length&&k.push(a.jsxs("span",{children:[a.jsx(Cn,{resource:M,userGuide:!1})," requires"," ",Sx(D.map(de=>a.jsx(Cn,{resource:de,userGuide:!1},de.resourceId)),"or"),"."]},M.resourceId))}}const P=k.length>0,U=M=>M.requested-M.used,F=M=>M.isNew&&0<M.requested&&M.requested<M.minimumExchange,V=[];for(let M of C)!M.isCredit&&F(M)&&V.push(a.jsxs("span",{children:["The minimum initial request for ",a.jsx(Cn,{resource:M,userGuide:!1})," is ",M.minimumExchange," ",M.unit,". ",a.jsx("br",{})]},M.resourceId));const Z=V.length>0;let T;b?T=a.jsx(Se,{color:"info",children:"Your exchange request has been submitted."}):S&&j.length>0&&j[0].includes("PI")&&j[0].includes("person status Unknown")?T=a.jsx(Se,{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(M=>M.role==="pi").map(M=>`${M.firstName} ${M.lastName}`)," ","to update the academic status in their profile, and then try again."]})}):S?T=a.jsxs(Se,{color:"danger",children:["Sorry, something went wrong: ",j.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."]}):_?T=a.jsx(Se,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):n.timeStatus=="current"&&!p.isManager?T=a.jsxs(Se,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",Vf(p)," to request a change."]}):P?T=a.jsxs(Se,{color:"warning",children:[k," Please adjust your balance values."]}):Z&&(T=a.jsx(Se,{color:"warning",children:V}));const L=N.length>0;let A=!1,H=!1;for(let M of C)if(M.isNew&&(A=!0),M.allocated!=M.requested&&(H=!0),A&&H)break;const B=C.map(M=>M.resourceId),X={},J={},ee=[];if(y&&E){n.allowedActions.Exchange.resources.filter(M=>!B.includes(M.resourceId)).map(M=>{X[M.resourceId]=M;const D=`${M.type} Resources (${M.unit})`;J[D]=J[D]||[],J[D].push(M)});for(const[M,D]of Object.entries(J))ee.push({label:M,options:D.sort((de,re)=>de.exchangeRates.current.unitCost<re.exchangeRates.current.unitCost||de.exchangeRates.current.unitCost==re.exchangeRates.current.unitCost&&de.name<re.name?-1:1).map(de=>{const re=ii(de.name),dt=re.short?`${re.short} (${re.full.replace(/ \([^(]+\)/,"")})`:re.full;return{value:de.resourceId,label:dt}})}),ee.sort((de,re)=>de.label<re.label?-1:1)}const Q=y?n.allowedActions.Exchange.resources.map(M=>M.resourceId):[];let te;const ue=[],_e=[];for(let M of C)M.isCredit?te=M:(ue.push(M),_e.push(E&&(M.isNew||M.allocated!=M.requested)?Cr.edited:Q.includes(M.resourceId)?"":Cr.disabled));const De=`Add ${ue.length?"another":"a"} resource to your exchange...`,Xe=(M,D)=>{const de=D.allocated-D.used,re=mo(Number(M.replace(/[^0-9-.]/g,"")),D.decimalPlaces),dt=Math.min(0,de);if(re<dt)return dt;let ot=te.requested*te.exchangeRates.base.unitCost;const be=(D.allocated-D.requested)*D.exchangeRates.base.unitCost,qt=Math.min(ot,be);ot-=qt;let $t=D.requested-D.used+qt/D.exchangeRates.base.unitCost;return ot>0&&($t+=ot/D.exchangeRates.current.unitCost),re>$t?mo($t,D.decimalPlaces,"floor"):re},me=M=>M.isBoolean?a.jsx(a.Fragment,{children:"—"}):a.jsxs(a.Fragment,{children:[Tn(ne.resourceTypeIcons[te.icon]),a.jsx("span",{className:"ms-2",children:zC(M.unit,M.exchangeRates.current.unitCost,te.name)})]}),Ie=[{key:"name",name:"Resource",format:(M,D)=>a.jsxs(a.Fragment,{children:[a.jsx(Cn,{resource:D}),(p.currentUser.resourceIds.includes(D.resourceId)||p.currentUser.resourceAccountInactiveIds.includes(D.resourceId))&&a.jsx(Io,{icon:"table",onClick:()=>o(D.resourceRepositoryKey),target:"_blank",title:`${D.name} Usage Details`})," ",a.jsx($o,{status:D.isActive?"Active":D.isNew?"New":"Inactive"})]}),width:Math.min(350,window.innerWidth*.3)},{key:"unit",name:"Unit Cost",width:300,format:(M,D)=>me(D)}];return y&&Ie.push({key:"requested",name:"Balance",class:"text-end",rowClass:M=>E&&Q.includes(M.resourceId)?Cr.input:"",format:(M,D)=>{const de=E&&Q.includes(D.resourceId);return D.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:M==1,disabled:!de,onChange:re=>i(D.resourceId,re.target.checked?1:0)})}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:"Requested"})]}):a.jsxs("span",{className:"d-flex",children:[de?a.jsx(p2,{classes:"text-end w-100",clean:re=>Xe(re,D),format:it,label:`Balance for ${D.name}`,setValue:re=>{i(D.resourceId,re+D.used)},style:{padding:"0.1rem 0.5rem"},value:U(D)}):a.jsx("span",{children:it(U(D))}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:D.unit})]})},formatHeader:M=>a.jsxs(a.Fragment,{children:[M,E?a.jsx(yo,{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:(M,D)=>{const re=-1*(D.requested-D.allocated)*D.exchangeRates.current.unitCost;return re!==0?a.jsxs("span",{className:`badge bg-${re>0?"primary":"danger"} rounded-pill`,children:[re>0?"+":"",it(re,te)," ",te.unit]}):a.jsx(a.Fragment,{children:"—"})}}),a.jsxs("div",{className:"resources",children:[C.length?a.jsx(f2,{requestId:e}):null,te&&(y||g||h)?a.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[a.jsxs("span",{children:[Tn(ne.resourceTypeIcons.credit)," ",it(te.requested,te)," ",te.unit," available to exchange"]}),g||h?a.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:O,children:[Tn(ne.resourceTypeIcons.credit)," Request More"," ",n.usesCredits?"Credits":"Units"]}):null]}):null,T,ue.length?a.jsx(mn,{columns:Ie,rows:ue,rowClasses:_e,classes:ee.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."}),ee.length?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:m,children:a.jsx(Ew,{classNames:{control:()=>"react-select mb-1"},options:ee,onChange:M=>r(M.value),placeholder:De,value:null,"aria-label":De,formatOptionLabel:({value:M,label:D})=>{const de=X[M];return a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsx("span",{children:a.jsx(Cn,{resource:de,userGuide:!1},D)}),a.jsx("span",{children:me(de)})]})}})}),ue.length?null:a.jsx(yo,{bg:"secondary",color:"dark",visible:p.tab=="resources",initial:!0,target:m,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,y&&E?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:v||!H&&!L&&!A,onClick:s,children:"Reset Form"}),a.jsx("button",{ref:x,type:"button",className:"btn btn-secondary",disabled:v||!H||!L||P||Z,onClick:f,children:v?"Submitting...":"Submit for Approval"})]}),H&&!P?a.jsx(yo,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:x,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 m2({question:e,requestId:t,grantNumber:n}){const{request:r,setResourceQuestionValues:o}=ut(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],m=p.required?"required":"",x=b=>o(d,i,b.target.value?[b.target.value]:[]),y=b=>{o(d,i,Array.from(b.target.options).filter(({selected:S})=>S).map(({value:S})=>parseInt(S,10)))},g=b=>{const S=parseInt(b.target.value,10),j=b.target.checked?[...f,S]:f.filter(_=>_!=S);o(d,i,j)},h=b=>{const S=parseInt(b.target.value);o(d,i,isNaN(S)?[]:[S])};let v;if(["calendar","integer_only","text"].includes(c)){const b={calendar:"date",integer_only:"number",text:"text"}[c];v=a.jsx("input",{className:"form-control",id:s,type:b,placeholder:p.label,required:p.required,value:f[0]||"",onChange:c=="integer_only"?h:x})}else if(c=="textarea")v=a.jsx("textarea",{className:"form-control",id:s,placeholder:p.label,required:p.required,value:f[0]||"",onChange:x});else if(c=="drop_down"||l.length>=10){const b=c=="multi_sel";v=a.jsxs("select",{id:s,className:"form-select",required:p.required,multiple:b,onChange:b?y:h,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 v=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"?h:g}),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 ${m}`,children:u}),v]})}function g2({requestId:e,grantNumber:t}){const{request:n,saveResources:r,toggleResourcesModal:o}=ut(e,t),{project:s}=kt(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?Uf(u.requested):a.jsxs(a.Fragment,{children:[d>0?"+":"",it(d,u)," ",u.unit]})})]},u.resourceId)}),c=i.some(({attributes:u,values:d})=>d.length==0&&u[0].required);return a.jsxs(ce,{size:"lg",show:n.showResourcesModal,onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Complete Your Exchange"})}),a.jsxs(ce.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(m2,{question:u,requestId:e,grantNumber:t},u.attributeSetId))]}):null]}),a.jsx(ce.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 Rw({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 v2({requestId:e,grantNumber:t}){const{project:n}=kt(t),{request:r,closeUsageDetailModal:o}=ut(e,t);if(!r||r.error||!n||n.error||!r.usageDetailStatus)return;let s,i="Usage";if(r.usageDetailStatus==Ve.pending)s=a.jsx(Ur,{});else if(r.usageDetailStatus==Ve.error)s=a.jsx(Se,{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}=ii(c),m=r.resources.find(h=>h.resourceRepositoryKey==u),x=h=>it(h,{decimalPlaces:m?m.decimalPlaces:void 0}),y={};for(let h of n.users)y[h.username]=h;i=a.jsxs(a.Fragment,{children:["Usage: ",p||f," for ",l]});const g=[{key:"name",name:"Name",format:(h,{lastName:v,firstName:b,portalUsername:S})=>{const j=y[S];return j?a.jsx(Rw,{user:j}):`${v}, ${b}`}},{key:"portalUsername",name:"Resource Username",format:h=>{const v=y[h],b=v?v.resourceUsernames[m.resourceId]:null;return b||a.jsx(a.Fragment,{children:"—"})}},{key:"role",name:"Role",format:h=>_x[h].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:x},{key:"lastMonth",name:"Last Month",class:"text-end",format:x},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:x},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:x},{key:"total",name:"All Time",class:"text-end",format:x}];s=d.length?a.jsx(mn,{rows:d,columns:g}):a.jsx(Se,{color:"info",children:"There is no usage for this resource."})}return a.jsxs(ce,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:i})}),a.jsx(ce.Body,{children:s})]})}var y2=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function x2(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=vn(e,y2),p=f.inputValue,m=w.useRef(void 0),x=w.useRef(!1),y=w.useState(Array.isArray(n)?n:void 0),g=ze(y,2),h=g[0],v=g[1],b=w.useState(typeof p<"u"?p:""),S=ze(b,2),j=S[0],_=S[1],E=w.useState(n===!0),C=ze(E,2),N=C[0],R=C[1],O=w.useState(void 0),k=ze(O,2),P=k[0],U=k[1],F=w.useState([]),V=ze(F,2),Z=V[0],T=V[1],L=w.useState(!1),A=ze(L,2),H=A[0],B=A[1],X=w.useState({}),J=ze(X,2),ee=J[0],Q=J[1],te=w.useState(void 0),ue=ze(te,2),_e=ue[0],De=ue[1],Xe=w.useState(void 0),me=ze(Xe,2),Ie=me[0],M=me[1];o!==Ie&&(Q({}),M(o)),n!==_e&&(v(Array.isArray(n)?n:void 0),De(n)),w.useEffect(function(){return x.current=!0,function(){x.current=!1}},[]);var D=w.useCallback(function(dt,ot){if(!s)return ot();var be=s(dt,ot);be&&typeof be.then=="function"&&be.then(ot,function(){return ot()})},[s]);w.useEffect(function(){n===!0&&D(j,function(dt){x.current&&(v(dt||[]),R(!!m.current))})},[]);var de=w.useCallback(function(dt,ot){var be=HP(dt,ot,c);if(!be){m.current=void 0,_(""),U(""),T([]),R(!1),B(!1);return}if(o&&ee[be])_(be),U(be),T(ee[be]),R(!1),B(!1);else{var qt=m.current={};_(be),R(!0),B(!P),D(be,function($t){x&&qt===m.current&&(m.current=void 0,R(!1),U(be),T($t||[]),B(!1),Q($t?W(W({},ee),{},ao({},be,$t)):ee))})}},[o,D,P,ee,c]),re=H?[]:j&&P?Z:h||[];return W(W({},f),{},{options:re,isLoading:N||l,onInputChange:de,filterOption:d})}var b2=w.forwardRef(function(e,t){var n=x2(e),r=Db(n);return w.createElement(Rp,Y({ref:t},r))}),w2=b2;const Nd=({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 S2({grantNumber:e,requestId:t}){const{project:n,addUser:r,resetUsers:o,saveUsers:s,setTab:i,setUserRole:l,statuses:c,toggleUsersResources:u}=kt(e),{request:d}=n?ut(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,m=n.usersStatus==c.pending,x=n.usersStatus==c.success,y=n.usersStatus==c.error,g=n.users,h=d.resources.filter(cd),v=h.length==0,b=g.find(R=>R.hasChanges)!==void 0,S=g.find(R=>R.role!="pi")!==void 0;let j;x&&!b?j=a.jsx(Se,{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."}):y?j=a.jsx(Se,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):f?h.length?v&&(j=a.jsx(Se,{color:"warning",children:"This project does not have any active resources."})):j=a.jsxs(Se,{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."]}):j=a.jsxs(Se,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",Vf(n)," to request a change."]});const _=(R,O)=>{let k,P,U,F;if(O.key=="all"){k="all resources for all users",P=V=>u(V),U=0;for(let V of g)U+=V.resourceIds.length;F=g.length*h.length}else k=`all users for ${O.name}`,P=V=>u(V,null,O.key),U=g.filter(({resourceIds:V})=>V.includes(O.key)).length,F=g.length;return a.jsxs(a.Fragment,{children:[O.key=="all"?R:a.jsx(Cn,{resource:O,userGuide:!1}),a.jsx("br",{}),a.jsx(Nd,{description:k,disabled:O.disabled,onChange:P,selectedLength:U,totalLength:F})]})},E=Ml.map(({role:R,name:O})=>a.jsx("option",{value:R,children:O},R)),C=[{key:"name",name:"Name",width:200,format:(R,O)=>a.jsx(Rw,{user:O})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(R,O)=>a.jsx("select",{className:"form-select",value:R,onChange:k=>l(O.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:E.filter(k=>k.key==R||!["pi","co_pi"].includes(k.key))})}];h.length&&C.push({key:"all",name:"All Resources",class:`text-center ${Cr.important}`,disabled:!f||v,width:100,format:(R,O)=>a.jsx(Nd,{description:`all users for ${O.name}`,disabled:!f||v,onChange:k=>u(k,O.username),selectedLength:O.resourceIds.length,totalLength:h.length}),formatHeader:_});for(let R of h)C.push({key:R.resourceId,name:R.name,class:"text-center",disabled:!f||!R.isActive,icon:R.icon,format:(O,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:_});const N=g.map(R=>R.hasChanges?Cr.edited:"");return a.jsxs(a.Fragment,{children:[j,a.jsx(mn,{rows:g,columns:C,frozenColumns:h.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:N,scrollRowIndex:n.usersNewRowIndex}),f&&h.length&&!v?a.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:a.jsx(w2,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await YE(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&&(h.length&&!v||S)?a.jsxs("div",{className:"d-flex mt-3",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:m||!b,onClick:o,children:"Reset Form"}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:m||!b,onClick:s,children:m?"Saving...":"Save Changes"})]}):null]})}const j2=(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}},_2=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:C2(t)},t))})]}):null;function C2(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const Ao={authenticityToken:null,data_loaded:!1,errors:[],form_valid:!1,grant_number:"",projects:[],publication:{},publicationId:null,publication_types:[],saving:!1,selected_resources:[],show_saved:!1,showEditModal:!1,resources_none_selected:!1},Nw=Lr({name:"publicationEdit",initialState:Ao,reducers:{addAuthor:e=>{e.publication.authors.push({portal_username:"",first_name:"",middle_name:"",last_name:"",prefix:"",suffix:"",initials:"",affiliation:"",hash:{}})},addProject:(e,{payload:t})=>{e.projects.push(t)},changePublicationType:(e,{payload:t})=>{let n=e.publication_types.find(r=>r.publication_type==t).fields;n.forEach(r=>{const o=e.publication.fields.find(s=>s.csl_field_name==r.csl_field_name);o&&(r.value=o.value)}),e.publication.publication_type=t,e.publication.fields=n},dataLoaded:(e,{payload:t})=>{e.publication=t.publication,e.form_valid=t.publication.title.trim()!="",e.publication.authors.forEach(n=>{n.affiliation||(n.affiliation="")}),e.publication_types=t.publication_types,e.projects=t.publication.projects||[],e.selected_resources=(t.publication.publication_resources||[]).map(n=>n.acct_resource_id).filter(Boolean).map(n=>Number(n)),e.resources_none_selected=t.publication.access_staff_publication||!1,e.data_loaded=!0},deleteAuthor:(e,{payload:t})=>{e.publication.authors.splice(t,1)},hideError:(e,{payload:t})=>{e.errors=e.errors.filter(n=>n.id!=t)},setFormValid:(e,{payload:t})=>{e.form_valid=t},setGrantNumber:(e,{payload:t})=>{e.grant_number=t},setPublication:(e,{payload:t})=>{e.publication.fields.forEach(n=>{n.field_value=t[n.csl_field_name]||""}),Object.keys(e.publication).forEach(n=>{t[n]&&(e.publication[n]=t[n])}),e.form_valid=t.title.trim()!=""},setPublicationId:(e,{payload:t})=>{e.publicationId=t},setShowEditModal:(e,{payload:t})=>{e.showEditModal=t},resetState:e=>{for(const[t,n]of Object.entries(Ao))e[t]=n},toggleRequest:(e,{payload:t})=>{e.projects[t].selected=!e.projects[t].selected},updateAuthor:(e,{payload:t})=>{e.publication.authors[t.idx][t.key]=t.value},updateErrors:(e,{payload:t})=>{e.errors.push({id:`${Math.random().toString(36).slice(2)}`,message:t})},updateField:(e,{payload:t})=>{e.publication.fields[t.index].field_value=t.value},updatePublication:(e,{payload:t})=>{e.publication[t.key]=t.value},updateSaving:(e,{payload:t})=>{e.saving=t},updateSelectedResources:(e,{payload:t})=>{e.selected_resources=t,t.length>0&&(e.resources_none_selected=!1)},setResourcesNoneSelected:(e,{payload:t})=>{e.resources_none_selected=t,t&&(e.selected_resources=[])},updateShowSaved:(e,{payload:t})=>{e.show_saved=t}}}),{addAuthor:Eg,addProject:E2,changePublicationType:kd,dataLoaded:R2,deleteAuthor:N2,hideError:kw,setFormValid:k2,setGrantNumber:Ow,setPublication:O2,setPublicationId:T2,setShowEditModal:Tw,resetState:P2,toggleRequest:I2,updateAuthor:$2,updateErrors:Xs,updateField:M2,updatePublication:va,updateSaving:tu,updateSelectedResources:A2,updateShowSaved:Pw,setResourcesNoneSelected:Rg}=Nw.actions,D2=e=>e.publicationEdit.publication,F2=e=>e.publicationEdit.publication.doi,L2=e=>e.publicationEdit.publication_types,Iw=e=>e.publicationEdit.publication.authors,$w=e=>e.publicationEdit.projects,U2=$l([$w],e=>e.filter(t=>t.selected)),V2=$l([U2],e=>{const t=new Set,n=[];return e.forEach(r=>{(r.resources||[]).forEach(o=>{!(o!=null&&o.resource_id)||t.has(o.resource_id)||(t.add(o.resource_id),n.push(o))})}),n}),Mw=e=>e.publicationEdit.selected_resources,Aw=e=>e.publicationEdit.resources_none_selected,z2=$l([Mw,Aw],(e,t)=>e.length>0||t),B2=e=>e.publicationEdit.errors,Dw=e=>e.publicationEdit.data_loaded,Fw=e=>e.publicationEdit.publicationId,q2=e=>e.publicationEdit.showEditModal,H2=e=>e.publicationEdit.show_saved,rc=e=>e.publicationEdit.saving,Lw=e=>e.publicationEdit.form_valid,W2=e=>e.publicationEdit.grant_number,Uw=e=>!rc(e)&&Dw(e)&&Lw(e)&&Vw(e)&&e.publicationEdit.projects.filter(t=>t.selected).length>0&&z2(e),Vw=e=>{const t=Iw(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},K2=()=>async(e,t)=>{const n=t().publicationEdit.publication.doi,r="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(ne.routes.publications_lookup_path({doi:n})).then(o=>o.json()).then(o=>{if(o.title!=""){let s=t().publicationEdit.publication_types.find(i=>i.citation_style_type==o.type);e(kd(s?s.publication_type:"Other")),e(O2(o))}else e(Xs(r))},()=>{e(Xs(r))})},G2=()=>async(e,t)=>{const n=t().publicationEdit.grant_number;await fetch(ne.routes.publications_find_project_path({grant_number:n})).then(r=>r.json()).then(r=>{e(E2(r)),e(Ow(""))},()=>{e(Xs("Unable to find a project with this grant number."))})},Np=e=>async t=>{t(T2(e)),t(Tw(!0))},zw=e=>async t=>{const n=e?`${ne.routes.edit_publication_path(e)}.json`:ne.routes.publication_path("new.json");await fetch(n,{headers:{accept:"application/json"}}).then(r=>r.json()).then(r=>{t(R2(r))})},Y2=()=>async(e,t)=>{const n=t().publicationEdit,r=n.projects.filter(p=>p.selected),o={...n.publication},s=n.errors,{formValid:i,missingFields:l}=j2(o,["title","publication_year","publication_month"],["first_name","last_name"]);if(!i){s.length>0&&Array.from(s).forEach(m=>{e(kw(m.id))});const p=_2(l);e(Xs(p));return}const u={authenticity_token:n.authenticityToken||document.querySelector("meta[name=csrf-token]").content,publication:{...o,access_staff_publication:n.resources_none_selected},authors:o.authors.map(p=>({...p,order:0})),tags:[],projects:r,resources:n.selected_resources.map(p=>({resource_id:p}))};let d,f;o.publication_id?(d=ne.routes.publication_path(o.publication_id),f="PATCH"):(d=ne.routes.publications_path(),f="POST"),e(tu(!0)),await fetch(d,{method:f,headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}).then(()=>{o.publication_id||(e(P2()),e(zw())),e(Pw(!0)),e(tu(!1))},()=>{e(tu(!1)),e(Xs("There was an error saving this publication."))})},fi=Nw.reducer,hn=rt("publicationsSearch/getPublications",async(e,{getState:t})=>{const n=t().publicationsSearch,r={},{authorName:o,createdBy:s,doi:i,grantNumber:l,journal:c,publicationType:u}=n.filterSelections;return i&&(r.doi=i),o&&(r.author_name=o),c&&n.filterOptions.journals.includes(c)&&(r.journal=c),u&&(r.publication_type=u),s.length&&(r.created_by=s),l&&(r.grant_number=l),n.usePagination?r.page=n.page.current+1:r.per_page=9999,await(await fetch(ne.routes.search_publications_path(r),{headers:{Accept:"application/json"}})).json()}),kp=rt("publicationsSearch/getFilters",async()=>(await(await fetch(ne.routes.search_publications_filters_path())).json()).filters||[]),Zs={publications:[],publicationsLoaded:!1,filterSelections:{createdBy:[],doi:"",grantNumber:"",journal:"",authorName:"",publicationType:""},filterOptions:{journals:[],publication_types:[]},page:{current:0,last:1},usePagination:!0},Bw=Lr({name:"publicationsSearch",initialState:Zs,reducers:{addCreatedByUsername:(e,{payload:t})=>{e.filterSelections.createdBy.push(t)},removeCreatedByUsername:(e,{payload:t})=>{e.filterSelections.createdBy=e.filterSelections.createdBy.filter(n=>n!==t)},updateFilterSelection:(e,{payload:t})=>{e.filterSelections[t.name]=t.value},resetFilters:e=>{e.filterSelections={createdBy:[],doi:"",journal:"",authorName:"",publicationType:""}},resetPublications:e=>{e.publications=[]},setUsePagination:(e,{payload:t})=>{e.usePagination=t}},extraReducers:e=>{e.addCase(hn.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(hn.fulfilled,(t,n)=>{var r,o,s,i;t.publicationsLoaded=!0,t.usePagination?(t.publications=[...t.publications,...n.payload.publications||[]],t.page.current=((o=(r=n.payload)==null?void 0:r.pagination)==null?void 0:o.current_page)||0,t.page.last=((i=(s=n.payload)==null?void 0:s.pagination)==null?void 0:i.last_page)||1):t.publications=n.payload.publications||[]}).addCase(hn.rejected,(t,n)=>{t.publicationsLoaded=!0,t.error=n.error.message}).addCase(kp.fulfilled,(t,n)=>{t.filterOptions=n.payload})}}),{addCreatedByUsername:Q2,removeCreatedByUsername:X2,resetFilters:Z2,resetPublications:Ng,setUsePagination:Op,updateFilterSelection:Od}=Bw.actions,J2=e=>e.publicationsSearch.filterSelections,eM=e=>e.publicationsSearch.publicationsLoaded,qw=e=>e.publicationsSearch.publications,tM=e=>e.publicationsSearch.filterOptions,nM=e=>e.publicationsSearch.page,rM=e=>e.publicationsSearch.usePagination,oc=Bw.reducer;function oM({children:e,hasMore:t,loadMore:n,isLoading:r}){const o=w.useRef(null),s=w.useRef(r);return w.useEffect(()=>{s.current=r},[r]),w.useEffect(()=>{const i=o.current;if(i&&t){const l=new IntersectionObserver(c=>{!s.current&&c[0].isIntersecting&&n()});return l.observe(o.current),()=>l.unobserve(i)}},[o,n,t]),a.jsxs(a.Fragment,{children:[e,a.jsx("div",{ref:o}),r&&a.jsx(Ur,{})]})}const sM="_citation_ru41y_1",iM="_tags_ru41y_7",kg={citation:sM,tags:iM},aM=/10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i,Hw=e=>{const t=(e||"").match(aM);return t?t[0]:null};function Ww({publication:e}){const{authors:t,doi:n,fields:r,publication_type:o,publication_year:s,title:i}=e,{"Journal name":l,Pages:c,Publisher:u,"Volume/Issue":d}=r,f=t.map(g=>`${g.last_name}, ${g.first_name.substr(0,1)}.`).join(", "),p=s||"N/A",m=i.endsWith(".")?i:`${i}.`,x=Hw(n),y=x?a.jsx("a",{href:`https://doi.org/${x}`,target:"_blank",rel:"noreferrer",children:x}):null;if(["Journal Paper","Other"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",m," ",l&&a.jsxs("em",{children:[l,"."]})," ",d&&a.jsxs(a.Fragment,{children:[d,","]})," ",c&&a.jsxs(a.Fragment,{children:[c,"."]})," ",y]});if(["Conference Paper","Software"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",m," ",l&&a.jsxs("em",{children:[l,"."]})," ",y]});if(["Book","Book Chapter"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",a.jsx("em",{children:m})," ",u&&a.jsxs("em",{children:[u,"."]})," ",y]});if(o==="Dataset")return a.jsxs(a.Fragment,{children:[f," (",p,").",a.jsx("em",{children:m})," [Dataset]. ",u,". ",y]});if(o==="Dissertation")return a.jsxs(a.Fragment,{children:[f," (",p,"). ",a.jsx("em",{children:m}),". [Doctoral dissertation",u&&a.jsxs(a.Fragment,{children:[", ",u]}),"]. ",y]})}function lM({allowEdit:e=!0,last:t=!1,publication:n}){const r=ge(),{projects:o,publication_type:s,resources:i=[]}=n,l=o.map(c=>c.grant_number);return a.jsx("div",{className:`col-12 mb-2 ${t||"border-bottom"}`,children:a.jsx("div",{className:"card",style:{border:"unset"},children:a.jsxs("div",{className:"card-body pt-2",children:[a.jsxs("div",{className:kg.citation,children:[a.jsx(Ww,{publication:n}),e&&n.can_edit&&a.jsx(Io,{onClick:()=>r(Np(n.publication_id)),icon:"pencil",title:"Edit publication"})]}),a.jsxs("ul",{className:kg.tags,children:[a.jsxs("li",{children:[a.jsx("i",{className:"bi bi-file-earmark"}),s==="Other"?"Publication":s]},"project-type"),l.map((c,u)=>a.jsx("li",{id:`project_${u}`,children:a.jsxs("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${c}`,id:`grant_link${u}`,target:"_blank",rel:"noreferrer",title:`Supported by project ${c}`,children:[a.jsx("i",{className:"bi bi-link-45deg"}),c]})},`grant_${u}`)),i.map(c=>{const{full:u,short:d}=ii(c);return a.jsxs("li",{children:[a.jsx("i",{className:"bi bi-server"})," ",d?a.jsx("abbr",{title:u,children:d}):u]},c)})]})]})})})}function Tp({allowEdit:e=!0,emptyMessage:t="No matching publications."}){const n=ge(),{current:r,last:o}=K(nM),s=K(eM),i=K(rM),l=K(qw);return s&&l.length===0?a.jsx("p",{children:t}):a.jsx(a.Fragment,{children:a.jsx(oM,{isLoading:!s,hasMore:i&&r<o,loadMore:()=>n(hn()),children:l.map((c,u)=>a.jsx(lM,{allowEdit:e,publication:c,last:u===l.length-1},c.publication_id))})})}function cM(){const e=ge(),t=K(F2);return 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:t,onChange:n=>e(va({key:"doi",value:n.target.value}))}),a.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>e(K2()),children:"Lookup Publication"})]})]})})}const uM=({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"})})})]})},dM=e=>({updateAuthor:t=>e($2(t)),deleteAuthor:t=>e(N2(t))}),fM=AC(null,dM)(uM);function pM(){const e=ge(),t=K(Iw),n=K(Vw),r=t.length===0;w.useEffect(()=>{r&&e(Eg())},[r,e]);const 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.jsx("tbody",{children:t.map((s,i)=>a.jsx(fM,{author:s,authorKey:i},`author_${i}`))})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>e(Eg()),children:"Add Author"})]})}function hM(){const e=ge(),t=K($w),n=o=>`list-group-item list-group-item-action clickable ${o.selected?"list-group-item-success":""}`,r=()=>t.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:t.map((o,s)=>a.jsxs("div",{className:n(o),onClick:()=>e(I2(s)),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})}function mM(){const e=ge(),t=K(W2);return 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:t,onChange:n=>e(Ow(n.target.value)),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>e(G2()),children:"Find Project"})]})]})})}function gM(){const e=ge(),t=K(V2),n=K(Mw),r=K(Aw),o=w.useMemo(()=>t.filter(u=>(u.label||u.value||"").toLowerCase()!=="access credits").map(u=>({resource_id:u.resource_id,label:u.label||u.value||u.resource_name||"",value:u.value||u.label||u.resource_name||"",providerAbbrev:u.organization_abbrev,providerName:u.organization_name})).sort((u,d)=>u.label.localeCompare(d.label)),[t]),s=w.useMemo(()=>{const u={};return o.forEach(d=>{const f=d.providerAbbrev||"Other";u[f]||(u[f]={providerAbbrev:d.providerAbbrev,providerName:d.providerName,resources:[]}),u[f].resources.push(d)}),Object.keys(u).sort().reduce((d,f)=>(d[f]=u[f],d),{})},[o]),i=(u,d)=>{r&&e(Rg(!1));const f=n||[],p=Number(u);let m;d?m=f.includes(p)?f:[...f,p]:m=f.filter(x=>Number(x)!==p),e(A2(m))},l=u=>{e(Rg(u))},c=(u,d)=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:`resource_used_${u.resource_id}_${d}`,checked:n.includes(Number(u.resource_id)),disabled:r,onChange:f=>i(Number(u.resource_id),f.target.checked)}),a.jsx("label",{className:"form-check-label",htmlFor:`resource_used_${u.resource_id}_${d}`,children:u.label})]},`resource_${u.resource_id}`);return a.jsxs("div",{className:"mb-4",children:[a.jsxs("div",{className:"fw-bold mb-2",children:["Resources",a.jsx("i",{className:"bi bi-asterisk text-danger"})]}),a.jsx("div",{className:"text-muted small mb-2",children:"Select a project above to see available resources."}),!r&&n.length===0&&a.jsx("div",{className:"alert alert-danger",children:'Select at least one resource or choose "This is an ACCESS staff publication".'}),o.length>0&&a.jsx(a.Fragment,{children:Object.entries(s).map(([u,d])=>a.jsxs("div",{className:"mb-3",children:[a.jsx("div",{className:"fw-semibold text-muted mb-2",style:{fontSize:"0.95em"},children:d.providerName||u}),a.jsx("div",{className:"ms-3",children:d.resources.map((f,p)=>c(f,p))})]},`provider_${u}`))}),a.jsxs("div",{className:"form-check mt-2",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:"resources_none",checked:r,onChange:u=>l(u.target.checked)}),a.jsx("label",{className:"form-check-label",htmlFor:"resources_none",children:"This is an ACCESS staff publication"})]})]})}function vM(){const e=ge(),t=K(D2),n=K(L2);K(Uw);const r=K(Lw),o=f=>{e(k2(f.target.value.trim()!=="")),e(va({key:"title",value:f.target.value}))},s=()=>t.fields.map((f,p)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:`field_${f.csl_field_name}`,className:"form-label",children:f.name}),a.jsx("input",{type:"text",className:"form-control",name:`field_${f.csl_field_name}`,id:`field_${f.csl_field_name}`,value:f.field_value||"",onChange:m=>e(M2({index:p,value:m.target.value}))})]})},`field_${f.csl_field_name}`)),i=()=>{const f=new Date().getFullYear()+2;let p=1980;const m=[];for(;p<=f;)m.push(p++);const x=["January","February","March","April","May","June","July","August","September","October","November","December"],y=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 ",y]}),a.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${r?"":"is-invalid"}`,value:t.title||"",onChange:g=>o(g)})]})}),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:t.publication_year||"",onChange:g=>{va({key:"publication_year",value:g.target.value})},children:m.map(g=>a.jsx("option",{value:g,children:g},`year_${g}`))})]})}),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:t.publication_month||"",onChange:g=>{va({key:"publication_month",value:g.target.value})},children:x.map((g,h)=>a.jsx("option",{value:h+1,children:g},`month_${h}`))})]})})]})},l=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(cM,{}),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:t.publication_type||"",onChange:f=>e(kd(f.target.value)),children:n.map(f=>a.jsx("option",{value:f.publication_type,children:f.publication_type},`pub_type_${f.type_id}`))})]})}),i(),s()]})]}),c=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Authors"}),a.jsxs(yo,{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(pM,{})})]}),u=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(yo,{children:"Click/Tap each project that this publication is related to."})]}),a.jsxs("div",{className:"card-body",children:[a.jsx(hM,{}),a.jsx("hr",{}),a.jsx(mM,{})]})]}),d=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Resources"}),a.jsx(yo,{children:"Select the resources that were used in this publication. Resources are shown from the projects you selected above."})]}),a.jsx("div",{className:"card-body",children:a.jsx(gM,{})})]});return a.jsxs(a.Fragment,{children:[l,c,u,d]})}function Kw(){const e=ge(),t=K(Dw),n=K(Fw);return w.useEffect(()=>{e(zw(n))},[n,e]),a.jsx(a.Fragment,{children:t?a.jsx(vM,{}):a.jsx(Ur,{})})}function Pp(){const e=ge(),t=K(q2),n=K(Fw),r=K(Uw),o=s=>{s&&e(Y2()),e(Tw(!1))};return a.jsx(a.Fragment,{children:a.jsxs(ce,{size:"xl",show:t,onHide:()=>o(!1),scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsxs(ce.Title,{children:[n?"Edit":"Add"," Publication"]})}),a.jsx(ce.Body,{children:a.jsx(Kw,{})}),a.jsx(ce.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>o(!1),children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-primary",disabled:!r,onClick:()=>r&&o(!0),children:"Save Publication"})]})})]})})}function yM({grantNumber:e}){const t=ge(),n=K(rc);return w.useEffect(()=>{n||(t(Od({name:"grantNumber",value:e})),t(Op(!1)),t(hn()))},[e,n,t]),a.jsxs(a.Fragment,{children:[a.jsx(Tp,{grantNumber:e,emptyMessage:"No publications are associated with this project."}),a.jsx(Pp,{})]})}function xM({grantNumber:e}){const t=w.useRef(zn({reducer:{publicationEdit:fi,publicationsSearch:oc}}));return a.jsxs(a.Fragment,{children:[a.jsx(Bn,{store:t.current,children:a.jsx(yM,{grantNumber:e})}),a.jsx("div",{children:a.jsx("a",{href:ne.routes.publications_path(),className:"btn btn-primary",children:"Add or Manage Publications"})})]})}function bM({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r,setRequest:o,setTab:s}=kt(t||n.grantNumber);if(!n)return;if(n.error)return a.jsx(Se,{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(Se,{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:jR.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(Se,{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(Se,{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(IN,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx(ts,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(fT,{requestId:e,grantNumber:t})}),a.jsx(ts,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(h2,{requestId:e})}),a.jsx(ts,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx(S2,{grantNumber:t})}),a.jsx(ts,{eventKey:"publications",title:"Publications",children:a.jsx(xM,{grantNumber:t,requestId:e})}),a.jsx(ts,{eventKey:"history",title:"History",children:a.jsx(VO,{requestId:e})})]}),a.jsx(DO,{grantNumber:t,requestId:e}),a.jsx(FO,{grantNumber:t,requestId:e}),a.jsx(LO,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(g2,{grantNumber:t,requestId:e}),a.jsx(v2,{grantNumber:t,requestId:e})]})}function wM({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleDeleteModal:o}=ut(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 m=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:m},u):a.jsx("a",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,href:d,children:m},u)})}function SM({open:e=!1,grantNumber:t,title:n,status:r}){const[o,s]=w.useState(e),{project:i,setRequest:l}=kt(t,!o&&n&&r&&!0),c=`project-${t}`;let u=null;if(o&&i)if(i.error)u=a.jsx(Se,{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:Lf(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(wM,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(bM,{...d,grantNumber:t}):null]})}return a.jsxs("div",{className:`${_m.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:_m.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($o,{status:r||i.status})]}),a.jsx("div",{className:"card-body",id:c,hidden:!o||!i,children:u})]})}function jM({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=xR(e);if(r)return a.jsx(Ur,{});if(n)return a.jsxs(Se,{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(SM,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const Gw={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:[]}},_M=rt("projectsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{const r=window.location.search,o=new URLSearchParams(r);o.has("_requestNumber")&&(n(Pd({name:"requestNumber",value:o.get("_requestNumber")})),n(Qw(!0))),await n(Td()),await n(Rr()),n(CM())}),CM=rt("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(Yw({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),Td=rt("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=rt("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(Tg(!0))):(n(Tg(!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()}),Ip=Lr({name:"projectsBrowser",initialState:Gw,reducers:{resetFilters:e=>{e.filters={org:"",allocationType:"",allFosToggled:!1,resource:"",requestNumber:""},e.singleEntry=!1,Ip.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(Td.pending,t=>{t.filtersLoaded=!1}).addCase(Td.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:EM,setApiUrl:sD,setShowPagination:Og,setTypeLists:Yw,toggleAllFos:RM,toggleFos:NM,toggleListFiltered:Qw,toggleSingleEntry:Tg,updateFilter:Pd,updatePageData:Id}=Ip.actions,kM=e=>e.projectsBrowser.filters,OM=e=>e.projectsBrowser.filtersLoaded,TM=e=>e.projectsBrowser.listIsFiltered,PM=e=>e.projectsBrowser.singleEntry,IM=e=>e.projectsBrowser.projectsLoaded,$M=e=>e.projectsBrowser.pageData,MM=e=>e.projectsBrowser.projects,AM=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,DM=e=>e.projectsBrowser.typeLists,FM=Ip.reducer;const LM=()=>{const e=ge(),t=K(kM),n=K(DM),r=K(TM),o=n.orgs.map(y=>({label:y,value:y})),s=w.useRef(),[i,l]=w.useState(null),c={height:"200px",overflowX:"auto",padding:"2px"},u=y=>{e(Pd({name:y.target.name,value:y.target.value}))},d=()=>{window.scrollTo(0,0),p(!0),e(Og(!1)),e(Id({current_page:1})),e(Rr())},f=()=>{l(null),e(Og(!1)),e(Id({current_page:1})),e(EM()),r&&(window.scrollTo(0,0),e(Rr()),p(!1))},p=y=>{e(Qw(y))},m=y=>{l(y),e(Pd({name:"org",value:y.value}))},x=()=>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(RM())}}),a.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),n.fosTypes.map(y=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:y.fosTypeId,id:`fos_${y.fosTypeId}`,checked:y.checked,onChange:()=>e(NM(y))}),a.jsx("label",{className:"form-check-label",htmlFor:`fos_${y.fosTypeId}`,children:y.fosName})]},`fos_${y.fosTypeId}`))]}),a.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),a.jsx("div",{className:"mb-3",children:a.jsx(Ew,{options:o,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:s,closeMenuOnSelect:!0,onChange:m,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:y=>u(y),children:[a.jsx("option",{value:"",children:"-- All --"}),n.allocationTypes.map((y,g)=>a.jsx("option",{value:y,children:y},`allocation_type_${g}`))]})}),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:y=>u(y),children:[a.jsx("option",{value:"",children:"-- All --"}),n.resources.map((y,g)=>a.jsx("option",{value:y.resourceId,children:y.resourceName},`resource_${g}`))]})}),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:y=>u(y)})}),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:x(),onClick:f,children:"Reset"})]})]})})};const Pg=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),Ig=({publication:e,index:t,fontSize:n="18px"})=>{const r=e.authors.map(p=>`${p.last_name}, ${p.first_name.substring(0,1)}.`).join(", "),o=e.projects.map(p=>p.grant_number),s=e.publication_type==="Other"?"Publication":e.publication_type,i=e.projects,l=t%2==0?"bg-light":"",c={textIndent:"-50px",marginLeft:"50px",fontSize:n},u=e.publication_datas??[],d=p=>{switch(p){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/${Pg(e.doi)}`,target:"_blank",className:"fw-normal",children:Pg(e.doi)}):!1;case"Journal":return e.journal.title?e.journal.title:!1;case"Volume/Issue":return u["Volume/Issue"]?u["Volume/Issue"]:!1;case"Pages":return u.Pages?u.Pages:!1;case"Publisher":return u.Publisher?u.Publisher:!1}},f=()=>{const p=d("Publication Year");let m=e.title;const x=d("Journal"),y=d("DOI"),g=d("Volume/Issue"),h=d("Pages"),v=d("Publisher");return m[m.length-1]!="."&&(m+="."),e.publication_type==="Journal Paper"||e.publication_type==="Other"?a.jsxs(a.Fragment,{children:[r," (",p,"). ",m,x?a.jsxs("em",{className:"ms-1",children:[x,"."]}):"",g?a.jsxs("span",{className:"ms-1",children:[g,","]}):"",h?a.jsxs("span",{className:"ms-1",children:[h,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Conference Paper"||e.publication_type==="Software"?a.jsxs(a.Fragment,{children:[r," (",p,"). ",m,x?a.jsxs("em",{className:"ms-1",children:[x,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Book"||e.publication_type==="Book Chapter"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m}),v?a.jsxs("em",{className:"ms-1",children:[v,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Dataset"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m})," [Dataset]. ",v||"",".",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Dissertation"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m}),". [Doctoral dissertation",v?", "+v:"","].",y?a.jsx("span",{className:"ms-1",children:y}):""]}):""};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 ${l}`,children:[a.jsx("p",{style:c,children:f()}),i.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-decoration-underline mb-2",children:["Projects Supporting this ",s]}),a.jsx("ul",{style:{...c,listStyleType:"none"},children:o.map((p,m)=>a.jsx("li",{id:`project_${m}`,children:a.jsx("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${p}`,id:`grant_link${m}`,target:"_blank",style:{fontWeight:"600"},children:p})},`grant_${m}`))})]})]})})})},UM=({project:e})=>{var E;const t=e.resources,[n,r]=w.useState(!1),[o,s]=w.useState(!1),[i,l]=w.useState(!1);K(PM);const c=e.abstract.length>=300,u=c?`${e.abstract.substring(0,300)}...`:e.abstract,d=C=>{let N=C.units?C.units:C.resourceUnits;const R=C.allocation?C.allocation:C.amount;if(N=="[Yes = 1, No = 0]"||N=="Yes / No")return R=="1.0"?"Yes":"No";{let O="0";return parseInt(R)&&(O=parseInt(R).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),N=="ACCESS Credits"&&(N=a.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),N=="Dollars"?`$${O}`:a.jsxs(a.Fragment,{children:[O," ",N]})}},f=()=>{const{origin:C,pathname:N}=window.location,R=`${C}${N}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(R),setTimeout(()=>r(!1),2e3)},p=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",m=a.jsx(zl,{id:"link-tooltip",children:"Link Copied!"}),x=()=>{if(p()){const C={background:"none",border:"none",color:"#fff",fontSize:"24px"};return a.jsx(fp,{placement:"left",trigger:"click",defaultShow:n,show:n,onToggle:()=>r(!n),overlay:m,children:a.jsx("button",{onClick:f,style:C,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,{})},y=()=>{const C=e.pi.split(",");return`${C[1]} ${C[0]}`},g=()=>!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(C=>`${C.name} (${C.organization})`).join(";")]})]}),h=()=>!e.beginDate||!e.endDate?"-":a.jsxs(a.Fragment,{children:[e.beginDate," to ",e.endDate]}),v=()=>e.allocationType==="NAIRR Start-Up"?a.jsxs("span",{className:"fw-bold",children:[p()," Start-Up: ",y(),", ",a.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"fw-bold",children:[p()," ",e.requestTitle]})," ",a.jsx("br",{}),a.jsxs("span",{className:"fst-italic",children:[e.pi," ",a.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),g()]}),b=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((C,N)=>a.jsxs("tr",{children:[a.jsx("td",{children:C.resourceName}),a.jsx("td",{style:{whiteSpace:"nowrap"},children:d(C)})]},`resource_${e.requestId}_${N}`))})]}),S=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:b})})]}),j=a.jsxs(ce,{show:o,onHide:()=>s(!1),id:`publicationsModal_${e.projectId}`,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:e.requestTitle})}),a.jsx(ce.Body,{children:(E=e==null?void 0:e.publications)==null?void 0:E.map((C,N)=>a.jsx("div",{children:a.jsx(Ig,{publication:{...C,projects:[]},index:N})},`publication_${N}`))}),a.jsx(ce.Footer,{children:a.jsx("button",{type:"button",className:"btn btn-secondary","data-bs-dismiss":"modal",onClick:()=>s(!1),children:"Close"})})]}),_=()=>{var C,N;return e.allocationType==="NAIRR Start-Up"?S:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row fw-bold mt-2 border-bottom",children:a.jsx("span",{className:"col mb-1 pb-0",children:"Abstract"})}),a.jsx("div",{style:{whiteSpace:"pre-wrap",display:"inline"},children:i?e.abstract:u}),c&&a.jsx("button",{onClick:()=>l(!i),style:{display:"inline",border:"none",background:"none",cursor:"pointer",fontWeight:"bold"},children:i?"Show Less":"Read More"}),a.jsxs("div",{className:"row mt-2",children:[a.jsxs("div",{className:"col-lg-6 left-panel flex-fill",children:[a.jsx("div",{className:"row fw-bold border-bottom",children:a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Resources"})})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:b})})]}),((C=e==null?void 0:e.publications)==null?void 0:C.length)>0&&a.jsxs("div",{className:"col-lg-6 right-panel",children:[a.jsx("div",{className:"row fw-bold border-bottom",children:a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Publications"})})}),a.jsx("div",{className:"mt-2 pb-0",children:a.jsx(Ig,{publication:{...e.publications[0],projects:[]},index:0,fontSize:"16px"})},`publication_${e.projectId}_0`),((N=e==null?void 0:e.publications)==null?void 0:N.length)>1&&a.jsxs("button",{className:"btn btn-primary",onClick:()=>s(!0),children:["View More (",e.publications.length,")"]}),j]})]})]})};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:v()}),a.jsx("div",{children:x()})]})}),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:h()})]}),_()]})]})},VM=()=>{const e=K(MM);return e.length==0?a.jsx("div",{children:"No Projects Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(UM,{project:t},`project_${n}`))})};const $g=()=>{const e=ge(),t=K($M),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(g,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{m()},[t]);const u=g=>{const h=parseInt(g);e(Id({current_page:g})),e(Rr(h))},d=g=>(event.preventDefault(),s("0"),u(g),!1),f=()=>{u(parseInt(t.current_page)+1)},p=()=>{u(parseInt(t.current_page)-1)},m=()=>{const g=[];if(t.last_page>l)if(t.current_page>4){g.push(1),g.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&g.push(t.current_page-h);g.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&g.push(t.current_page+h);t.last_page-t.current_page>1&&(g.push("spacer"),g.push(t.last_page))}else[1,2,3,4,5].forEach(v=>{v==t.current_page?g.push(["current",v]):g.push(v)}),g.push("spacer"),g.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?g.push(["current",h]):g.push(h);r(g)},x=g=>{let h="";return typeof g=="object"?[g,h]=g:h=g,g=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):g=="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(g),children:h})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:g=>d(g.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(g=>a.jsx("option",{value:g+1,children:g+1},`page_option_${g}`))]})});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:p,disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((g,h)=>a.jsx(Re.Fragment,{children:x(g)},`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:f,disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},zM=({api_url:e})=>{const t=ge(),n=K(IM),r=K(OM),o=K(AM),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(_M())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(LM,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx($g,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(VM,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx($g,{scroll:"projects_browser_app"}):""})})]})]})})};function Xw(){const e=ge();return a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>e(Np(null)),children:"Add a New Publication"})}function Zw(){const e=ge(),t=K(B2),n=K(H2);return a.jsxs(a.Fragment,{children:[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:()=>e(Pw(!1))})]}),t.map(r=>a.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[r.message,a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>e(kw(r.id))})]},`err_${r.id}`))]})}function BM(){const e=ge(),t=K(rc);return w.useEffect(()=>{t||(e(Op(!1)),e(hn()),e(kp()))},[e,t]),a.jsxs(a.Fragment,{children:[a.jsx(Zw,{}),a.jsxs("div",{className:"d-flex justify-content-between align-items-start",children:[a.jsx("h1",{children:"My Publications"}),a.jsx(Xw,{})]}),a.jsx(Tp,{}),a.jsx(Pp,{})]})}const qM=()=>{const e=ge(),t=K(tM),n=K(J2),r=()=>{e(Ng()),window.scrollTo(0,0),e(hn())},o=()=>{e(Ng()),e(Z2()),window.scrollTo(0,0),e(hn())};if(!t.journals)return a.jsx("p",{children:"Loading filters..."});const s=l=>{e(Od({name:l.target.name,value:l.target.value}))},i=l=>{e(Od({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:Hw(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"})]})]})})},HM=()=>{const e=ge();return w.useEffect(()=>{e(hn()),e(kp())},[e]),a.jsx(a.Fragment,{children: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.jsx("div",{className:"col-sm-9",children:a.jsx("div",{className:"row",id:"publicationListRow",children:a.jsx("div",{className:"col",children:a.jsx(Tp,{allowEdit:!1})})})})]})})})},Jw={selected:[]},e1=Lr({name:"publicationsSelect",initialState:Jw,reducers:{setSelected:(e,{payload:t})=>{e.selected=t},toggleSelected:(e,{payload:t})=>{e.selected.includes(t)?e.selected=e.selected.filter(r=>r!==t):e.selected.push(t)},clearSelected:e=>{e.selected=[]}}}),{setSelected:WM,toggleSelected:KM,clearSelected:iD}=e1.actions,GM=e=>e.publicationsSelect.selected,YM=e1.reducer;function QM({allowAdd:e=!0,allowEdit:t=!0,allowSelect:n=!1}){const r=ge(),o=K(rc),s=K(GM),i=K(qw);w.useEffect(()=>{o||(r(Op(!1)),r(hn()))},[o,r]);const l=[{key:"publication",name:"Publication",format:(c,u)=>a.jsxs(a.Fragment,{children:[a.jsx(Ww,{publication:u}),t&&u.can_edit&&a.jsx(Io,{onClick:()=>r(Np(u.publication_id)),icon:"pencil",title:"Edit publication"},"edit")]})},{key:"created_by",name:"Entered By",headerClass:"text-nowrap"}];return n&&l.splice(0,0,{key:"publication_id",format:c=>{const u=s.includes(c);return a.jsx("input",{type:"checkbox",name:"publication_ids[]",value:c,checked:u,onChange:()=>r(KM(c))})},formatHeader:()=>a.jsx(Nd,{selectedLength:s.length,totalLength:i.length,onChange:c=>r(WM(c?i.map(u=>u.publication_id):[]))})}),a.jsxs(a.Fragment,{children:[a.jsx(mn,{columns:l,rows:i}),e&&a.jsx(Xw,{}),a.jsx(Pp,{})]})}function XM(){const e=ge();return w.useEffect(()=>{addEventListener("requestAddRole",t=>e(Q2(t.detail.username))),addEventListener("requestRemoveRole",t=>e(X2(t.detail.username)))},[e]),a.jsxs(a.Fragment,{children:[a.jsx(Zw,{}),a.jsx(QM,{allowSelect:!0})]})}const ZM={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}},ya=rt("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(Mg(!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(nA({data:r,params:e})),t(Mg(!0))});rt("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(oA(e)),t(n1())});const 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)}))},eA=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($d(s.allowedResources,s.excludedResources,i.resourceName)){const{categories:l,formattedResource:c}=tA(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}},$d=(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,tA=(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]&&$d(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=$d(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}},t1=Lr({name:"resourceCatalog",initialState:ZM,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,{resources:r,catalogs:o,categories:s}=eA(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=JM(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(ya.pending,t=>{}).addCase(ya.fulfilled,(t,n)=>{}).addCase(ya.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:nA,processData:aD,resetFilters:rA,setResourcesLoaded:Mg,toggleCatalog:oA,toggleFilter:n1}=t1.actions,r1=e=>e.resourceCatalog.catalogs,sA=e=>e.resourceCatalog.filters,iA=e=>e.resourceCatalog.hasErrors,aA=e=>e.resourceCatalog.resourcesLoaded,lA=e=>e.resourceCatalog.filteredResources,cA=t1.reducer,uA="_access_1yrq0_2",dA="_resourceName_1yrq0_6",fA="_description_1yrq0_11",pA="_filterBar_1yrq0_15",hA="_cardBg_1yrq0_20",mA="_active_1yrq0_25",gA="_plainButton_1yrq0_30",vA="_btnSecondary_1yrq0_40",yA="_filtersHidden_1yrq0_51",xA="_filtersVisible_1yrq0_57",Dt={access:uA,resourceName:dA,description:fA,filterBar:pA,cardBg:hA,active:mA,plainButton:gA,btnSecondary:vA,filtersHidden:yA,filtersVisible:xA},bA=({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"})]})})]})})})})},wA=({filter:e})=>{const t=ge(),n=()=>{t(n1(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})]})})})},SA=({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(wA,{filter:t},t.featureId))]})}),jA=({onReset:e})=>{const t=ge(),n=K(r1),r=K(sA),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(SA,{category:s},s.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(rA()),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"})]})},_A=()=>{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(jA,{onReset:r})})]})})})})},CA=()=>{const e=K(lA);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(_A,{}),e.map(t=>a.jsx(bA,{resource:t},t.resourceId))]})})},EA=({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"}),"."]})]})})]}),RA=({catalogSources:e=[],onRamps:t=!1,baseUrl:n})=>{const r=ge(),o=K(aA),s=K(iA),i=K(r1),l=Object.keys(i).map(u=>i[u]);w.useEffect(()=>{r(ya({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(EA,{baseUrl:n}):"",c(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(CA,{})})})]}):a.jsx(Ur,{})},NA={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}},xa=rt("resourceCatalog/getResources",async(e,{dispatch:t})=>{const r=await(await fetch(e.apiUrl)).json();t(OA({data:r,params:e}))}),kA=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)}))},Ag=(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)},o1=Lr({name:"resourceCatalog",initialState:NA,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(x=>x.categoryIsFilter).forEach(x=>{const y=x.categoryId;x.categoryName=="ACCESS Resource Grouping"?p=x.features[0].name:(!u[y]&&Ag(i,r,x.categoryName)&&(u[y]={categoryId:y,categoryName:x.categoryName,categoryDescription:x.categoryDescription,features:{}}),x.features.forEach(g=>{const h={featureId:g.featureId,name:g.name,description:g.description,categoryId:y,selected:!1},v=Ag(l,o,h.name);v&&f.push(h),u[y]&&v&&!u[y].features[g.featureId]&&(u[y].features[g.featureId]=h)}))});const m={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(x=>x.name).sort((x,y)=>x>y),featureIds:f.map(x=>x.featureId),sortCategory:p};c.push(m)});for(const d in u){const f=u[d],p=[];for(const m in f.features)p.push(f.features[m]);e.filters.push({...f,features:p.sort((m,x)=>m.name>x.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=kA(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(xa.pending,t=>{}).addCase(xa.fulfilled,(t,n)=>{}).addCase(xa.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:OA,processData:lD,resetFilters:TA,toggleFilter:PA}=o1.actions,IA=e=>e.resourceCatalog.hasErrors,$A=e=>e.resourceCatalog.resourcesLoaded,MA=e=>e.resourceCatalog.filters,AA=e=>e.resourceCatalog.filteredResources,DA=o1.reducer,FA=({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(fa.Item,{eventKey:e.resourceId,children:[a.jsx(fa.Header,{children:e.resourceName}),a.jsxs(fa.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)]})]})},LA=()=>{const e=K(AA);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(fa,{children:e.map(t=>a.jsx(FA,{resource:t},t.resourceId))})]})},UA=({filter:e})=>{const t=ge(),n=()=>{t(PA(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})]})})})},VA=({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(UA,{filter:t},t.featureId))]})}),zA=()=>{const e=ge(),t=K(MA),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(VA,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(TA()),disabled:n.length==0,children:"Reset Filters"})]})},BA=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=ge(),l=K($A),c=K(IA);return w.useEffect(()=>{i(xa({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(zA,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(LA,{})})]})}):a.jsx(Ur,{})};function qA(e,{bootstrapFonts:t=!0,bootstrapVariables:n=!0,baseUrl:r=null}={}){const o=e.attachShadow({mode:"open"}),s=document.createElement("div"),i=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),u=document.createElement("link"),d=document.createElement("link"),f=document.createElement("link");return r=r??(typeof document>"u"?require("url").pathToFileURL(__filename).href:$p&&$p.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),u.rel="stylesheet",u.href=`${r}/bootstrap.css`,d.rel="stylesheet",d.href=`${r}/xras-ui.css`,f.rel="stylesheet",f.href=`${r}/access.css`,l.appendChild(c),i.appendChild(l),s.appendChild(i),o.appendChild(u),o.appendChild(d),o.appendChild(f),o.appendChild(s),s.classList.add("bootstrap"),n&&i.classList.add("bootstrap-variables"),t&&(l.classList.add("bootstrap-fonts"),l.setAttribute("data-bs-theme","light")),c}function HA({target:e}){bt.createRoot(e).render(a.jsx(pE,{}))}function WA({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){bt.createRoot(o).render(a.jsx(PE,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function KA({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){bt.createRoot(t).render(a.jsx(Ix,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function GA({target:e,username:t,routes:n}){ai(n);const r=zn({reducer:{api:yR}});bt.createRoot(e).render(a.jsx(Bn,{store:r,children:a.jsx(jM,{username:t})}))}function YA({target:e,apiUrl:t}){const n=zn({reducer:{projectsBrowser:FM},preloadedState:{projectsBrowser:{...Gw,apiUrl:t}}});bt.createRoot(e).render(a.jsx(Bn,{store:n,children:a.jsx(zM,{})}))}function QA({target:e,routes:t,authenticityToken:n}){ai(t);const r=zn({reducer:{publicationsSearch:oc,publicationEdit:fi},preloadedState:{publicationEdit:{...Ao,authenticityToken:n}}});bt.createRoot(e).render(a.jsx(Bn,{store:r,children:a.jsx(HM,{})}))}function XA({publicationId:e,target:t,routes:n,authenticityToken:r}){const o=zn({reducer:{publicationEdit:fi},preloadedState:{publicationEdit:{...Ao,authenticityToken:r}}});ai(n),bt.createRoot(t).render(a.jsx(Bn,{store:o,children:a.jsx(Kw,{publicationId:e})}))}function ZA({authenticityToken:e,routes:t,selectedPublicationIds:n,target:r,usernames:o}){const s=zn({reducer:{publicationEdit:fi,publicationsSearch:oc,publicationsSelect:YM},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:o}},publicationEdit:{...Ao,authenticityToken:e},publicationsSelect:{...Jw,selected:n}}});ai(t),bt.createRoot(r).render(a.jsx(Bn,{store:s,children:a.jsx(XM,{})}))}function JA({target:e,catalogSources:t,onRamps:n,baseUrl:r}){const o=zn({reducer:{resourceCatalog:cA}});bt.createRoot(e).render(a.jsx(Bn,{store:o,children:a.jsx(RA,{catalogSources:t,onRamps:n,baseUrl:r})}))}function eD({authenticityToken:e,routes:t,target:n,username:r}){ai(t);const o=zn({reducer:{publicationEdit:fi,publicationsSearch:oc},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:[r]}},publicationEdit:{...Ao,authenticityToken:e}}});bt.createRoot(n).render(a.jsx(Bn,{store:o,children:a.jsx(BM,{})}))}function tD({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=zn({reducer:{resourceCatalog:DA}});bt.createRoot(e).render(a.jsx(Bn,{store:l,children:a.jsx(BA,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function nD({allocationTypes:e,target:t}){bt.createRoot(t).render(a.jsx(Keywords,{allocationTypes:e}))}exports.allocationsMap=HA;exports.editResource=KA;exports.keywords=nD;exports.myPublications=eD;exports.onRampsResourceCatalog=JA;exports.projects=GA;exports.projectsBrowser=YA;exports.publicationEdit=XA;exports.publicationsBrowser=QA;exports.publicationsSelect=ZA;exports.resourceCatalog=tD;exports.resources=WA;exports.shadowTarget=qA;
|
|
70
|
+
`]))),MI=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})},Yc=function(t){var n=t.delay,r=t.offset;return G("span",{css:wp({animation:"".concat(AI," 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"},"","")})},DI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=gn(t,RI);return G("div",Y({},Pe(K(K({},i),{},{innerProps:n,isRtl:r,size:s}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),G(Yc,{delay:0,offset:r}),G(Yc,{delay:160,offset:!0}),G(Yc,{delay:320,offset:!r}))},FI=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}})},LI=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},Pe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":o,"control--menu-is-open":l}),i,{"aria-disabled":r||void 0}),n)},UI=LI,VI=["data"],zI=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},BI=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({},Pe(t,"group",{group:!0}),c),G(i,Y({},l,{selectProps:f,theme:d,getStyles:o,getClassNames:s,cx:r}),u),G("div",null,n))},qI=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"})},HI=function(t){var n=iw(t);n.data;var r=gn(n,VI);return G("div",Y({},Pe(t,"groupHeading",{"group-heading":!0}),r))},WI=BI,KI=["innerRef","isDisabled","isHidden","inputClassName"],GI=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)":""},YI),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},mw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},YI={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"},mw)},QI=function(t){return K({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},mw)},XI=function(t){var n=t.cx,r=t.value,o=iw(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=gn(o,KI);return G("div",Y({},Pe(t,"input",{"input-container":!0}),{"data-value":r||""}),G("input",Y({className:n({input:!0},c),ref:s,style:QI(l),disabled:i},u)))},ZI=XI,JI=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})},e$=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})},t$=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}})},gw=function(t){var n=t.children,r=t.innerProps;return G("div",r,n)},n$=gw,r$=gw;function o$(e){var t=e.children,n=e.innerProps;return G("div",Y({role:"button"},n),t||G(jp,{size:14}))}var s$=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({},Pe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),s),selectProps:c},G(d,{data:o,innerProps:K({},Pe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:c},n),G(f,{data:o,innerProps:K(K({},Pe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},l),selectProps:c}))},i$=s$,a$=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}})},l$=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({},Pe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":o,"option--is-selected":s}),{ref:i,"aria-disabled":r},l),n)},c$=l$,u$=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})},d$=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"placeholder",{placeholder:!0}),r),n)},f$=d$,p$=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})},h$=function(t){var n=t.children,r=t.isDisabled,o=t.innerProps;return G("div",Y({},Pe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),o),n)},m$=h$,g$={ClearIndicator:PI,Control:UI,DropdownIndicator:OI,DownChevron:pw,CrossIcon:jp,Group:WI,GroupHeading:HI,IndicatorsContainer:jI,IndicatorSeparator:$I,Input:ZI,LoadingIndicator:DI,Menu:dI,MenuList:pI,MenuPortal:xI,LoadingMessage:vI,NoOptionsMessage:gI,MultiValue:i$,MultiValueContainer:n$,MultiValueLabel:r$,MultiValueRemove:o$,Option:c$,Placeholder:f$,SelectContainer:wI,SingleValue:m$,ValueContainer:_I},v$=function(t){return K(K({},g$),t.components)},pg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function y$(e,t){return!!(e===t||pg(e)&&pg(t))}function x$(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!y$(e[n],t[n]))return!1;return!0}function b$(e,t){t===void 0&&(t=x$);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 w$={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"},S$=function(t){return G("span",Y({css:w$},t))},hg=S$,_$={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(y,g){return y&&y.length?"".concat(y.indexOf(g)+1," of ").concat(y.length):""};if(n==="value"&&l)return"value ".concat(i," focused, ").concat(f(l,r),".");if(n==="menu"&&d){var p=c?" disabled":"",m="".concat(u?" selected":"").concat(p);return"".concat(i).concat(m,", ").concat(f(o,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},C$=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,m=c.inputValue,v=c.isMulti,y=c.isOptionDisabled,g=c.isSearchable,h=c.menuIsOpen,x=c.options,b=c.screenReaderStatus,S=c.tabSelectsValue,_=c.isLoading,j=c["aria-label"],E=c["aria-live"],C=w.useMemo(function(){return K(K({},_$),f||{})},[f]),N=w.useMemo(function(){var F="";if(n&&C.onChange){var V=n.option,Z=n.options,T=n.removedValue,L=n.removedValues,M=n.value,W=function(ue){return Array.isArray(ue)?null:ue},B=T||V||W(M),X=B?p(B):"",J=Z||L||void 0,ee=J?J.map(p):[],Q=K({isDisabled:B&&y(B,l),label:X,labels:ee},n);F=C.onChange(Q)}return F},[n,C,y,l,p]),R=w.useMemo(function(){var F="",V=r||o,Z=!!(r&&l&&l.includes(r));if(V&&C.onFocus){var T={focused:V,label:p(V),isDisabled:y(V,l),isSelected:Z,options:s,context:V===r?"menu":"value",selectValue:l,isAppleDevice:d};F=C.onFocus(T)}return F},[r,o,p,y,C,s,l,d]),O=w.useMemo(function(){var F="";if(h&&x.length&&!_&&C.onFilter){var V=b({count:s.length});F=C.onFilter({inputValue:m,resultsMessage:V})}return F},[s,m,h,C,x,b,_]),k=(n==null?void 0:n.action)==="initial-input-focus",P=w.useMemo(function(){var F="";if(C.guidance){var V=o?"value":h?"menu":"input";F=C.guidance({"aria-label":j,context:V,isDisabled:r&&y(r,l),isMulti:v,isSearchable:g,tabSelectsValue:S,isInitialFocus:k})}return F},[j,r,o,v,y,g,h,C,l,S,k]),U=G(w.Fragment,null,G("span",{id:"aria-selection"},N),G("span",{id:"aria-focused"},R),G("span",{id:"aria-results"},O),G("span",{id:"aria-guidance"},P));return G(w.Fragment,null,G(hg,{id:u},k&&U),G(hg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&U))},j$=C$,Rd=[{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źẑżžẓẕƶȥɀⱬꝣ"}],E$=new RegExp("["+Rd.map(function(e){return e.letters}).join("")+"]","g"),vw={};for(var Qc=0;Qc<Rd.length;Qc++)for(var Xc=Rd[Qc],Zc=0;Zc<Xc.letters.length;Zc++)vw[Xc.letters[Zc]]=Xc.base;var yw=function(t){return t.replace(E$,function(n){return vw[n]})},R$=b$(yw),mg=function(t){return t.replace(/^\s+|\s+$/g,"")},N$=function(t){return"".concat(t.label," ").concat(t.value)},k$=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=K({ignoreCase:!0,ignoreAccents:!0,stringify:N$,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,c=o.trim,u=o.matchFrom,d=c?mg(r):r,f=c?mg(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=R$(d),f=yw(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},O$=["innerRef"];function T$(e){var t=e.innerRef,n=gn(e,O$),r=rI(n,"onExited","in","enter","exit","appear");return G("input",Y({ref:t},r,{css:wp({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 I$(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(g,h){if(u.current!==null){var x=u.current,b=x.scrollTop,S=x.scrollHeight,_=x.clientHeight,j=u.current,E=h>0,C=S-_-b,N=!1;C>h&&i.current&&(r&&r(g),i.current=!1),E&&l.current&&(s&&s(g),l.current=!1),E&&h>C?(n&&!i.current&&n(g),j.scrollTop=S,N=!0,i.current=!0):!E&&-h>b&&(o&&!l.current&&o(g),j.scrollTop=0,N=!0,l.current=!0),N&&P$(g)}},[n,r,o,s]),f=w.useCallback(function(g){d(g,g.deltaY)},[d]),p=w.useCallback(function(g){c.current=g.changedTouches[0].clientY},[]),m=w.useCallback(function(g){var h=c.current-g.changedTouches[0].clientY;d(g,h)},[d]),v=w.useCallback(function(g){if(g){var h=eI?{passive:!1}:!1;g.addEventListener("wheel",f,h),g.addEventListener("touchstart",p,h),g.addEventListener("touchmove",m,h)}},[m,p,f]),y=w.useCallback(function(g){g&&(g.removeEventListener("wheel",f,!1),g.removeEventListener("touchstart",p,!1),g.removeEventListener("touchmove",m,!1))},[m,p,f]);return w.useEffect(function(){if(t){var g=u.current;return v(g),function(){y(g)}}},[t,v,y]),function(g){u.current=g}}var gg=["boxSizing","height","overflow","paddingRight","position"],vg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function yg(e){e.preventDefault()}function xg(e){e.stopPropagation()}function bg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function wg(){return"ontouchstart"in window||navigator.maxTouchPoints}var Sg=!!(typeof window<"u"&&window.document&&window.document.createElement),ss=0,Kr={capture:!1,passive:!1};function $$(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(Sg){var u=document.body,d=u&&u.style;if(r&&gg.forEach(function(v){var y=d&&d[v];o.current[v]=y}),r&&ss<1){var f=parseInt(o.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,m=window.innerWidth-p+f||0;Object.keys(vg).forEach(function(v){var y=vg[v];d&&(d[v]=y)}),d&&(d.paddingRight="".concat(m,"px"))}u&&wg()&&(u.addEventListener("touchmove",yg,Kr),c&&(c.addEventListener("touchstart",bg,Kr),c.addEventListener("touchmove",xg,Kr))),ss+=1}},[r]),l=w.useCallback(function(c){if(Sg){var u=document.body,d=u&&u.style;ss=Math.max(ss-1,0),r&&ss<1&&gg.forEach(function(f){var p=o.current[f];d&&(d[f]=p)}),u&&wg()&&(u.removeEventListener("touchmove",yg,Kr),c&&(c.removeEventListener("touchstart",bg,Kr),c.removeEventListener("touchmove",xg,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 A$=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},M$={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function D$(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=I$({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=$$({isEnabled:n}),f=function(m){u(m),d(m)};return G(w.Fragment,null,n&&G("div",{onClick:A$,css:M$}),t(f))}var F$={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},L$=function(t){var n=t.name,r=t.onFocus;return G("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:F$,value:"",onChange:function(){}})},U$=L$;function Ep(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 V$(){return Ep(/^iPhone/i)}function xw(){return Ep(/^Mac/i)}function z$(){return Ep(/^iPad/i)||xw()&&navigator.maxTouchPoints>1}function B$(){return V$()||z$()}function q$(){return xw()||B$()}var H$=function(t){return t.label},W$=function(t){return t.label},K$=function(t){return t.value},G$=function(t){return!!t.isDisabled},Y$={clearIndicator:TI,container:bI,control:FI,dropdownIndicator:kI,group:zI,groupHeading:qI,indicatorsContainer:CI,indicatorSeparator:II,input:GI,loadingIndicator:MI,loadingMessage:mI,menu:lI,menuList:fI,menuPortal:yI,multiValue:JI,multiValueLabel:e$,multiValueRemove:t$,noOptionsMessage:hI,option:a$,placeholder:u$,singleValue:p$,valueContainer:SI},Q$={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%)"},X$=4,bw=4,Z$=38,J$=bw*2,e2={baseUnit:bw,controlHeight:Z$,menuGutter:J$},Jc={borderRadius:X$,colors:Q$,spacing:e2},t2={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:dg(),captureMenuScroll:!dg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:k$(),formatGroupLabel:H$,getOptionLabel:W$,getOptionValue:K$,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:G$,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!ZP(),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 _g(e,t,n,r){var o=_w(e,t,n),s=Cw(e,t,n),i=Sw(e,t),l=pl(e,t);return{type:"option",data:t,isDisabled:o,isSelected:s,label:i,value:l,index:r}}function va(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(i,l){return _g(e,i,t,l)}).filter(function(i){return jg(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=_g(e,n,t,r);return jg(e,s)?s:void 0}).filter(tI)}function ww(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,pp(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function Cg(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,pp(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 n2(e,t){return ww(va(e,t))}function jg(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!Ew(e)||!s)&&jw(e,{label:i,value:l,data:o},r)}function r2(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 o2(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var eu=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},Sw=function(t,n){return t.getOptionLabel(n)},pl=function(t,n){return t.getOptionValue(n)};function _w(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function Cw(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=pl(e,t);return n.some(function(o){return pl(e,o)===r})}function jw(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Ew=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},s2=1,Rp=function(e){ST(n,e);var t=jT(n);function n(r){var o;if(bT(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=q$(),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,m=f.isMulti,v=f.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:v}),p&&(o.setState({inputIsHiddenAfterUpdate:!m}),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,m=o.state.selectValue,v=f&&o.isOptionSelected(c,m),y=o.isOptionDisabled(c,m);if(v){var g=o.getOptionValue(c);o.setValue(m.filter(function(h){return o.getOptionValue(h)!==g}),"deselect-option",c)}else if(!y)f?o.setValue([].concat(pp(m),[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(v){return o.getOptionValue(v)!==f}),m=Hi(u,p,p[0]||null);o.onChange(m,{action:"remove-value",removedValue:c}),o.focusInput()},o.clearValue=function(){var c=o.state.selectValue;o.onChange(Hi(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=Hi(c,f,f[0]||null);o.onChange(p,{action:"pop-value",removedValue:d})},o.getFocusedOptionId=function(c){return eu(o.state.focusableOptionsWithIds,c)},o.getFocusableOptionsWithIds=function(){return Cg(va(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 WP.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return Sw(o.props,c)},o.getOptionValue=function(c){return pl(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=Y$[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 v$(o.props)},o.buildCategorizedOptions=function(){return va(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return ww(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&&nc(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),m=5;o.userIsDragging=f>m||p>m}},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 Ew(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,m=u.inputValue,v=u.isClearable,y=u.isDisabled,g=u.menuIsOpen,h=u.onKeyDown,x=u.tabSelectsValue,b=u.openMenuOnFocus,S=o.state,_=S.focusedOption,j=S.focusedValue,E=S.selectValue;if(!y&&!(typeof h=="function"&&(h(c),c.defaultPrevented))){switch(o.blockOptionHover=!0,c.key){case"ArrowLeft":if(!d||m)return;o.focusValue("previous");break;case"ArrowRight":if(!d||m)return;o.focusValue("next");break;case"Delete":case"Backspace":if(m)return;if(j)o.removeValue(j);else{if(!f)return;d?o.popValue():v&&o.clearValue()}break;case"Tab":if(o.isComposing||c.shiftKey||!g||!x||!_||b&&o.isOptionSelected(_,E))return;o.selectOption(_);break;case"Enter":if(c.keyCode===229)break;if(g){if(!_||o.isComposing)return;o.selectOption(_);break}return;case"Escape":g?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:m}),o.onMenuClose()):v&&p&&o.clearValue();break;case" ":if(m)return;if(!g){o.openMenu("first");break}if(!_)return;o.selectOption(_);break;case"ArrowUp":g?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":g?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!g)return;o.focusOption("pageup");break;case"PageDown":if(!g)return;o.focusOption("pagedown");break;case"Home":if(!g)return;o.focusOption("first");break;case"End":if(!g)return;o.focusOption("last");break;default:return}c.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++s2),o.state.selectValue=cg(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=eu(s,i[l])}return o}return wT(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&&ug(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&&(ug(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(Jc):K(K({},Jc),this.props.theme):Jc}},{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,m=f.isRtl,v=f.options,y=this.hasValue();return{clearValue:o,cx:s,getStyles:i,getClassNames:l,getValue:c,hasValue:y,isMulti:p,isRtl:m,options:v,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 _w(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return Cw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return jw(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,m=this.getComponents(),v=m.Input,y=this.state,g=y.inputIsHidden,h=y.ariaSelection,x=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()?(h==null?void 0:h.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?w.createElement(v,Y({},x,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:b,innerRef:this.getInputRef,isDisabled:s,isHidden:g,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:d,type:"text",value:c},S)):w.createElement(T$,Y({id:b,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:dl,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,m=this.props,v=m.controlShouldRenderValue,y=m.isDisabled,g=m.isMulti,h=m.inputValue,x=m.placeholder,b=this.state,S=b.selectValue,_=b.focusedValue,j=b.isFocused;if(!this.hasValue()||!v)return h?null:w.createElement(f,Y({},p,{key:"placeholder",isDisabled:y,isFocused:j,innerProps:{id:this.getElementId("placeholder")}}),x);if(g)return S.map(function(C,N){var R=C===_,O="".concat(o.getOptionLabel(C),"-").concat(o.getOptionValue(C));return w.createElement(i,Y({},p,{components:{Container:l,Label:c,Remove:u},isFocused:R,isDisabled:y,key:O,index:N,removeProps:{onClick:function(){return o.removeValue(C)},onTouchEnd:function(){return o.removeValue(C)},onMouseDown:function(P){P.preventDefault()}},data:C}),o.formatOptionLabel(C,"value"))});if(h)return null;var E=S[0];return w.createElement(d,Y({},p,{data:E,isDisabled:y}),this.formatOptionLabel(E,"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,m=s.Option,v=this.commonProps,y=this.state.focusedOption,g=this.props,h=g.captureMenuScroll,x=g.inputValue,b=g.isLoading,S=g.loadingMessage,_=g.minMenuHeight,j=g.maxMenuHeight,E=g.menuIsOpen,C=g.menuPlacement,N=g.menuPosition,R=g.menuPortalTarget,O=g.menuShouldBlockScroll,k=g.menuShouldScrollIntoView,P=g.noOptionsMessage,U=g.onMenuScrollToTop,F=g.onMenuScrollToBottom;if(!E)return null;var V=function(X,J){var ee=X.type,Q=X.data,te=X.isDisabled,ue=X.isSelected,Ce=X.label,De=X.value,Ze=y===Q,me=te?void 0:function(){return o.onOptionHover(Q)},Ie=te?void 0:function(){return o.selectOption(Q)},A="".concat(o.getElementId("option"),"-").concat(J),D={id:A,onClick:Ie,onMouseMove:me,onMouseOver:me,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:ue};return w.createElement(m,Y({},v,{innerProps:D,data:Q,isDisabled:te,isSelected:ue,key:A,label:Ce,type:ee,value:De,isFocused:Ze,innerRef:Ze?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(X.data,"menu"))},Z;if(this.hasOptions())Z=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var X=B.data,J=B.options,ee=B.index,Q="".concat(o.getElementId("group"),"-").concat(ee),te="".concat(Q,"-heading");return w.createElement(i,Y({},v,{key:Q,data:X,options:J,Heading:l,headingProps:{id:te,data:B.data},label:o.formatGroupLabel(B.data)}),B.options.map(function(ue){return V(ue,"".concat(ee,"-").concat(ue.index))}))}else if(B.type==="option")return V(B,"".concat(B.index))});else if(b){var T=S({inputValue:x});if(T===null)return null;Z=w.createElement(f,v,T)}else{var L=P({inputValue:x});if(L===null)return null;Z=w.createElement(p,v,L)}var M={minMenuHeight:_,maxMenuHeight:j,menuPlacement:C,menuPosition:N,menuShouldScrollIntoView:k},W=w.createElement(cI,Y({},v,M),function(B){var X=B.ref,J=B.placerProps,ee=J.placement,Q=J.maxHeight;return w.createElement(c,Y({},v,M,{innerRef:X,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:b,placement:ee}),w.createElement(D$,{captureEnabled:h,onTopArrive:U,onBottomArrive:F,lockEnabled:O},function(te){return w.createElement(u,Y({},v,{innerRef:function(Ce){o.getMenuListRef(Ce),te(Ce)},innerProps:{role:"listbox","aria-multiselectable":v.isMulti,id:o.getElementId("listbox")},isLoading:b,maxHeight:Q,focusedOption:y}),Z)}))});return R||N==="fixed"?w.createElement(d,Y({},v,{appendTo:R,controlElement:this.controlRef,menuPlacement:C,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(U$,{name:u,onFocus:this.onValueInputFocus});if(!(!u||l))if(c)if(i){var p=f.map(function(y){return o.getOptionValue(y)}).join(i);return w.createElement("input",{name:u,type:"hidden",value:p})}else{var m=f.length>0?f.map(function(y,g){return w.createElement("input",{key:"i-".concat(g),name:u,type:"hidden",value:o.getOptionValue(y)})}):w.createElement("input",{name:u,type:"hidden",value:""});return w.createElement("div",null,m)}else{var v=f[0]?this.getOptionValue(f[0]):"";return w.createElement("input",{name:u,type:"hidden",value:v})}}},{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(j$,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,m=u.menuIsOpen,v=this.state.isFocused,y=this.commonProps=this.getCommonProps();return w.createElement(l,Y({},y,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:v}),this.renderLiveRegion(),w.createElement(s,Y({},y,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:v,menuIsOpen:m}),w.createElement(c,Y({},y,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(i,Y({},y,{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,m=o.options,v=o.value,y=o.menuIsOpen,g=o.inputValue,h=o.isMulti,x=cg(v),b={};if(i&&(v!==i.value||m!==i.options||y!==i.menuIsOpen||g!==i.inputValue)){var S=y?n2(o,x):[],_=y?Cg(va(o,x),"".concat(p,"-option")):[],j=l?r2(s,x):null,E=o2(s,S),C=eu(_,E);b={selectValue:x,focusedOption:E,focusedOptionId:C,focusableOptionsWithIds:_,focusedValue:j,clearFocusValueOnUpdate:!1}}var N=c!=null&&o!==i?{inputIsHidden:c,inputIsHiddenAfterUpdate:void 0}:{},R=u,O=d&&f;return d&&!O&&(R={value:Hi(h,x,x[0]||null),options:x,action:"initial-input-focus"},O=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(R=null),K(K(K({},b),N),{},{prevProps:o,ariaSelection:R,prevWasFocused:O})}}]),n}(w.Component);Rp.defaultProps=t2;var i2=w.forwardRef(function(e,t){var n=Fb(e);return w.createElement(Rp,Y({ref:t},n))}),Rw=i2;function yo({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,[m,v]=w.useState(p?localStorage.getItem(s)!="true":s),[y,g]=w.useState(!1);w.useEffect(()=>{setTimeout(()=>g(!0),100)},[]);const h=()=>{p&&localStorage.setItem(s,"true")},x=a.jsxs(zl,{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:()=>{h(),v(!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(Ab,{target:u.current,placement:c,show:m&&f&&y,children:x}):a.jsx(fp,{placement:c,onToggle:b=>{h(),v(b)},overlay:x,show:m&&f&&y,trigger:d,children:a.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:a.jsx("i",{className:`bi bi-${o}`})})})}const a2="_items_c2dbg_1",l2="_item_c2dbg_1",c2="_details_c2dbg_14",u2="_text_c2dbg_20",d2="_number_c2dbg_35",f2="_outer_c2dbg_50",p2="_inner_c2dbg_61",xn={items:a2,item:l2,details:c2,text:u2,number:d2,outer:f2,inner:p2},is=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function h2({requestId:e,grantNumber:t,creditColorClass:n="gray-300",colorClasses:r=rd}){const{request:o}=ut(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+=od(p));const c=[],u=[];let d=-.25;const f=[...l,i].map((p,m)=>{if(!p)return null;const v=m+1,g=od(p)/s,h=p.requested-p.used,x=Math.max(0,h),b=p.isCredit?s/p.exchangeRates.base.unitCost:p.requested,S=b==0?0:100*x/b,j=`var(--bs-${p.isCredit?n:r[m%r.length]})`;if(g>0){const E=d,C=d+g/2,N=d+=g,R=g>.5?1:0,O=[`M ${is(E,100)}`,`A 100 100 0 ${R} 1 ${is(N,100)}`,`L ${is(N,50)}`,`A 50 50 0 ${R} 0 ${is(E,50)}`].join(" "),[k,P]=is(C,75).split(" ").map(U=>parseFloat(U));c.push(a.jsx("path",{d:O,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:v},`${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:it(x,{abbreviate:!0})}),p.unit," available"]})})},"center-text")),a.jsxs("li",{className:xn.item,children:[a.jsx("span",{className:xn.number,children:v}),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:[it(h,{abbreviate:!0})," ",p.isCredit?null:a.jsxs(a.Fragment,{children:["of ",it(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 Eg=e=>e;function m2({classes:e,clean:t=Eg,format:n=Eg,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 g2({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}=ut(e,t),{project:p}=kt(t||n&&n.grantNumber),m=w.useRef(null),v=w.useRef(null);if(!n||!p)return;const y="Exchange"in n.allowedActions,g="Renewal"in n.allowedActions,h="Supplement"in n.allowedActions,x=n.exchangeStatus==c.pending,b=n.exchangeStatus==c.success,S=n.exchangeStatus==c.error,_=n.exchangeErrors,j=n.exchangeActionId!==null,E=n.exchangeActionEditable,C=n.resources,N=n.resourcesReason,R={};for(let A of C)R[A.resourceId]=A;const O=()=>{Cx(n)>=.75?u():d()},k=[];for(let A of C){let D=[];if(A.requested>0){for(let de of A.requires||[]){let re=R[de];if(re){if(re.requested>0){D=[];break}D.push(re)}}D.length&&k.push(a.jsxs("span",{children:[a.jsx(jn,{resource:A,userGuide:!1})," requires"," ",_x(D.map(de=>a.jsx(jn,{resource:de,userGuide:!1},de.resourceId)),"or"),"."]},A.resourceId))}}const P=k.length>0,U=A=>A.requested-A.used,F=A=>A.isNew&&0<A.requested&&A.requested<A.minimumExchange,V=[];for(let A of C)!A.isCredit&&F(A)&&V.push(a.jsxs("span",{children:["The minimum initial request for ",a.jsx(jn,{resource:A,userGuide:!1})," is ",A.minimumExchange," ",A.unit,". ",a.jsx("br",{})]},A.resourceId));const Z=V.length>0;let T;b?T=a.jsx(Se,{color:"info",children:"Your exchange request has been submitted."}):S&&_.length>0&&_[0].includes("PI")&&_[0].includes("person status Unknown")?T=a.jsx(Se,{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(A=>A.role==="pi").map(A=>`${A.firstName} ${A.lastName}`)," ","to update the academic status in their profile, and then try again."]})}):S?T=a.jsxs(Se,{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?T=a.jsx(Se,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):n.timeStatus=="current"&&!p.isManager?T=a.jsxs(Se,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",Vf(p)," to request a change."]}):P?T=a.jsxs(Se,{color:"warning",children:[k," Please adjust your balance values."]}):Z&&(T=a.jsx(Se,{color:"warning",children:V}));const L=N.length>0;let M=!1,W=!1;for(let A of C)if(A.isNew&&(M=!0),A.allocated!=A.requested&&(W=!0),M&&W)break;const B=C.map(A=>A.resourceId),X={},J={},ee=[];if(y&&E){n.allowedActions.Exchange.resources.filter(A=>!B.includes(A.resourceId)).map(A=>{X[A.resourceId]=A;const D=`${A.type} Resources (${A.unit})`;J[D]=J[D]||[],J[D].push(A)});for(const[A,D]of Object.entries(J))ee.push({label:A,options:D.sort((de,re)=>de.exchangeRates.current.unitCost<re.exchangeRates.current.unitCost||de.exchangeRates.current.unitCost==re.exchangeRates.current.unitCost&&de.name<re.name?-1:1).map(de=>{const re=ai(de.name),dt=re.short?`${re.short} (${re.full.replace(/ \([^(]+\)/,"")})`:re.full;return{value:de.resourceId,label:dt}})}),ee.sort((de,re)=>de.label<re.label?-1:1)}const Q=y?n.allowedActions.Exchange.resources.map(A=>A.resourceId):[];let te;const ue=[],Ce=[];for(let A of C)A.isCredit?te=A:(ue.push(A),Ce.push(E&&(A.isNew||A.allocated!=A.requested)?jr.edited:Q.includes(A.resourceId)?"":jr.disabled));const De=`Add ${ue.length?"another":"a"} resource to your exchange...`,Ze=(A,D)=>{const de=D.allocated-D.used,re=mo(Number(A.replace(/[^0-9-.]/g,"")),D.decimalPlaces),dt=Math.min(0,de);if(re<dt)return dt;let ot=te.requested*te.exchangeRates.base.unitCost;const be=(D.allocated-D.requested)*D.exchangeRates.base.unitCost,Bt=Math.min(ot,be);ot-=Bt;let $t=D.requested-D.used+Bt/D.exchangeRates.base.unitCost;return ot>0&&($t+=ot/D.exchangeRates.current.unitCost),re>$t?mo($t,D.decimalPlaces,"floor"):re},me=A=>A.isBoolean?a.jsx(a.Fragment,{children:"—"}):a.jsxs(a.Fragment,{children:[Tn(ne.resourceTypeIcons[te.icon]),a.jsx("span",{className:"ms-2",children:qj(A.unit,A.exchangeRates.current.unitCost,te.name)})]}),Ie=[{key:"name",name:"Resource",format:(A,D)=>a.jsxs(a.Fragment,{children:[a.jsx(jn,{resource:D}),(p.currentUser.resourceIds.includes(D.resourceId)||p.currentUser.resourceAccountInactiveIds.includes(D.resourceId))&&a.jsx(Io,{icon:"table",onClick:()=>o(D.resourceRepositoryKey),target:"_blank",title:`${D.name} Usage Details`})," ",a.jsx($o,{status:D.isActive?"Active":D.isNew?"New":"Inactive"})]}),width:Math.min(350,window.innerWidth*.3)},{key:"unit",name:"Unit Cost",width:300,format:(A,D)=>me(D)}];return y&&Ie.push({key:"requested",name:"Balance",class:"text-end",rowClass:A=>E&&Q.includes(A.resourceId)?jr.input:"",format:(A,D)=>{const de=E&&Q.includes(D.resourceId);return D.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:A==1,disabled:!de,onChange:re=>i(D.resourceId,re.target.checked?1:0)})}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:"Requested"})]}):a.jsxs("span",{className:"d-flex",children:[de?a.jsx(m2,{classes:"text-end w-100",clean:re=>Ze(re,D),format:it,label:`Balance for ${D.name}`,setValue:re=>{i(D.resourceId,re+D.used)},style:{padding:"0.1rem 0.5rem"},value:U(D)}):a.jsx("span",{children:it(U(D))}),a.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:D.unit})]})},formatHeader:A=>a.jsxs(a.Fragment,{children:[A,E?a.jsx(yo,{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:(A,D)=>{const re=-1*(D.requested-D.allocated)*D.exchangeRates.current.unitCost;return re!==0?a.jsxs("span",{className:`badge bg-${re>0?"primary":"danger"} rounded-pill`,children:[re>0?"+":"",it(re,te)," ",te.unit]}):a.jsx(a.Fragment,{children:"—"})}}),a.jsxs("div",{className:"resources",children:[C.length?a.jsx(h2,{requestId:e}):null,te&&(y||g||h)?a.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[a.jsxs("span",{children:[Tn(ne.resourceTypeIcons.credit)," ",it(te.requested,te)," ",te.unit," available to exchange"]}),g||h?a.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:O,children:[Tn(ne.resourceTypeIcons.credit)," Request More"," ",n.usesCredits?"Credits":"Units"]}):null]}):null,T,ue.length?a.jsx(hn,{columns:Ie,rows:ue,rowClasses:Ce,classes:ee.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."}),ee.length?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:m,children:a.jsx(Rw,{classNames:{control:()=>"react-select mb-1"},options:ee,onChange:A=>r(A.value),placeholder:De,value:null,"aria-label":De,formatOptionLabel:({value:A,label:D})=>{const de=X[A];return a.jsxs("span",{className:"d-flex justify-content-between",children:[a.jsx("span",{children:a.jsx(jn,{resource:de,userGuide:!1},D)}),a.jsx("span",{children:me(de)})]})}})}),ue.length?null:a.jsx(yo,{bg:"secondary",color:"dark",visible:p.tab=="resources",initial:!0,target:m,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,y&&E?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:A=>l(A.target.value),style:{minHeight:"3rem"}})]}),a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:x||!W&&!L&&!M,onClick:s,children:"Reset Form"}),a.jsx("button",{ref:v,type:"button",className:"btn btn-secondary",disabled:x||!W||!L||P||Z,onClick:f,children:x?"Submitting...":"Submit for Approval"})]}),W&&!P?a.jsx(yo,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:v,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 v2({question:e,requestId:t,grantNumber:n}){const{request:r,setResourceQuestionValues:o}=ut(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],m=p.required?"required":"",v=b=>o(d,i,b.target.value?[b.target.value]:[]),y=b=>{o(d,i,Array.from(b.target.options).filter(({selected:S})=>S).map(({value:S})=>parseInt(S,10)))},g=b=>{const S=parseInt(b.target.value,10),_=b.target.checked?[...f,S]:f.filter(j=>j!=S);o(d,i,_)},h=b=>{const S=parseInt(b.target.value);o(d,i,isNaN(S)?[]:[S])};let x;if(["calendar","integer_only","text"].includes(c)){const b={calendar:"date",integer_only:"number",text:"text"}[c];x=a.jsx("input",{className:"form-control",id:s,type:b,placeholder:p.label,required:p.required,value:f[0]||"",onChange:c=="integer_only"?h:v})}else if(c=="textarea")x=a.jsx("textarea",{className:"form-control",id:s,placeholder:p.label,required:p.required,value:f[0]||"",onChange:v});else if(c=="drop_down"||l.length>=10){const b=c=="multi_sel";x=a.jsxs("select",{id:s,className:"form-select",required:p.required,multiple:b,onChange:b?y:h,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 x=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"?h:g}),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 ${m}`,children:u}),x]})}function y2({requestId:e,grantNumber:t}){const{request:n,saveResources:r,toggleResourcesModal:o}=ut(e,t),{project:s}=kt(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?Uf(u.requested):a.jsxs(a.Fragment,{children:[d>0?"+":"",it(d,u)," ",u.unit]})})]},u.resourceId)}),c=i.some(({attributes:u,values:d})=>d.length==0&&u[0].required);return a.jsxs(ce,{size:"lg",show:n.showResourcesModal,onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:"Complete Your Exchange"})}),a.jsxs(ce.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(v2,{question:u,requestId:e,grantNumber:t},u.attributeSetId))]}):null]}),a.jsx(ce.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 Nw({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 x2({requestId:e,grantNumber:t}){const{project:n}=kt(t),{request:r,closeUsageDetailModal:o}=ut(e,t);if(!r||r.error||!n||n.error||!r.usageDetailStatus)return;let s,i="Usage";if(r.usageDetailStatus==Ve.pending)s=a.jsx(Ur,{});else if(r.usageDetailStatus==Ve.error)s=a.jsx(Se,{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}=ai(c),m=r.resources.find(h=>h.resourceRepositoryKey==u),v=h=>it(h,{decimalPlaces:m?m.decimalPlaces:void 0}),y={};for(let h of n.users)y[h.username]=h;i=a.jsxs(a.Fragment,{children:["Usage: ",p||f," for ",l]});const g=[{key:"name",name:"Name",format:(h,{lastName:x,firstName:b,portalUsername:S})=>{const _=y[S];return _?a.jsx(Nw,{user:_}):`${x}, ${b}`}},{key:"portalUsername",name:"Resource Username",format:h=>{const x=y[h],b=x?x.resourceUsernames[m.resourceId]:null;return b||a.jsx(a.Fragment,{children:"—"})}},{key:"role",name:"Role",format:h=>jx[h].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:v},{key:"lastMonth",name:"Last Month",class:"text-end",format:v},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:v},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:v},{key:"total",name:"All Time",class:"text-end",format:v}];s=d.length?a.jsx(hn,{rows:d,columns:g}):a.jsx(Se,{color:"info",children:"There is no usage for this resource."})}return a.jsxs(ce,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:i})}),a.jsx(ce.Body,{children:s})]})}var b2=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function w2(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,b2),p=f.inputValue,m=w.useRef(void 0),v=w.useRef(!1),y=w.useState(Array.isArray(n)?n:void 0),g=ze(y,2),h=g[0],x=g[1],b=w.useState(typeof p<"u"?p:""),S=ze(b,2),_=S[0],j=S[1],E=w.useState(n===!0),C=ze(E,2),N=C[0],R=C[1],O=w.useState(void 0),k=ze(O,2),P=k[0],U=k[1],F=w.useState([]),V=ze(F,2),Z=V[0],T=V[1],L=w.useState(!1),M=ze(L,2),W=M[0],B=M[1],X=w.useState({}),J=ze(X,2),ee=J[0],Q=J[1],te=w.useState(void 0),ue=ze(te,2),Ce=ue[0],De=ue[1],Ze=w.useState(void 0),me=ze(Ze,2),Ie=me[0],A=me[1];o!==Ie&&(Q({}),A(o)),n!==Ce&&(x(Array.isArray(n)?n:void 0),De(n)),w.useEffect(function(){return v.current=!0,function(){v.current=!1}},[]);var D=w.useCallback(function(dt,ot){if(!s)return ot();var be=s(dt,ot);be&&typeof be.then=="function"&&be.then(ot,function(){return ot()})},[s]);w.useEffect(function(){n===!0&&D(_,function(dt){v.current&&(x(dt||[]),R(!!m.current))})},[]);var de=w.useCallback(function(dt,ot){var be=KP(dt,ot,c);if(!be){m.current=void 0,j(""),U(""),T([]),R(!1),B(!1);return}if(o&&ee[be])j(be),U(be),T(ee[be]),R(!1),B(!1);else{var Bt=m.current={};j(be),R(!0),B(!P),D(be,function($t){v&&Bt===m.current&&(m.current=void 0,R(!1),U(be),T($t||[]),B(!1),Q($t?K(K({},ee),{},ao({},be,$t)):ee))})}},[o,D,P,ee,c]),re=W?[]:_&&P?Z:h||[];return K(K({},f),{},{options:re,isLoading:N||l,onInputChange:de,filterOption:d})}var S2=w.forwardRef(function(e,t){var n=w2(e),r=Fb(n);return w.createElement(Rp,Y({ref:t},r))}),_2=S2;const Nd=({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 C2({grantNumber:e,requestId:t}){const{project:n,addUser:r,resetUsers:o,saveUsers:s,setTab:i,setUserRole:l,statuses:c,toggleUsersResources:u}=kt(e),{request:d}=n?ut(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,m=n.usersStatus==c.pending,v=n.usersStatus==c.success,y=n.usersStatus==c.error,g=n.users,h=d.resources.filter(cd),x=h.length==0,b=g.find(R=>R.hasChanges)!==void 0,S=g.find(R=>R.role!="pi")!==void 0;let _;v&&!b?_=a.jsx(Se,{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."}):y?_=a.jsx(Se,{color:"danger",children:"Sorry, your changes could not be saved. Please try again later."}):f?h.length?x&&(_=a.jsx(Se,{color:"warning",children:"This project does not have any active resources."})):_=a.jsxs(Se,{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(Se,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",Vf(n)," to request a change."]});const j=(R,O)=>{let k,P,U,F;if(O.key=="all"){k="all resources for all users",P=V=>u(V),U=0;for(let V of g)U+=V.resourceIds.length;F=g.length*h.length}else k=`all users for ${O.name}`,P=V=>u(V,null,O.key),U=g.filter(({resourceIds:V})=>V.includes(O.key)).length,F=g.length;return a.jsxs(a.Fragment,{children:[O.key=="all"?R:a.jsx(jn,{resource:O,userGuide:!1}),a.jsx("br",{}),a.jsx(Nd,{description:k,disabled:O.disabled,onChange:P,selectedLength:U,totalLength:F})]})},E=Al.map(({role:R,name:O})=>a.jsx("option",{value:R,children:O},R)),C=[{key:"name",name:"Name",width:200,format:(R,O)=>a.jsx(Nw,{user:O})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(R,O)=>a.jsx("select",{className:"form-select",value:R,onChange:k=>l(O.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:E.filter(k=>k.key==R||!["pi","co_pi"].includes(k.key))})}];h.length&&C.push({key:"all",name:"All Resources",class:`text-center ${jr.important}`,disabled:!f||x,width:100,format:(R,O)=>a.jsx(Nd,{description:`all users for ${O.name}`,disabled:!f||x,onChange:k=>u(k,O.username),selectedLength:O.resourceIds.length,totalLength:h.length}),formatHeader:j});for(let R of h)C.push({key:R.resourceId,name:R.name,class:"text-center",disabled:!f||!R.isActive,icon:R.icon,format:(O,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=g.map(R=>R.hasChanges?jr.edited:"");return a.jsxs(a.Fragment,{children:[_,a.jsx(hn,{rows:g,columns:C,frozenColumns:h.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:N,scrollRowIndex:n.usersNewRowIndex}),f&&h.length&&!x?a.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:a.jsx(_2,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await XE(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&&(h.length&&!x||S)?a.jsxs("div",{className:"d-flex mt-3",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:m||!b,onClick:o,children:"Reset Form"}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:m||!b,onClick:s,children:m?"Saving...":"Save Changes"})]}):null]})}const j2=(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}},E2=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:R2(t)},t))})]}):null;function R2(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const Mo={authenticityToken:null,data_loaded:!1,errors:[],form_valid:!1,grant_number:"",projects:[],publication:{},publicationId:null,publication_types:[],saving:!1,selected_resources:[],show_saved:!1,showEditModal:!1,resources_none_selected:!1},kw=Lr({name:"publicationEdit",initialState:Mo,reducers:{addAuthor:e=>{e.publication.authors.push({portal_username:"",first_name:"",middle_name:"",last_name:"",prefix:"",suffix:"",initials:"",affiliation:"",hash:{}})},addProject:(e,{payload:t})=>{e.projects.push(t)},changePublicationType:(e,{payload:t})=>{let n=e.publication_types.find(r=>r.publication_type==t).fields;n.forEach(r=>{const o=e.publication.fields.find(s=>s.csl_field_name==r.csl_field_name);o&&(r.value=o.value)}),e.publication.publication_type=t,e.publication.fields=n},dataLoaded:(e,{payload:t})=>{e.publication=t.publication,e.form_valid=t.publication.title.trim()!="",e.publication.authors.forEach(n=>{n.affiliation||(n.affiliation="")}),e.publication_types=t.publication_types,e.projects=t.publication.projects||[],e.selected_resources=(t.publication.publication_resources||[]).map(n=>n.acct_resource_id).filter(Boolean).map(n=>Number(n)),e.resources_none_selected=t.publication.access_staff_publication||!1,e.data_loaded=!0},deleteAuthor:(e,{payload:t})=>{e.publication.authors.splice(t,1)},hideError:(e,{payload:t})=>{e.errors=e.errors.filter(n=>n.id!=t)},setFormValid:(e,{payload:t})=>{e.form_valid=t},setGrantNumber:(e,{payload:t})=>{e.grant_number=t},setPublication:(e,{payload:t})=>{e.publication.fields.forEach(n=>{n.field_value=t[n.csl_field_name]||""}),Object.keys(e.publication).forEach(n=>{t[n]&&(e.publication[n]=t[n])}),e.form_valid=t.title.trim()!=""},setPublicationId:(e,{payload:t})=>{e.publicationId=t},setShowEditModal:(e,{payload:t})=>{e.showEditModal=t},resetState:e=>{for(const[t,n]of Object.entries(Mo))e[t]=n},toggleRequest:(e,{payload:t})=>{e.projects[t].selected=!e.projects[t].selected},updateAuthor:(e,{payload:t})=>{e.publication.authors[t.idx][t.key]=t.value},updateErrors:(e,{payload:t})=>{e.errors.push({id:`${Math.random().toString(36).slice(2)}`,message:t})},updateField:(e,{payload:t})=>{e.publication.fields[t.index].field_value=t.value},updatePublication:(e,{payload:t})=>{e.publication[t.key]=t.value},updateSaving:(e,{payload:t})=>{e.saving=t},updateSelectedResources:(e,{payload:t})=>{e.selected_resources=t,t.length>0&&(e.resources_none_selected=!1)},setResourcesNoneSelected:(e,{payload:t})=>{e.resources_none_selected=t,t&&(e.selected_resources=[])},updateShowSaved:(e,{payload:t})=>{e.show_saved=t}}}),{addAuthor:Rg,addProject:N2,changePublicationType:kd,dataLoaded:k2,deleteAuthor:O2,hideError:Ow,setFormValid:T2,setGrantNumber:Tw,setPublication:P2,setPublicationId:I2,setShowEditModal:Pw,resetState:$2,toggleRequest:A2,updateAuthor:M2,updateErrors:Xs,updateField:D2,updatePublication:ya,updateSaving:tu,updateSelectedResources:F2,updateShowSaved:Iw,setResourcesNoneSelected:Ng}=kw.actions,L2=e=>e.publicationEdit.publication,U2=e=>e.publicationEdit.publication.doi,V2=e=>e.publicationEdit.publication_types,$w=e=>e.publicationEdit.publication.authors,Aw=e=>e.publicationEdit.projects,z2=si([Aw],e=>e.filter(t=>t.selected)),B2=si([z2],e=>{const t=new Set,n=[];return e.forEach(r=>{(r.resources||[]).forEach(o=>{!(o!=null&&o.resource_id)||t.has(o.resource_id)||(t.add(o.resource_id),n.push(o))})}),n}),Mw=e=>e.publicationEdit.selected_resources,Dw=e=>e.publicationEdit.resources_none_selected,q2=si([Mw,Dw],(e,t)=>e.length>0||t),H2=e=>e.publicationEdit.errors,Fw=e=>e.publicationEdit.data_loaded,Lw=e=>e.publicationEdit.publicationId,W2=e=>e.publicationEdit.showEditModal,K2=e=>e.publicationEdit.show_saved,rc=e=>e.publicationEdit.saving,Uw=e=>e.publicationEdit.form_valid,G2=e=>e.publicationEdit.grant_number,Vw=e=>!rc(e)&&Fw(e)&&Uw(e)&&zw(e)&&e.publicationEdit.projects.filter(t=>t.selected).length>0&&q2(e),zw=e=>{const t=$w(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},Y2=()=>async(e,t)=>{const n=t().publicationEdit.publication.doi,r="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(ne.routes.publications_lookup_path({doi:n})).then(o=>o.json()).then(o=>{if(o.title!=""){let s=t().publicationEdit.publication_types.find(i=>i.citation_style_type==o.type);e(kd(s?s.publication_type:"Other")),e(P2(o))}else e(Xs(r))},()=>{e(Xs(r))})},Q2=()=>async(e,t)=>{const n=t().publicationEdit.grant_number;await fetch(ne.routes.publications_find_project_path({grant_number:n})).then(r=>r.json()).then(r=>{e(N2(r)),e(Tw(""))},()=>{e(Xs("Unable to find a project with this grant number."))})},Np=e=>async t=>{t(I2(e)),t(Pw(!0))},Bw=e=>async t=>{const n=e?`${ne.routes.edit_publication_path(e)}.json`:ne.routes.publication_path("new.json");await fetch(n,{headers:{accept:"application/json"}}).then(r=>r.json()).then(r=>{t(k2(r))})},X2=()=>async(e,t)=>{const n=t().publicationEdit,r=n.projects.filter(p=>p.selected),o={...n.publication},s=n.errors,{formValid:i,missingFields:l}=j2(o,["title","publication_year","publication_month"],["first_name","last_name"]);if(!i){s.length>0&&Array.from(s).forEach(m=>{e(Ow(m.id))});const p=E2(l);e(Xs(p));return}const u={authenticity_token:n.authenticityToken||document.querySelector("meta[name=csrf-token]").content,publication:{...o,access_staff_publication:n.resources_none_selected},authors:o.authors.map(p=>({...p,order:0})),tags:[],projects:r,resources:n.selected_resources.map(p=>({resource_id:p}))};let d,f;o.publication_id?(d=ne.routes.publication_path(o.publication_id),f="PATCH"):(d=ne.routes.publications_path(),f="POST"),e(tu(!0)),await fetch(d,{method:f,headers:{"Content-Type":"application/json"},body:JSON.stringify(u)}).then(()=>{o.publication_id||(e($2()),e(Bw())),e(Iw(!0)),e(tu(!1))},()=>{e(tu(!1)),e(Xs("There was an error saving this publication."))})},pi=kw.reducer,pn=He("publicationsSearch/getPublications",async(e,{getState:t})=>{const n=t().publicationsSearch,r={},{authorName:o,createdBy:s,doi:i,grantNumber:l,journal:c,publicationType:u}=n.filterSelections;return i&&(r.doi=i),o&&(r.author_name=o),c&&n.filterOptions.journals.includes(c)&&(r.journal=c),u&&(r.publication_type=u),s.length&&(r.created_by=s),l&&(r.grant_number=l),n.usePagination?r.page=n.page.current+1:r.per_page=9999,await(await fetch(ne.routes.search_publications_path(r),{headers:{Accept:"application/json"}})).json()}),kp=He("publicationsSearch/getFilters",async()=>(await(await fetch(ne.routes.search_publications_filters_path())).json()).filters||[]),Zs={publications:[],publicationsLoaded:!1,filterSelections:{createdBy:[],doi:"",grantNumber:"",journal:"",authorName:"",publicationType:""},filterOptions:{journals:[],publication_types:[]},page:{current:0,last:1},usePagination:!0},qw=Lr({name:"publicationsSearch",initialState:Zs,reducers:{addCreatedByUsername:(e,{payload:t})=>{e.filterSelections.createdBy.push(t)},removeCreatedByUsername:(e,{payload:t})=>{e.filterSelections.createdBy=e.filterSelections.createdBy.filter(n=>n!==t)},updateFilterSelection:(e,{payload:t})=>{e.filterSelections[t.name]=t.value},resetFilters:e=>{e.filterSelections={createdBy:[],doi:"",journal:"",authorName:"",publicationType:""}},resetPublications:e=>{e.publications=[]},setUsePagination:(e,{payload:t})=>{e.usePagination=t}},extraReducers:e=>{e.addCase(pn.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(pn.fulfilled,(t,n)=>{var r,o,s,i;t.publicationsLoaded=!0,t.usePagination?(t.publications=[...t.publications,...n.payload.publications||[]],t.page.current=((o=(r=n.payload)==null?void 0:r.pagination)==null?void 0:o.current_page)||0,t.page.last=((i=(s=n.payload)==null?void 0:s.pagination)==null?void 0:i.last_page)||1):t.publications=n.payload.publications||[]}).addCase(pn.rejected,(t,n)=>{t.publicationsLoaded=!0,t.error=n.error.message}).addCase(kp.fulfilled,(t,n)=>{t.filterOptions=n.payload})}}),{addCreatedByUsername:Z2,removeCreatedByUsername:J2,resetFilters:eA,resetPublications:kg,setUsePagination:Op,updateFilterSelection:Od}=qw.actions,tA=e=>e.publicationsSearch.filterSelections,nA=e=>e.publicationsSearch.publicationsLoaded,Hw=e=>e.publicationsSearch.publications,rA=e=>e.publicationsSearch.filterOptions,oA=e=>e.publicationsSearch.page,sA=e=>e.publicationsSearch.usePagination,oc=qw.reducer;function iA({children:e,hasMore:t,loadMore:n,isLoading:r}){const o=w.useRef(null),s=w.useRef(r);return w.useEffect(()=>{s.current=r},[r]),w.useEffect(()=>{const i=o.current;if(i&&t){const l=new IntersectionObserver(c=>{!s.current&&c[0].isIntersecting&&n()});return l.observe(o.current),()=>l.unobserve(i)}},[o,n,t]),a.jsxs(a.Fragment,{children:[e,a.jsx("div",{ref:o}),r&&a.jsx(Ur,{})]})}const aA="_citation_ru41y_1",lA="_tags_ru41y_7",Og={citation:aA,tags:lA},cA=/10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i,Ww=e=>{const t=(e||"").match(cA);return t?t[0]:null};function Kw({publication:e}){const{authors:t,doi:n,fields:r,publication_type:o,publication_year:s,title:i}=e,{"Journal name":l,Pages:c,Publisher:u,"Volume/Issue":d}=r,f=t.map(g=>`${g.last_name}, ${g.first_name.substr(0,1)}.`).join(", "),p=s||"N/A",m=i.endsWith(".")?i:`${i}.`,v=Ww(n),y=v?a.jsx("a",{href:`https://doi.org/${v}`,target:"_blank",rel:"noreferrer",children:v}):null;if(["Journal Paper","Other"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",m," ",l&&a.jsxs("em",{children:[l,"."]})," ",d&&a.jsxs(a.Fragment,{children:[d,","]})," ",c&&a.jsxs(a.Fragment,{children:[c,"."]})," ",y]});if(["Conference Paper","Software"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",m," ",l&&a.jsxs("em",{children:[l,"."]})," ",y]});if(["Book","Book Chapter"].includes(o))return a.jsxs(a.Fragment,{children:[f," (",p,"). ",a.jsx("em",{children:m})," ",u&&a.jsxs("em",{children:[u,"."]})," ",y]});if(o==="Dataset")return a.jsxs(a.Fragment,{children:[f," (",p,").",a.jsx("em",{children:m})," [Dataset]. ",u,". ",y]});if(o==="Dissertation")return a.jsxs(a.Fragment,{children:[f," (",p,"). ",a.jsx("em",{children:m}),". [Doctoral dissertation",u&&a.jsxs(a.Fragment,{children:[", ",u]}),"]. ",y]})}function uA({allowEdit:e=!0,last:t=!1,publication:n}){const r=ge(),{projects:o,publication_type:s,resources:i=[]}=n,l=o.map(c=>c.grant_number);return a.jsx("div",{className:`col-12 mb-2 ${t||"border-bottom"}`,children:a.jsx("div",{className:"card",style:{border:"unset"},children:a.jsxs("div",{className:"card-body pt-2",children:[a.jsxs("div",{className:Og.citation,children:[a.jsx(Kw,{publication:n}),e&&n.can_edit&&a.jsx(Io,{onClick:()=>r(Np(n.publication_id)),icon:"pencil",title:"Edit publication"})]}),a.jsxs("ul",{className:Og.tags,children:[a.jsxs("li",{children:[a.jsx("i",{className:"bi bi-file-earmark"}),s==="Other"?"Publication":s]},"project-type"),l.map((c,u)=>a.jsx("li",{id:`project_${u}`,children:a.jsxs("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${c}`,id:`grant_link${u}`,target:"_blank",rel:"noreferrer",title:`Supported by project ${c}`,children:[a.jsx("i",{className:"bi bi-link-45deg"}),c]})},`grant_${u}`)),i.map(c=>{const{full:u,short:d}=ai(c);return a.jsxs("li",{children:[a.jsx("i",{className:"bi bi-server"})," ",d?a.jsx("abbr",{title:u,children:d}):u]},c)})]})]})})})}function Tp({allowEdit:e=!0,emptyMessage:t="No matching publications."}){const n=ge(),{current:r,last:o}=H(oA),s=H(nA),i=H(sA),l=H(Hw);return s&&l.length===0?a.jsx("p",{children:t}):a.jsx(a.Fragment,{children:a.jsx(iA,{isLoading:!s,hasMore:i&&r<o,loadMore:()=>n(pn()),children:l.map((c,u)=>a.jsx(uA,{allowEdit:e,publication:c,last:u===l.length-1},c.publication_id))})})}function dA(){const e=ge(),t=H(U2);return 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:t,onChange:n=>e(ya({key:"doi",value:n.target.value}))}),a.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>e(Y2()),children:"Lookup Publication"})]})]})})}const fA=({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"})})})]})},pA=e=>({updateAuthor:t=>e(M2(t)),deleteAuthor:t=>e(O2(t))}),hA=Fj(null,pA)(fA);function mA(){const e=ge(),t=H($w),n=H(zw),r=t.length===0;w.useEffect(()=>{r&&e(Rg())},[r,e]);const 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.jsx("tbody",{children:t.map((s,i)=>a.jsx(hA,{author:s,authorKey:i},`author_${i}`))})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>e(Rg()),children:"Add Author"})]})}function gA(){const e=ge(),t=H(Aw),n=o=>`list-group-item list-group-item-action clickable ${o.selected?"list-group-item-success":""}`,r=()=>t.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:t.map((o,s)=>a.jsxs("div",{className:n(o),onClick:()=>e(A2(s)),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})}function vA(){const e=ge(),t=H(G2);return 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:t,onChange:n=>e(Tw(n.target.value)),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>e(Q2()),children:"Find Project"})]})]})})}function yA(){const e=ge(),t=H(B2),n=H(Mw),r=H(Dw),o=w.useMemo(()=>t.filter(u=>(u.label||u.value||"").toLowerCase()!=="access credits").map(u=>({resource_id:u.resource_id,label:u.label||u.value||u.resource_name||"",value:u.value||u.label||u.resource_name||"",providerAbbrev:u.organization_abbrev,providerName:u.organization_name})).sort((u,d)=>u.label.localeCompare(d.label)),[t]),s=w.useMemo(()=>{const u={};return o.forEach(d=>{const f=d.providerAbbrev||"Other";u[f]||(u[f]={providerAbbrev:d.providerAbbrev,providerName:d.providerName,resources:[]}),u[f].resources.push(d)}),Object.keys(u).sort().reduce((d,f)=>(d[f]=u[f],d),{})},[o]),i=(u,d)=>{r&&e(Ng(!1));const f=n||[],p=Number(u);let m;d?m=f.includes(p)?f:[...f,p]:m=f.filter(v=>Number(v)!==p),e(F2(m))},l=u=>{e(Ng(u))},c=(u,d)=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:`resource_used_${u.resource_id}_${d}`,checked:n.includes(Number(u.resource_id)),disabled:r,onChange:f=>i(Number(u.resource_id),f.target.checked)}),a.jsx("label",{className:"form-check-label",htmlFor:`resource_used_${u.resource_id}_${d}`,children:u.label})]},`resource_${u.resource_id}`);return a.jsxs("div",{className:"mb-4",children:[a.jsxs("div",{className:"fw-bold mb-2",children:["Resources",a.jsx("i",{className:"bi bi-asterisk text-danger"})]}),a.jsx("div",{className:"text-muted small mb-2",children:"Select a project above to see available resources."}),!r&&n.length===0&&a.jsx("div",{className:"alert alert-danger",children:'Select at least one resource or choose "This is an ACCESS staff publication".'}),o.length>0&&a.jsx(a.Fragment,{children:Object.entries(s).map(([u,d])=>a.jsxs("div",{className:"mb-3",children:[a.jsx("div",{className:"fw-semibold text-muted mb-2",style:{fontSize:"0.95em"},children:d.providerName||u}),a.jsx("div",{className:"ms-3",children:d.resources.map((f,p)=>c(f,p))})]},`provider_${u}`))}),a.jsxs("div",{className:"form-check mt-2",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",id:"resources_none",checked:r,onChange:u=>l(u.target.checked)}),a.jsx("label",{className:"form-check-label",htmlFor:"resources_none",children:"This is an ACCESS staff publication"})]})]})}function xA(){const e=ge(),t=H(L2),n=H(V2);H(Vw);const r=H(Uw),o=f=>{e(T2(f.target.value.trim()!=="")),e(ya({key:"title",value:f.target.value}))},s=()=>t.fields.map((f,p)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsx("label",{htmlFor:`field_${f.csl_field_name}`,className:"form-label",children:f.name}),a.jsx("input",{type:"text",className:"form-control",name:`field_${f.csl_field_name}`,id:`field_${f.csl_field_name}`,value:f.field_value||"",onChange:m=>e(D2({index:p,value:m.target.value}))})]})},`field_${f.csl_field_name}`)),i=()=>{const f=new Date().getFullYear()+2;let p=1980;const m=[];for(;p<=f;)m.push(p++);const v=["January","February","March","April","May","June","July","August","September","October","November","December"],y=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 ",y]}),a.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${r?"":"is-invalid"}`,value:t.title||"",onChange:g=>o(g)})]})}),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:t.publication_year||"",onChange:g=>{ya({key:"publication_year",value:g.target.value})},children:m.map(g=>a.jsx("option",{value:g,children:g},`year_${g}`))})]})}),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:t.publication_month||"",onChange:g=>{ya({key:"publication_month",value:g.target.value})},children:v.map((g,h)=>a.jsx("option",{value:h+1,children:g},`month_${h}`))})]})})]})},l=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(dA,{}),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:t.publication_type||"",onChange:f=>e(kd(f.target.value)),children:n.map(f=>a.jsx("option",{value:f.publication_type,children:f.publication_type},`pub_type_${f.type_id}`))})]})}),i(),s()]})]}),c=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Authors"}),a.jsxs(yo,{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(mA,{})})]}),u=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(yo,{children:"Click/Tap each project that this publication is related to."})]}),a.jsxs("div",{className:"card-body",children:[a.jsx(gA,{}),a.jsx("hr",{}),a.jsx(vA,{})]})]}),d=a.jsxs("div",{className:"card mt-3",children:[a.jsxs("div",{className:"card-header d-flex",children:[a.jsx("h2",{children:"Resources"}),a.jsx(yo,{children:"Select the resources that were used in this publication. Resources are shown from the projects you selected above."})]}),a.jsx("div",{className:"card-body",children:a.jsx(yA,{})})]});return a.jsxs(a.Fragment,{children:[l,c,u,d]})}function Gw(){const e=ge(),t=H(Fw),n=H(Lw);return w.useEffect(()=>{e(Bw(n))},[n,e]),a.jsx(a.Fragment,{children:t?a.jsx(xA,{}):a.jsx(Ur,{})})}function Pp(){const e=ge(),t=H(W2),n=H(Lw),r=H(Vw),o=s=>{s&&e(X2()),e(Pw(!1))};return a.jsx(a.Fragment,{children:a.jsxs(ce,{size:"xl",show:t,onHide:()=>o(!1),scrollable:!0,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsxs(ce.Title,{children:[n?"Edit":"Add"," Publication"]})}),a.jsx(ce.Body,{children:a.jsx(Gw,{})}),a.jsx(ce.Footer,{children:a.jsxs("div",{className:"d-flex",children:[a.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>o(!1),children:"Cancel"}),a.jsx("button",{type:"button",className:"btn btn-primary",disabled:!r,onClick:()=>r&&o(!0),children:"Save Publication"})]})})]})})}function bA({grantNumber:e}){const t=ge(),n=H(rc);return w.useEffect(()=>{n||(t(Od({name:"grantNumber",value:e})),t(Op(!1)),t(pn()))},[e,n,t]),a.jsxs(a.Fragment,{children:[a.jsx(Tp,{grantNumber:e,emptyMessage:"No publications are associated with this project."}),a.jsx(Pp,{})]})}function wA({grantNumber:e}){const t=w.useRef(zn({reducer:{publicationEdit:pi,publicationsSearch:oc}}));return a.jsxs(a.Fragment,{children:[a.jsx(Bn,{store:t.current,children:a.jsx(bA,{grantNumber:e})}),a.jsx("div",{children:a.jsx("a",{href:ne.routes.publications_path(),className:"btn btn-primary",children:"Add or Manage Publications"})})]})}function SA({requestId:e,grantNumber:t}){const{request:n}=ut(e,t),{project:r,setRequest:o,setTab:s}=kt(t||n.grantNumber);if(!n)return;if(n.error)return a.jsx(Se,{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(Se,{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:jR.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(Se,{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(Se,{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(AN,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx(ts,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(hT,{requestId:e,grantNumber:t})}),a.jsx(ts,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(g2,{requestId:e})}),a.jsx(ts,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx(C2,{grantNumber:t})}),a.jsx(ts,{eventKey:"publications",title:"Publications",children:a.jsx(wA,{grantNumber:t,requestId:e})}),a.jsx(ts,{eventKey:"history",title:"History",children:a.jsx(BO,{requestId:e})})]}),a.jsx(LO,{grantNumber:t,requestId:e}),a.jsx(UO,{grantNumber:t,requestId:e}),a.jsx(VO,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(y2,{grantNumber:t,requestId:e}),a.jsx(x2,{grantNumber:t,requestId:e})]})}function _A({requestId:e,grantNumber:t}){const{request:n,toggleActionsModal:r,toggleDeleteModal:o}=ut(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 m=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:m},u):a.jsx("a",{className:`btn btn-${p||"primary"} ms-2 text-nowrap`,href:d,children:m},u)})}function CA({open:e=!1,grantNumber:t,title:n,status:r}){const[o,s]=w.useState(e),{project:i,setRequest:l}=kt(t,!o&&n&&r&&!0),c=`project-${t}`;let u=null;if(o&&i)if(i.error)u=a.jsx(Se,{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:Lf(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(_A,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(SA,{...d,grantNumber:t}):null]})}return a.jsxs("div",{className:`${jm.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:jm.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($o,{status:r||i.status})]}),a.jsx("div",{className:"card-body",id:c,hidden:!o||!i,children:u})]})}function jA({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=wR(e);if(r)return a.jsx(Ur,{});if(n)return a.jsxs(Se,{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(CA,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const Yw={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:[]}},EA=He("projectsBrowser/initApp",async(e,{getState:t,dispatch:n})=>{const r=window.location.search,o=new URLSearchParams(r);o.has("_requestNumber")&&(n(Pd({name:"requestNumber",value:o.get("_requestNumber")})),n(Xw(!0))),await n(Td()),await n(Rr()),n(RA())}),RA=He("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(Qw({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),Td=He("projectsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().projectsBrowser.apiUrl}?filters=1`,i=await(await fetch(o)).json();n(Qw(i.filters))}),Rr=He("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(Pg(!0))):(n(Pg(!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()}),Ip=Lr({name:"projectsBrowser",initialState:Yw,reducers:{resetFilters:e=>{e.filters={org:"",allocationType:"",allFosToggled:!1,resource:"",requestNumber:""},e.singleEntry=!1,Ip.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(Td.pending,t=>{t.filtersLoaded=!1}).addCase(Td.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:NA,setApiUrl:dD,setShowPagination:Tg,setTypeLists:Qw,toggleAllFos:kA,toggleFos:OA,toggleListFiltered:Xw,toggleSingleEntry:Pg,updateFilter:Pd,updatePageData:Id}=Ip.actions,TA=e=>e.projectsBrowser.filters,PA=e=>e.projectsBrowser.filtersLoaded,IA=e=>e.projectsBrowser.listIsFiltered,$A=e=>e.projectsBrowser.singleEntry,AA=e=>e.projectsBrowser.projectsLoaded,MA=e=>e.projectsBrowser.pageData,DA=e=>e.projectsBrowser.projects,FA=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,LA=e=>e.projectsBrowser.typeLists,UA=Ip.reducer;const VA=()=>{const e=ge(),t=H(TA),n=H(LA),r=H(IA),o=n.orgs.map(y=>({label:y,value:y})),s=w.useRef(),[i,l]=w.useState(null),c={height:"200px",overflowX:"auto",padding:"2px"},u=y=>{e(Pd({name:y.target.name,value:y.target.value}))},d=()=>{window.scrollTo(0,0),p(!0),e(Tg(!1)),e(Id({current_page:1})),e(Rr())},f=()=>{l(null),e(Tg(!1)),e(Id({current_page:1})),e(NA()),r&&(window.scrollTo(0,0),e(Rr()),p(!1))},p=y=>{e(Xw(y))},m=y=>{l(y),e(Pd({name:"org",value:y.value}))},v=()=>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(kA())}}),a.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),n.fosTypes.map(y=>a.jsxs("div",{className:"form-check",children:[a.jsx("input",{className:"form-check-input",type:"checkbox",value:y.fosTypeId,id:`fos_${y.fosTypeId}`,checked:y.checked,onChange:()=>e(OA(y))}),a.jsx("label",{className:"form-check-label",htmlFor:`fos_${y.fosTypeId}`,children:y.fosName})]},`fos_${y.fosTypeId}`))]}),a.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),a.jsx("div",{className:"mb-3",children:a.jsx(Rw,{options:o,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:s,closeMenuOnSelect:!0,onChange:m,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:y=>u(y),children:[a.jsx("option",{value:"",children:"-- All --"}),n.allocationTypes.map((y,g)=>a.jsx("option",{value:y,children:y},`allocation_type_${g}`))]})}),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:y=>u(y),children:[a.jsx("option",{value:"",children:"-- All --"}),n.resources.map((y,g)=>a.jsx("option",{value:y.resourceId,children:y.resourceName},`resource_${g}`))]})}),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:y=>u(y)})}),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:v(),onClick:f,children:"Reset"})]})]})})};const Ig=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),$g=({publication:e,index:t,fontSize:n="18px"})=>{const r=e.authors.map(p=>`${p.last_name}, ${p.first_name.substring(0,1)}.`).join(", "),o=e.projects.map(p=>p.grant_number),s=e.publication_type==="Other"?"Publication":e.publication_type,i=e.projects,l=t%2==0?"bg-light":"",c={textIndent:"-50px",marginLeft:"50px",fontSize:n},u=e.publication_datas??[],d=p=>{switch(p){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/${Ig(e.doi)}`,target:"_blank",className:"fw-normal",children:Ig(e.doi)}):!1;case"Journal":return e.journal.title?e.journal.title:!1;case"Volume/Issue":return u["Volume/Issue"]?u["Volume/Issue"]:!1;case"Pages":return u.Pages?u.Pages:!1;case"Publisher":return u.Publisher?u.Publisher:!1}},f=()=>{const p=d("Publication Year");let m=e.title;const v=d("Journal"),y=d("DOI"),g=d("Volume/Issue"),h=d("Pages"),x=d("Publisher");return m[m.length-1]!="."&&(m+="."),e.publication_type==="Journal Paper"||e.publication_type==="Other"?a.jsxs(a.Fragment,{children:[r," (",p,"). ",m,v?a.jsxs("em",{className:"ms-1",children:[v,"."]}):"",g?a.jsxs("span",{className:"ms-1",children:[g,","]}):"",h?a.jsxs("span",{className:"ms-1",children:[h,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Conference Paper"||e.publication_type==="Software"?a.jsxs(a.Fragment,{children:[r," (",p,"). ",m,v?a.jsxs("em",{className:"ms-1",children:[v,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Book"||e.publication_type==="Book Chapter"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m}),x?a.jsxs("em",{className:"ms-1",children:[x,"."]}):"",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Dataset"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m})," [Dataset]. ",x||"",".",y?a.jsx("span",{className:"ms-1",children:y}):""]}):e.publication_type==="Dissertation"?a.jsxs(a.Fragment,{children:[r," (",p,").",a.jsx("em",{className:"ms-1",children:m}),". [Doctoral dissertation",x?", "+x:"","].",y?a.jsx("span",{className:"ms-1",children:y}):""]}):""};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 ${l}`,children:[a.jsx("p",{style:c,children:f()}),i.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-decoration-underline mb-2",children:["Projects Supporting this ",s]}),a.jsx("ul",{style:{...c,listStyleType:"none"},children:o.map((p,m)=>a.jsx("li",{id:`project_${m}`,children:a.jsx("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${p}`,id:`grant_link${m}`,target:"_blank",style:{fontWeight:"600"},children:p})},`grant_${m}`))})]})]})})})},zA=({project:e})=>{var E;const t=e.resources,[n,r]=w.useState(!1),[o,s]=w.useState(!1),[i,l]=w.useState(!1);H($A);const c=e.abstract.length>=300,u=c?`${e.abstract.substring(0,300)}...`:e.abstract,d=C=>{let N=C.units?C.units:C.resourceUnits;const R=C.allocation?C.allocation:C.amount;if(N=="[Yes = 1, No = 0]"||N=="Yes / No")return R=="1.0"?"Yes":"No";{let O="0";return parseInt(R)&&(O=parseInt(R).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),N=="ACCESS Credits"&&(N=a.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),N=="Dollars"?`$${O}`:a.jsxs(a.Fragment,{children:[O," ",N]})}},f=()=>{const{origin:C,pathname:N}=window.location,R=`${C}${N}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(R),setTimeout(()=>r(!1),2e3)},p=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",m=a.jsx(zl,{id:"link-tooltip",children:"Link Copied!"}),v=()=>{if(p()){const C={background:"none",border:"none",color:"#fff",fontSize:"24px"};return a.jsx(fp,{placement:"left",trigger:"click",defaultShow:n,show:n,onToggle:()=>r(!n),overlay:m,children:a.jsx("button",{onClick:f,style:C,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,{})},y=()=>{const C=e.pi.split(",");return`${C[1]} ${C[0]}`},g=()=>!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(C=>`${C.name} (${C.organization})`).join(";")]})]}),h=()=>!e.beginDate||!e.endDate?"-":a.jsxs(a.Fragment,{children:[e.beginDate," to ",e.endDate]}),x=()=>e.allocationType==="NAIRR Start-Up"?a.jsxs("span",{className:"fw-bold",children:[p()," Start-Up: ",y(),", ",a.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"fw-bold",children:[p()," ",e.requestTitle]})," ",a.jsx("br",{}),a.jsxs("span",{className:"fst-italic",children:[e.pi," ",a.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),g()]}),b=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((C,N)=>a.jsxs("tr",{children:[a.jsx("td",{children:C.resourceName}),a.jsx("td",{style:{whiteSpace:"nowrap"},children:d(C)})]},`resource_${e.requestId}_${N}`))})]}),S=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:b})})]}),_=a.jsxs(ce,{show:o,onHide:()=>s(!1),id:`publicationsModal_${e.projectId}`,children:[a.jsx(ce.Header,{closeButton:!0,children:a.jsx(ce.Title,{children:e.requestTitle})}),a.jsx(ce.Body,{children:(E=e==null?void 0:e.publications)==null?void 0:E.map((C,N)=>a.jsx("div",{children:a.jsx($g,{publication:{...C,projects:[]},index:N})},`publication_${N}`))}),a.jsx(ce.Footer,{children:a.jsx("button",{type:"button",className:"btn btn-secondary","data-bs-dismiss":"modal",onClick:()=>s(!1),children:"Close"})})]}),j=()=>{var C,N;return e.allocationType==="NAIRR Start-Up"?S:a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row fw-bold mt-2 border-bottom",children:a.jsx("span",{className:"col mb-1 pb-0",children:"Abstract"})}),a.jsx("div",{style:{whiteSpace:"pre-wrap",display:"inline"},children:i?e.abstract:u}),c&&a.jsx("button",{onClick:()=>l(!i),style:{display:"inline",border:"none",background:"none",cursor:"pointer",fontWeight:"bold"},children:i?"Show Less":"Read More"}),a.jsxs("div",{className:"row mt-2",children:[a.jsxs("div",{className:"col-lg-6 left-panel flex-fill",children:[a.jsx("div",{className:"row fw-bold border-bottom",children:a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Resources"})})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:b})})]}),((C=e==null?void 0:e.publications)==null?void 0:C.length)>0&&a.jsxs("div",{className:"col-lg-6 right-panel",children:[a.jsx("div",{className:"row fw-bold border-bottom",children:a.jsx("div",{className:"col",children:a.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Publications"})})}),a.jsx("div",{className:"mt-2 pb-0",children:a.jsx($g,{publication:{...e.publications[0],projects:[]},index:0,fontSize:"16px"})},`publication_${e.projectId}_0`),((N=e==null?void 0:e.publications)==null?void 0:N.length)>1&&a.jsxs("button",{className:"btn btn-primary",onClick:()=>s(!0),children:["View More (",e.publications.length,")"]}),_]})]})]})};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:x()}),a.jsx("div",{children:v()})]})}),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:h()})]}),j()]})]})},BA=()=>{const e=H(DA);return e.length==0?a.jsx("div",{children:"No Projects Found"}):a.jsx("div",{children:e.map((t,n)=>a.jsx(zA,{project:t},`project_${n}`))})};const Ag=()=>{const e=ge(),t=H(MA),[n,r]=w.useState([]),[o,s]=w.useState("0"),i=Array.from({length:t.last_page},(g,h)=>h),l=10,c={width:"50px",textAlign:"center"};w.useEffect(()=>{m()},[t]);const u=g=>{const h=parseInt(g);e(Id({current_page:g})),e(Rr(h))},d=g=>(event.preventDefault(),s("0"),u(g),!1),f=()=>{u(parseInt(t.current_page)+1)},p=()=>{u(parseInt(t.current_page)-1)},m=()=>{const g=[];if(t.last_page>l)if(t.current_page>4){g.push(1),g.push("spacer");for(var h=1;h>0;h--)t.current_page-h>1&&g.push(t.current_page-h);g.push(["current",t.current_page]);for(var h=1;h<2;h++)t.current_page+h<=t.last_page&&g.push(t.current_page+h);t.last_page-t.current_page>1&&(g.push("spacer"),g.push(t.last_page))}else[1,2,3,4,5].forEach(x=>{x==t.current_page?g.push(["current",x]):g.push(x)}),g.push("spacer"),g.push(t.last_page);else for(var h=1;h<=t.last_page;h++)h==t.current_page?g.push(["current",h]):g.push(h);r(g)},v=g=>{let h="";return typeof g=="object"?[g,h]=g:h=g,g=="spacer"?a.jsx("li",{className:"page-item disabled",children:a.jsx("span",{className:"page-link",style:c,children:". . ."})}):g=="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(g),children:h})})},y=()=>a.jsx("li",{className:"page-item",children:a.jsxs("select",{className:"page-link",style:{...c,height:"100%"},value:o,onChange:g=>d(g.target.value),children:[a.jsx("option",{value:"0",children:"Go To"}),i.map(g=>a.jsx("option",{value:g+1,children:g+1},`page_option_${g}`))]})});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:p,disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),n.map((g,h)=>a.jsx(Ee.Fragment,{children:v(g)},`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:f,disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},qA=({api_url:e})=>{const t=ge(),n=H(AA),r=H(PA),o=H(FA),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(EA())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(VA,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Ag,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(BA,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Ag,{scroll:"projects_browser_app"}):""})})]})]})})};function Zw(){const e=ge();return a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>e(Np(null)),children:"Add a New Publication"})}function Jw(){const e=ge(),t=H(H2),n=H(K2);return a.jsxs(a.Fragment,{children:[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:()=>e(Iw(!1))})]}),t.map(r=>a.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[r.message,a.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>e(Ow(r.id))})]},`err_${r.id}`))]})}function HA(){const e=ge(),t=H(rc);return w.useEffect(()=>{t||(e(Op(!1)),e(pn()),e(kp()))},[e,t]),a.jsxs(a.Fragment,{children:[a.jsx(Jw,{}),a.jsxs("div",{className:"d-flex justify-content-between align-items-start",children:[a.jsx("h1",{children:"My Publications"}),a.jsx(Zw,{})]}),a.jsx(Tp,{}),a.jsx(Pp,{})]})}const WA=()=>{const e=ge(),t=H(rA),n=H(tA),r=()=>{e(kg()),window.scrollTo(0,0),e(pn())},o=()=>{e(kg()),e(eA()),window.scrollTo(0,0),e(pn())};if(!t.journals)return a.jsx("p",{children:"Loading filters..."});const s=l=>{e(Od({name:l.target.name,value:l.target.value}))},i=l=>{e(Od({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:Ww(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"})]})]})})},KA=()=>{const e=ge();return w.useEffect(()=>{e(pn()),e(kp())},[e]),a.jsx(a.Fragment,{children:a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(WA,{})}),a.jsx("div",{className:"col-sm-9",children:a.jsx("div",{className:"row",id:"publicationListRow",children:a.jsx("div",{className:"col",children:a.jsx(Tp,{allowEdit:!1})})})})]})})})},e1={selected:[]},t1=Lr({name:"publicationsSelect",initialState:e1,reducers:{setSelected:(e,{payload:t})=>{e.selected=t},toggleSelected:(e,{payload:t})=>{e.selected.includes(t)?e.selected=e.selected.filter(r=>r!==t):e.selected.push(t)},clearSelected:e=>{e.selected=[]}}}),{setSelected:GA,toggleSelected:YA,clearSelected:fD}=t1.actions,QA=e=>e.publicationsSelect.selected,XA=t1.reducer;function ZA({allowAdd:e=!0,allowEdit:t=!0,allowSelect:n=!1}){const r=ge(),o=H(rc),s=H(QA),i=H(Hw);w.useEffect(()=>{o||(r(Op(!1)),r(pn()))},[o,r]);const l=[{key:"publication",name:"Publication",format:(c,u)=>a.jsxs(a.Fragment,{children:[a.jsx(Kw,{publication:u}),t&&u.can_edit&&a.jsx(Io,{onClick:()=>r(Np(u.publication_id)),icon:"pencil",title:"Edit publication"},"edit")]})},{key:"created_by",name:"Entered By",headerClass:"text-nowrap"}];return n&&l.splice(0,0,{key:"publication_id",format:c=>{const u=s.includes(c);return a.jsx("input",{type:"checkbox",name:"publication_ids[]",value:c,checked:u,onChange:()=>r(YA(c))})},formatHeader:()=>a.jsx(Nd,{selectedLength:s.length,totalLength:i.length,onChange:c=>r(GA(c?i.map(u=>u.publication_id):[]))})}),a.jsxs(a.Fragment,{children:[a.jsx(hn,{columns:l,rows:i}),e&&a.jsx(Zw,{}),a.jsx(Pp,{})]})}function JA(){const e=ge();return w.useEffect(()=>{addEventListener("requestAddRole",t=>e(Z2(t.detail.username))),addEventListener("requestRemoveRole",t=>e(J2(t.detail.username)))},[e]),a.jsxs(a.Fragment,{children:[a.jsx(Jw,{}),a.jsx(ZA,{allowSelect:!0})]})}const eM={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},selectedCategory:"CPU",selectedFilters:[]},tM=He("resourceCatalog/initApp",async(e,{dispatch:t})=>{t(hl(!1)),t(nM()),t(hl(!0))});He("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(hl(!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(iM({data:r,params:e})),t(hl(!0))});const nM=He("resourceCatalog/getRampsResources",async(e,{dispatch:t})=>{const n="https://operations-api.access-ci.org/wh2/cider/v1/access-active-groups/type/resource-catalog.access-ci.org/",r="https://operations-api.access-ci.org/wh2/cider/v1/access-allocated/",o="https://operations-api.access-ci.org/wh2/cider/v1/features/",i=await(await fetch(n)).json(),c=await(await fetch(r)).json(),d=await(await fetch(o)).json();t(sM({params:e,metadata:i.results,rampsResources:c.results,features:d.results}))});He("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(lM(e)),t(r1())});const Mg=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($d(s.allowedResources,s.excludedResources,i.resourceName)){const{categories:l,formattedResource:c}=rM(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}},$d=(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.includes(n):!0,rM=(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]&&$d(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=$d(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}},oM=e=>e.type.endsWith("rejected"),n1=Lr({name:"resourceCatalog",initialState:eM,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,r=t.groups;t.rampsResources;const{resources:o,catalogs:s,categories:i}=Mg(n);e.catalogs=s,e.onRamps=t.params.onRamps;for(const l in i){const c=i[l],u=[];for(const d in c.features)u.push(c.features[d]);e.filters.push({...c,features:u.sort((d,f)=>d.name>f.name)})}e.filters=e.filters.sort((l,c)=>l.categoryName.localeCompare(c.categoryName)),e.resources=o.map(l=>{if(!r)return l;const c=r.organizations.find(u=>u.organization_name==l.organization);if(l.logo=(c==null?void 0:c.organization_favicon_url)||null,c){const u=r.active_groups.find(d=>d.rollup_organization_ids.includes(c.organization_id));r.resources.filter(d=>u.rollup_info_resourceids.includes(d.info_resourceid))}return l}).sort((l,c)=>l.resourceName.localeCompare(c.resourceName)).sort((l,c)=>e.resourceSorting[l.sortCategory]>e.resourceSorting[c.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},handleRamps:(e,{payload:t})=>{const{features:n,metadata:r,rampsResources:o}=t,s={},i={},l=r.active_groups,c={"Innovative / Novel Compute":"Innovative","CPU Compute":"CPU","GPU Compute":"GPU","Commercial Cloud":"Cloud",Cloud:"Cloud",Storage:"Storage"};n.filter(v=>!["Resource Category","**DELETED** ACCESS Integration Roadmap","Resource Status","Allocations"].includes(v.feature_category_name)).forEach(v=>{var y;s[v.feature_category_id]={categoryId:v.feature_category_id,categoryName:v.feature_category_name,categoryDescription:v.feature_category_description,features:v.features.map(g=>g.id),categoryIsFilter:((y=v==null?void 0:v.other_attributes)==null?void 0:y.is_allocations_filter)||!1},v.features.forEach(g=>{i[g.id]={featureId:g.id,name:g.name,categoryId:g.feature_category_id,isFilter:g.is_allocations_filter}})});const u=o.map(v=>{const y=r.organizations.find(E=>E.organization_name==v.organization_name),g=v.features.find(E=>E.feature_category=="Resource Type"),h=c[g==null?void 0:g.name]||"other",x={},b=l.find(E=>E.rollup_info_resourceids.includes(v.info_resourceid));let S=[];b&&(S=b.rollup_info_resourceids.filter(E=>E!=v.info_resourceid).map(E=>o.find(C=>C.info_resourceid==E)).map(E=>({info_resourceid:E.info_resourceid,cider_resource_id:E.cider_resource_id,resourceName:E.short_name,displayResourceName:E.resource_descriptive_name})));const _=[];return v.features.forEach(E=>{_.push(E.id);const C=i[E.id];if(C){const N=s[C.categoryId];x[C.categoryId]||(x[C.categoryId]={...N,features:[]}),x[C.categoryId].features.push(C)}}),{cider_resource_id:v.cider_resource_id,info_resourceid:v.info_resourceid,resourceId:v.cider_resource_id,resourceName:v.short_name,displayResourceName:v.resource_descriptive_name,resourceDescription:v.resource_description,recommendedUse:v.recommended_use,icon:(y==null?void 0:y.organization_favicon_url)||null,resourceType:g==null?void 0:g.name,resourceCategory:h,organization:v.organization_name,featureCategories:Object.values(x),relatedResources:S,groupId:b==null?void 0:b.info_groupid,filters:_}}),d=[{apiUrl:"https://allocations.access-ci.org/resources.json",catalogLabel:"ACCESS",allowedCategories:[],allowedFilters:[],allowedResources:[],excludedCategories:["Resource Category","**DELETED** ACCESS Integration Roadmap","Resource Status"],excludedFilters:["Resource Status"],excludedResources:["ACCESS Credits"],data:u}],{resources:f,catalogs:p,categories:m}=Mg(d);for(const v in m){const y=m[v],g=[];for(const h in y.features)g.push(y.features[h]);e.filters.push({...y,features:g.sort((h,x)=>h.name>x.name)})}e.filters=e.filters.sort((v,y)=>v.categoryName.localeCompare(y.categoryName)),e.resources=f.sort((v,y)=>v.resourceName.localeCompare(y.resourceName)),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.selectedFilters=[]},setResourcesLoaded:(e,{payload:t})=>{e.resourcesLoaded=t},setSelectedCategory:(e,{payload:t})=>{e.selectedCategory=t},toggleCatalog:(e,{payload:t})=>{const{catalog:n,selected:r}=t;e.catalogs[n.catalogLabel].selected=r},toggleFilter:(e,{payload:t})=>{e.selectedFilters.includes(t)?e.selectedFilters=e.selectedFilters.filter(n=>n!=t):e.selectedFilters.push(t)}},extraReducers:e=>{e.addMatcher(oM,(t,n)=>{console.log(n)})}}),{handleRamps:sM,handleResponse:iM,processData:pD,resetFilters:aM,setResourcesLoaded:hl,setSelectedCategory:hD,toggleCatalog:lM,toggleFilter:r1}=n1.actions,cM=e=>e.resourceCatalog.resources,o1=e=>e.resourceCatalog.catalogs,uM=e=>e.resourceCatalog.filters,dM=e=>e.resourceCatalog.hasErrors,fM=e=>e.resourceCatalog.resourcesLoaded,s1=e=>e.resourceCatalog.selectedCategory,$p=e=>e.resourceCatalog.selectedFilters,pM=si([cM,$p,s1],(e,t,n)=>(e.filter(r=>r.resourceCategory==n),t.length==0?e:e.filter(r=>t.some(o=>r.filters.includes(o))))),hM=n1.reducer,mM="_access_1yrq0_2",gM="_resourceName_1yrq0_6",vM="_description_1yrq0_11",yM="_filterBar_1yrq0_15",xM="_cardBg_1yrq0_20",bM="_active_1yrq0_25",wM="_plainButton_1yrq0_30",SM="_btnSecondary_1yrq0_40",_M="_filtersHidden_1yrq0_51",CM="_filtersVisible_1yrq0_57",Cn={access:mM,resourceName:gM,description:vM,filterBar:yM,cardBg:xM,active:bM,plainButton:wM,btnSecondary:SM,filtersHidden:_M,filtersVisible:CM},jM=({features:e,id:t})=>{const n={"ACCESS Pegasus":"https://pegasus.isi.edu/wordpress/wp-content/uploads/2016/01/favicon.ico","ACCESS OnDemand":"https://openondemand.org/themes/fire/theme/assets/media/favicons/favicon.ico","Advance reservations":"calendar-check","Composable hardware fabric":"boxes","Compute Resources":"cpu-fill","CPU Compute":"cpu-fill","GPU Compute":"gpu-card","Innovative / Novel Compute":"lightbulb","Large Memory Nodes":"arrows-fullscreen",Preemption:"clock-history","Science Gateway support":"globe","Service / Other":"stars","Storage Resources":"hdd-fill","Virtual Machines":"pc-display-horizontal",Cloud:"cloud",Storage:"hdd-fill"},r={fontFamily:"Archivo, sans-serif",color:"rgb(35, 35, 35)",backgroundColor:"rgb(206, 232, 233)",border:"1px solid #48c0b9",margin:"2px"},o=s=>{const i=n[s];return i?i.startsWith("http")?a.jsx("img",{className:"me-2",style:{width:"12px"},alt:`${s}-icon`,src:i}):a.jsx("i",{className:`bi bi-${n[s]} me-2`}):a.jsx(a.Fragment,{})};return a.jsx(a.Fragment,{children:e.map((s,i)=>a.jsxs("span",{className:"badge me-2",style:r,children:[o(s),s]},`feature_${t}_${i}`))})},EM=({resource:e})=>{w.useState(!0);const t=()=>a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:"Features"})}),a.jsx("div",{className:"row mb-2",children:a.jsx("div",{className:"col",children:a.jsx(jM,{features:e.features,id:e.resourceId})})})]}),n=()=>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:Cn.description,dangerouslySetInnerHTML:{__html:e.recommendedUse}})})})]}):"",r=()=>{const i={background:"linear-gradient(90deg,rgba(255, 255, 255, 1) 0%, rgba(26, 91, 110, 1) 50%)",display:"flex",justifyContent:"space-between"};return a.jsx("div",{className:"card-header",style:i,children:a.jsxs("span",{style:{fontWeight:"bold"},children:[s(),e.resourceName]})})},o=()=>e.relatedResources.length==0?"":a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col fw-bold",children:"Related Resources"})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx("ul",{className:"list-group",children:e.relatedResources.map(i=>a.jsx("a",{className:"list-group-item list-group-item-action",href:`https://allocations.access-ci.org/resources/${e.groupId}`,target:"_blank",children:i.displayResourceName},`rr_${e.resourceId}_${i.cider_resource_id}`))})})})]}),s=()=>{if(e.icon)return a.jsx("img",{style:{width:"20px",marginRight:"5px"},src:`${e.icon}`})};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:[r(),a.jsx("div",{className:"card-body",children:a.jsxs("div",{className:"row",children:[a.jsxs("div",{className:"col-12 col-md-8",children:[n(),t()]}),a.jsx("div",{className:"col-12 col-md-4",children:o()})]})}),a.jsx("div",{className:"card-footer",children:a.jsxs("a",{target:"_blank",href:`https://allocations.access-ci.org/resources/${e.groupId}`,className:"fw-bold",style:{color:"#000"},children:["Learn more about ",e.displayResourceName,a.jsx("i",{className:"bi bi-box-arrow-up-right ms-2"})]})})]})})})})},RM=({filter:e,selectedFilters:t})=>{const n=ge(),r=()=>{n(r1(e.featureId))},o=t.includes(e.featureId);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:o,onChange:r})]})})})},NM=({category:e,selectedFilters:t})=>a.jsxs("div",{className:"col-12 col-sm-6",children:[a.jsx("div",{className:"fw-bold mb-1 mt-1",children:a.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(n=>a.jsx(RM,{filter:n,selectedFilters:t},n.featureId))]}),kM=({onReset:e})=>{const t=ge(),n=H(o1),r=H(uM),o=H($p);return Object.keys(n).map(s=>n[s]),a.jsxs("div",{style:{textAlign:"left",backgroundColor:"#fff"},children:[a.jsx("div",{className:"row",children:r.map(s=>a.jsx(NM,{selectedFilters:o,category:s},s.categoryId))}),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(aM()),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"})]})},OM=()=>{const[e,t]=w.useState(!1),n=w.useRef(null),r=H($p),o=()=>{const i=n.current;e?(i.style.height="0px",i.classList.remove(Cn.filtersVisible),i.classList.add(Cn.filtersHidden)):(i.style.height=i.scrollHeight+"px",i.classList.remove(Cn.filtersHidden),i.classList.add(Cn.filtersVisible)),t(!e)},s={color:"#fff",backgroundColor:"rgb(26, 91, 110)",marginLeft:"4px"};return a.jsx("div",{className:Cn.filterBar,style:{position:"sticky",top:"0px"},children:a.jsx("div",{className:"row mb-2",children:a.jsx("div",{className:"col pt-2 pb-2",children:a.jsx("div",{className:"p-1 pb-0 bg-white",children:a.jsxs("div",{children:[a.jsxs("button",{className:"btn mb-1 mt-1",style:{border:"1px solid #48c0b9"},type:"button",onClick:o,children:[a.jsx("i",{className:"bi bi-filter"})," Filters",r.length>0&&a.jsx("span",{className:"badge rounded-pill",style:s,children:r.length})]}),a.jsx("div",{className:`${Cn.filtersHidden} pe-2 ps-2`,id:"filtersList",ref:n,children:a.jsx(kM,{onReset:o})})]})})})})})},TM=()=>{const e=H(pM);H(s1);const t=[{label:"CPU Compute",key:"CPU",icon:"cpu-fill"},{label:"GPU Compute",key:"GPU",icon:"gpu-card"},{label:"Innovative/Novel Compute",key:"Innovative",icon:"lightbulb"},{label:"Cloud",key:"Cloud",icon:"cloud"},{label:"Storage",key:"Storage",icon:"hdd-fill"}];if(e.length==0)return a.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"});const n=o=>o.map(s=>a.jsx(EM,{resource:s},s.resourceId)),r=o=>{const s=e.filter(i=>i.resourceCategory==o.key);return s.length==0?"":a.jsxs(Ee.Fragment,{children:[a.jsxs("h4",{style:{position:"sticky",top:"58px",fontFamily:"Archivo, sans-serif",borderBottom:"1px solid #999",backgroundColor:"rgb(26, 91, 110)",color:"#FFF",zIndex:10,paddingLeft:"10px",paddingBottom:"5px",paddingTop:"5px"},children:[a.jsx("i",{className:`bi bi-${o.icon}`})," ",o.label]}),n(s)]},`category_${o.key}`)};return a.jsx("div",{className:"card shadow",children:a.jsxs("div",{className:"card-body",children:[a.jsx(OM,{}),t.map(o=>r(o))]})})},PM=({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 ${Cn.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"}),"."]})]})})]}),IM=({catalogSources:e=[],onRamps:t=!1,baseUrl:n,onRampsApi:r="https://allocations.access-ci.org/resources.json"})=>{const o=ge(),s=H(fM),i=H(dM),l=H(o1),c=Object.keys(l).map(d=>l[d]);w.useEffect(()=>{o(tM({catalogSources:e,onRamps:t,onRampsApi:r}))},[]);const u=()=>t&&c.length>1?a.jsx(a.Fragment,{children:c.filter(d=>d.catalogLabel!="ACCESS").map((d,f)=>a.jsx("div",{className:"row mb-3",children:a.jsxs("div",{className:"col",children:[a.jsxs("h4",{className:"border-bottom",children:["About ",d.catalogLabel]}),a.jsx("div",{dangerouslySetInnerHTML:{__html:d.description}})]})},`catalog_${f}`))}):"";return i?a.jsx("div",{className:"row",children:a.jsx("div",{className:"col text-center mt-2",children:a.jsx("h4",{children:"Unable to Load Resources"})})}):s?a.jsxs("div",{className:`container mt-3 ${Cn.access}`,children:[t?a.jsx(PM,{baseUrl:n}):"",u(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(TM,{})})})]}):a.jsx(Ur,{})},$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}},xa=He("resourceCatalog/getResources",async(e,{dispatch:t})=>{const r=await(await fetch(e.apiUrl)).json();t(MM({data:r,params:e}))}),AM=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)}))},Dg=(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)},i1=Lr({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(v=>v.categoryIsFilter).forEach(v=>{const y=v.categoryId;v.categoryName=="ACCESS Resource Grouping"?p=v.features[0].name:(!u[y]&&Dg(i,r,v.categoryName)&&(u[y]={categoryId:y,categoryName:v.categoryName,categoryDescription:v.categoryDescription,features:{}}),v.features.forEach(g=>{const h={featureId:g.featureId,name:g.name,description:g.description,categoryId:y,selected:!1},x=Dg(l,o,h.name);x&&f.push(h),u[y]&&x&&!u[y].features[g.featureId]&&(u[y].features[g.featureId]=h)}))});const m={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(v=>v.name).sort((v,y)=>v>y),featureIds:f.map(v=>v.featureId),sortCategory:p};c.push(m)});for(const d in u){const f=u[d],p=[];for(const m in f.features)p.push(f.features[m]);e.filters.push({...f,features:p.sort((m,v)=>m.name>v.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=AM(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(xa.pending,t=>{}).addCase(xa.fulfilled,(t,n)=>{}).addCase(xa.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:MM,processData:mD,resetFilters:DM,toggleFilter:FM}=i1.actions,LM=e=>e.resourceCatalog.hasErrors,UM=e=>e.resourceCatalog.resourcesLoaded,VM=e=>e.resourceCatalog.filters,zM=e=>e.resourceCatalog.filteredResources,BM=i1.reducer,qM=({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(pa.Item,{eventKey:e.resourceId,children:[a.jsx(pa.Header,{children:e.resourceName}),a.jsxs(pa.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)]})]})},HM=()=>{const e=H(zM);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(pa,{children:e.map(t=>a.jsx(qM,{resource:t},t.resourceId))})]})},WM=({filter:e})=>{const t=ge(),n=()=>{t(FM(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})]})})})},KM=({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(WM,{filter:t},t.featureId))]})}),GM=()=>{const e=ge(),t=H(VM),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(KM,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(DM()),disabled:n.length==0,children:"Reset Filters"})]})},YM=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=ge(),l=H(UM),c=H(LM);return w.useEffect(()=>{i(xa({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(GM,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(HM,{})})]})}):a.jsx(Ur,{})};function QM(e,{bootstrapFonts:t=!0,bootstrapVariables:n=!0,baseUrl:r=null}={}){const o=e.attachShadow({mode:"open"}),s=document.createElement("div"),i=document.createElement("div"),l=document.createElement("div"),c=document.createElement("div"),u=document.createElement("link"),d=document.createElement("link"),f=document.createElement("link");return r=r??(typeof document>"u"?require("url").pathToFileURL(__filename).href:Ap&&Ap.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),u.rel="stylesheet",u.href=`${r}/bootstrap.css`,d.rel="stylesheet",d.href=`${r}/xras-ui.css`,f.rel="stylesheet",f.href=`${r}/access.css`,l.appendChild(c),i.appendChild(l),s.appendChild(i),o.appendChild(u),o.appendChild(d),o.appendChild(f),o.appendChild(s),s.classList.add("bootstrap"),n&&i.classList.add("bootstrap-variables"),t&&(l.classList.add("bootstrap-fonts"),l.setAttribute("data-bs-theme","light")),c}function XM({target:e}){bt.createRoot(e).render(a.jsx(mE,{}))}function ZM({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){bt.createRoot(o).render(a.jsx($E,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function JM({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){bt.createRoot(t).render(a.jsx($x,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function eD({target:e,username:t,routes:n}){li(n);const r=zn({reducer:{api:bR}});bt.createRoot(e).render(a.jsx(Bn,{store:r,children:a.jsx(jA,{username:t})}))}function tD({target:e,apiUrl:t}){const n=zn({reducer:{projectsBrowser:UA},preloadedState:{projectsBrowser:{...Yw,apiUrl:t}}});bt.createRoot(e).render(a.jsx(Bn,{store:n,children:a.jsx(qA,{})}))}function nD({target:e,routes:t,authenticityToken:n}){li(t);const r=zn({reducer:{publicationsSearch:oc,publicationEdit:pi},preloadedState:{publicationEdit:{...Mo,authenticityToken:n}}});bt.createRoot(e).render(a.jsx(Bn,{store:r,children:a.jsx(KA,{})}))}function rD({publicationId:e,target:t,routes:n,authenticityToken:r}){const o=zn({reducer:{publicationEdit:pi},preloadedState:{publicationEdit:{...Mo,authenticityToken:r}}});li(n),bt.createRoot(t).render(a.jsx(Bn,{store:o,children:a.jsx(Gw,{publicationId:e})}))}function oD({authenticityToken:e,routes:t,selectedPublicationIds:n,target:r,usernames:o}){const s=zn({reducer:{publicationEdit:pi,publicationsSearch:oc,publicationsSelect:XA},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:o}},publicationEdit:{...Mo,authenticityToken:e},publicationsSelect:{...e1,selected:n}}});li(t),bt.createRoot(r).render(a.jsx(Bn,{store:s,children:a.jsx(JA,{})}))}function sD({target:e,catalogSources:t,onRamps:n,baseUrl:r,onRampsApi:o}){const s=zn({reducer:{resourceCatalog:hM}});bt.createRoot(e).render(a.jsx(Bn,{store:s,children:a.jsx(IM,{catalogSources:t,onRamps:n,baseUrl:r,onRampsApi:o})}))}function iD({authenticityToken:e,routes:t,target:n,username:r}){li(t);const o=zn({reducer:{publicationEdit:pi,publicationsSearch:oc},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:[r]}},publicationEdit:{...Mo,authenticityToken:e}}});bt.createRoot(n).render(a.jsx(Bn,{store:o,children:a.jsx(HA,{})}))}function aD({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=zn({reducer:{resourceCatalog:BM}});bt.createRoot(e).render(a.jsx(Bn,{store:l,children:a.jsx(YM,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function lD({allocationTypes:e,target:t}){bt.createRoot(t).render(a.jsx(Keywords,{allocationTypes:e}))}exports.allocationsMap=XM;exports.editResource=JM;exports.keywords=lD;exports.myPublications=iD;exports.onRampsResourceCatalog=sD;exports.projects=eD;exports.projectsBrowser=tD;exports.publicationEdit=rD;exports.publicationsBrowser=nD;exports.publicationsSelect=oD;exports.resourceCatalog=aD;exports.resources=ZM;exports.shadowTarget=QM;
|