@xras/ui 0.30.1 → 0.30.3
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/bootstrap.css +1 -1
- package/dist/xras-ui.cjs +14 -65
- package/dist/xras-ui.css +1 -1
- package/dist/xras-ui.js +15510 -16174
- package/package.json +2 -2
package/dist/xras-ui.cjs
CHANGED
|
@@ -1,70 +1,19 @@
|
|
|
1
|
-
"use strict";var d1=Object.defineProperty;var f1=(e,t,n)=>t in e?d1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var sc=(e,t,n)=>(f1(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Ap=typeof document<"u"?document.currentScript:null;function p1(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 Ug={exports:{}},ml={},zg={exports:{}},se={};/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ei=Symbol.for("react.element"),h1=Symbol.for("react.portal"),m1=Symbol.for("react.fragment"),g1=Symbol.for("react.strict_mode"),v1=Symbol.for("react.profiler"),y1=Symbol.for("react.provider"),x1=Symbol.for("react.context"),b1=Symbol.for("react.forward_ref"),w1=Symbol.for("react.suspense"),S1=Symbol.for("react.memo"),_1=Symbol.for("react.lazy"),Mp=Symbol.iterator;function C1(e){return e===null||typeof e!="object"?null:(e=Mp&&e[Mp]||e["@@iterator"],typeof e=="function"?e:null)}var Vg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bg=Object.assign,qg={};function Do(e,t,n){this.props=e,this.context=t,this.refs=qg,this.updater=n||Vg}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 Hg(){}Hg.prototype=Do.prototype;function Ad(e,t,n){this.props=e,this.context=t,this.refs=qg,this.updater=n||Vg}var Md=Ad.prototype=new Hg;Md.constructor=Ad;Bg(Md,Do.prototype);Md.isPureReactComponent=!0;var Dp=Array.isArray,Wg=Object.prototype.hasOwnProperty,Dd={current:null},Kg={key:!0,ref:!0,__self:!0,__source:!0};function Gg(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)Wg.call(t,r)&&!Kg.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 j1(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 E1(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?E1(""+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 h1: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=j1(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=C1(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 R1(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},N1={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=m1;se.Profiler=v1;se.PureComponent=Ad;se.StrictMode=g1;se.Suspense=w1;se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N1;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=Bg({},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)Wg.call(t,c)&&!Kg.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:x1,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:y1,_context:e},e.Consumer=e};se.createElement=Gg;se.createFactory=function(e){var t=Gg.bind(null,e);return t.type=e,t};se.createRef=function(){return{current:null}};se.forwardRef=function(e){return{$$typeof:b1,render:e}};se.isValidElement=Fd;se.lazy=function(e){return{$$typeof:_1,_payload:{_status:-1,_result:e},_init:R1}};se.memo=function(e,t){return{$$typeof:S1,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";zg.exports=se;var w=zg.exports;const Ee=Js(w),ba=p1({__proto__:null,default:Ee},[w]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var k1=w,O1=Symbol.for("react.element"),T1=Symbol.for("react.fragment"),P1=Object.prototype.hasOwnProperty,I1=k1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,$1={key:!0,ref:!0,__self:!0,__source:!0};function Yg(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)P1.call(t,r)&&!$1.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:O1,type:e,key:s,ref:i,props:o,_owner:I1.current}}ml.Fragment=T1;ml.jsx=Yg;ml.jsxs=Yg;Ug.exports=ml;var a=Ug.exports,bt={},Qg={exports:{}},Tt={},Xg={exports:{}},Zg={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
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,z(_);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 z(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,z(_))},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,z(_))),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}}}})(Zg);Xg.exports=Zg;var A1=Xg.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Jg=w,Et=A1;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 ev=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++)ev.add(t[e])}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=Object.prototype.hasOwnProperty,M1=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Lp={},Up={};function D1(e){return tu.call(Up,e)?!0:tu.call(Lp,e)?!1:M1.test(e)?Up[e]=!0:(Lp[e]=!0,!1)}function F1(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 L1(e,t,n,r){if(t===null||typeof t>"u"||F1(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 zd(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")&&(L1(t,n,o,r)&&(n=null),r||o===null?D1(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 zn=Jg.__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"),Vd=Symbol.for("react.strict_mode"),nu=Symbol.for("react.profiler"),tv=Symbol.for("react.provider"),nv=Symbol.for("react.context"),Bd=Symbol.for("react.forward_ref"),ru=Symbol.for("react.suspense"),ou=Symbol.for("react.suspense_list"),qd=Symbol.for("react.memo"),Wn=Symbol.for("react.lazy"),rv=Symbol.for("react.offscreen"),zp=Symbol.iterator;function Wo(e){return e===null||typeof e!="object"?null:(e=zp&&e[zp]||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
|
-
`+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
|
-
`),s=r.stack.split(`
|
|
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 U1(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 su(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 nu:return"Profiler";case Vd:return"StrictMode";case ru:return"Suspense";case ou:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case nv:return(e.displayName||"Context")+".Consumer";case tv: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:su(e.type)||"Memo";case Wn:t=e._payload,e=e._init;try{return su(e(t))}catch{}}return null}function z1(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 su(t);case 8:return t===Vd?"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 ov(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function V1(e){var t=ov(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=V1(e))}function sv(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ov(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 iu(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 iv(e,t){t=t.checked,t!=null&&zd(e,"checked",t,!1)}function au(e,t){iv(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")?lu(e,t.type,n):t.hasOwnProperty("defaultValue")&&lu(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 lu(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 cu(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 av(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 lv(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 uu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?lv(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xi,cv=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},B1=["Webkit","ms","Moz","O"];Object.keys(ps).forEach(function(e){B1.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ps[t]=ps[e]})});function uv(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 dv(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=uv(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var q1=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 du(e,t){if(t){if(q1[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 fu(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 pu=null;function Hd(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hu=null,co=null,uo=null;function Wp(e){if(e=ri(e)){if(typeof hu!="function")throw Error(I(280));var t=e.stateNode;t&&(t=bl(t),hu(e.stateNode,e.type,t))}}function fv(e){co?uo?uo.push(e):uo=[e]:co=e}function pv(){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 hv(e,t){return e(t)}function mv(){}var uc=!1;function gv(e,t,n){if(uc)return e(t,n);uc=!0;try{return hv(e,t,n)}finally{uc=!1,(co!==null||uo!==null)&&(mv(),pv())}}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 mu=!1;if(In)try{var Ko={};Object.defineProperty(Ko,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Ko,Ko),window.removeEventListener("test",Ko,Ko)}catch{mu=!1}function H1(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,gu=null,W1={onError:function(e){hs=!0,Sa=e}};function K1(e,t,n,r,o,s,i,l,c){hs=!1,Sa=null,H1.apply(W1,arguments)}function G1(e,t,n,r,o,s,i,l,c){if(K1.apply(this,arguments),hs){if(hs){var u=Sa;hs=!1,Sa=null}else throw Error(I(198));_a||(_a=!0,gu=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 vv(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 Y1(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 yv(e){return e=Y1(e),e!==null?xv(e):null}function xv(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xv(e);if(t!==null)return t;e=e.sibling}return null}var bv=Et.unstable_scheduleCallback,Gp=Et.unstable_cancelCallback,Q1=Et.unstable_shouldYield,X1=Et.unstable_requestPaint,$e=Et.unstable_now,Z1=Et.unstable_getCurrentPriorityLevel,Wd=Et.unstable_ImmediatePriority,wv=Et.unstable_UserBlockingPriority,Ca=Et.unstable_NormalPriority,J1=Et.unstable_LowPriority,Sv=Et.unstable_IdlePriority,gl=null,ln=null;function eS(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:rS,tS=Math.log,nS=Math.LN2;function rS(e){return e>>>=0,e===0?32:31-(tS(e)/nS|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 oS(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 sS(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]=oS(l,t)):c<=t&&(e.expiredLanes|=l),s&=~l}}function vu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _v(){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 iS(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 Cv(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var jv,Gd,Ev,Rv,Nv,yu=!1,Si=[],er=null,tr=null,nr=null,Ns=new Map,ks=new Map,Yn=[],aS="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 lS(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 kv(e){var t=xr(e.target);if(t!==null){var n=Fr(t);if(n!==null){if(t=n.tag,t===13){if(t=vv(n),t!==null){e.blockedOn=t,Nv(e.priority,function(){Ev(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=xu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pu=r,n.target.dispatchEvent(r),pu=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 cS(){yu=!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,yu||(yu=!0,Et.unstable_scheduleCallback(Et.unstable_NormalPriority,cS)))}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);)kv(n),n.blockedOn===null&&Yn.shift()}var fo=zn.ReactCurrentBatchConfig,Ea=!0;function uS(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 dS(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=xu(e,t,n,r);if(o===null)wc(e,t,r,Ra,n),Yp(e,r);else if(lS(o,e,t,n,r))r.stopPropagation();else if(Yp(e,r),t&4&&-1<aS.indexOf(e)){for(;o!==null;){var s=ri(o);if(s!==null&&jv(s),s=xu(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 xu(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=vv(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 Ov(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(Z1()){case Wd:return 1;case wv:return 4;case Ca:case J1:return 16;case Sv:return 536870912;default:return 16}default:return 16}}var Zn=null,Qd=null,Yi=null;function Tv(){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}),fS=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),pS=ke({},vl,{dataTransfer:0}),hS=Pt(pS),mS=ke({},ni,{relatedTarget:0}),hc=Pt(mS),gS=ke({},Fo,{animationName:0,elapsedTime:0,pseudoElement:0}),vS=Pt(gS),yS=ke({},Fo,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xS=Pt(yS),bS=ke({},Fo,{data:0}),Jp=Pt(bS),wS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},SS={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"},_S={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function CS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_S[e])?!!t[e]:!1}function Zd(){return CS}var jS=ke({},ni,{key:function(e){if(e.key){var t=wS[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"?SS[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}}),ES=Pt(jS),RS=ke({},vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eh=Pt(RS),NS=ke({},ni,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zd}),kS=Pt(NS),OS=ke({},Fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),TS=Pt(OS),PS=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}),IS=Pt(PS),$S=[9,13,27,32],Jd=In&&"CompositionEvent"in window,ms=null;In&&"documentMode"in document&&(ms=document.documentMode);var AS=In&&"TextEvent"in window&&!ms,Pv=In&&(!Jd||ms&&8<ms&&11>=ms),th=" ",nh=!1;function Iv(e,t){switch(e){case"keyup":return $S.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $v(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xr=!1;function MS(e,t){switch(e){case"compositionend":return $v(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 DS(e,t){if(Xr)return e==="compositionend"||!Jd&&Iv(e,t)?(e=Tv(),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 Pv&&t.locale!=="ko"?null:t.data;default:return null}}var FS={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"?!!FS[e.type]:t==="textarea"}function Av(e,t,n,r){fv(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 LS(e){Wv(e,0)}function yl(e){var t=eo(e);if(sv(t))return e}function US(e,t){if(e==="change")return t}var Mv=!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;Mv=mc&&(!document.documentMode||9<document.documentMode)}function sh(){gs&&(gs.detachEvent("onpropertychange",Dv),Ts=gs=null)}function Dv(e){if(e.propertyName==="value"&&yl(Ts)){var t=[];Av(t,Ts,e,Hd(e)),gv(LS,t)}}function zS(e,t,n){e==="focusin"?(sh(),gs=t,Ts=n,gs.attachEvent("onpropertychange",Dv)):e==="focusout"&&sh()}function VS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yl(Ts)}function BS(e,t){if(e==="click")return yl(t)}function qS(e,t){if(e==="input"||e==="change")return yl(t)}function HS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:HS;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(!tu.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 Fv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Lv(){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 WS(e){var t=Lv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Fv(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 KS=In&&"documentMode"in document&&11>=document.documentMode,Zr=null,bu=null,vs=null,wu=!1;function lh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wu||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(bu,"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={},Uv={};In&&(Uv=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 Uv)return vc[e]=t[n];return e}var zv=xl("animationend"),Vv=xl("animationiteration"),Bv=xl("animationstart"),qv=xl("transitionend"),Hv=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){Hv.set(e,t),Dr(t,[e])}for(var yc=0;yc<ch.length;yc++){var xc=ch[yc],GS=xc.toLowerCase(),YS=xc[0].toUpperCase()+xc.slice(1);fr(GS,"on"+YS)}fr(zv,"onAnimationEnd");fr(Vv,"onAnimationIteration");fr(Bv,"onAnimationStart");fr("dblclick","onDoubleClick");fr("focusin","onFocus");fr("focusout","onBlur");fr(qv,"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 uh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,G1(r,t,void 0,e),e.currentTarget=null}function Wv(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=gu,_a=!1,gu=null,e}function we(e,t){var n=t[Eu];n===void 0&&(n=t[Eu]=new Set);var r=e+"__bubble";n.has(r)||(Kv(t,e,2,!1),n.add(r))}function bc(e,t,n){var r=0;t&&(r|=4),Kv(n,e,r,t)}var ji="_reactListening"+Math.random().toString(36).slice(2);function Is(e){if(!e[ji]){e[ji]=!0,ev.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[ji]||(t[ji]=!0,bc("selectionchange",!1,t))}}function Kv(e,t,n,r){switch(Ov(t)){case 1:var o=uS;break;case 4:o=dS;break;default:o=Yd}n=o.bind(null,t,n,e),o=void 0,!mu||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}gv(function(){var u=s,d=Hd(n),f=[];e:{var p=Hv.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=ES;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=hS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=kS;break;case zv:case Vv:case Bv:m=vS;break;case qv:m=TS;break;case"scroll":m=fS;break;case"wheel":m=IS;break;case"copy":case"cut":case"paste":m=xS;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!==pu&&(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=Vr(b))x++;for(b=0,S=h;S;S=Vr(S))b++;for(;0<x-b;)y=Vr(y),x--;for(;0<b-x;)h=Vr(h),b--;for(;x--;){if(y===h||h!==null&&y===h.alternate)break t;y=Vr(y),h=Vr(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 _=US;else if(rh(p))if(Mv)_=qS;else{_=VS;var j=zS}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(_=BS);if(_&&(_=_(e,u))){Av(f,_,n,d);break e}j&&j(e,p,u),e==="focusout"&&(j=p._wrapperState)&&j.controlled&&p.type==="number"&&lu(p,"number",p.value)}switch(j=u?eo(u):window,e){case"focusin":(rh(j)||j.contentEditable==="true")&&(Zr=j,bu=u,vs=null);break;case"focusout":vs=bu=Zr=null;break;case"mousedown":wu=!0;break;case"contextmenu":case"mouseup":case"dragend":wu=!1,lh(f,n,d);break;case"selectionchange":if(KS)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?Iv(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(Pv&&n.locale!=="ko"&&(Xr||C!=="onCompositionStart"?C==="onCompositionEnd"&&Xr&&(E=Tv()):(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=$v(n),E!==null&&(C.data=E)))),(E=AS?MS(e,n):DS(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))}Wv(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 Vr(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 XS=/\r\n?/g,ZS=/\u0000|\uFFFD/g;function fh(e){return(typeof e=="string"?e:""+e).replace(XS,`
|
|
38
|
-
`).replace(ZS,"")}function Ei(e,t,n){if(t=fh(t),fh(e)!==t&&n)throw Error(I(425))}function ka(){}var Su=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 ju=typeof setTimeout=="function"?setTimeout:void 0,JS=typeof clearTimeout=="function"?clearTimeout:void 0,ph=typeof Promise=="function"?Promise:void 0,e_=typeof queueMicrotask=="function"?queueMicrotask:typeof ph<"u"?function(e){return ph.resolve(null).then(e).catch(t_)}:ju;function t_(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,Eu="__reactEvents$"+Lo,n_="__reactListeners$"+Lo,r_="__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 Ru=[],to=-1;function pr(e){return{current:e}}function _e(e){0>to||(e.current=Ru[to],Ru[to]=null,to--)}function xe(e,t){to++,Ru[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 Gv(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,z1(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=Gv(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 Yv(e){wn===null?wn=[e]:wn.push(e)}function o_(e){wl=!0,Yv(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)),bv(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 Qv(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),Qv(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 Xv(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 Nu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ku(e){if(je){var t=_t;if(t){var n=t;if(!vh(e,t)){if(Nu(e))throw Error(I(418));t=rr(n.nextSibling);var r=Ct;t&&vh(e,t)?Xv(r,n):(e.flags=e.flags&-4097|2,je=!1,Ct=e)}}else{if(Nu(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"&&!Cu(e.type,e.memoizedProps)),t&&(t=_t)){if(Nu(e))throw Zv(),Error(I(418));for(;t;)Xv(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 Zv(){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 s_=zn.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 Ou(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 Jv(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 ey(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 ty=new Jg.Component().refs;function Tu(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 ny(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 Pu(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=ty,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"&&(Tu(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===ty&&(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 ry(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=ry(!0),oy=ry(!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:uu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=uu(t,e)}_e(cn),xe(cn,t)}function _o(){_e(cn),_e(Ms),_e(Ds)}function sy(e){wr(Ds.current);var t=wr(cn.current),n=uu(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=zn.ReactCurrentDispatcher,jc=zn.ReactCurrentBatchConfig,Or=0,Ne=null,Fe=null,qe=null,Fa=!1,ys=!1,Fs=0,i_=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?u_:d_,e=n(r,o),ys){s=0;do{if(ys=!1,Fs=0,25<=s)throw Error(I(301));s+=1,qe=Fe=null,t.updateQueue=null,Zi.current=f_,e=n(r,o)}while(ys)}if(Zi.current=La,t=Fe!==null&&Fe.next!==null,Or=0,qe=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 qe===null?Ne.memoizedState=qe=e:qe=qe.next=e,qe}function Ut(){if(Fe===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=qe===null?Ne.memoizedState:qe.next;if(t!==null)qe=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},qe===null?Ne.memoizedState=qe=e:qe=qe.next=e}return qe}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 iy(){}function ay(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(uy.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||qe!==null&&qe.memoizedState.tag&1){if(n.flags|=2048,Us(9,cy.bind(null,n,r,o,t),void 0,null),He===null)throw Error(I(349));Or&30||ly(n,t,o)}return o}function ly(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 cy(e,t,n,r){t.value=n,t.getSnapshot=r,dy(t)&&fy(e)}function uy(e,t,n){return n(function(){dy(t)&&fy(e)})}function dy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jt(e,n)}catch{return!0}}function fy(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=c_.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 py(){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 hy(e,t){return _l(4,2,e,t)}function my(e,t){return _l(4,4,e,t)}function gy(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 vy(e,t,n){return n=n!=null?n.concat([e]):null,_l(4,4,gy.bind(null,t,e),n)}function vf(){}function yy(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 xy(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 by(e,t,n){return Or&21?(Jt(n,t)||(n=_v(),Ne.lanes|=n,Tr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,pt=!0),e.memoizedState=n)}function a_(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 wy(){return Ut().memoizedState}function l_(e,t,n){var r=ir(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Sy(e))_y(t,n);else if(n=Jv(e,t,n,r),n!==null){var o=at();Xt(n,e,r,o),Cy(n,t,r)}}function c_(e,t,n){var r=ir(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Sy(e))_y(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=Jv(e,t,o,r),n!==null&&(o=at(),Xt(n,e,r,o),Cy(n,t,r))}}function Sy(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function _y(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 Cy(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},u_={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,gy.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=l_.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=a_.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(),He===null)throw Error(I(349));Or&30||ly(r,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,jh(uy.bind(null,r,s,e),[e]),r.flags|=2048,Us(9,cy.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=nn(),t=He.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=i_++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},d_={readContext:Lt,useCallback:yy,useContext:Lt,useEffect:gf,useImperativeHandle:vy,useInsertionEffect:hy,useLayoutEffect:my,useMemo:xy,useReducer:Ec,useRef:py,useState:function(){return Ec(Ls)},useDebugValue:vf,useDeferredValue:function(e){var t=Ut();return by(t,Fe.memoizedState,e)},useTransition:function(){var e=Ec(Ls)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:iy,useSyncExternalStore:ay,useId:wy,unstable_isNewReconciler:!1},f_={readContext:Lt,useCallback:yy,useContext:Lt,useEffect:gf,useImperativeHandle:vy,useInsertionEffect:hy,useLayoutEffect:my,useMemo:xy,useReducer:Rc,useRef:py,useState:function(){return Rc(Ls)},useDebugValue:vf,useDeferredValue:function(e){var t=Ut();return Fe===null?t.memoizedState=e:by(t,Fe.memoizedState,e)},useTransition:function(){var e=Rc(Ls)[0],t=Ut().memoizedState;return[e,t]},useMutableSource:iy,useSyncExternalStore:ay,useId:wy,unstable_isNewReconciler:!1};function Co(e,t){try{var n="",r=t;do n+=U1(r),r=r.return;while(r);var o=n}catch(s){o=`
|
|
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 Iu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var p_=typeof WeakMap=="function"?WeakMap:Map;function jy(e,t,n){n=kn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){za||(za=!0,Bu=r),Iu(e,t)},n}function Ey(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(){Iu(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Iu(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 p_;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=R_.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 h_=zn.ReactCurrentOwner,pt=!1;function st(e,t,n,r){t.child=e===null?oy(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,Ry(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 Ry(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 $u(e,t,n,r,o)}function Ny(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 ky(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function $u(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),ny(t,n,r),Pu(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"&&(Tu(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,ey(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"&&(Tu(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 Au(e,t,n,r,s,o)}function Au(e,t,n,r,o,s){ky(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return o&&gh(t,n,!1),Mn(e,t,s);r=t.stateNode,h_.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 Oy(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 Mu={dehydrated:null,treeContext:null,retryLane:0};function Du(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ty(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 ku(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=Du(n),t.memoizedState=Mu,e):yf(t,i));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return m_(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?Du(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},s.memoizedState=i,s.childLanes=e.childLanes&~n,t.memoizedState=Mu,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 m_(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=Du(i),t.memoizedState=Mu,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=He,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=N_.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),Ou(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 Py(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 g_(e,t,n){switch(t.tag){case 3:Oy(t),wo();break;case 5:sy(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?Ty(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 Py(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,Ny(e,t,n)}return Mn(e,t,n)}var Iy,Fu,$y,Ay;Iy=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}};Fu=function(){};$y=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=iu(e,o),r=iu(e,r),s=[];break;case"select":o=ke({},o,{value:void 0}),r=ke({},r,{value:void 0}),s=[];break;case"textarea":o=cu(e,o),r=cu(e,r),s=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ka)}du(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)}};Ay=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 v_(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&&(Wu(Gt),Gt=null))),Fu(e,t),et(t),null;case 5:df(t);var o=wr(Ds.current);if(n=t.type,e!==null&&t.stateNode!=null)$y(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(I(166));return 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":Vp(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)}du(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=lv(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,Iy(e,t,!1,!1),t.stateNode=e;e:{switch(i=fu(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=iu(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=cu(e,r),we("invalid",e);break;default:o=r}du(n,o),l=o;for(s in l)if(l.hasOwnProperty(s)){var c=l[s];s==="style"?dv(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&cv(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&&zd(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)Ay(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))Zv(),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&&(Wu(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(),Fu(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 y_(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,x_=typeof WeakSet=="function"?WeakSet:Set,V=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 Lu(e,t,n){try{n()}catch(r){Oe(e,t,r)}}var $h=!1;function b_(e,t){if(Su=Ea,e=Lv(),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,V=t;V!==null;)if(t=V,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,V=e;else for(;V!==null;){t=V;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,V=e;break}V=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&&Lu(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 Uu(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 My(e){var t=e.alternate;t!==null&&(e.alternate=null,My(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[Eu],delete t[n_],delete t[r_])),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 Dy(e){return e.tag===5||e.tag===3||e.tag===4}function Ah(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dy(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 Vu(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(Vu(e,t,n),e=e.sibling;e!==null;)Vu(e,t,n),e=e.sibling}var Ge=null,Kt=!1;function Hn(e,t,n){for(n=n.child;n!==null;)Fy(e,t,n),n=n.sibling}function Fy(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)&&Lu(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 x_),t.forEach(function(r){var o=k_.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));Fy(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;)Ly(t,e),t=t.sibling}function Ly(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&&iv(o,s),fu(l,i);var u=fu(l,s);for(i=0;i<c.length;i+=2){var d=c[i],f=c[i+1];d==="style"?dv(o,f):d==="dangerouslySetInnerHTML"?cv(o,f):d==="children"?Es(o,f):zd(o,d,f,u)}switch(l){case"input":au(o,s);break;case"textarea":av(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(V=e,d=e.child;d!==null;){for(f=V=d;V!==null;){switch(p=V,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,V=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=uv("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(Dy(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);Vu(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 w_(e,t,n){V=e,Uy(e)}function Uy(e,t,n){for(var r=(e.mode&1)!==0;V!==null;){var o=V,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(V=o;V!==null;)i=V,c=i.child,i.tag===22&&i.memoizedState!==null?Lh(o):c!==null?(c.return=i,V=c):Lh(o);for(;s!==null;)V=s,Uy(s),s=s.sibling;V=o,Oi=l,nt=u}Dh(e)}else o.subtreeFlags&8772&&s!==null?(s.return=o,V=s):Dh(e)}}function Dh(e){for(;V!==null;){var t=V;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&&Uu(t)}catch(p){Oe(t,t.return,p)}}if(t===e){V=null;break}if(n=t.sibling,n!==null){n.return=t.return,V=n;break}V=t.return}}function Fh(e){for(;V!==null;){var t=V;if(t===e){V=null;break}var n=t.sibling;if(n!==null){n.return=t.return,V=n;break}V=t.return}}function Lh(e){for(;V!==null;){var t=V;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{Uu(t)}catch(c){Oe(t,s,c)}break;case 5:var i=t.return;try{Uu(t)}catch(c){Oe(t,i,c)}}}catch(c){Oe(t,t.return,c)}if(t===e){V=null;break}var l=t.sibling;if(l!==null){l.return=t.return,V=l;break}V=t.return}}var S_=Math.ceil,Ua=zn.ReactCurrentDispatcher,xf=zn.ReactCurrentOwner,Ft=zn.ReactCurrentBatchConfig,le=0,He=null,Me=null,Qe=0,St=0,io=pr(0),Le=0,zs=null,Tr=0,jl=0,bf=0,bs=null,ft=null,wf=0,jo=1/0,bn=null,za=!1,Bu=null,sr=null,Ti=!1,Jn=null,Va=0,ws=0,qu=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:s_.transition!==null?(na===0&&(na=_v()),na):(e=ve,e!==0||(e=window.event,e=e===void 0?16:Ov(e.type)),e):1}function Xt(e,t,n,r){if(50<ws)throw ws=0,qu=null,Error(I(185));ti(e,n,r),(!(le&2)||e!==He)&&(e===He&&(!(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;sS(e,t);var r=ja(e,e===He?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?o_(Uh.bind(null,e)):Yv(Uh.bind(null,e)),e_(function(){!(le&6)&&hr()}),n=null;else{switch(Cv(r)){case 1:n=Wd;break;case 4:n=wv;break;case 16:n=Ca;break;case 536870912:n=Sv;break;default:n=Ca}n=Gy(n,zy.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function zy(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===He?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=By();(He!==e||Qe!==t)&&(bn=null,jo=$e()+500,_r(e,t));do try{j_();break}catch(l){Vy(e,l)}while(!0);sf(),Ua.current=s,le=o,Me!==null?t=0:(He=null,Qe=0,t=Le)}if(t!==0){if(t===2&&(o=vu(e),o!==0&&(r=o,t=Hu(e,o))),t===1)throw n=zs,_r(e,0),Qn(e,r),gt(e,$e()),n;if(t===6)Qn(e,r);else{if(o=e.current.alternate,!(r&30)&&!__(o)&&(t=Ba(e,r),t===2&&(s=vu(e),s!==0&&(r=s,t=Hu(e,s))),t===1))throw n=zs,_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=ju(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*S_(r/1960))-r,10<r){e.timeoutHandle=ju(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?zy.bind(null,e):null}function Hu(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&&Wu(t)),e}function Wu(e){ft===null?ft=e:ft.push.apply(ft,e)}function __(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=vu(e);r!==0&&(t=r,n=Hu(e,r))}if(n===1)throw n=zs,_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,JS(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(He=e,Me=e=ar(e.current,null),Qe=St=t,Le=0,zs=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 Vy(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,qe=Fe=Ne=null,ys=!1,Fs=0,xf.current=null,n===null||n.return===null){Le=1,zs=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=jy(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=Ey(s,l,t);xh(s,S);break e}}s=s.return}while(s!==null)}Hy(n)}catch(_){t=_,Me===n&&n!==null&&(Me=n=n.return);continue}break}while(!0)}function By(){var e=Ua.current;return Ua.current=La,e===null?La:e}function Cf(){(Le===0||Le===3||Le===2)&&(Le=4),He===null||!(Tr&268435455)&&!(jl&268435455)||Qn(He,Qe)}function Ba(e,t){var n=le;le|=2;var r=By();(He!==e||Qe!==t)&&(bn=null,_r(e,t));do try{C_();break}catch(o){Vy(e,o)}while(!0);if(sf(),le=n,Ua.current=r,Me!==null)throw Error(I(261));return He=null,Qe=0,Le}function C_(){for(;Me!==null;)qy(Me)}function j_(){for(;Me!==null&&!Q1();)qy(Me)}function qy(e){var t=Ky(e.alternate,e,St);e.memoizedProps=e.pendingProps,t===null?Hy(e):Me=t,xf.current=null}function Hy(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=y_(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=v_(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,E_(e,t,n,r)}finally{Ft.transition=o,ve=r}return null}function E_(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(iS(e,s),e===He&&(Me=He=null,Qe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ti||(Ti=!0,Gy(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,b_(e,n),Ly(n,e),WS(_u),Ea=!!Su,_u=Su=null,e.current=n,w_(n),X1(),le=l,ve=i,Ft.transition=s}else e.current=n;if(Ti&&(Ti=!1,Jn=e,Va=o),s=e.pendingLanes,s===0&&(sr=null),eS(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(za)throw za=!1,e=Bu,Bu=null,e;return Va&1&&e.tag!==0&&ho(),s=e.pendingLanes,s&1?e===qu?ws++:(ws=0,qu=e):ws=0,hr(),null}function ho(){if(Jn!==null){var e=Cv(Va),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,Va=0,le&6)throw Error(I(331));var o=le;for(le|=4,V=e.current;V!==null;){var s=V,i=s.child;if(V.flags&16){var l=s.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(V=u;V!==null;){var d=V;switch(d.tag){case 0:case 11:case 15:xs(8,d,s)}var f=d.child;if(f!==null)f.return=d,V=f;else for(;V!==null;){d=V;var p=d.sibling,m=d.return;if(My(d),d===u){V=null;break}if(p!==null){p.return=m,V=p;break}V=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)}}V=s}}if(s.subtreeFlags&2064&&i!==null)i.return=s,V=i;else e:for(;V!==null;){if(s=V,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,V=h;break e}V=s.return}}var x=e.current;for(V=x;V!==null;){i=V;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,V=b;else e:for(i=x;V!==null;){if(l=V,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Cl(9,l)}}catch(_){Oe(l,l.return,_)}if(l===i){V=null;break e}var S=l.sibling;if(S!==null){S.return=l.return,V=S;break e}V=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 zh(e,t,n){t=Co(n,t),t=jy(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)zh(e,e,n);else for(;t!==null;){if(t.tag===3){zh(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=Ey(t,e,1),t=or(t,e,1),e=at(),t!==null&&(ti(t,1,e),gt(t,e));break}}t=t.return}}function R_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=at(),e.pingedLanes|=e.suspendedLanes&n,He===e&&(Qe&n)===n&&(Le===4||Le===3&&(Qe&130023424)===Qe&&500>$e()-wf?_r(e,0):bf|=n),gt(e,t)}function Wy(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 N_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Wy(e,n)}function k_(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),Wy(e,n)}var Ky;Ky=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,g_(e,t,n);pt=!!(e.flags&131072)}else pt=!1,je&&t.flags&1048576&&Qv(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,Pu(t,r,e,n),t=Au(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=T_(r),e=Wt(r,e),o){case 0:t=$u(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),$u(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(Oy(t),e===null)throw Error(I(387));r=t.pendingProps,s=t.memoizedState,o=s.element,ey(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=oy(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 sy(t),e===null&&ku(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),ky(e,t),st(e,t,i,n),t.child;case 6:return e===null&&ku(t),null;case 13:return Ty(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),Ou(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),Ou(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 Ry(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),ny(t,r,o),Pu(t,r,o,n),Au(null,t,r,!0,e,n);case 19:return Py(e,t,n);case 22:return Ny(e,t,n)}throw Error(I(156,t.tag))};function Gy(e,t){return bv(e,t)}function O_(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 O_(e,t,n,r)}function jf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function T_(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 Vd:i=8,o|=8;break;case nu:return e=Dt(12,n,t,o|2),e.elementType=nu,e.lanes=s,e;case ru:return e=Dt(13,n,t,o),e.elementType=ru,e.lanes=s,e;case ou:return e=Dt(19,n,t,o),e.elementType=ou,e.lanes=s,e;case rv:return El(n,o,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tv:i=10;break e;case nv: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=rv,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 P_(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 P_(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 I_(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 Yy(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 Gv(e,n,t)}return t}function Qy(e,t,n,r,o,s,i,l,c){return e=Ef(n,r,!0,e,o,s,i,l,c),e.context=Yy(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=Yy(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 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 $_(){return null}var Xy=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=Rv();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&&kv(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 A_(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=Qy(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=A_(n,t,e,o,r);return qa(i)}jv=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)}};Ev=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)}};Rv=function(){return ve};Nv=function(e,t){var n=ve;try{return ve=e,t()}finally{ve=n}};hu=function(e,t,n){switch(t){case"input":if(au(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));sv(r),au(r,o)}}}break;case"textarea":av(e,n);break;case"select":t=n.value,t!=null&&lo(e,!!n.multiple,t,!1)}};hv=Sf;mv=Pr;var M_={usingClientEntryPoint:!1,Events:[ri,eo,bl,fv,pv,Sf]},Jo={findFiberByHostInstance:xr,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},D_={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:zn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=yv(e),e===null?null:e.stateNode},findFiberByHostInstance:Jo.findFiberByHostInstance||$_,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(D_),ln=Pi}catch{}}Tt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M_;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 I_(e,t,null,n)};Tt.createRoot=function(e,t){if(!kf(e))throw Error(I(299));var n=!1,r="",o=Xy;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=yv(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=Xy;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(i=n.onRecoverableError)),t=Qy(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 Zy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Zy)}catch(e){console.error(e)}}Zy(),Qg.exports=Tt;var Of=Qg.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 F_=typeof Symbol=="function"&&Symbol.observable||"@@observable",Hh=F_,Pc=()=>Math.random().toString(36).substring(7).split("").join("."),L_={INIT:`@@redux/INIT${Pc()}`,REPLACE:`@@redux/REPLACE${Pc()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Pc()}`},Ha=L_;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 Jy(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(Jy)(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 U_(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 z_(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{U_(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 V_(...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 B_(e){return Tf(e)&&"type"in e&&typeof e.type=="string"}var ex=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?tx(e)||Array.isArray(e)||!!e[Wh]||!!((t=e.constructor)!=null&&t[Wh])||Pl(e)||Il(e):!1}var q_=Object.prototype.constructor.toString();function tx(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)===q_}function Vs(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 Ku(e,t){return Tl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function nx(e,t,n){const r=Tl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function H_(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 Gu(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&&tx(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=W_),Object.freeze(e),t&&Vs(e,(n,r)=>Pf(r,!0))),e}function W_(){Yt(2)}function $l(e){return Object.isFrozen(e)}var K_={};function Ir(e){const t=K_[e];return t||Yt(0,e),t}var Bs;function rx(){return Bs}function G_(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 Yu(e){Qu(e),e.drafts_.forEach(Y_),e.drafts_=null}function Qu(e){e===Bs&&(Bs=e.parent_)}function Gh(e){return Bs=G_(Bs,e)}function Y_(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_&&(Yu(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,[]),Yu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ex?e:void 0}function Ka(e,t,n){if($l(t))return t;const r=t[Rt];if(!r)return Vs(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),Vs(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&&!Ku(t.assigned_,r)?s.concat(r):void 0,c=Ka(e,o,l);if(nx(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 Q_(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:rx(),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(!Ku(n,t))return X_(e,n,t);const r=n[t];return e.finalized_||!Dn(r)?r:r===Ic(e.base_,t)?($c(e),e.copy_[t]=Zu(r,e)):r},has(e,t){return t in yr(e)},ownKeys(e){return Reflect.ownKeys(yr(e))},set(e,t,n){const r=ox(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(H_(n,o)&&(n!==void 0||Ku(e.base_,t)))return!0;$c(e),Xu(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),Xu(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={};Vs(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 X_(e,t,n){var o;const r=ox(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ox(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 Xu(e){e.modified_||(e.modified_=!0,e.parent_&&Xu(e.parent_))}function $c(e){e.copy_||(e.copy_=Gu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Z_=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=Zu(t,void 0);let l=!0;try{o=n(i),l=!1}finally{l?Yu(s):Qu(s)}return Kh(s,r),Yh(o,s)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===ex&&(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=sx(e));const t=Gh(this),n=Zu(e,void 0);return n[Rt].isManual_=!0,Qu(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 Zu(e,t){const n=Pl(e)?Ir("MapSet").proxyMap_(e,t):Il(e)?Ir("MapSet").proxySet_(e,t):Q_(e,t);return(t?t.scope_:rx()).drafts_.push(n),n}function sx(e){return ur(e)||Yt(10,e),ix(e)}function ix(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=Gu(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Gu(e,!0);return Vs(n,(r,o)=>{nx(n,r,ix(o))}),t&&(t.finalized_=!1),n}var Nt=new Z_,ax=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 J_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function eC(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function tC(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 nC(e){const t=Array.isArray(e[0])?e[0]:e;return tC(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function rC(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var oC=class{constructor(e){this.value=e}deref(){return this.value}},sC=typeof WeakRef<"u"?WeakRef:oC,iC=0,Zh=1;function Ii(){return{s:iC,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 sC(d):d}return u.v=d,d}return i.clearCache=()=>{n=Ii(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function lx(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()),J_(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=nC(o),b=f(function(){return s++,u.apply(null,arguments)},...g),S=m(function(){i++;const j=rC(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=lx($f),aC=Object.assign((e,t=si)=>{eC(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:()=>aC});function cx(e){return({dispatch:n,getState:r})=>o=>s=>typeof s=="function"?s(n,r,e):o(s)}var lC=cx(),cC=cx,uC=(...e)=>{const t=lx(...e),n=Object.assign((...r)=>{const o=t(...r),s=(i,...l)=>o(ur(i)?sx(i):i,...l);return Object.assign(s,o),s},{withTypes:()=>n});return n};uC($f);var dC=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)},fC=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=>B_(r)&&r.type===e,n}var ux=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)?ax(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 pC(e){return typeof e=="boolean"}var hC=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:o=!0,actionCreatorCheck:s=!0}=t??{};let i=new ux;return n&&(pC(n)?i.push(lC):i.push(cC(n.extraArgument))),i},mC="RTK_autoBatch",dx=e=>t=>{setTimeout(t,e)},gC=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:dx(10),vC=(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"?gC:e.type==="callback"?e.queueNotification:dx(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[mC]),s=!o,s&&(i||(i=!0,c(u))),r.dispatch(d)}finally{o=!0}}})},yC=e=>function(n){const{autoBatch:r=!0}=n??{};let o=new ux(e);return r&&o.push(vC(typeof r=="object"?r:void 0)),o},xC=!0;function Vn(e){const t=hC(),{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=z_(n);else throw new Error(vt(1));let c;typeof r=="function"?c=r(t):c=t();let u=Wa;o&&(u=dC({trace:!xC,...typeof o=="object"&&o}));const d=V_(...c),f=yC(d);let p=typeof i=="function"?i(f):f();const m=u(...p);return Jy(l,s,m)}function fx(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 bC(e){return typeof e=="function"}function wC(e,t){let[n,r,o]=fx(t),s;if(bC(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 ax(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 SC="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",px=(e=21)=>{let t="",n=e;for(;n--;)t+=SC[Math.random()*64|0];return t},_C=(e,t)=>fC(e)?e.match(t):e(t);function CC(...e){return t=>e.some(n=>_C(n,t))}var jC=["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}},EC=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of jC)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},Ue=(()=>{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||EC)(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):px(),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(NC(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(RC)}})}}return Object.assign(l,{pending:s,rejected:i,fulfilled:o,settled:CC(i,o),typePrefix:t})}return e.withTypes=()=>e,e})();function RC(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function NC(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var kC=Symbol.for("rtk-slice-createasyncthunk");function OC(e,t){return`${e}/${t}`}function TC({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[kC];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(IC()):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:OC(s,b),createNotation:typeof o.reducers=="function"};AC(S)?DC(_,S,d,t):$C(_,S,d)});function f(){const[b={},S=[],_=void 0]=typeof o.extraReducers=="function"?fx(o.extraReducers):[o.extraReducers],j={...b,...u.sliceCaseReducersByType};return wC(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]=PC(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 PC(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=TC();function IC(){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 $C({type:e,reducerName:t,createNotation:n},r,o){let s,i;if("reducer"in r){if(n&&!MC(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 AC(e){return e._reducerDefinitionType==="asyncThunk"}function MC(e){return e._reducerDefinitionType==="reducerWithPrepare"}function DC({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 FC=(e,t)=>{if(typeof e!="function")throw new Error(vt(32))},Af="listenerMiddleware",LC=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 FC(s),{predicate:o,type:t,effect:s}},UC=Object.assign(e=>{const{type:t,predicate:n,effect:r}=LC(e);return{id:px(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(vt(22))}}},{withTypes:()=>UC}),zC=Object.assign(On(`${Af}/add`),{withTypes:()=>zC});On(`${Af}/removeAll`);var VC=Object.assign(On(`${Af}/remove`),{withTypes:()=>VC});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 hx={exports:{}},mx={};/**
|
|
41
|
-
* @license React
|
|
42
|
-
* use-sync-external-store-with-selector.production.min.js
|
|
43
|
-
*
|
|
44
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
45
|
-
*
|
|
46
|
-
* This source code is licensed under the MIT license found in the
|
|
47
|
-
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var ii=w;function BC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var qC=typeof Object.is=="function"?Object.is:BC,HC=ii.useSyncExternalStore,WC=ii.useRef,KC=ii.useEffect,GC=ii.useMemo,YC=ii.useDebugValue;mx.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var s=WC(null);if(s.current===null){var i={hasValue:!1,value:null};s.current=i}else i=s.current;s=GC(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,qC(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=HC(e,s[0],s[1]);return KC(function(){i.hasValue=!0,i.value=l},[l]),YC(l),l};hx.exports=mx;var QC=hx.exports,ie="default"in ba?Ee:ba,nm=Symbol.for("react-redux-context"),rm=typeof globalThis<"u"?globalThis:{};function XC(){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=XC(),gx=()=>{throw new Error("uSES not initialized!")};function Mf(e=Fn){return function(){return ie.useContext(e)}}var vx=Mf(),yx=gx,ZC=e=>{yx=e},JC=(e,t)=>e===t;function ej(e=Fn){const t=e===Fn?vx:Mf(e),n=(r,o={})=>{const{equalityFn:s=JC,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=yx(c.addNestedSub,l.getState,u||l.getState,p,s);return ie.useDebugValue(m),m};return Object.assign(n,{withTypes:()=>n}),n}var H=ej(),tj=Symbol.for("react.element"),nj=Symbol.for("react.portal"),rj=Symbol.for("react.fragment"),oj=Symbol.for("react.strict_mode"),sj=Symbol.for("react.profiler"),ij=Symbol.for("react.provider"),aj=Symbol.for("react.context"),lj=Symbol.for("react.server_context"),xx=Symbol.for("react.forward_ref"),cj=Symbol.for("react.suspense"),uj=Symbol.for("react.suspense_list"),Df=Symbol.for("react.memo"),dj=Symbol.for("react.lazy"),fj=xx,pj=Df;function hj(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case tj:{const n=e.type;switch(n){case rj:case sj:case oj:case cj:case uj:return n;default:{const r=n&&n.$$typeof;switch(r){case lj:case aj:case xx:case dj:case Df:case ij:return r;default:return t}}}}case nj:return t}}}function mj(e){return hj(e)===Df}function gj(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 vj(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...o}){const s=t(e,o),i=n(e,o),l=r(e,o);return gj(s,i,l,e,o)}function yj(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 Ju(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 bx(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 xj(e){return e&&typeof e=="object"?Ju(t=>yj(e,t)):e?typeof e=="function"?bx(e):Ff(e,"mapDispatchToProps"):Ju(t=>({dispatch:t}))}function bj(e){return e?typeof e=="function"?bx(e):Ff(e,"mapStateToProps"):Ju(()=>({}))}function wj(e,t,n){return{...n,...e,...t}}function Sj(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 _j(e){return e?typeof e=="function"?Sj(e):Ff(e,"mergeProps"):()=>wj}function Cj(e){e()}function jj(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Cj(()=>{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 wx(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=jj())}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 Ej=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ya=Ej?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 Rj={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Nj={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},kj={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Sx={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Oj={[fj]:kj,[pj]:Sx};function am(e){return mj(e)?Sx:Oj[e.$$typeof]||Rj}var Tj=Object.defineProperty,Pj=Object.getOwnPropertyNames,lm=Object.getOwnPropertySymbols,Ij=Object.getOwnPropertyDescriptor,$j=Object.getPrototypeOf,cm=Object.prototype;function ed(e,t){if(typeof t!="string"){if(cm){const s=$j(t);s&&s!==cm&&ed(e,s)}let n=Pj(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(!Nj[i]&&!(o&&o[i])&&!(r&&r[i])){const l=Ij(t,i);try{Tj(e,i,l)}catch{}}}}return e}var _x=gx,Aj=e=>{_x=e},Mj=[null,null];function Dj(e,t,n){Ya(()=>e(...t),n)}function Fj(e,t,n,r,o,s){e.current=r,n.current=!1,o.current&&(o.current=null,s())}function Lj(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 Uj(e,t){return e===t}function zj(e,t,n,{pure:r,areStatesEqual:o=Uj,areOwnPropsEqual:s=Mc,areStatePropsEqual:i=Mc,areMergedPropsEqual:l=Mc,forwardRef:c=!1,context:u=Fn}={}){const d=u,f=bj(e),p=xj(t),m=_j(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:ge,...Ie}=E;return[E.context,ge,Ie]},[E]),O=ie.useMemo(()=>{let ge=d;return C!=null&&C.Consumer,ge},[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,z=U?k.getServerState:F.getState,Z=ie.useMemo(()=>vj(F.dispatch,b),[F]),[T,L]=ie.useMemo(()=>{if(!v)return Mj;const ge=wx(F,P?void 0:k.subscription),Ie=ge.notifyNestedSubs.bind(ge);return[ge,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?Lj(v,F,T,Z,B,W,J,ee,X,L,Ie):()=>{},[T]);Dj(Fj,[B,W,J,R,X,L]);let Ce;try{Ce=_x(ue,te,z?()=>Z(z(),R):te)}catch(ge){throw Q.current&&(ge.message+=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Fu=typeof document<"u"?document.currentScript:null;function QS(e,t){for(var r=0;r<t.length;r++){const i=t[r];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const l=Object.getOwnPropertyDescriptor(i,o);l&&Object.defineProperty(e,o,l.get?l:{enumerable:!0,get:()=>i[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 Lu={exports:{}},Bo={},Uu={exports:{}},ke={};var ug;function XS(){if(ug)return ke;ug=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function x(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function b(I,B,Y){this.props=I,this.context=B,this.refs=S,this.updater=Y||w}b.prototype.isReactComponent={},b.prototype.setState=function(I,B){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,B,"setState")},b.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function C(){}C.prototype=b.prototype;function R(I,B,Y){this.props=I,this.context=B,this.refs=S,this.updater=Y||w}var N=R.prototype=new C;N.constructor=R,_(N,b.prototype),N.isPureReactComponent=!0;var P=Array.isArray,k=Object.prototype.hasOwnProperty,O={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function D(I,B,Y){var ie,ae={},ue=null,le=null;if(B!=null)for(ie in B.ref!==void 0&&(le=B.ref),B.key!==void 0&&(ue=""+B.key),B)k.call(B,ie)&&!T.hasOwnProperty(ie)&&(ae[ie]=B[ie]);var de=arguments.length-2;if(de===1)ae.children=Y;else if(1<de){for(var me=Array(de),Ne=0;Ne<de;Ne++)me[Ne]=arguments[Ne+2];ae.children=me}if(I&&I.defaultProps)for(ie in de=I.defaultProps,de)ae[ie]===void 0&&(ae[ie]=de[ie]);return{$$typeof:e,type:I,key:ue,ref:le,props:ae,_owner:O.current}}function K(I,B){return{$$typeof:e,type:I.type,key:B,ref:I.ref,props:I.props,_owner:I._owner}}function U(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function W(I){var B={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(Y){return B[Y]})}var H=/\/+/g;function X(I,B){return typeof I=="object"&&I!==null&&I.key!=null?W(""+I.key):B.toString(36)}function oe(I,B,Y,ie,ae){var ue=typeof I;(ue==="undefined"||ue==="boolean")&&(I=null);var le=!1;if(I===null)le=!0;else switch(ue){case"string":case"number":le=!0;break;case"object":switch(I.$$typeof){case e:case t:le=!0}}if(le)return le=I,ae=ae(le),I=ie===""?"."+X(le,0):ie,P(ae)?(Y="",I!=null&&(Y=I.replace(H,"$&/")+"/"),oe(ae,B,Y,"",function(Ne){return Ne})):ae!=null&&(U(ae)&&(ae=K(ae,Y+(!ae.key||le&&le.key===ae.key?"":(""+ae.key).replace(H,"$&/")+"/")+I)),B.push(ae)),1;if(le=0,ie=ie===""?".":ie+":",P(I))for(var de=0;de<I.length;de++){ue=I[de];var me=ie+X(ue,de);le+=oe(ue,B,Y,me,ae)}else if(me=x(I),typeof me=="function")for(I=me.call(I),de=0;!(ue=I.next()).done;)ue=ue.value,me=ie+X(ue,de++),le+=oe(ue,B,Y,me,ae);else if(ue==="object")throw B=String(I),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return le}function re(I,B,Y){if(I==null)return I;var ie=[],ae=0;return oe(I,ie,"","",function(ue){return B.call(Y,ue,ae++)}),ie}function se(I){if(I._status===-1){var B=I._result;B=B(),B.then(function(Y){(I._status===0||I._status===-1)&&(I._status=1,I._result=Y)},function(Y){(I._status===0||I._status===-1)&&(I._status=2,I._result=Y)}),I._status===-1&&(I._status=0,I._result=B)}if(I._status===1)return I._result.default;throw I._result}var pe={current:null},q={transition:null},ne={ReactCurrentDispatcher:pe,ReactCurrentBatchConfig:q,ReactCurrentOwner:O};return ke.Children={map:re,forEach:function(I,B,Y){re(I,function(){B.apply(this,arguments)},Y)},count:function(I){var B=0;return re(I,function(){B++}),B},toArray:function(I){return re(I,function(B){return B})||[]},only:function(I){if(!U(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},ke.Component=b,ke.Fragment=r,ke.Profiler=o,ke.PureComponent=R,ke.StrictMode=i,ke.Suspense=f,ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,ke.cloneElement=function(I,B,Y){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var ie=_({},I.props),ae=I.key,ue=I.ref,le=I._owner;if(B!=null){if(B.ref!==void 0&&(ue=B.ref,le=O.current),B.key!==void 0&&(ae=""+B.key),I.type&&I.type.defaultProps)var de=I.type.defaultProps;for(me in B)k.call(B,me)&&!T.hasOwnProperty(me)&&(ie[me]=B[me]===void 0&&de!==void 0?de[me]:B[me])}var me=arguments.length-2;if(me===1)ie.children=Y;else if(1<me){de=Array(me);for(var Ne=0;Ne<me;Ne++)de[Ne]=arguments[Ne+2];ie.children=de}return{$$typeof:e,type:I.type,key:ae,ref:ue,props:ie,_owner:le}},ke.createContext=function(I){return I={$$typeof:d,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:l,_context:I},I.Consumer=I},ke.createElement=D,ke.createFactory=function(I){var B=D.bind(null,I);return B.type=I,B},ke.createRef=function(){return{current:null}},ke.forwardRef=function(I){return{$$typeof:p,render:I}},ke.isValidElement=U,ke.lazy=function(I){return{$$typeof:g,_payload:{_status:-1,_result:I},_init:se}},ke.memo=function(I,B){return{$$typeof:h,type:I,compare:B===void 0?null:B}},ke.startTransition=function(I){var B=q.transition;q.transition={};try{I()}finally{q.transition=B}},ke.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},ke.useCallback=function(I,B){return pe.current.useCallback(I,B)},ke.useContext=function(I){return pe.current.useContext(I)},ke.useDebugValue=function(){},ke.useDeferredValue=function(I){return pe.current.useDeferredValue(I)},ke.useEffect=function(I,B){return pe.current.useEffect(I,B)},ke.useId=function(){return pe.current.useId()},ke.useImperativeHandle=function(I,B,Y){return pe.current.useImperativeHandle(I,B,Y)},ke.useInsertionEffect=function(I,B){return pe.current.useInsertionEffect(I,B)},ke.useLayoutEffect=function(I,B){return pe.current.useLayoutEffect(I,B)},ke.useMemo=function(I,B){return pe.current.useMemo(I,B)},ke.useReducer=function(I,B,Y){return pe.current.useReducer(I,B,Y)},ke.useRef=function(I){return pe.current.useRef(I)},ke.useState=function(I){return pe.current.useState(I)},ke.useSyncExternalStore=function(I,B,Y){return pe.current.useSyncExternalStore(I,B,Y)},ke.useTransition=function(){return pe.current.useTransition()},ke.version="18.2.0",ke}var dg;function Ol(){return dg||(dg=1,Uu.exports=XS()),Uu.exports}var fg;function JS(){if(fg)return Bo;fg=1;var e=Ol(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function d(p,f,h){var g,y={},x=null,w=null;h!==void 0&&(x=""+h),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(w=f.ref);for(g in f)i.call(f,g)&&!l.hasOwnProperty(g)&&(y[g]=f[g]);if(p&&p.defaultProps)for(g in f=p.defaultProps,f)y[g]===void 0&&(y[g]=f[g]);return{$$typeof:t,type:p,key:x,ref:w,props:y,_owner:o.current}}return Bo.Fragment=r,Bo.jsx=d,Bo.jsxs=d,Bo}var pg;function ZS(){return pg||(pg=1,Lu.exports=JS()),Lu.exports}var c=ZS(),ka={},zu={exports:{}},Ut={},Vu={exports:{}},Bu={};var hg;function e_(){return hg||(hg=1,(function(e){function t(q,ne){var I=q.length;q.push(ne);e:for(;0<I;){var B=I-1>>>1,Y=q[B];if(0<o(Y,ne))q[B]=ne,q[I]=Y,I=B;else break e}}function r(q){return q.length===0?null:q[0]}function i(q){if(q.length===0)return null;var ne=q[0],I=q.pop();if(I!==ne){q[0]=I;e:for(var B=0,Y=q.length,ie=Y>>>1;B<ie;){var ae=2*(B+1)-1,ue=q[ae],le=ae+1,de=q[le];if(0>o(ue,I))le<Y&&0>o(de,ue)?(q[B]=de,q[le]=I,B=le):(q[B]=ue,q[ae]=I,B=ae);else if(le<Y&&0>o(de,I))q[B]=de,q[le]=I,B=le;else break e}}return ne}function o(q,ne){var I=q.sortIndex-ne.sortIndex;return I!==0?I:q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var d=Date,p=d.now();e.unstable_now=function(){return d.now()-p}}var f=[],h=[],g=1,y=null,x=3,w=!1,_=!1,S=!1,b=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(q){for(var ne=r(h);ne!==null;){if(ne.callback===null)i(h);else if(ne.startTime<=q)i(h),ne.sortIndex=ne.expirationTime,t(f,ne);else break;ne=r(h)}}function P(q){if(S=!1,N(q),!_)if(r(f)!==null)_=!0,se(k);else{var ne=r(h);ne!==null&&pe(P,ne.startTime-q)}}function k(q,ne){_=!1,S&&(S=!1,C(D),D=-1),w=!0;var I=x;try{for(N(ne),y=r(f);y!==null&&(!(y.expirationTime>ne)||q&&!W());){var B=y.callback;if(typeof B=="function"){y.callback=null,x=y.priorityLevel;var Y=B(y.expirationTime<=ne);ne=e.unstable_now(),typeof Y=="function"?y.callback=Y:y===r(f)&&i(f),N(ne)}else i(f);y=r(f)}if(y!==null)var ie=!0;else{var ae=r(h);ae!==null&&pe(P,ae.startTime-ne),ie=!1}return ie}finally{y=null,x=I,w=!1}}var O=!1,T=null,D=-1,K=5,U=-1;function W(){return!(e.unstable_now()-U<K)}function H(){if(T!==null){var q=e.unstable_now();U=q;var ne=!0;try{ne=T(!0,q)}finally{ne?X():(O=!1,T=null)}}else O=!1}var X;if(typeof R=="function")X=function(){R(H)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,re=oe.port2;oe.port1.onmessage=H,X=function(){re.postMessage(null)}}else X=function(){b(H,0)};function se(q){T=q,O||(O=!0,X())}function pe(q,ne){D=b(function(){q(e.unstable_now())},ne)}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(q){q.callback=null},e.unstable_continueExecution=function(){_||w||(_=!0,se(k))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(q){switch(x){case 1:case 2:case 3:var ne=3;break;default:ne=x}var I=x;x=ne;try{return q()}finally{x=I}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,ne){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var I=x;x=q;try{return ne()}finally{x=I}},e.unstable_scheduleCallback=function(q,ne,I){var B=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?B+I:B):I=B,q){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=I+Y,q={id:g++,callback:ne,priorityLevel:q,startTime:I,expirationTime:Y,sortIndex:-1},I>B?(q.sortIndex=I,t(h,q),r(f)===null&&q===r(h)&&(S?(C(D),D=-1):S=!0,pe(P,I-B))):(q.sortIndex=Y,t(f,q),_||w||(_=!0,se(k))),q},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(q){var ne=x;return function(){var I=x;x=ne;try{return q.apply(this,arguments)}finally{x=I}}}})(Bu)),Bu}var mg;function t_(){return mg||(mg=1,Vu.exports=e_()),Vu.exports}var gg;function n_(){if(gg)return Ut;gg=1;var e=Ol(),t=t_();function r(n){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+n,a=1;a<arguments.length;a++)s+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+n+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,o={};function l(n,s){d(n,s),d(n+"Capture",s)}function d(n,s){for(o[n]=s,n=0;n<s.length;n++)i.add(s[n])}var p=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[: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]*$/,g={},y={};function x(n){return f.call(y,n)?!0:f.call(g,n)?!1:h.test(n)?y[n]=!0:(g[n]=!0,!1)}function w(n,s,a,u){if(a!==null&&a.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return u?!1:a!==null?!a.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function _(n,s,a,u){if(s===null||typeof s>"u"||w(n,s,a,u))return!0;if(u)return!1;if(a!==null)switch(a.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(n,s,a,u,m,v,E){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=u,this.attributeNamespace=m,this.mustUseProperty=a,this.propertyName=n,this.type=s,this.sanitizeURL=v,this.removeEmptyString=E}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){b[n]=new S(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var s=n[0];b[s]=new S(s,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){b[n]=new S(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){b[n]=new S(n,2,!1,n,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(n){b[n]=new S(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){b[n]=new S(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){b[n]=new S(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){b[n]=new S(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){b[n]=new S(n,5,!1,n.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function R(n){return n[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(n){var s=n.replace(C,R);b[s]=new S(s,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var s=n.replace(C,R);b[s]=new S(s,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var s=n.replace(C,R);b[s]=new S(s,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){b[n]=new S(n,1,!1,n.toLowerCase(),null,!1,!1)}),b.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){b[n]=new S(n,1,!1,n.toLowerCase(),null,!0,!0)});function N(n,s,a,u){var m=b.hasOwnProperty(s)?b[s]:null;(m!==null?m.type!==0:u||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,a,m,u)&&(a=null),u||m===null?x(s)&&(a===null?n.removeAttribute(s):n.setAttribute(s,""+a)):m.mustUseProperty?n[m.propertyName]=a===null?m.type===3?!1:"":a:(s=m.attributeName,u=m.attributeNamespace,a===null?n.removeAttribute(s):(m=m.type,a=m===3||m===4&&a===!0?"":""+a,u?n.setAttributeNS(u,s,a):n.setAttribute(s,a))))}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),O=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),W=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),pe=Symbol.for("react.offscreen"),q=Symbol.iterator;function ne(n){return n===null||typeof n!="object"?null:(n=q&&n[q]||n["@@iterator"],typeof n=="function"?n:null)}var I=Object.assign,B;function Y(n){if(B===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);B=s&&s[1]||""}return`
|
|
2
|
+
`+B+n}var ie=!1;function ae(n,s){if(!n||ie)return"";ie=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(V){var u=V}Reflect.construct(n,[],s)}else{try{s.call()}catch(V){u=V}n.call(s.prototype)}else{try{throw Error()}catch(V){u=V}n()}}catch(V){if(V&&u&&typeof V.stack=="string"){for(var m=V.stack.split(`
|
|
3
|
+
`),v=u.stack.split(`
|
|
4
|
+
`),E=m.length-1,A=v.length-1;1<=E&&0<=A&&m[E]!==v[A];)A--;for(;1<=E&&0<=A;E--,A--)if(m[E]!==v[A]){if(E!==1||A!==1)do if(E--,A--,0>A||m[E]!==v[A]){var M=`
|
|
5
|
+
`+m[E].replace(" at new "," at ");return n.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",n.displayName)),M}while(1<=E&&0<=A);break}}}finally{ie=!1,Error.prepareStackTrace=a}return(n=n?n.displayName||n.name:"")?Y(n):""}function ue(n){switch(n.tag){case 5:return Y(n.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return n=ae(n.type,!1),n;case 11:return n=ae(n.type.render,!1),n;case 1:return n=ae(n.type,!0),n;default:return""}}function le(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case T:return"Fragment";case O:return"Portal";case K:return"Profiler";case D:return"StrictMode";case X:return"Suspense";case oe:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case W:return(n.displayName||"Context")+".Consumer";case U:return(n._context.displayName||"Context")+".Provider";case H:var s=n.render;return n=n.displayName,n||(n=s.displayName||s.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case re:return s=n.displayName||null,s!==null?s:le(n.type)||"Memo";case se:s=n._payload,n=n._init;try{return le(n(s))}catch{}}return null}function de(n){var s=n.type;switch(n.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=s.render,n=n.displayName||n.name||"",s.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return le(s);case 8:return s===D?"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 s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function me(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Ne(n){var s=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function rt(n){var s=Ne(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,s),u=""+n[s];if(!n.hasOwnProperty(s)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var m=a.get,v=a.set;return Object.defineProperty(n,s,{configurable:!0,get:function(){return m.call(this)},set:function(E){u=""+E,v.call(this,E)}}),Object.defineProperty(n,s,{enumerable:a.enumerable}),{getValue:function(){return u},setValue:function(E){u=""+E},stopTracking:function(){n._valueTracker=null,delete n[s]}}}}function st(n){n._valueTracker||(n._valueTracker=rt(n))}function Ae(n){if(!n)return!1;var s=n._valueTracker;if(!s)return!0;var a=s.getValue(),u="";return n&&(u=Ne(n)?n.checked?"true":"false":n.value),n=u,n!==a?(s.setValue(n),!0):!1}function He(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Z(n,s){var a=s.checked;return I({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked})}function te(n,s){var a=s.defaultValue==null?"":s.defaultValue,u=s.checked!=null?s.checked:s.defaultChecked;a=me(s.value!=null?s.value:a),n._wrapperState={initialChecked:u,initialValue:a,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Pe(n,s){s=s.checked,s!=null&&N(n,"checked",s,!1)}function Ee(n,s){Pe(n,s);var a=me(s.value),u=s.type;if(a!=null)u==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a);else if(u==="submit"||u==="reset"){n.removeAttribute("value");return}s.hasOwnProperty("value")?ct(n,s.type,a):s.hasOwnProperty("defaultValue")&&ct(n,s.type,me(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(n.defaultChecked=!!s.defaultChecked)}function bt(n,s,a){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var u=s.type;if(!(u!=="submit"&&u!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+n._wrapperState.initialValue,a||s===n.value||(n.value=s),n.defaultValue=s}a=n.name,a!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,a!==""&&(n.name=a)}function ct(n,s,a){(s!=="number"||He(n.ownerDocument)!==n)&&(a==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+a&&(n.defaultValue=""+a))}var Fe=Array.isArray;function pt(n,s,a,u){if(n=n.options,s){s={};for(var m=0;m<a.length;m++)s["$"+a[m]]=!0;for(a=0;a<n.length;a++)m=s.hasOwnProperty("$"+n[a].value),n[a].selected!==m&&(n[a].selected=m),m&&u&&(n[a].defaultSelected=!0)}else{for(a=""+me(a),s=null,m=0;m<n.length;m++){if(n[m].value===a){n[m].selected=!0,u&&(n[m].defaultSelected=!0);return}s!==null||n[m].disabled||(s=n[m])}s!==null&&(s.selected=!0)}}function Ct(n,s){if(s.dangerouslySetInnerHTML!=null)throw Error(r(91));return I({},s,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function Ar(n,s){var a=s.value;if(a==null){if(a=s.children,s=s.defaultValue,a!=null){if(s!=null)throw Error(r(92));if(Fe(a)){if(1<a.length)throw Error(r(93));a=a[0]}s=a}s==null&&(s=""),a=s}n._wrapperState={initialValue:me(a)}}function $n(n,s){var a=me(s.value),u=me(s.defaultValue);a!=null&&(a=""+a,a!==n.value&&(n.value=a),s.defaultValue==null&&n.defaultValue!==a&&(n.defaultValue=a)),u!=null&&(n.defaultValue=""+u)}function Mr(n){var s=n.textContent;s===n._wrapperState.initialValue&&s!==""&&s!==null&&(n.value=s)}function Oe(n){switch(n){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 Ht(n,s){return n==null||n==="http://www.w3.org/1999/xhtml"?Oe(s):n==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var bn,_p=(function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,a,u,m){MSApp.execUnsafeLocalFunction(function(){return n(s,a,u,m)})}:n})(function(n,s){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=s;else{for(bn=bn||document.createElement("div"),bn.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=bn.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;s.firstChild;)n.appendChild(s.firstChild)}});function so(n,s){if(s){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=s;return}}n.textContent=s}var oo={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},ew=["Webkit","ms","Moz","O"];Object.keys(oo).forEach(function(n){ew.forEach(function(s){s=s+n.charAt(0).toUpperCase()+n.substring(1),oo[s]=oo[n]})});function jp(n,s,a){return s==null||typeof s=="boolean"||s===""?"":a||typeof s!="number"||s===0||oo.hasOwnProperty(n)&&oo[n]?(""+s).trim():s+"px"}function Cp(n,s){n=n.style;for(var a in s)if(s.hasOwnProperty(a)){var u=a.indexOf("--")===0,m=jp(a,s[a],u);a==="float"&&(a="cssFloat"),u?n.setProperty(a,m):n[a]=m}}var tw=I({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 Ql(n,s){if(s){if(tw[n]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(r(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(r(61))}if(s.style!=null&&typeof s.style!="object")throw Error(r(62))}}function Xl(n,s){if(n.indexOf("-")===-1)return typeof s.is=="string";switch(n){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 Jl=null;function Zl(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ec=null,as=null,ls=null;function Ep(n){if(n=No(n)){if(typeof ec!="function")throw Error(r(280));var s=n.stateNode;s&&(s=qi(s),ec(n.stateNode,n.type,s))}}function Rp(n){as?ls?ls.push(n):ls=[n]:as=n}function Np(){if(as){var n=as,s=ls;if(ls=as=null,Ep(n),s)for(n=0;n<s.length;n++)Ep(s[n])}}function kp(n,s){return n(s)}function Op(){}var tc=!1;function Tp(n,s,a){if(tc)return n(s,a);tc=!0;try{return kp(n,s,a)}finally{tc=!1,(as!==null||ls!==null)&&(Op(),Np())}}function io(n,s){var a=n.stateNode;if(a===null)return null;var u=qi(a);if(u===null)return null;a=u[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(n=n.type,u=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!u;break e;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(r(231,s,typeof a));return a}var nc=!1;if(p)try{var ao={};Object.defineProperty(ao,"passive",{get:function(){nc=!0}}),window.addEventListener("test",ao,ao),window.removeEventListener("test",ao,ao)}catch{nc=!1}function nw(n,s,a,u,m,v,E,A,M){var V=Array.prototype.slice.call(arguments,3);try{s.apply(a,V)}catch(Q){this.onError(Q)}}var lo=!1,Si=null,_i=!1,rc=null,rw={onError:function(n){lo=!0,Si=n}};function sw(n,s,a,u,m,v,E,A,M){lo=!1,Si=null,nw.apply(rw,arguments)}function ow(n,s,a,u,m,v,E,A,M){if(sw.apply(this,arguments),lo){if(lo){var V=Si;lo=!1,Si=null}else throw Error(r(198));_i||(_i=!0,rc=V)}}function Dr(n){var s=n,a=n;if(n.alternate)for(;s.return;)s=s.return;else{n=s;do s=n,(s.flags&4098)!==0&&(a=s.return),n=s.return;while(n)}return s.tag===3?a:null}function Pp(n){if(n.tag===13){var s=n.memoizedState;if(s===null&&(n=n.alternate,n!==null&&(s=n.memoizedState)),s!==null)return s.dehydrated}return null}function Ip(n){if(Dr(n)!==n)throw Error(r(188))}function iw(n){var s=n.alternate;if(!s){if(s=Dr(n),s===null)throw Error(r(188));return s!==n?null:n}for(var a=n,u=s;;){var m=a.return;if(m===null)break;var v=m.alternate;if(v===null){if(u=m.return,u!==null){a=u;continue}break}if(m.child===v.child){for(v=m.child;v;){if(v===a)return Ip(m),n;if(v===u)return Ip(m),s;v=v.sibling}throw Error(r(188))}if(a.return!==u.return)a=m,u=v;else{for(var E=!1,A=m.child;A;){if(A===a){E=!0,a=m,u=v;break}if(A===u){E=!0,u=m,a=v;break}A=A.sibling}if(!E){for(A=v.child;A;){if(A===a){E=!0,a=v,u=m;break}if(A===u){E=!0,u=v,a=m;break}A=A.sibling}if(!E)throw Error(r(189))}}if(a.alternate!==u)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?n:s}function Ap(n){return n=iw(n),n!==null?Mp(n):null}function Mp(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var s=Mp(n);if(s!==null)return s;n=n.sibling}return null}var Dp=t.unstable_scheduleCallback,$p=t.unstable_cancelCallback,aw=t.unstable_shouldYield,lw=t.unstable_requestPaint,ot=t.unstable_now,cw=t.unstable_getCurrentPriorityLevel,sc=t.unstable_ImmediatePriority,Fp=t.unstable_UserBlockingPriority,ji=t.unstable_NormalPriority,uw=t.unstable_LowPriority,Lp=t.unstable_IdlePriority,Ci=null,wn=null;function dw(n){if(wn&&typeof wn.onCommitFiberRoot=="function")try{wn.onCommitFiberRoot(Ci,n,void 0,(n.current.flags&128)===128)}catch{}}var dn=Math.clz32?Math.clz32:hw,fw=Math.log,pw=Math.LN2;function hw(n){return n>>>=0,n===0?32:31-(fw(n)/pw|0)|0}var Ei=64,Ri=4194304;function co(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Ni(n,s){var a=n.pendingLanes;if(a===0)return 0;var u=0,m=n.suspendedLanes,v=n.pingedLanes,E=a&268435455;if(E!==0){var A=E&~m;A!==0?u=co(A):(v&=E,v!==0&&(u=co(v)))}else E=a&~m,E!==0?u=co(E):v!==0&&(u=co(v));if(u===0)return 0;if(s!==0&&s!==u&&(s&m)===0&&(m=u&-u,v=s&-s,m>=v||m===16&&(v&4194240)!==0))return s;if((u&4)!==0&&(u|=a&16),s=n.entangledLanes,s!==0)for(n=n.entanglements,s&=u;0<s;)a=31-dn(s),m=1<<a,u|=n[a],s&=~m;return u}function mw(n,s){switch(n){case 1:case 2:case 4:return s+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 s+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 gw(n,s){for(var a=n.suspendedLanes,u=n.pingedLanes,m=n.expirationTimes,v=n.pendingLanes;0<v;){var E=31-dn(v),A=1<<E,M=m[E];M===-1?((A&a)===0||(A&u)!==0)&&(m[E]=mw(A,s)):M<=s&&(n.expiredLanes|=A),v&=~A}}function oc(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Up(){var n=Ei;return Ei<<=1,(Ei&4194240)===0&&(Ei=64),n}function ic(n){for(var s=[],a=0;31>a;a++)s.push(n);return s}function uo(n,s,a){n.pendingLanes|=s,s!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,s=31-dn(s),n[s]=a}function vw(n,s){var a=n.pendingLanes&~s;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=s,n.mutableReadLanes&=s,n.entangledLanes&=s,s=n.entanglements;var u=n.eventTimes;for(n=n.expirationTimes;0<a;){var m=31-dn(a),v=1<<m;s[m]=0,u[m]=-1,n[m]=-1,a&=~v}}function ac(n,s){var a=n.entangledLanes|=s;for(n=n.entanglements;a;){var u=31-dn(a),m=1<<u;m&s|n[u]&s&&(n[u]|=s),a&=~m}}var qe=0;function zp(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var Vp,lc,Bp,qp,Hp,cc=!1,ki=[],ur=null,dr=null,fr=null,fo=new Map,po=new Map,pr=[],yw="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 Wp(n,s){switch(n){case"focusin":case"focusout":ur=null;break;case"dragenter":case"dragleave":dr=null;break;case"mouseover":case"mouseout":fr=null;break;case"pointerover":case"pointerout":fo.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":po.delete(s.pointerId)}}function ho(n,s,a,u,m,v){return n===null||n.nativeEvent!==v?(n={blockedOn:s,domEventName:a,eventSystemFlags:u,nativeEvent:v,targetContainers:[m]},s!==null&&(s=No(s),s!==null&&lc(s)),n):(n.eventSystemFlags|=u,s=n.targetContainers,m!==null&&s.indexOf(m)===-1&&s.push(m),n)}function xw(n,s,a,u,m){switch(s){case"focusin":return ur=ho(ur,n,s,a,u,m),!0;case"dragenter":return dr=ho(dr,n,s,a,u,m),!0;case"mouseover":return fr=ho(fr,n,s,a,u,m),!0;case"pointerover":var v=m.pointerId;return fo.set(v,ho(fo.get(v)||null,n,s,a,u,m)),!0;case"gotpointercapture":return v=m.pointerId,po.set(v,ho(po.get(v)||null,n,s,a,u,m)),!0}return!1}function Kp(n){var s=$r(n.target);if(s!==null){var a=Dr(s);if(a!==null){if(s=a.tag,s===13){if(s=Pp(a),s!==null){n.blockedOn=s,Hp(n.priority,function(){Bp(a)});return}}else if(s===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Oi(n){if(n.blockedOn!==null)return!1;for(var s=n.targetContainers;0<s.length;){var a=dc(n.domEventName,n.eventSystemFlags,s[0],n.nativeEvent);if(a===null){a=n.nativeEvent;var u=new a.constructor(a.type,a);Jl=u,a.target.dispatchEvent(u),Jl=null}else return s=No(a),s!==null&&lc(s),n.blockedOn=a,!1;s.shift()}return!0}function Gp(n,s,a){Oi(n)&&a.delete(s)}function bw(){cc=!1,ur!==null&&Oi(ur)&&(ur=null),dr!==null&&Oi(dr)&&(dr=null),fr!==null&&Oi(fr)&&(fr=null),fo.forEach(Gp),po.forEach(Gp)}function mo(n,s){n.blockedOn===s&&(n.blockedOn=null,cc||(cc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bw)))}function go(n){function s(m){return mo(m,n)}if(0<ki.length){mo(ki[0],n);for(var a=1;a<ki.length;a++){var u=ki[a];u.blockedOn===n&&(u.blockedOn=null)}}for(ur!==null&&mo(ur,n),dr!==null&&mo(dr,n),fr!==null&&mo(fr,n),fo.forEach(s),po.forEach(s),a=0;a<pr.length;a++)u=pr[a],u.blockedOn===n&&(u.blockedOn=null);for(;0<pr.length&&(a=pr[0],a.blockedOn===null);)Kp(a),a.blockedOn===null&&pr.shift()}var cs=P.ReactCurrentBatchConfig,Ti=!0;function ww(n,s,a,u){var m=qe,v=cs.transition;cs.transition=null;try{qe=1,uc(n,s,a,u)}finally{qe=m,cs.transition=v}}function Sw(n,s,a,u){var m=qe,v=cs.transition;cs.transition=null;try{qe=4,uc(n,s,a,u)}finally{qe=m,cs.transition=v}}function uc(n,s,a,u){if(Ti){var m=dc(n,s,a,u);if(m===null)Nc(n,s,u,Pi,a),Wp(n,u);else if(xw(m,n,s,a,u))u.stopPropagation();else if(Wp(n,u),s&4&&-1<yw.indexOf(n)){for(;m!==null;){var v=No(m);if(v!==null&&Vp(v),v=dc(n,s,a,u),v===null&&Nc(n,s,u,Pi,a),v===m)break;m=v}m!==null&&u.stopPropagation()}else Nc(n,s,u,null,a)}}var Pi=null;function dc(n,s,a,u){if(Pi=null,n=Zl(u),n=$r(n),n!==null)if(s=Dr(n),s===null)n=null;else if(a=s.tag,a===13){if(n=Pp(s),n!==null)return n;n=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;n=null}else s!==n&&(n=null);return Pi=n,null}function Yp(n){switch(n){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(cw()){case sc:return 1;case Fp:return 4;case ji:case uw:return 16;case Lp:return 536870912;default:return 16}default:return 16}}var hr=null,fc=null,Ii=null;function Qp(){if(Ii)return Ii;var n,s=fc,a=s.length,u,m="value"in hr?hr.value:hr.textContent,v=m.length;for(n=0;n<a&&s[n]===m[n];n++);var E=a-n;for(u=1;u<=E&&s[a-u]===m[v-u];u++);return Ii=m.slice(n,1<u?1-u:void 0)}function Ai(n){var s=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&s===13&&(n=13)):n=s,n===10&&(n=13),32<=n||n===13?n:0}function Mi(){return!0}function Xp(){return!1}function Wt(n){function s(a,u,m,v,E){this._reactName=a,this._targetInst=m,this.type=u,this.nativeEvent=v,this.target=E,this.currentTarget=null;for(var A in n)n.hasOwnProperty(A)&&(a=n[A],this[A]=a?a(v):v[A]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Mi:Xp,this.isPropagationStopped=Xp,this}return I(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Mi)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Mi)},persist:function(){},isPersistent:Mi}),s}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pc=Wt(us),vo=I({},us,{view:0,detail:0}),_w=Wt(vo),hc,mc,yo,Di=I({},vo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vc,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==yo&&(yo&&n.type==="mousemove"?(hc=n.screenX-yo.screenX,mc=n.screenY-yo.screenY):mc=hc=0,yo=n),hc)},movementY:function(n){return"movementY"in n?n.movementY:mc}}),Jp=Wt(Di),jw=I({},Di,{dataTransfer:0}),Cw=Wt(jw),Ew=I({},vo,{relatedTarget:0}),gc=Wt(Ew),Rw=I({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),Nw=Wt(Rw),kw=I({},us,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),Ow=Wt(kw),Tw=I({},us,{data:0}),Zp=Wt(Tw),Pw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Iw={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"},Aw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mw(n){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(n):(n=Aw[n])?!!s[n]:!1}function vc(){return Mw}var Dw=I({},vo,{key:function(n){if(n.key){var s=Pw[n.key]||n.key;if(s!=="Unidentified")return s}return n.type==="keypress"?(n=Ai(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?Iw[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vc,charCode:function(n){return n.type==="keypress"?Ai(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Ai(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),$w=Wt(Dw),Fw=I({},Di,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eh=Wt(Fw),Lw=I({},vo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vc}),Uw=Wt(Lw),zw=I({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vw=Wt(zw),Bw=I({},Di,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),qw=Wt(Bw),Hw=[9,13,27,32],yc=p&&"CompositionEvent"in window,xo=null;p&&"documentMode"in document&&(xo=document.documentMode);var Ww=p&&"TextEvent"in window&&!xo,th=p&&(!yc||xo&&8<xo&&11>=xo),nh=" ",rh=!1;function sh(n,s){switch(n){case"keyup":return Hw.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var ds=!1;function Kw(n,s){switch(n){case"compositionend":return oh(s);case"keypress":return s.which!==32?null:(rh=!0,nh);case"textInput":return n=s.data,n===nh&&rh?null:n;default:return null}}function Gw(n,s){if(ds)return n==="compositionend"||!yc&&sh(n,s)?(n=Qp(),Ii=fc=hr=null,ds=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return th&&s.locale!=="ko"?null:s.data;default:return null}}var Yw={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 ih(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s==="input"?!!Yw[n.type]:s==="textarea"}function ah(n,s,a,u){Rp(u),s=zi(s,"onChange"),0<s.length&&(a=new pc("onChange","change",null,a,u),n.push({event:a,listeners:s}))}var bo=null,wo=null;function Qw(n){Ch(n,0)}function $i(n){var s=gs(n);if(Ae(s))return n}function Xw(n,s){if(n==="change")return s}var lh=!1;if(p){var xc;if(p){var bc="oninput"in document;if(!bc){var ch=document.createElement("div");ch.setAttribute("oninput","return;"),bc=typeof ch.oninput=="function"}xc=bc}else xc=!1;lh=xc&&(!document.documentMode||9<document.documentMode)}function uh(){bo&&(bo.detachEvent("onpropertychange",dh),wo=bo=null)}function dh(n){if(n.propertyName==="value"&&$i(wo)){var s=[];ah(s,wo,n,Zl(n)),Tp(Qw,s)}}function Jw(n,s,a){n==="focusin"?(uh(),bo=s,wo=a,bo.attachEvent("onpropertychange",dh)):n==="focusout"&&uh()}function Zw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return $i(wo)}function eS(n,s){if(n==="click")return $i(s)}function tS(n,s){if(n==="input"||n==="change")return $i(s)}function nS(n,s){return n===s&&(n!==0||1/n===1/s)||n!==n&&s!==s}var fn=typeof Object.is=="function"?Object.is:nS;function So(n,s){if(fn(n,s))return!0;if(typeof n!="object"||n===null||typeof s!="object"||s===null)return!1;var a=Object.keys(n),u=Object.keys(s);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var m=a[u];if(!f.call(s,m)||!fn(n[m],s[m]))return!1}return!0}function fh(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function ph(n,s){var a=fh(n);n=0;for(var u;a;){if(a.nodeType===3){if(u=n+a.textContent.length,n<=s&&u>=s)return{node:a,offset:s-n};n=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=fh(a)}}function hh(n,s){return n&&s?n===s?!0:n&&n.nodeType===3?!1:s&&s.nodeType===3?hh(n,s.parentNode):"contains"in n?n.contains(s):n.compareDocumentPosition?!!(n.compareDocumentPosition(s)&16):!1:!1}function mh(){for(var n=window,s=He();s instanceof n.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href=="string"}catch{a=!1}if(a)n=s.contentWindow;else break;s=He(n.document)}return s}function wc(n){var s=n&&n.nodeName&&n.nodeName.toLowerCase();return s&&(s==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||s==="textarea"||n.contentEditable==="true")}function rS(n){var s=mh(),a=n.focusedElem,u=n.selectionRange;if(s!==a&&a&&a.ownerDocument&&hh(a.ownerDocument.documentElement,a)){if(u!==null&&wc(a)){if(s=u.start,n=u.end,n===void 0&&(n=s),"selectionStart"in a)a.selectionStart=s,a.selectionEnd=Math.min(n,a.value.length);else if(n=(s=a.ownerDocument||document)&&s.defaultView||window,n.getSelection){n=n.getSelection();var m=a.textContent.length,v=Math.min(u.start,m);u=u.end===void 0?v:Math.min(u.end,m),!n.extend&&v>u&&(m=u,u=v,v=m),m=ph(a,v);var E=ph(a,u);m&&E&&(n.rangeCount!==1||n.anchorNode!==m.node||n.anchorOffset!==m.offset||n.focusNode!==E.node||n.focusOffset!==E.offset)&&(s=s.createRange(),s.setStart(m.node,m.offset),n.removeAllRanges(),v>u?(n.addRange(s),n.extend(E.node,E.offset)):(s.setEnd(E.node,E.offset),n.addRange(s)))}}for(s=[],n=a;n=n.parentNode;)n.nodeType===1&&s.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<s.length;a++)n=s[a],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var sS=p&&"documentMode"in document&&11>=document.documentMode,fs=null,Sc=null,_o=null,_c=!1;function gh(n,s,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;_c||fs==null||fs!==He(u)||(u=fs,"selectionStart"in u&&wc(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),_o&&So(_o,u)||(_o=u,u=zi(Sc,"onSelect"),0<u.length&&(s=new pc("onSelect","select",null,s,a),n.push({event:s,listeners:u}),s.target=fs)))}function Fi(n,s){var a={};return a[n.toLowerCase()]=s.toLowerCase(),a["Webkit"+n]="webkit"+s,a["Moz"+n]="moz"+s,a}var ps={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionend:Fi("Transition","TransitionEnd")},jc={},vh={};p&&(vh=document.createElement("div").style,"AnimationEvent"in window||(delete ps.animationend.animation,delete ps.animationiteration.animation,delete ps.animationstart.animation),"TransitionEvent"in window||delete ps.transitionend.transition);function Li(n){if(jc[n])return jc[n];if(!ps[n])return n;var s=ps[n],a;for(a in s)if(s.hasOwnProperty(a)&&a in vh)return jc[n]=s[a];return n}var yh=Li("animationend"),xh=Li("animationiteration"),bh=Li("animationstart"),wh=Li("transitionend"),Sh=new Map,_h="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 mr(n,s){Sh.set(n,s),l(s,[n])}for(var Cc=0;Cc<_h.length;Cc++){var Ec=_h[Cc],oS=Ec.toLowerCase(),iS=Ec[0].toUpperCase()+Ec.slice(1);mr(oS,"on"+iS)}mr(yh,"onAnimationEnd"),mr(xh,"onAnimationIteration"),mr(bh,"onAnimationStart"),mr("dblclick","onDoubleClick"),mr("focusin","onFocus"),mr("focusout","onBlur"),mr(wh,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jo="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(" "),aS=new Set("cancel close invalid load scroll toggle".split(" ").concat(jo));function jh(n,s,a){var u=n.type||"unknown-event";n.currentTarget=a,ow(u,s,void 0,n),n.currentTarget=null}function Ch(n,s){s=(s&4)!==0;for(var a=0;a<n.length;a++){var u=n[a],m=u.event;u=u.listeners;e:{var v=void 0;if(s)for(var E=u.length-1;0<=E;E--){var A=u[E],M=A.instance,V=A.currentTarget;if(A=A.listener,M!==v&&m.isPropagationStopped())break e;jh(m,A,V),v=M}else for(E=0;E<u.length;E++){if(A=u[E],M=A.instance,V=A.currentTarget,A=A.listener,M!==v&&m.isPropagationStopped())break e;jh(m,A,V),v=M}}}if(_i)throw n=rc,_i=!1,rc=null,n}function Ke(n,s){var a=s[Ac];a===void 0&&(a=s[Ac]=new Set);var u=n+"__bubble";a.has(u)||(Eh(s,n,2,!1),a.add(u))}function Rc(n,s,a){var u=0;s&&(u|=4),Eh(a,n,u,s)}var Ui="_reactListening"+Math.random().toString(36).slice(2);function Co(n){if(!n[Ui]){n[Ui]=!0,i.forEach(function(a){a!=="selectionchange"&&(aS.has(a)||Rc(a,!1,n),Rc(a,!0,n))});var s=n.nodeType===9?n:n.ownerDocument;s===null||s[Ui]||(s[Ui]=!0,Rc("selectionchange",!1,s))}}function Eh(n,s,a,u){switch(Yp(s)){case 1:var m=ww;break;case 4:m=Sw;break;default:m=uc}a=m.bind(null,s,a,n),m=void 0,!nc||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(m=!0),u?m!==void 0?n.addEventListener(s,a,{capture:!0,passive:m}):n.addEventListener(s,a,!0):m!==void 0?n.addEventListener(s,a,{passive:m}):n.addEventListener(s,a,!1)}function Nc(n,s,a,u,m){var v=u;if((s&1)===0&&(s&2)===0&&u!==null)e:for(;;){if(u===null)return;var E=u.tag;if(E===3||E===4){var A=u.stateNode.containerInfo;if(A===m||A.nodeType===8&&A.parentNode===m)break;if(E===4)for(E=u.return;E!==null;){var M=E.tag;if((M===3||M===4)&&(M=E.stateNode.containerInfo,M===m||M.nodeType===8&&M.parentNode===m))return;E=E.return}for(;A!==null;){if(E=$r(A),E===null)return;if(M=E.tag,M===5||M===6){u=v=E;continue e}A=A.parentNode}}u=u.return}Tp(function(){var V=v,Q=Zl(a),J=[];e:{var G=Sh.get(n);if(G!==void 0){var ce=pc,he=n;switch(n){case"keypress":if(Ai(a)===0)break e;case"keydown":case"keyup":ce=$w;break;case"focusin":he="focus",ce=gc;break;case"focusout":he="blur",ce=gc;break;case"beforeblur":case"afterblur":ce=gc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=Jp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=Cw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=Uw;break;case yh:case xh:case bh:ce=Nw;break;case wh:ce=Vw;break;case"scroll":ce=_w;break;case"wheel":ce=qw;break;case"copy":case"cut":case"paste":ce=Ow;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=eh}var ge=(s&4)!==0,it=!ge&&n==="scroll",L=ge?G!==null?G+"Capture":null:G;ge=[];for(var F=V,z;F!==null;){z=F;var ee=z.stateNode;if(z.tag===5&&ee!==null&&(z=ee,L!==null&&(ee=io(F,L),ee!=null&&ge.push(Eo(F,ee,z)))),it)break;F=F.return}0<ge.length&&(G=new ce(G,he,null,a,Q),J.push({event:G,listeners:ge}))}}if((s&7)===0){e:{if(G=n==="mouseover"||n==="pointerover",ce=n==="mouseout"||n==="pointerout",G&&a!==Jl&&(he=a.relatedTarget||a.fromElement)&&($r(he)||he[Fn]))break e;if((ce||G)&&(G=Q.window===Q?Q:(G=Q.ownerDocument)?G.defaultView||G.parentWindow:window,ce?(he=a.relatedTarget||a.toElement,ce=V,he=he?$r(he):null,he!==null&&(it=Dr(he),he!==it||he.tag!==5&&he.tag!==6)&&(he=null)):(ce=null,he=V),ce!==he)){if(ge=Jp,ee="onMouseLeave",L="onMouseEnter",F="mouse",(n==="pointerout"||n==="pointerover")&&(ge=eh,ee="onPointerLeave",L="onPointerEnter",F="pointer"),it=ce==null?G:gs(ce),z=he==null?G:gs(he),G=new ge(ee,F+"leave",ce,a,Q),G.target=it,G.relatedTarget=z,ee=null,$r(Q)===V&&(ge=new ge(L,F+"enter",he,a,Q),ge.target=z,ge.relatedTarget=it,ee=ge),it=ee,ce&&he)t:{for(ge=ce,L=he,F=0,z=ge;z;z=hs(z))F++;for(z=0,ee=L;ee;ee=hs(ee))z++;for(;0<F-z;)ge=hs(ge),F--;for(;0<z-F;)L=hs(L),z--;for(;F--;){if(ge===L||L!==null&&ge===L.alternate)break t;ge=hs(ge),L=hs(L)}ge=null}else ge=null;ce!==null&&Rh(J,G,ce,ge,!1),he!==null&&it!==null&&Rh(J,it,he,ge,!0)}}e:{if(G=V?gs(V):window,ce=G.nodeName&&G.nodeName.toLowerCase(),ce==="select"||ce==="input"&&G.type==="file")var ye=Xw;else if(ih(G))if(lh)ye=tS;else{ye=Zw;var Se=Jw}else(ce=G.nodeName)&&ce.toLowerCase()==="input"&&(G.type==="checkbox"||G.type==="radio")&&(ye=eS);if(ye&&(ye=ye(n,V))){ah(J,ye,a,Q);break e}Se&&Se(n,G,V),n==="focusout"&&(Se=G._wrapperState)&&Se.controlled&&G.type==="number"&&ct(G,"number",G.value)}switch(Se=V?gs(V):window,n){case"focusin":(ih(Se)||Se.contentEditable==="true")&&(fs=Se,Sc=V,_o=null);break;case"focusout":_o=Sc=fs=null;break;case"mousedown":_c=!0;break;case"contextmenu":case"mouseup":case"dragend":_c=!1,gh(J,a,Q);break;case"selectionchange":if(sS)break;case"keydown":case"keyup":gh(J,a,Q)}var _e;if(yc)e:{switch(n){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else ds?sh(n,a)&&(Ce="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(Ce="onCompositionStart");Ce&&(th&&a.locale!=="ko"&&(ds||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&ds&&(_e=Qp()):(hr=Q,fc="value"in hr?hr.value:hr.textContent,ds=!0)),Se=zi(V,Ce),0<Se.length&&(Ce=new Zp(Ce,n,null,a,Q),J.push({event:Ce,listeners:Se}),_e?Ce.data=_e:(_e=oh(a),_e!==null&&(Ce.data=_e)))),(_e=Ww?Kw(n,a):Gw(n,a))&&(V=zi(V,"onBeforeInput"),0<V.length&&(Q=new Zp("onBeforeInput","beforeinput",null,a,Q),J.push({event:Q,listeners:V}),Q.data=_e))}Ch(J,s)})}function Eo(n,s,a){return{instance:n,listener:s,currentTarget:a}}function zi(n,s){for(var a=s+"Capture",u=[];n!==null;){var m=n,v=m.stateNode;m.tag===5&&v!==null&&(m=v,v=io(n,a),v!=null&&u.unshift(Eo(n,v,m)),v=io(n,s),v!=null&&u.push(Eo(n,v,m))),n=n.return}return u}function hs(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Rh(n,s,a,u,m){for(var v=s._reactName,E=[];a!==null&&a!==u;){var A=a,M=A.alternate,V=A.stateNode;if(M!==null&&M===u)break;A.tag===5&&V!==null&&(A=V,m?(M=io(a,v),M!=null&&E.unshift(Eo(a,M,A))):m||(M=io(a,v),M!=null&&E.push(Eo(a,M,A)))),a=a.return}E.length!==0&&n.push({event:s,listeners:E})}var lS=/\r\n?/g,cS=/\u0000|\uFFFD/g;function Nh(n){return(typeof n=="string"?n:""+n).replace(lS,`
|
|
6
|
+
`).replace(cS,"")}function Vi(n,s,a){if(s=Nh(s),Nh(n)!==s&&a)throw Error(r(425))}function Bi(){}var kc=null,Oc=null;function Tc(n,s){return n==="textarea"||n==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Pc=typeof setTimeout=="function"?setTimeout:void 0,uS=typeof clearTimeout=="function"?clearTimeout:void 0,kh=typeof Promise=="function"?Promise:void 0,dS=typeof queueMicrotask=="function"?queueMicrotask:typeof kh<"u"?function(n){return kh.resolve(null).then(n).catch(fS)}:Pc;function fS(n){setTimeout(function(){throw n})}function Ic(n,s){var a=s,u=0;do{var m=a.nextSibling;if(n.removeChild(a),m&&m.nodeType===8)if(a=m.data,a==="/$"){if(u===0){n.removeChild(m),go(s);return}u--}else a!=="$"&&a!=="$?"&&a!=="$!"||u++;a=m}while(a);go(s)}function gr(n){for(;n!=null;n=n.nextSibling){var s=n.nodeType;if(s===1||s===3)break;if(s===8){if(s=n.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return n}function Oh(n){n=n.previousSibling;for(var s=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"){if(s===0)return n;s--}else a==="/$"&&s++}n=n.previousSibling}return null}var ms=Math.random().toString(36).slice(2),Sn="__reactFiber$"+ms,Ro="__reactProps$"+ms,Fn="__reactContainer$"+ms,Ac="__reactEvents$"+ms,pS="__reactListeners$"+ms,hS="__reactHandles$"+ms;function $r(n){var s=n[Sn];if(s)return s;for(var a=n.parentNode;a;){if(s=a[Fn]||a[Sn]){if(a=s.alternate,s.child!==null||a!==null&&a.child!==null)for(n=Oh(n);n!==null;){if(a=n[Sn])return a;n=Oh(n)}return s}n=a,a=n.parentNode}return null}function No(n){return n=n[Sn]||n[Fn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function gs(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function qi(n){return n[Ro]||null}var Mc=[],vs=-1;function vr(n){return{current:n}}function Ge(n){0>vs||(n.current=Mc[vs],Mc[vs]=null,vs--)}function We(n,s){vs++,Mc[vs]=n.current,n.current=s}var yr={},Et=vr(yr),Mt=vr(!1),Fr=yr;function ys(n,s){var a=n.type.contextTypes;if(!a)return yr;var u=n.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===s)return u.__reactInternalMemoizedMaskedChildContext;var m={},v;for(v in a)m[v]=s[v];return u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=s,n.__reactInternalMemoizedMaskedChildContext=m),m}function Dt(n){return n=n.childContextTypes,n!=null}function Hi(){Ge(Mt),Ge(Et)}function Th(n,s,a){if(Et.current!==yr)throw Error(r(168));We(Et,s),We(Mt,a)}function Ph(n,s,a){var u=n.stateNode;if(s=s.childContextTypes,typeof u.getChildContext!="function")return a;u=u.getChildContext();for(var m in u)if(!(m in s))throw Error(r(108,de(n)||"Unknown",m));return I({},a,u)}function Wi(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||yr,Fr=Et.current,We(Et,n),We(Mt,Mt.current),!0}function Ih(n,s,a){var u=n.stateNode;if(!u)throw Error(r(169));a?(n=Ph(n,s,Fr),u.__reactInternalMemoizedMergedChildContext=n,Ge(Mt),Ge(Et),We(Et,n)):Ge(Mt),We(Mt,a)}var Ln=null,Ki=!1,Dc=!1;function Ah(n){Ln===null?Ln=[n]:Ln.push(n)}function mS(n){Ki=!0,Ah(n)}function xr(){if(!Dc&&Ln!==null){Dc=!0;var n=0,s=qe;try{var a=Ln;for(qe=1;n<a.length;n++){var u=a[n];do u=u(!0);while(u!==null)}Ln=null,Ki=!1}catch(m){throw Ln!==null&&(Ln=Ln.slice(n+1)),Dp(sc,xr),m}finally{qe=s,Dc=!1}}return null}var xs=[],bs=0,Gi=null,Yi=0,tn=[],nn=0,Lr=null,Un=1,zn="";function Ur(n,s){xs[bs++]=Yi,xs[bs++]=Gi,Gi=n,Yi=s}function Mh(n,s,a){tn[nn++]=Un,tn[nn++]=zn,tn[nn++]=Lr,Lr=n;var u=Un;n=zn;var m=32-dn(u)-1;u&=~(1<<m),a+=1;var v=32-dn(s)+m;if(30<v){var E=m-m%5;v=(u&(1<<E)-1).toString(32),u>>=E,m-=E,Un=1<<32-dn(s)+m|a<<m|u,zn=v+n}else Un=1<<v|a<<m|u,zn=n}function $c(n){n.return!==null&&(Ur(n,1),Mh(n,1,0))}function Fc(n){for(;n===Gi;)Gi=xs[--bs],xs[bs]=null,Yi=xs[--bs],xs[bs]=null;for(;n===Lr;)Lr=tn[--nn],tn[nn]=null,zn=tn[--nn],tn[nn]=null,Un=tn[--nn],tn[nn]=null}var Kt=null,Gt=null,Qe=!1,pn=null;function Dh(n,s){var a=an(5,null,null,0);a.elementType="DELETED",a.stateNode=s,a.return=n,s=n.deletions,s===null?(n.deletions=[a],n.flags|=16):s.push(a)}function $h(n,s){switch(n.tag){case 5:var a=n.type;return s=s.nodeType!==1||a.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(n.stateNode=s,Kt=n,Gt=gr(s.firstChild),!0):!1;case 6:return s=n.pendingProps===""||s.nodeType!==3?null:s,s!==null?(n.stateNode=s,Kt=n,Gt=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(a=Lr!==null?{id:Un,overflow:zn}:null,n.memoizedState={dehydrated:s,treeContext:a,retryLane:1073741824},a=an(18,null,null,0),a.stateNode=s,a.return=n,n.child=a,Kt=n,Gt=null,!0):!1;default:return!1}}function Lc(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Uc(n){if(Qe){var s=Gt;if(s){var a=s;if(!$h(n,s)){if(Lc(n))throw Error(r(418));s=gr(a.nextSibling);var u=Kt;s&&$h(n,s)?Dh(u,a):(n.flags=n.flags&-4097|2,Qe=!1,Kt=n)}}else{if(Lc(n))throw Error(r(418));n.flags=n.flags&-4097|2,Qe=!1,Kt=n}}}function Fh(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Kt=n}function Qi(n){if(n!==Kt)return!1;if(!Qe)return Fh(n),Qe=!0,!1;var s;if((s=n.tag!==3)&&!(s=n.tag!==5)&&(s=n.type,s=s!=="head"&&s!=="body"&&!Tc(n.type,n.memoizedProps)),s&&(s=Gt)){if(Lc(n))throw Lh(),Error(r(418));for(;s;)Dh(n,s),s=gr(s.nextSibling)}if(Fh(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,s=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"){if(s===0){Gt=gr(n.nextSibling);break e}s--}else a!=="$"&&a!=="$!"&&a!=="$?"||s++}n=n.nextSibling}Gt=null}}else Gt=Kt?gr(n.stateNode.nextSibling):null;return!0}function Lh(){for(var n=Gt;n;)n=gr(n.nextSibling)}function ws(){Gt=Kt=null,Qe=!1}function zc(n){pn===null?pn=[n]:pn.push(n)}var gS=P.ReactCurrentBatchConfig;function hn(n,s){if(n&&n.defaultProps){s=I({},s),n=n.defaultProps;for(var a in n)s[a]===void 0&&(s[a]=n[a]);return s}return s}var Xi=vr(null),Ji=null,Ss=null,Vc=null;function Bc(){Vc=Ss=Ji=null}function qc(n){var s=Xi.current;Ge(Xi),n._currentValue=s}function Hc(n,s,a){for(;n!==null;){var u=n.alternate;if((n.childLanes&s)!==s?(n.childLanes|=s,u!==null&&(u.childLanes|=s)):u!==null&&(u.childLanes&s)!==s&&(u.childLanes|=s),n===a)break;n=n.return}}function _s(n,s){Ji=n,Vc=Ss=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&s)!==0&&($t=!0),n.firstContext=null)}function rn(n){var s=n._currentValue;if(Vc!==n)if(n={context:n,memoizedValue:s,next:null},Ss===null){if(Ji===null)throw Error(r(308));Ss=n,Ji.dependencies={lanes:0,firstContext:n}}else Ss=Ss.next=n;return s}var zr=null;function Wc(n){zr===null?zr=[n]:zr.push(n)}function Uh(n,s,a,u){var m=s.interleaved;return m===null?(a.next=a,Wc(s)):(a.next=m.next,m.next=a),s.interleaved=a,Vn(n,u)}function Vn(n,s){n.lanes|=s;var a=n.alternate;for(a!==null&&(a.lanes|=s),a=n,n=n.return;n!==null;)n.childLanes|=s,a=n.alternate,a!==null&&(a.childLanes|=s),a=n,n=n.return;return a.tag===3?a.stateNode:null}var br=!1;function Kc(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function zh(n,s){n=n.updateQueue,s.updateQueue===n&&(s.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Bn(n,s){return{eventTime:n,lane:s,tag:0,payload:null,callback:null,next:null}}function wr(n,s,a){var u=n.updateQueue;if(u===null)return null;if(u=u.shared,(Me&2)!==0){var m=u.pending;return m===null?s.next=s:(s.next=m.next,m.next=s),u.pending=s,Vn(n,a)}return m=u.interleaved,m===null?(s.next=s,Wc(u)):(s.next=m.next,m.next=s),u.interleaved=s,Vn(n,a)}function Zi(n,s,a){if(s=s.updateQueue,s!==null&&(s=s.shared,(a&4194240)!==0)){var u=s.lanes;u&=n.pendingLanes,a|=u,s.lanes=a,ac(n,a)}}function Vh(n,s){var a=n.updateQueue,u=n.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var m=null,v=null;if(a=a.firstBaseUpdate,a!==null){do{var E={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};v===null?m=v=E:v=v.next=E,a=a.next}while(a!==null);v===null?m=v=s:v=v.next=s}else m=v=s;a={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:v,shared:u.shared,effects:u.effects},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=s:n.next=s,a.lastBaseUpdate=s}function ea(n,s,a,u){var m=n.updateQueue;br=!1;var v=m.firstBaseUpdate,E=m.lastBaseUpdate,A=m.shared.pending;if(A!==null){m.shared.pending=null;var M=A,V=M.next;M.next=null,E===null?v=V:E.next=V,E=M;var Q=n.alternate;Q!==null&&(Q=Q.updateQueue,A=Q.lastBaseUpdate,A!==E&&(A===null?Q.firstBaseUpdate=V:A.next=V,Q.lastBaseUpdate=M))}if(v!==null){var J=m.baseState;E=0,Q=V=M=null,A=v;do{var G=A.lane,ce=A.eventTime;if((u&G)===G){Q!==null&&(Q=Q.next={eventTime:ce,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var he=n,ge=A;switch(G=s,ce=a,ge.tag){case 1:if(he=ge.payload,typeof he=="function"){J=he.call(ce,J,G);break e}J=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=ge.payload,G=typeof he=="function"?he.call(ce,J,G):he,G==null)break e;J=I({},J,G);break e;case 2:br=!0}}A.callback!==null&&A.lane!==0&&(n.flags|=64,G=m.effects,G===null?m.effects=[A]:G.push(A))}else ce={eventTime:ce,lane:G,tag:A.tag,payload:A.payload,callback:A.callback,next:null},Q===null?(V=Q=ce,M=J):Q=Q.next=ce,E|=G;if(A=A.next,A===null){if(A=m.shared.pending,A===null)break;G=A,A=G.next,G.next=null,m.lastBaseUpdate=G,m.shared.pending=null}}while(!0);if(Q===null&&(M=J),m.baseState=M,m.firstBaseUpdate=V,m.lastBaseUpdate=Q,s=m.shared.interleaved,s!==null){m=s;do E|=m.lane,m=m.next;while(m!==s)}else v===null&&(m.shared.lanes=0);qr|=E,n.lanes=E,n.memoizedState=J}}function Bh(n,s,a){if(n=s.effects,s.effects=null,n!==null)for(s=0;s<n.length;s++){var u=n[s],m=u.callback;if(m!==null){if(u.callback=null,u=a,typeof m!="function")throw Error(r(191,m));m.call(u)}}}var qh=new e.Component().refs;function Gc(n,s,a,u){s=n.memoizedState,a=a(u,s),a=a==null?s:I({},s,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var ta={isMounted:function(n){return(n=n._reactInternals)?Dr(n)===n:!1},enqueueSetState:function(n,s,a){n=n._reactInternals;var u=Pt(),m=Cr(n),v=Bn(u,m);v.payload=s,a!=null&&(v.callback=a),s=wr(n,v,m),s!==null&&(vn(s,n,m,u),Zi(s,n,m))},enqueueReplaceState:function(n,s,a){n=n._reactInternals;var u=Pt(),m=Cr(n),v=Bn(u,m);v.tag=1,v.payload=s,a!=null&&(v.callback=a),s=wr(n,v,m),s!==null&&(vn(s,n,m,u),Zi(s,n,m))},enqueueForceUpdate:function(n,s){n=n._reactInternals;var a=Pt(),u=Cr(n),m=Bn(a,u);m.tag=2,s!=null&&(m.callback=s),s=wr(n,m,u),s!==null&&(vn(s,n,u,a),Zi(s,n,u))}};function Hh(n,s,a,u,m,v,E){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(u,v,E):s.prototype&&s.prototype.isPureReactComponent?!So(a,u)||!So(m,v):!0}function Wh(n,s,a){var u=!1,m=yr,v=s.contextType;return typeof v=="object"&&v!==null?v=rn(v):(m=Dt(s)?Fr:Et.current,u=s.contextTypes,v=(u=u!=null)?ys(n,m):yr),s=new s(a,v),n.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ta,n.stateNode=s,s._reactInternals=n,u&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=m,n.__reactInternalMemoizedMaskedChildContext=v),s}function Kh(n,s,a,u){n=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(a,u),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(a,u),s.state!==n&&ta.enqueueReplaceState(s,s.state,null)}function Yc(n,s,a,u){var m=n.stateNode;m.props=a,m.state=n.memoizedState,m.refs=qh,Kc(n);var v=s.contextType;typeof v=="object"&&v!==null?m.context=rn(v):(v=Dt(s)?Fr:Et.current,m.context=ys(n,v)),m.state=n.memoizedState,v=s.getDerivedStateFromProps,typeof v=="function"&&(Gc(n,s,v,a),m.state=n.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(s=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),s!==m.state&&ta.enqueueReplaceState(m,m.state,null),ea(n,a,m,u),m.state=n.memoizedState),typeof m.componentDidMount=="function"&&(n.flags|=4194308)}function ko(n,s,a){if(n=a.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(r(309));var u=a.stateNode}if(!u)throw Error(r(147,n));var m=u,v=""+n;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===v?s.ref:(s=function(E){var A=m.refs;A===qh&&(A=m.refs={}),E===null?delete A[v]:A[v]=E},s._stringRef=v,s)}if(typeof n!="string")throw Error(r(284));if(!a._owner)throw Error(r(290,n))}return n}function na(n,s){throw n=Object.prototype.toString.call(s),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":n))}function Gh(n){var s=n._init;return s(n._payload)}function Yh(n){function s(L,F){if(n){var z=L.deletions;z===null?(L.deletions=[F],L.flags|=16):z.push(F)}}function a(L,F){if(!n)return null;for(;F!==null;)s(L,F),F=F.sibling;return null}function u(L,F){for(L=new Map;F!==null;)F.key!==null?L.set(F.key,F):L.set(F.index,F),F=F.sibling;return L}function m(L,F){return L=Rr(L,F),L.index=0,L.sibling=null,L}function v(L,F,z){return L.index=z,n?(z=L.alternate,z!==null?(z=z.index,z<F?(L.flags|=2,F):z):(L.flags|=2,F)):(L.flags|=1048576,F)}function E(L){return n&&L.alternate===null&&(L.flags|=2),L}function A(L,F,z,ee){return F===null||F.tag!==6?(F=Pu(z,L.mode,ee),F.return=L,F):(F=m(F,z),F.return=L,F)}function M(L,F,z,ee){var ye=z.type;return ye===T?Q(L,F,z.props.children,ee,z.key):F!==null&&(F.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===se&&Gh(ye)===F.type)?(ee=m(F,z.props),ee.ref=ko(L,F,z),ee.return=L,ee):(ee=wa(z.type,z.key,z.props,null,L.mode,ee),ee.ref=ko(L,F,z),ee.return=L,ee)}function V(L,F,z,ee){return F===null||F.tag!==4||F.stateNode.containerInfo!==z.containerInfo||F.stateNode.implementation!==z.implementation?(F=Iu(z,L.mode,ee),F.return=L,F):(F=m(F,z.children||[]),F.return=L,F)}function Q(L,F,z,ee,ye){return F===null||F.tag!==7?(F=Gr(z,L.mode,ee,ye),F.return=L,F):(F=m(F,z),F.return=L,F)}function J(L,F,z){if(typeof F=="string"&&F!==""||typeof F=="number")return F=Pu(""+F,L.mode,z),F.return=L,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case k:return z=wa(F.type,F.key,F.props,null,L.mode,z),z.ref=ko(L,null,F),z.return=L,z;case O:return F=Iu(F,L.mode,z),F.return=L,F;case se:var ee=F._init;return J(L,ee(F._payload),z)}if(Fe(F)||ne(F))return F=Gr(F,L.mode,z,null),F.return=L,F;na(L,F)}return null}function G(L,F,z,ee){var ye=F!==null?F.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return ye!==null?null:A(L,F,""+z,ee);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case k:return z.key===ye?M(L,F,z,ee):null;case O:return z.key===ye?V(L,F,z,ee):null;case se:return ye=z._init,G(L,F,ye(z._payload),ee)}if(Fe(z)||ne(z))return ye!==null?null:Q(L,F,z,ee,null);na(L,z)}return null}function ce(L,F,z,ee,ye){if(typeof ee=="string"&&ee!==""||typeof ee=="number")return L=L.get(z)||null,A(F,L,""+ee,ye);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case k:return L=L.get(ee.key===null?z:ee.key)||null,M(F,L,ee,ye);case O:return L=L.get(ee.key===null?z:ee.key)||null,V(F,L,ee,ye);case se:var Se=ee._init;return ce(L,F,z,Se(ee._payload),ye)}if(Fe(ee)||ne(ee))return L=L.get(z)||null,Q(F,L,ee,ye,null);na(F,ee)}return null}function he(L,F,z,ee){for(var ye=null,Se=null,_e=F,Ce=F=0,gt=null;_e!==null&&Ce<z.length;Ce++){_e.index>Ce?(gt=_e,_e=null):gt=_e.sibling;var $e=G(L,_e,z[Ce],ee);if($e===null){_e===null&&(_e=gt);break}n&&_e&&$e.alternate===null&&s(L,_e),F=v($e,F,Ce),Se===null?ye=$e:Se.sibling=$e,Se=$e,_e=gt}if(Ce===z.length)return a(L,_e),Qe&&Ur(L,Ce),ye;if(_e===null){for(;Ce<z.length;Ce++)_e=J(L,z[Ce],ee),_e!==null&&(F=v(_e,F,Ce),Se===null?ye=_e:Se.sibling=_e,Se=_e);return Qe&&Ur(L,Ce),ye}for(_e=u(L,_e);Ce<z.length;Ce++)gt=ce(_e,L,Ce,z[Ce],ee),gt!==null&&(n&>.alternate!==null&&_e.delete(gt.key===null?Ce:gt.key),F=v(gt,F,Ce),Se===null?ye=gt:Se.sibling=gt,Se=gt);return n&&_e.forEach(function(Nr){return s(L,Nr)}),Qe&&Ur(L,Ce),ye}function ge(L,F,z,ee){var ye=ne(z);if(typeof ye!="function")throw Error(r(150));if(z=ye.call(z),z==null)throw Error(r(151));for(var Se=ye=null,_e=F,Ce=F=0,gt=null,$e=z.next();_e!==null&&!$e.done;Ce++,$e=z.next()){_e.index>Ce?(gt=_e,_e=null):gt=_e.sibling;var Nr=G(L,_e,$e.value,ee);if(Nr===null){_e===null&&(_e=gt);break}n&&_e&&Nr.alternate===null&&s(L,_e),F=v(Nr,F,Ce),Se===null?ye=Nr:Se.sibling=Nr,Se=Nr,_e=gt}if($e.done)return a(L,_e),Qe&&Ur(L,Ce),ye;if(_e===null){for(;!$e.done;Ce++,$e=z.next())$e=J(L,$e.value,ee),$e!==null&&(F=v($e,F,Ce),Se===null?ye=$e:Se.sibling=$e,Se=$e);return Qe&&Ur(L,Ce),ye}for(_e=u(L,_e);!$e.done;Ce++,$e=z.next())$e=ce(_e,L,Ce,$e.value,ee),$e!==null&&(n&&$e.alternate!==null&&_e.delete($e.key===null?Ce:$e.key),F=v($e,F,Ce),Se===null?ye=$e:Se.sibling=$e,Se=$e);return n&&_e.forEach(function(YS){return s(L,YS)}),Qe&&Ur(L,Ce),ye}function it(L,F,z,ee){if(typeof z=="object"&&z!==null&&z.type===T&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case k:e:{for(var ye=z.key,Se=F;Se!==null;){if(Se.key===ye){if(ye=z.type,ye===T){if(Se.tag===7){a(L,Se.sibling),F=m(Se,z.props.children),F.return=L,L=F;break e}}else if(Se.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===se&&Gh(ye)===Se.type){a(L,Se.sibling),F=m(Se,z.props),F.ref=ko(L,Se,z),F.return=L,L=F;break e}a(L,Se);break}else s(L,Se);Se=Se.sibling}z.type===T?(F=Gr(z.props.children,L.mode,ee,z.key),F.return=L,L=F):(ee=wa(z.type,z.key,z.props,null,L.mode,ee),ee.ref=ko(L,F,z),ee.return=L,L=ee)}return E(L);case O:e:{for(Se=z.key;F!==null;){if(F.key===Se)if(F.tag===4&&F.stateNode.containerInfo===z.containerInfo&&F.stateNode.implementation===z.implementation){a(L,F.sibling),F=m(F,z.children||[]),F.return=L,L=F;break e}else{a(L,F);break}else s(L,F);F=F.sibling}F=Iu(z,L.mode,ee),F.return=L,L=F}return E(L);case se:return Se=z._init,it(L,F,Se(z._payload),ee)}if(Fe(z))return he(L,F,z,ee);if(ne(z))return ge(L,F,z,ee);na(L,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,F!==null&&F.tag===6?(a(L,F.sibling),F=m(F,z),F.return=L,L=F):(a(L,F),F=Pu(z,L.mode,ee),F.return=L,L=F),E(L)):a(L,F)}return it}var js=Yh(!0),Qh=Yh(!1),Oo={},_n=vr(Oo),To=vr(Oo),Po=vr(Oo);function Vr(n){if(n===Oo)throw Error(r(174));return n}function Qc(n,s){switch(We(Po,s),We(To,n),We(_n,Oo),n=s.nodeType,n){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Ht(null,"");break;default:n=n===8?s.parentNode:s,s=n.namespaceURI||null,n=n.tagName,s=Ht(s,n)}Ge(_n),We(_n,s)}function Cs(){Ge(_n),Ge(To),Ge(Po)}function Xh(n){Vr(Po.current);var s=Vr(_n.current),a=Ht(s,n.type);s!==a&&(We(To,n),We(_n,a))}function Xc(n){To.current===n&&(Ge(_n),Ge(To))}var Je=vr(0);function ra(n){for(var s=n;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Jc=[];function Zc(){for(var n=0;n<Jc.length;n++)Jc[n]._workInProgressVersionPrimary=null;Jc.length=0}var sa=P.ReactCurrentDispatcher,eu=P.ReactCurrentBatchConfig,Br=0,Ze=null,ut=null,ht=null,oa=!1,Io=!1,Ao=0,vS=0;function Rt(){throw Error(r(321))}function tu(n,s){if(s===null)return!1;for(var a=0;a<s.length&&a<n.length;a++)if(!fn(n[a],s[a]))return!1;return!0}function nu(n,s,a,u,m,v){if(Br=v,Ze=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,sa.current=n===null||n.memoizedState===null?wS:SS,n=a(u,m),Io){v=0;do{if(Io=!1,Ao=0,25<=v)throw Error(r(301));v+=1,ht=ut=null,s.updateQueue=null,sa.current=_S,n=a(u,m)}while(Io)}if(sa.current=la,s=ut!==null&&ut.next!==null,Br=0,ht=ut=Ze=null,oa=!1,s)throw Error(r(300));return n}function ru(){var n=Ao!==0;return Ao=0,n}function jn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ht===null?Ze.memoizedState=ht=n:ht=ht.next=n,ht}function sn(){if(ut===null){var n=Ze.alternate;n=n!==null?n.memoizedState:null}else n=ut.next;var s=ht===null?Ze.memoizedState:ht.next;if(s!==null)ht=s,ut=n;else{if(n===null)throw Error(r(310));ut=n,n={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},ht===null?Ze.memoizedState=ht=n:ht=ht.next=n}return ht}function Mo(n,s){return typeof s=="function"?s(n):s}function su(n){var s=sn(),a=s.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var u=ut,m=u.baseQueue,v=a.pending;if(v!==null){if(m!==null){var E=m.next;m.next=v.next,v.next=E}u.baseQueue=m=v,a.pending=null}if(m!==null){v=m.next,u=u.baseState;var A=E=null,M=null,V=v;do{var Q=V.lane;if((Br&Q)===Q)M!==null&&(M=M.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),u=V.hasEagerState?V.eagerState:n(u,V.action);else{var J={lane:Q,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};M===null?(A=M=J,E=u):M=M.next=J,Ze.lanes|=Q,qr|=Q}V=V.next}while(V!==null&&V!==v);M===null?E=u:M.next=A,fn(u,s.memoizedState)||($t=!0),s.memoizedState=u,s.baseState=E,s.baseQueue=M,a.lastRenderedState=u}if(n=a.interleaved,n!==null){m=n;do v=m.lane,Ze.lanes|=v,qr|=v,m=m.next;while(m!==n)}else m===null&&(a.lanes=0);return[s.memoizedState,a.dispatch]}function ou(n){var s=sn(),a=s.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=n;var u=a.dispatch,m=a.pending,v=s.memoizedState;if(m!==null){a.pending=null;var E=m=m.next;do v=n(v,E.action),E=E.next;while(E!==m);fn(v,s.memoizedState)||($t=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),a.lastRenderedState=v}return[v,u]}function Jh(){}function Zh(n,s){var a=Ze,u=sn(),m=s(),v=!fn(u.memoizedState,m);if(v&&(u.memoizedState=m,$t=!0),u=u.queue,iu(nm.bind(null,a,u,n),[n]),u.getSnapshot!==s||v||ht!==null&&ht.memoizedState.tag&1){if(a.flags|=2048,Do(9,tm.bind(null,a,u,m,s),void 0,null),mt===null)throw Error(r(349));(Br&30)!==0||em(a,s,m)}return m}function em(n,s,a){n.flags|=16384,n={getSnapshot:s,value:a},s=Ze.updateQueue,s===null?(s={lastEffect:null,stores:null},Ze.updateQueue=s,s.stores=[n]):(a=s.stores,a===null?s.stores=[n]:a.push(n))}function tm(n,s,a,u){s.value=a,s.getSnapshot=u,rm(s)&&sm(n)}function nm(n,s,a){return a(function(){rm(s)&&sm(n)})}function rm(n){var s=n.getSnapshot;n=n.value;try{var a=s();return!fn(n,a)}catch{return!0}}function sm(n){var s=Vn(n,1);s!==null&&vn(s,n,1,-1)}function om(n){var s=jn();return typeof n=="function"&&(n=n()),s.memoizedState=s.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Mo,lastRenderedState:n},s.queue=n,n=n.dispatch=bS.bind(null,Ze,n),[s.memoizedState,n]}function Do(n,s,a,u){return n={tag:n,create:s,destroy:a,deps:u,next:null},s=Ze.updateQueue,s===null?(s={lastEffect:null,stores:null},Ze.updateQueue=s,s.lastEffect=n.next=n):(a=s.lastEffect,a===null?s.lastEffect=n.next=n:(u=a.next,a.next=n,n.next=u,s.lastEffect=n)),n}function im(){return sn().memoizedState}function ia(n,s,a,u){var m=jn();Ze.flags|=n,m.memoizedState=Do(1|s,a,void 0,u===void 0?null:u)}function aa(n,s,a,u){var m=sn();u=u===void 0?null:u;var v=void 0;if(ut!==null){var E=ut.memoizedState;if(v=E.destroy,u!==null&&tu(u,E.deps)){m.memoizedState=Do(s,a,v,u);return}}Ze.flags|=n,m.memoizedState=Do(1|s,a,v,u)}function am(n,s){return ia(8390656,8,n,s)}function iu(n,s){return aa(2048,8,n,s)}function lm(n,s){return aa(4,2,n,s)}function cm(n,s){return aa(4,4,n,s)}function um(n,s){if(typeof s=="function")return n=n(),s(n),function(){s(null)};if(s!=null)return n=n(),s.current=n,function(){s.current=null}}function dm(n,s,a){return a=a!=null?a.concat([n]):null,aa(4,4,um.bind(null,s,n),a)}function au(){}function fm(n,s){var a=sn();s=s===void 0?null:s;var u=a.memoizedState;return u!==null&&s!==null&&tu(s,u[1])?u[0]:(a.memoizedState=[n,s],n)}function pm(n,s){var a=sn();s=s===void 0?null:s;var u=a.memoizedState;return u!==null&&s!==null&&tu(s,u[1])?u[0]:(n=n(),a.memoizedState=[n,s],n)}function hm(n,s,a){return(Br&21)===0?(n.baseState&&(n.baseState=!1,$t=!0),n.memoizedState=a):(fn(a,s)||(a=Up(),Ze.lanes|=a,qr|=a,n.baseState=!0),s)}function yS(n,s){var a=qe;qe=a!==0&&4>a?a:4,n(!0);var u=eu.transition;eu.transition={};try{n(!1),s()}finally{qe=a,eu.transition=u}}function mm(){return sn().memoizedState}function xS(n,s,a){var u=Cr(n);if(a={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null},gm(n))vm(s,a);else if(a=Uh(n,s,a,u),a!==null){var m=Pt();vn(a,n,u,m),ym(a,s,u)}}function bS(n,s,a){var u=Cr(n),m={lane:u,action:a,hasEagerState:!1,eagerState:null,next:null};if(gm(n))vm(s,m);else{var v=n.alternate;if(n.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var E=s.lastRenderedState,A=v(E,a);if(m.hasEagerState=!0,m.eagerState=A,fn(A,E)){var M=s.interleaved;M===null?(m.next=m,Wc(s)):(m.next=M.next,M.next=m),s.interleaved=m;return}}catch{}a=Uh(n,s,m,u),a!==null&&(m=Pt(),vn(a,n,u,m),ym(a,s,u))}}function gm(n){var s=n.alternate;return n===Ze||s!==null&&s===Ze}function vm(n,s){Io=oa=!0;var a=n.pending;a===null?s.next=s:(s.next=a.next,a.next=s),n.pending=s}function ym(n,s,a){if((a&4194240)!==0){var u=s.lanes;u&=n.pendingLanes,a|=u,s.lanes=a,ac(n,a)}}var la={readContext:rn,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useInsertionEffect:Rt,useLayoutEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useMutableSource:Rt,useSyncExternalStore:Rt,useId:Rt,unstable_isNewReconciler:!1},wS={readContext:rn,useCallback:function(n,s){return jn().memoizedState=[n,s===void 0?null:s],n},useContext:rn,useEffect:am,useImperativeHandle:function(n,s,a){return a=a!=null?a.concat([n]):null,ia(4194308,4,um.bind(null,s,n),a)},useLayoutEffect:function(n,s){return ia(4194308,4,n,s)},useInsertionEffect:function(n,s){return ia(4,2,n,s)},useMemo:function(n,s){var a=jn();return s=s===void 0?null:s,n=n(),a.memoizedState=[n,s],n},useReducer:function(n,s,a){var u=jn();return s=a!==void 0?a(s):s,u.memoizedState=u.baseState=s,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:s},u.queue=n,n=n.dispatch=xS.bind(null,Ze,n),[u.memoizedState,n]},useRef:function(n){var s=jn();return n={current:n},s.memoizedState=n},useState:om,useDebugValue:au,useDeferredValue:function(n){return jn().memoizedState=n},useTransition:function(){var n=om(!1),s=n[0];return n=yS.bind(null,n[1]),jn().memoizedState=n,[s,n]},useMutableSource:function(){},useSyncExternalStore:function(n,s,a){var u=Ze,m=jn();if(Qe){if(a===void 0)throw Error(r(407));a=a()}else{if(a=s(),mt===null)throw Error(r(349));(Br&30)!==0||em(u,s,a)}m.memoizedState=a;var v={value:a,getSnapshot:s};return m.queue=v,am(nm.bind(null,u,v,n),[n]),u.flags|=2048,Do(9,tm.bind(null,u,v,a,s),void 0,null),a},useId:function(){var n=jn(),s=mt.identifierPrefix;if(Qe){var a=zn,u=Un;a=(u&~(1<<32-dn(u)-1)).toString(32)+a,s=":"+s+"R"+a,a=Ao++,0<a&&(s+="H"+a.toString(32)),s+=":"}else a=vS++,s=":"+s+"r"+a.toString(32)+":";return n.memoizedState=s},unstable_isNewReconciler:!1},SS={readContext:rn,useCallback:fm,useContext:rn,useEffect:iu,useImperativeHandle:dm,useInsertionEffect:lm,useLayoutEffect:cm,useMemo:pm,useReducer:su,useRef:im,useState:function(){return su(Mo)},useDebugValue:au,useDeferredValue:function(n){var s=sn();return hm(s,ut.memoizedState,n)},useTransition:function(){var n=su(Mo)[0],s=sn().memoizedState;return[n,s]},useMutableSource:Jh,useSyncExternalStore:Zh,useId:mm,unstable_isNewReconciler:!1},_S={readContext:rn,useCallback:fm,useContext:rn,useEffect:iu,useImperativeHandle:dm,useInsertionEffect:lm,useLayoutEffect:cm,useMemo:pm,useReducer:ou,useRef:im,useState:function(){return ou(Mo)},useDebugValue:au,useDeferredValue:function(n){var s=sn();return ut===null?s.memoizedState=n:hm(s,ut.memoizedState,n)},useTransition:function(){var n=ou(Mo)[0],s=sn().memoizedState;return[n,s]},useMutableSource:Jh,useSyncExternalStore:Zh,useId:mm,unstable_isNewReconciler:!1};function Es(n,s){try{var a="",u=s;do a+=ue(u),u=u.return;while(u);var m=a}catch(v){m=`
|
|
7
|
+
Error generating stack: `+v.message+`
|
|
8
|
+
`+v.stack}return{value:n,source:s,stack:m,digest:null}}function lu(n,s,a){return{value:n,source:null,stack:a??null,digest:s??null}}function cu(n,s){try{console.error(s.value)}catch(a){setTimeout(function(){throw a})}}var jS=typeof WeakMap=="function"?WeakMap:Map;function xm(n,s,a){a=Bn(-1,a),a.tag=3,a.payload={element:null};var u=s.value;return a.callback=function(){ma||(ma=!0,ju=u),cu(n,s)},a}function bm(n,s,a){a=Bn(-1,a),a.tag=3;var u=n.type.getDerivedStateFromError;if(typeof u=="function"){var m=s.value;a.payload=function(){return u(m)},a.callback=function(){cu(n,s)}}var v=n.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(a.callback=function(){cu(n,s),typeof u!="function"&&(_r===null?_r=new Set([this]):_r.add(this));var E=s.stack;this.componentDidCatch(s.value,{componentStack:E!==null?E:""})}),a}function wm(n,s,a){var u=n.pingCache;if(u===null){u=n.pingCache=new jS;var m=new Set;u.set(s,m)}else m=u.get(s),m===void 0&&(m=new Set,u.set(s,m));m.has(a)||(m.add(a),n=FS.bind(null,n,s,a),s.then(n,n))}function Sm(n){do{var s;if((s=n.tag===13)&&(s=n.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return n;n=n.return}while(n!==null);return null}function _m(n,s,a,u,m){return(n.mode&1)===0?(n===s?n.flags|=65536:(n.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(s=Bn(-1,1),s.tag=2,wr(a,s,1))),a.lanes|=1),n):(n.flags|=65536,n.lanes=m,n)}var CS=P.ReactCurrentOwner,$t=!1;function Tt(n,s,a,u){s.child=n===null?Qh(s,null,a,u):js(s,n.child,a,u)}function jm(n,s,a,u,m){a=a.render;var v=s.ref;return _s(s,m),u=nu(n,s,a,u,v,m),a=ru(),n!==null&&!$t?(s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~m,qn(n,s,m)):(Qe&&a&&$c(s),s.flags|=1,Tt(n,s,u,m),s.child)}function Cm(n,s,a,u,m){if(n===null){var v=a.type;return typeof v=="function"&&!Tu(v)&&v.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(s.tag=15,s.type=v,Em(n,s,v,u,m)):(n=wa(a.type,null,u,s,s.mode,m),n.ref=s.ref,n.return=s,s.child=n)}if(v=n.child,(n.lanes&m)===0){var E=v.memoizedProps;if(a=a.compare,a=a!==null?a:So,a(E,u)&&n.ref===s.ref)return qn(n,s,m)}return s.flags|=1,n=Rr(v,u),n.ref=s.ref,n.return=s,s.child=n}function Em(n,s,a,u,m){if(n!==null){var v=n.memoizedProps;if(So(v,u)&&n.ref===s.ref)if($t=!1,s.pendingProps=u=v,(n.lanes&m)!==0)(n.flags&131072)!==0&&($t=!0);else return s.lanes=n.lanes,qn(n,s,m)}return uu(n,s,a,u,m)}function Rm(n,s,a){var u=s.pendingProps,m=u.children,v=n!==null?n.memoizedState:null;if(u.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},We(Ns,Yt),Yt|=a;else{if((a&1073741824)===0)return n=v!==null?v.baseLanes|a:a,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:n,cachePool:null,transitions:null},s.updateQueue=null,We(Ns,Yt),Yt|=n,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=v!==null?v.baseLanes:a,We(Ns,Yt),Yt|=u}else v!==null?(u=v.baseLanes|a,s.memoizedState=null):u=a,We(Ns,Yt),Yt|=u;return Tt(n,s,m,a),s.child}function Nm(n,s){var a=s.ref;(n===null&&a!==null||n!==null&&n.ref!==a)&&(s.flags|=512,s.flags|=2097152)}function uu(n,s,a,u,m){var v=Dt(a)?Fr:Et.current;return v=ys(s,v),_s(s,m),a=nu(n,s,a,u,v,m),u=ru(),n!==null&&!$t?(s.updateQueue=n.updateQueue,s.flags&=-2053,n.lanes&=~m,qn(n,s,m)):(Qe&&u&&$c(s),s.flags|=1,Tt(n,s,a,m),s.child)}function km(n,s,a,u,m){if(Dt(a)){var v=!0;Wi(s)}else v=!1;if(_s(s,m),s.stateNode===null)ua(n,s),Wh(s,a,u),Yc(s,a,u,m),u=!0;else if(n===null){var E=s.stateNode,A=s.memoizedProps;E.props=A;var M=E.context,V=a.contextType;typeof V=="object"&&V!==null?V=rn(V):(V=Dt(a)?Fr:Et.current,V=ys(s,V));var Q=a.getDerivedStateFromProps,J=typeof Q=="function"||typeof E.getSnapshotBeforeUpdate=="function";J||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(A!==u||M!==V)&&Kh(s,E,u,V),br=!1;var G=s.memoizedState;E.state=G,ea(s,u,E,m),M=s.memoizedState,A!==u||G!==M||Mt.current||br?(typeof Q=="function"&&(Gc(s,a,Q,u),M=s.memoizedState),(A=br||Hh(s,a,A,u,G,M,V))?(J||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(s.flags|=4194308)):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=u,s.memoizedState=M),E.props=u,E.state=M,E.context=V,u=A):(typeof E.componentDidMount=="function"&&(s.flags|=4194308),u=!1)}else{E=s.stateNode,zh(n,s),A=s.memoizedProps,V=s.type===s.elementType?A:hn(s.type,A),E.props=V,J=s.pendingProps,G=E.context,M=a.contextType,typeof M=="object"&&M!==null?M=rn(M):(M=Dt(a)?Fr:Et.current,M=ys(s,M));var ce=a.getDerivedStateFromProps;(Q=typeof ce=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(A!==J||G!==M)&&Kh(s,E,u,M),br=!1,G=s.memoizedState,E.state=G,ea(s,u,E,m);var he=s.memoizedState;A!==J||G!==he||Mt.current||br?(typeof ce=="function"&&(Gc(s,a,ce,u),he=s.memoizedState),(V=br||Hh(s,a,V,u,G,he,M)||!1)?(Q||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(u,he,M),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(u,he,M)),typeof E.componentDidUpdate=="function"&&(s.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof E.componentDidUpdate!="function"||A===n.memoizedProps&&G===n.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&G===n.memoizedState||(s.flags|=1024),s.memoizedProps=u,s.memoizedState=he),E.props=u,E.state=he,E.context=M,u=V):(typeof E.componentDidUpdate!="function"||A===n.memoizedProps&&G===n.memoizedState||(s.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||A===n.memoizedProps&&G===n.memoizedState||(s.flags|=1024),u=!1)}return du(n,s,a,u,v,m)}function du(n,s,a,u,m,v){Nm(n,s);var E=(s.flags&128)!==0;if(!u&&!E)return m&&Ih(s,a,!1),qn(n,s,v);u=s.stateNode,CS.current=s;var A=E&&typeof a.getDerivedStateFromError!="function"?null:u.render();return s.flags|=1,n!==null&&E?(s.child=js(s,n.child,null,v),s.child=js(s,null,A,v)):Tt(n,s,A,v),s.memoizedState=u.state,m&&Ih(s,a,!0),s.child}function Om(n){var s=n.stateNode;s.pendingContext?Th(n,s.pendingContext,s.pendingContext!==s.context):s.context&&Th(n,s.context,!1),Qc(n,s.containerInfo)}function Tm(n,s,a,u,m){return ws(),zc(m),s.flags|=256,Tt(n,s,a,u),s.child}var fu={dehydrated:null,treeContext:null,retryLane:0};function pu(n){return{baseLanes:n,cachePool:null,transitions:null}}function Pm(n,s,a){var u=s.pendingProps,m=Je.current,v=!1,E=(s.flags&128)!==0,A;if((A=E)||(A=n!==null&&n.memoizedState===null?!1:(m&2)!==0),A?(v=!0,s.flags&=-129):(n===null||n.memoizedState!==null)&&(m|=1),We(Je,m&1),n===null)return Uc(s),n=s.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((s.mode&1)===0?s.lanes=1:n.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(E=u.children,n=u.fallback,v?(u=s.mode,v=s.child,E={mode:"hidden",children:E},(u&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=E):v=Sa(E,u,0,null),n=Gr(n,u,a,null),v.return=s,n.return=s,v.sibling=n,s.child=v,s.child.memoizedState=pu(a),s.memoizedState=fu,n):hu(s,E));if(m=n.memoizedState,m!==null&&(A=m.dehydrated,A!==null))return ES(n,s,E,u,A,m,a);if(v){v=u.fallback,E=s.mode,m=n.child,A=m.sibling;var M={mode:"hidden",children:u.children};return(E&1)===0&&s.child!==m?(u=s.child,u.childLanes=0,u.pendingProps=M,s.deletions=null):(u=Rr(m,M),u.subtreeFlags=m.subtreeFlags&14680064),A!==null?v=Rr(A,v):(v=Gr(v,E,a,null),v.flags|=2),v.return=s,u.return=s,u.sibling=v,s.child=u,u=v,v=s.child,E=n.child.memoizedState,E=E===null?pu(a):{baseLanes:E.baseLanes|a,cachePool:null,transitions:E.transitions},v.memoizedState=E,v.childLanes=n.childLanes&~a,s.memoizedState=fu,u}return v=n.child,n=v.sibling,u=Rr(v,{mode:"visible",children:u.children}),(s.mode&1)===0&&(u.lanes=a),u.return=s,u.sibling=null,n!==null&&(a=s.deletions,a===null?(s.deletions=[n],s.flags|=16):a.push(n)),s.child=u,s.memoizedState=null,u}function hu(n,s){return s=Sa({mode:"visible",children:s},n.mode,0,null),s.return=n,n.child=s}function ca(n,s,a,u){return u!==null&&zc(u),js(s,n.child,null,a),n=hu(s,s.pendingProps.children),n.flags|=2,s.memoizedState=null,n}function ES(n,s,a,u,m,v,E){if(a)return s.flags&256?(s.flags&=-257,u=lu(Error(r(422))),ca(n,s,E,u)):s.memoizedState!==null?(s.child=n.child,s.flags|=128,null):(v=u.fallback,m=s.mode,u=Sa({mode:"visible",children:u.children},m,0,null),v=Gr(v,m,E,null),v.flags|=2,u.return=s,v.return=s,u.sibling=v,s.child=u,(s.mode&1)!==0&&js(s,n.child,null,E),s.child.memoizedState=pu(E),s.memoizedState=fu,v);if((s.mode&1)===0)return ca(n,s,E,null);if(m.data==="$!"){if(u=m.nextSibling&&m.nextSibling.dataset,u)var A=u.dgst;return u=A,v=Error(r(419)),u=lu(v,u,void 0),ca(n,s,E,u)}if(A=(E&n.childLanes)!==0,$t||A){if(u=mt,u!==null){switch(E&-E){case 4:m=2;break;case 16:m=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:m=32;break;case 536870912:m=268435456;break;default:m=0}m=(m&(u.suspendedLanes|E))!==0?0:m,m!==0&&m!==v.retryLane&&(v.retryLane=m,Vn(n,m),vn(u,n,m,-1))}return Ou(),u=lu(Error(r(421))),ca(n,s,E,u)}return m.data==="$?"?(s.flags|=128,s.child=n.child,s=LS.bind(null,n),m._reactRetry=s,null):(n=v.treeContext,Gt=gr(m.nextSibling),Kt=s,Qe=!0,pn=null,n!==null&&(tn[nn++]=Un,tn[nn++]=zn,tn[nn++]=Lr,Un=n.id,zn=n.overflow,Lr=s),s=hu(s,u.children),s.flags|=4096,s)}function Im(n,s,a){n.lanes|=s;var u=n.alternate;u!==null&&(u.lanes|=s),Hc(n.return,s,a)}function mu(n,s,a,u,m){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:m}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=u,v.tail=a,v.tailMode=m)}function Am(n,s,a){var u=s.pendingProps,m=u.revealOrder,v=u.tail;if(Tt(n,s,u.children,a),u=Je.current,(u&2)!==0)u=u&1|2,s.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=s.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Im(n,a,s);else if(n.tag===19)Im(n,a,s);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===s)break e;for(;n.sibling===null;){if(n.return===null||n.return===s)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}u&=1}if(We(Je,u),(s.mode&1)===0)s.memoizedState=null;else switch(m){case"forwards":for(a=s.child,m=null;a!==null;)n=a.alternate,n!==null&&ra(n)===null&&(m=a),a=a.sibling;a=m,a===null?(m=s.child,s.child=null):(m=a.sibling,a.sibling=null),mu(s,!1,m,a,v);break;case"backwards":for(a=null,m=s.child,s.child=null;m!==null;){if(n=m.alternate,n!==null&&ra(n)===null){s.child=m;break}n=m.sibling,m.sibling=a,a=m,m=n}mu(s,!0,a,null,v);break;case"together":mu(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function ua(n,s){(s.mode&1)===0&&n!==null&&(n.alternate=null,s.alternate=null,s.flags|=2)}function qn(n,s,a){if(n!==null&&(s.dependencies=n.dependencies),qr|=s.lanes,(a&s.childLanes)===0)return null;if(n!==null&&s.child!==n.child)throw Error(r(153));if(s.child!==null){for(n=s.child,a=Rr(n,n.pendingProps),s.child=a,a.return=s;n.sibling!==null;)n=n.sibling,a=a.sibling=Rr(n,n.pendingProps),a.return=s;a.sibling=null}return s.child}function RS(n,s,a){switch(s.tag){case 3:Om(s),ws();break;case 5:Xh(s);break;case 1:Dt(s.type)&&Wi(s);break;case 4:Qc(s,s.stateNode.containerInfo);break;case 10:var u=s.type._context,m=s.memoizedProps.value;We(Xi,u._currentValue),u._currentValue=m;break;case 13:if(u=s.memoizedState,u!==null)return u.dehydrated!==null?(We(Je,Je.current&1),s.flags|=128,null):(a&s.child.childLanes)!==0?Pm(n,s,a):(We(Je,Je.current&1),n=qn(n,s,a),n!==null?n.sibling:null);We(Je,Je.current&1);break;case 19:if(u=(a&s.childLanes)!==0,(n.flags&128)!==0){if(u)return Am(n,s,a);s.flags|=128}if(m=s.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),We(Je,Je.current),u)break;return null;case 22:case 23:return s.lanes=0,Rm(n,s,a)}return qn(n,s,a)}var Mm,gu,Dm,$m;Mm=function(n,s){for(var a=s.child;a!==null;){if(a.tag===5||a.tag===6)n.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},gu=function(){},Dm=function(n,s,a,u){var m=n.memoizedProps;if(m!==u){n=s.stateNode,Vr(_n.current);var v=null;switch(a){case"input":m=Z(n,m),u=Z(n,u),v=[];break;case"select":m=I({},m,{value:void 0}),u=I({},u,{value:void 0}),v=[];break;case"textarea":m=Ct(n,m),u=Ct(n,u),v=[];break;default:typeof m.onClick!="function"&&typeof u.onClick=="function"&&(n.onclick=Bi)}Ql(a,u);var E;a=null;for(V in m)if(!u.hasOwnProperty(V)&&m.hasOwnProperty(V)&&m[V]!=null)if(V==="style"){var A=m[V];for(E in A)A.hasOwnProperty(E)&&(a||(a={}),a[E]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(o.hasOwnProperty(V)?v||(v=[]):(v=v||[]).push(V,null));for(V in u){var M=u[V];if(A=m?.[V],u.hasOwnProperty(V)&&M!==A&&(M!=null||A!=null))if(V==="style")if(A){for(E in A)!A.hasOwnProperty(E)||M&&M.hasOwnProperty(E)||(a||(a={}),a[E]="");for(E in M)M.hasOwnProperty(E)&&A[E]!==M[E]&&(a||(a={}),a[E]=M[E])}else a||(v||(v=[]),v.push(V,a)),a=M;else V==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,A=A?A.__html:void 0,M!=null&&A!==M&&(v=v||[]).push(V,M)):V==="children"?typeof M!="string"&&typeof M!="number"||(v=v||[]).push(V,""+M):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(o.hasOwnProperty(V)?(M!=null&&V==="onScroll"&&Ke("scroll",n),v||A===M||(v=[])):(v=v||[]).push(V,M))}a&&(v=v||[]).push("style",a);var V=v;(s.updateQueue=V)&&(s.flags|=4)}},$m=function(n,s,a,u){a!==u&&(s.flags|=4)};function $o(n,s){if(!Qe)switch(n.tailMode){case"hidden":s=n.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?s||n.tail===null?n.tail=null:n.tail.sibling=null:u.sibling=null}}function Nt(n){var s=n.alternate!==null&&n.alternate.child===n.child,a=0,u=0;if(s)for(var m=n.child;m!==null;)a|=m.lanes|m.childLanes,u|=m.subtreeFlags&14680064,u|=m.flags&14680064,m.return=n,m=m.sibling;else for(m=n.child;m!==null;)a|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=n,m=m.sibling;return n.subtreeFlags|=u,n.childLanes=a,s}function NS(n,s,a){var u=s.pendingProps;switch(Fc(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(s),null;case 1:return Dt(s.type)&&Hi(),Nt(s),null;case 3:return u=s.stateNode,Cs(),Ge(Mt),Ge(Et),Zc(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(n===null||n.child===null)&&(Qi(s)?s.flags|=4:n===null||n.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,pn!==null&&(Ru(pn),pn=null))),gu(n,s),Nt(s),null;case 5:Xc(s);var m=Vr(Po.current);if(a=s.type,n!==null&&s.stateNode!=null)Dm(n,s,a,u,m),n.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!u){if(s.stateNode===null)throw Error(r(166));return Nt(s),null}if(n=Vr(_n.current),Qi(s)){u=s.stateNode,a=s.type;var v=s.memoizedProps;switch(u[Sn]=s,u[Ro]=v,n=(s.mode&1)!==0,a){case"dialog":Ke("cancel",u),Ke("close",u);break;case"iframe":case"object":case"embed":Ke("load",u);break;case"video":case"audio":for(m=0;m<jo.length;m++)Ke(jo[m],u);break;case"source":Ke("error",u);break;case"img":case"image":case"link":Ke("error",u),Ke("load",u);break;case"details":Ke("toggle",u);break;case"input":te(u,v),Ke("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!v.multiple},Ke("invalid",u);break;case"textarea":Ar(u,v),Ke("invalid",u)}Ql(a,v),m=null;for(var E in v)if(v.hasOwnProperty(E)){var A=v[E];E==="children"?typeof A=="string"?u.textContent!==A&&(v.suppressHydrationWarning!==!0&&Vi(u.textContent,A,n),m=["children",A]):typeof A=="number"&&u.textContent!==""+A&&(v.suppressHydrationWarning!==!0&&Vi(u.textContent,A,n),m=["children",""+A]):o.hasOwnProperty(E)&&A!=null&&E==="onScroll"&&Ke("scroll",u)}switch(a){case"input":st(u),bt(u,v,!0);break;case"textarea":st(u),Mr(u);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(u.onclick=Bi)}u=m,s.updateQueue=u,u!==null&&(s.flags|=4)}else{E=m.nodeType===9?m:m.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=Oe(a)),n==="http://www.w3.org/1999/xhtml"?a==="script"?(n=E.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof u.is=="string"?n=E.createElement(a,{is:u.is}):(n=E.createElement(a),a==="select"&&(E=n,u.multiple?E.multiple=!0:u.size&&(E.size=u.size))):n=E.createElementNS(n,a),n[Sn]=s,n[Ro]=u,Mm(n,s,!1,!1),s.stateNode=n;e:{switch(E=Xl(a,u),a){case"dialog":Ke("cancel",n),Ke("close",n),m=u;break;case"iframe":case"object":case"embed":Ke("load",n),m=u;break;case"video":case"audio":for(m=0;m<jo.length;m++)Ke(jo[m],n);m=u;break;case"source":Ke("error",n),m=u;break;case"img":case"image":case"link":Ke("error",n),Ke("load",n),m=u;break;case"details":Ke("toggle",n),m=u;break;case"input":te(n,u),m=Z(n,u),Ke("invalid",n);break;case"option":m=u;break;case"select":n._wrapperState={wasMultiple:!!u.multiple},m=I({},u,{value:void 0}),Ke("invalid",n);break;case"textarea":Ar(n,u),m=Ct(n,u),Ke("invalid",n);break;default:m=u}Ql(a,m),A=m;for(v in A)if(A.hasOwnProperty(v)){var M=A[v];v==="style"?Cp(n,M):v==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,M!=null&&_p(n,M)):v==="children"?typeof M=="string"?(a!=="textarea"||M!=="")&&so(n,M):typeof M=="number"&&so(n,""+M):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(o.hasOwnProperty(v)?M!=null&&v==="onScroll"&&Ke("scroll",n):M!=null&&N(n,v,M,E))}switch(a){case"input":st(n),bt(n,u,!1);break;case"textarea":st(n),Mr(n);break;case"option":u.value!=null&&n.setAttribute("value",""+me(u.value));break;case"select":n.multiple=!!u.multiple,v=u.value,v!=null?pt(n,!!u.multiple,v,!1):u.defaultValue!=null&&pt(n,!!u.multiple,u.defaultValue,!0);break;default:typeof m.onClick=="function"&&(n.onclick=Bi)}switch(a){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Nt(s),null;case 6:if(n&&s.stateNode!=null)$m(n,s,n.memoizedProps,u);else{if(typeof u!="string"&&s.stateNode===null)throw Error(r(166));if(a=Vr(Po.current),Vr(_n.current),Qi(s)){if(u=s.stateNode,a=s.memoizedProps,u[Sn]=s,(v=u.nodeValue!==a)&&(n=Kt,n!==null))switch(n.tag){case 3:Vi(u.nodeValue,a,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Vi(u.nodeValue,a,(n.mode&1)!==0)}v&&(s.flags|=4)}else u=(a.nodeType===9?a:a.ownerDocument).createTextNode(u),u[Sn]=s,s.stateNode=u}return Nt(s),null;case 13:if(Ge(Je),u=s.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Qe&&Gt!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Lh(),ws(),s.flags|=98560,v=!1;else if(v=Qi(s),u!==null&&u.dehydrated!==null){if(n===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Sn]=s}else ws(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Nt(s),v=!1}else pn!==null&&(Ru(pn),pn=null),v=!0;if(!v)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=a,s):(u=u!==null,u!==(n!==null&&n.memoizedState!==null)&&u&&(s.child.flags|=8192,(s.mode&1)!==0&&(n===null||(Je.current&1)!==0?dt===0&&(dt=3):Ou())),s.updateQueue!==null&&(s.flags|=4),Nt(s),null);case 4:return Cs(),gu(n,s),n===null&&Co(s.stateNode.containerInfo),Nt(s),null;case 10:return qc(s.type._context),Nt(s),null;case 17:return Dt(s.type)&&Hi(),Nt(s),null;case 19:if(Ge(Je),v=s.memoizedState,v===null)return Nt(s),null;if(u=(s.flags&128)!==0,E=v.rendering,E===null)if(u)$o(v,!1);else{if(dt!==0||n!==null&&(n.flags&128)!==0)for(n=s.child;n!==null;){if(E=ra(n),E!==null){for(s.flags|=128,$o(v,!1),u=E.updateQueue,u!==null&&(s.updateQueue=u,s.flags|=4),s.subtreeFlags=0,u=a,a=s.child;a!==null;)v=a,n=u,v.flags&=14680066,E=v.alternate,E===null?(v.childLanes=0,v.lanes=n,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=E.childLanes,v.lanes=E.lanes,v.child=E.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=E.memoizedProps,v.memoizedState=E.memoizedState,v.updateQueue=E.updateQueue,v.type=E.type,n=E.dependencies,v.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),a=a.sibling;return We(Je,Je.current&1|2),s.child}n=n.sibling}v.tail!==null&&ot()>ks&&(s.flags|=128,u=!0,$o(v,!1),s.lanes=4194304)}else{if(!u)if(n=ra(E),n!==null){if(s.flags|=128,u=!0,a=n.updateQueue,a!==null&&(s.updateQueue=a,s.flags|=4),$o(v,!0),v.tail===null&&v.tailMode==="hidden"&&!E.alternate&&!Qe)return Nt(s),null}else 2*ot()-v.renderingStartTime>ks&&a!==1073741824&&(s.flags|=128,u=!0,$o(v,!1),s.lanes=4194304);v.isBackwards?(E.sibling=s.child,s.child=E):(a=v.last,a!==null?a.sibling=E:s.child=E,v.last=E)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=ot(),s.sibling=null,a=Je.current,We(Je,u?a&1|2:a&1),s):(Nt(s),null);case 22:case 23:return ku(),u=s.memoizedState!==null,n!==null&&n.memoizedState!==null!==u&&(s.flags|=8192),u&&(s.mode&1)!==0?(Yt&1073741824)!==0&&(Nt(s),s.subtreeFlags&6&&(s.flags|=8192)):Nt(s),null;case 24:return null;case 25:return null}throw Error(r(156,s.tag))}function kS(n,s){switch(Fc(s),s.tag){case 1:return Dt(s.type)&&Hi(),n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 3:return Cs(),Ge(Mt),Ge(Et),Zc(),n=s.flags,(n&65536)!==0&&(n&128)===0?(s.flags=n&-65537|128,s):null;case 5:return Xc(s),null;case 13:if(Ge(Je),n=s.memoizedState,n!==null&&n.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ws()}return n=s.flags,n&65536?(s.flags=n&-65537|128,s):null;case 19:return Ge(Je),null;case 4:return Cs(),null;case 10:return qc(s.type._context),null;case 22:case 23:return ku(),null;case 24:return null;default:return null}}var da=!1,kt=!1,OS=typeof WeakSet=="function"?WeakSet:Set,fe=null;function Rs(n,s){var a=n.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(u){et(n,s,u)}else a.current=null}function vu(n,s,a){try{a()}catch(u){et(n,s,u)}}var Fm=!1;function TS(n,s){if(kc=Ti,n=mh(),wc(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var m=u.anchorOffset,v=u.focusNode;u=u.focusOffset;try{a.nodeType,v.nodeType}catch{a=null;break e}var E=0,A=-1,M=-1,V=0,Q=0,J=n,G=null;t:for(;;){for(var ce;J!==a||m!==0&&J.nodeType!==3||(A=E+m),J!==v||u!==0&&J.nodeType!==3||(M=E+u),J.nodeType===3&&(E+=J.nodeValue.length),(ce=J.firstChild)!==null;)G=J,J=ce;for(;;){if(J===n)break t;if(G===a&&++V===m&&(A=E),G===v&&++Q===u&&(M=E),(ce=J.nextSibling)!==null)break;J=G,G=J.parentNode}J=ce}a=A===-1||M===-1?null:{start:A,end:M}}else a=null}a=a||{start:0,end:0}}else a=null;for(Oc={focusedElem:n,selectionRange:a},Ti=!1,fe=s;fe!==null;)if(s=fe,n=s.child,(s.subtreeFlags&1028)!==0&&n!==null)n.return=s,fe=n;else for(;fe!==null;){s=fe;try{var he=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(he!==null){var ge=he.memoizedProps,it=he.memoizedState,L=s.stateNode,F=L.getSnapshotBeforeUpdate(s.elementType===s.type?ge:hn(s.type,ge),it);L.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var z=s.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ee){et(s,s.return,ee)}if(n=s.sibling,n!==null){n.return=s.return,fe=n;break}fe=s.return}return he=Fm,Fm=!1,he}function Fo(n,s,a){var u=s.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var m=u=u.next;do{if((m.tag&n)===n){var v=m.destroy;m.destroy=void 0,v!==void 0&&vu(s,a,v)}m=m.next}while(m!==u)}}function fa(n,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var a=s=s.next;do{if((a.tag&n)===n){var u=a.create;a.destroy=u()}a=a.next}while(a!==s)}}function yu(n){var s=n.ref;if(s!==null){var a=n.stateNode;n.tag,n=a,typeof s=="function"?s(n):s.current=n}}function Lm(n){var s=n.alternate;s!==null&&(n.alternate=null,Lm(s)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(s=n.stateNode,s!==null&&(delete s[Sn],delete s[Ro],delete s[Ac],delete s[pS],delete s[hS])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Um(n){return n.tag===5||n.tag===3||n.tag===4}function zm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Um(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function xu(n,s,a){var u=n.tag;if(u===5||u===6)n=n.stateNode,s?a.nodeType===8?a.parentNode.insertBefore(n,s):a.insertBefore(n,s):(a.nodeType===8?(s=a.parentNode,s.insertBefore(n,a)):(s=a,s.appendChild(n)),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Bi));else if(u!==4&&(n=n.child,n!==null))for(xu(n,s,a),n=n.sibling;n!==null;)xu(n,s,a),n=n.sibling}function bu(n,s,a){var u=n.tag;if(u===5||u===6)n=n.stateNode,s?a.insertBefore(n,s):a.appendChild(n);else if(u!==4&&(n=n.child,n!==null))for(bu(n,s,a),n=n.sibling;n!==null;)bu(n,s,a),n=n.sibling}var wt=null,mn=!1;function Sr(n,s,a){for(a=a.child;a!==null;)Vm(n,s,a),a=a.sibling}function Vm(n,s,a){if(wn&&typeof wn.onCommitFiberUnmount=="function")try{wn.onCommitFiberUnmount(Ci,a)}catch{}switch(a.tag){case 5:kt||Rs(a,s);case 6:var u=wt,m=mn;wt=null,Sr(n,s,a),wt=u,mn=m,wt!==null&&(mn?(n=wt,a=a.stateNode,n.nodeType===8?n.parentNode.removeChild(a):n.removeChild(a)):wt.removeChild(a.stateNode));break;case 18:wt!==null&&(mn?(n=wt,a=a.stateNode,n.nodeType===8?Ic(n.parentNode,a):n.nodeType===1&&Ic(n,a),go(n)):Ic(wt,a.stateNode));break;case 4:u=wt,m=mn,wt=a.stateNode.containerInfo,mn=!0,Sr(n,s,a),wt=u,mn=m;break;case 0:case 11:case 14:case 15:if(!kt&&(u=a.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){m=u=u.next;do{var v=m,E=v.destroy;v=v.tag,E!==void 0&&((v&2)!==0||(v&4)!==0)&&vu(a,s,E),m=m.next}while(m!==u)}Sr(n,s,a);break;case 1:if(!kt&&(Rs(a,s),u=a.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=a.memoizedProps,u.state=a.memoizedState,u.componentWillUnmount()}catch(A){et(a,s,A)}Sr(n,s,a);break;case 21:Sr(n,s,a);break;case 22:a.mode&1?(kt=(u=kt)||a.memoizedState!==null,Sr(n,s,a),kt=u):Sr(n,s,a);break;default:Sr(n,s,a)}}function Bm(n){var s=n.updateQueue;if(s!==null){n.updateQueue=null;var a=n.stateNode;a===null&&(a=n.stateNode=new OS),s.forEach(function(u){var m=US.bind(null,n,u);a.has(u)||(a.add(u),u.then(m,m))})}}function gn(n,s){var a=s.deletions;if(a!==null)for(var u=0;u<a.length;u++){var m=a[u];try{var v=n,E=s,A=E;e:for(;A!==null;){switch(A.tag){case 5:wt=A.stateNode,mn=!1;break e;case 3:wt=A.stateNode.containerInfo,mn=!0;break e;case 4:wt=A.stateNode.containerInfo,mn=!0;break e}A=A.return}if(wt===null)throw Error(r(160));Vm(v,E,m),wt=null,mn=!1;var M=m.alternate;M!==null&&(M.return=null),m.return=null}catch(V){et(m,s,V)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)qm(s,n),s=s.sibling}function qm(n,s){var a=n.alternate,u=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(gn(s,n),Cn(n),u&4){try{Fo(3,n,n.return),fa(3,n)}catch(ge){et(n,n.return,ge)}try{Fo(5,n,n.return)}catch(ge){et(n,n.return,ge)}}break;case 1:gn(s,n),Cn(n),u&512&&a!==null&&Rs(a,a.return);break;case 5:if(gn(s,n),Cn(n),u&512&&a!==null&&Rs(a,a.return),n.flags&32){var m=n.stateNode;try{so(m,"")}catch(ge){et(n,n.return,ge)}}if(u&4&&(m=n.stateNode,m!=null)){var v=n.memoizedProps,E=a!==null?a.memoizedProps:v,A=n.type,M=n.updateQueue;if(n.updateQueue=null,M!==null)try{A==="input"&&v.type==="radio"&&v.name!=null&&Pe(m,v),Xl(A,E);var V=Xl(A,v);for(E=0;E<M.length;E+=2){var Q=M[E],J=M[E+1];Q==="style"?Cp(m,J):Q==="dangerouslySetInnerHTML"?_p(m,J):Q==="children"?so(m,J):N(m,Q,J,V)}switch(A){case"input":Ee(m,v);break;case"textarea":$n(m,v);break;case"select":var G=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!v.multiple;var ce=v.value;ce!=null?pt(m,!!v.multiple,ce,!1):G!==!!v.multiple&&(v.defaultValue!=null?pt(m,!!v.multiple,v.defaultValue,!0):pt(m,!!v.multiple,v.multiple?[]:"",!1))}m[Ro]=v}catch(ge){et(n,n.return,ge)}}break;case 6:if(gn(s,n),Cn(n),u&4){if(n.stateNode===null)throw Error(r(162));m=n.stateNode,v=n.memoizedProps;try{m.nodeValue=v}catch(ge){et(n,n.return,ge)}}break;case 3:if(gn(s,n),Cn(n),u&4&&a!==null&&a.memoizedState.isDehydrated)try{go(s.containerInfo)}catch(ge){et(n,n.return,ge)}break;case 4:gn(s,n),Cn(n);break;case 13:gn(s,n),Cn(n),m=n.child,m.flags&8192&&(v=m.memoizedState!==null,m.stateNode.isHidden=v,!v||m.alternate!==null&&m.alternate.memoizedState!==null||(_u=ot())),u&4&&Bm(n);break;case 22:if(Q=a!==null&&a.memoizedState!==null,n.mode&1?(kt=(V=kt)||Q,gn(s,n),kt=V):gn(s,n),Cn(n),u&8192){if(V=n.memoizedState!==null,(n.stateNode.isHidden=V)&&!Q&&(n.mode&1)!==0)for(fe=n,Q=n.child;Q!==null;){for(J=fe=Q;fe!==null;){switch(G=fe,ce=G.child,G.tag){case 0:case 11:case 14:case 15:Fo(4,G,G.return);break;case 1:Rs(G,G.return);var he=G.stateNode;if(typeof he.componentWillUnmount=="function"){u=G,a=G.return;try{s=u,he.props=s.memoizedProps,he.state=s.memoizedState,he.componentWillUnmount()}catch(ge){et(u,a,ge)}}break;case 5:Rs(G,G.return);break;case 22:if(G.memoizedState!==null){Km(J);continue}}ce!==null?(ce.return=G,fe=ce):Km(J)}Q=Q.sibling}e:for(Q=null,J=n;;){if(J.tag===5){if(Q===null){Q=J;try{m=J.stateNode,V?(v=m.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(A=J.stateNode,M=J.memoizedProps.style,E=M!=null&&M.hasOwnProperty("display")?M.display:null,A.style.display=jp("display",E))}catch(ge){et(n,n.return,ge)}}}else if(J.tag===6){if(Q===null)try{J.stateNode.nodeValue=V?"":J.memoizedProps}catch(ge){et(n,n.return,ge)}}else if((J.tag!==22&&J.tag!==23||J.memoizedState===null||J===n)&&J.child!==null){J.child.return=J,J=J.child;continue}if(J===n)break e;for(;J.sibling===null;){if(J.return===null||J.return===n)break e;Q===J&&(Q=null),J=J.return}Q===J&&(Q=null),J.sibling.return=J.return,J=J.sibling}}break;case 19:gn(s,n),Cn(n),u&4&&Bm(n);break;case 21:break;default:gn(s,n),Cn(n)}}function Cn(n){var s=n.flags;if(s&2){try{e:{for(var a=n.return;a!==null;){if(Um(a)){var u=a;break e}a=a.return}throw Error(r(160))}switch(u.tag){case 5:var m=u.stateNode;u.flags&32&&(so(m,""),u.flags&=-33);var v=zm(n);bu(n,v,m);break;case 3:case 4:var E=u.stateNode.containerInfo,A=zm(n);xu(n,A,E);break;default:throw Error(r(161))}}catch(M){et(n,n.return,M)}n.flags&=-3}s&4096&&(n.flags&=-4097)}function PS(n,s,a){fe=n,Hm(n)}function Hm(n,s,a){for(var u=(n.mode&1)!==0;fe!==null;){var m=fe,v=m.child;if(m.tag===22&&u){var E=m.memoizedState!==null||da;if(!E){var A=m.alternate,M=A!==null&&A.memoizedState!==null||kt;A=da;var V=kt;if(da=E,(kt=M)&&!V)for(fe=m;fe!==null;)E=fe,M=E.child,E.tag===22&&E.memoizedState!==null?Gm(m):M!==null?(M.return=E,fe=M):Gm(m);for(;v!==null;)fe=v,Hm(v),v=v.sibling;fe=m,da=A,kt=V}Wm(n)}else(m.subtreeFlags&8772)!==0&&v!==null?(v.return=m,fe=v):Wm(n)}}function Wm(n){for(;fe!==null;){var s=fe;if((s.flags&8772)!==0){var a=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:kt||fa(5,s);break;case 1:var u=s.stateNode;if(s.flags&4&&!kt)if(a===null)u.componentDidMount();else{var m=s.elementType===s.type?a.memoizedProps:hn(s.type,a.memoizedProps);u.componentDidUpdate(m,a.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var v=s.updateQueue;v!==null&&Bh(s,v,u);break;case 3:var E=s.updateQueue;if(E!==null){if(a=null,s.child!==null)switch(s.child.tag){case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}Bh(s,E,a)}break;case 5:var A=s.stateNode;if(a===null&&s.flags&4){a=A;var M=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":M.autoFocus&&a.focus();break;case"img":M.src&&(a.src=M.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var V=s.alternate;if(V!==null){var Q=V.memoizedState;if(Q!==null){var J=Q.dehydrated;J!==null&&go(J)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}kt||s.flags&512&&yu(s)}catch(G){et(s,s.return,G)}}if(s===n){fe=null;break}if(a=s.sibling,a!==null){a.return=s.return,fe=a;break}fe=s.return}}function Km(n){for(;fe!==null;){var s=fe;if(s===n){fe=null;break}var a=s.sibling;if(a!==null){a.return=s.return,fe=a;break}fe=s.return}}function Gm(n){for(;fe!==null;){var s=fe;try{switch(s.tag){case 0:case 11:case 15:var a=s.return;try{fa(4,s)}catch(M){et(s,a,M)}break;case 1:var u=s.stateNode;if(typeof u.componentDidMount=="function"){var m=s.return;try{u.componentDidMount()}catch(M){et(s,m,M)}}var v=s.return;try{yu(s)}catch(M){et(s,v,M)}break;case 5:var E=s.return;try{yu(s)}catch(M){et(s,E,M)}}}catch(M){et(s,s.return,M)}if(s===n){fe=null;break}var A=s.sibling;if(A!==null){A.return=s.return,fe=A;break}fe=s.return}}var IS=Math.ceil,pa=P.ReactCurrentDispatcher,wu=P.ReactCurrentOwner,on=P.ReactCurrentBatchConfig,Me=0,mt=null,at=null,St=0,Yt=0,Ns=vr(0),dt=0,Lo=null,qr=0,ha=0,Su=0,Uo=null,Ft=null,_u=0,ks=1/0,Hn=null,ma=!1,ju=null,_r=null,ga=!1,jr=null,va=0,zo=0,Cu=null,ya=-1,xa=0;function Pt(){return(Me&6)!==0?ot():ya!==-1?ya:ya=ot()}function Cr(n){return(n.mode&1)===0?1:(Me&2)!==0&&St!==0?St&-St:gS.transition!==null?(xa===0&&(xa=Up()),xa):(n=qe,n!==0||(n=window.event,n=n===void 0?16:Yp(n.type)),n)}function vn(n,s,a,u){if(50<zo)throw zo=0,Cu=null,Error(r(185));uo(n,a,u),((Me&2)===0||n!==mt)&&(n===mt&&((Me&2)===0&&(ha|=a),dt===4&&Er(n,St)),Lt(n,u),a===1&&Me===0&&(s.mode&1)===0&&(ks=ot()+500,Ki&&xr()))}function Lt(n,s){var a=n.callbackNode;gw(n,s);var u=Ni(n,n===mt?St:0);if(u===0)a!==null&&$p(a),n.callbackNode=null,n.callbackPriority=0;else if(s=u&-u,n.callbackPriority!==s){if(a!=null&&$p(a),s===1)n.tag===0?mS(Qm.bind(null,n)):Ah(Qm.bind(null,n)),dS(function(){(Me&6)===0&&xr()}),a=null;else{switch(zp(u)){case 1:a=sc;break;case 4:a=Fp;break;case 16:a=ji;break;case 536870912:a=Lp;break;default:a=ji}a=sg(a,Ym.bind(null,n))}n.callbackPriority=s,n.callbackNode=a}}function Ym(n,s){if(ya=-1,xa=0,(Me&6)!==0)throw Error(r(327));var a=n.callbackNode;if(Os()&&n.callbackNode!==a)return null;var u=Ni(n,n===mt?St:0);if(u===0)return null;if((u&30)!==0||(u&n.expiredLanes)!==0||s)s=ba(n,u);else{s=u;var m=Me;Me|=2;var v=Jm();(mt!==n||St!==s)&&(Hn=null,ks=ot()+500,Wr(n,s));do try{DS();break}catch(A){Xm(n,A)}while(!0);Bc(),pa.current=v,Me=m,at!==null?s=0:(mt=null,St=0,s=dt)}if(s!==0){if(s===2&&(m=oc(n),m!==0&&(u=m,s=Eu(n,m))),s===1)throw a=Lo,Wr(n,0),Er(n,u),Lt(n,ot()),a;if(s===6)Er(n,u);else{if(m=n.current.alternate,(u&30)===0&&!AS(m)&&(s=ba(n,u),s===2&&(v=oc(n),v!==0&&(u=v,s=Eu(n,v))),s===1))throw a=Lo,Wr(n,0),Er(n,u),Lt(n,ot()),a;switch(n.finishedWork=m,n.finishedLanes=u,s){case 0:case 1:throw Error(r(345));case 2:Kr(n,Ft,Hn);break;case 3:if(Er(n,u),(u&130023424)===u&&(s=_u+500-ot(),10<s)){if(Ni(n,0)!==0)break;if(m=n.suspendedLanes,(m&u)!==u){Pt(),n.pingedLanes|=n.suspendedLanes&m;break}n.timeoutHandle=Pc(Kr.bind(null,n,Ft,Hn),s);break}Kr(n,Ft,Hn);break;case 4:if(Er(n,u),(u&4194240)===u)break;for(s=n.eventTimes,m=-1;0<u;){var E=31-dn(u);v=1<<E,E=s[E],E>m&&(m=E),u&=~v}if(u=m,u=ot()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*IS(u/1960))-u,10<u){n.timeoutHandle=Pc(Kr.bind(null,n,Ft,Hn),u);break}Kr(n,Ft,Hn);break;case 5:Kr(n,Ft,Hn);break;default:throw Error(r(329))}}}return Lt(n,ot()),n.callbackNode===a?Ym.bind(null,n):null}function Eu(n,s){var a=Uo;return n.current.memoizedState.isDehydrated&&(Wr(n,s).flags|=256),n=ba(n,s),n!==2&&(s=Ft,Ft=a,s!==null&&Ru(s)),n}function Ru(n){Ft===null?Ft=n:Ft.push.apply(Ft,n)}function AS(n){for(var s=n;;){if(s.flags&16384){var a=s.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var u=0;u<a.length;u++){var m=a[u],v=m.getSnapshot;m=m.value;try{if(!fn(v(),m))return!1}catch{return!1}}}if(a=s.child,s.subtreeFlags&16384&&a!==null)a.return=s,s=a;else{if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Er(n,s){for(s&=~Su,s&=~ha,n.suspendedLanes|=s,n.pingedLanes&=~s,n=n.expirationTimes;0<s;){var a=31-dn(s),u=1<<a;n[a]=-1,s&=~u}}function Qm(n){if((Me&6)!==0)throw Error(r(327));Os();var s=Ni(n,0);if((s&1)===0)return Lt(n,ot()),null;var a=ba(n,s);if(n.tag!==0&&a===2){var u=oc(n);u!==0&&(s=u,a=Eu(n,u))}if(a===1)throw a=Lo,Wr(n,0),Er(n,s),Lt(n,ot()),a;if(a===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=s,Kr(n,Ft,Hn),Lt(n,ot()),null}function Nu(n,s){var a=Me;Me|=1;try{return n(s)}finally{Me=a,Me===0&&(ks=ot()+500,Ki&&xr())}}function Hr(n){jr!==null&&jr.tag===0&&(Me&6)===0&&Os();var s=Me;Me|=1;var a=on.transition,u=qe;try{if(on.transition=null,qe=1,n)return n()}finally{qe=u,on.transition=a,Me=s,(Me&6)===0&&xr()}}function ku(){Yt=Ns.current,Ge(Ns)}function Wr(n,s){n.finishedWork=null,n.finishedLanes=0;var a=n.timeoutHandle;if(a!==-1&&(n.timeoutHandle=-1,uS(a)),at!==null)for(a=at.return;a!==null;){var u=a;switch(Fc(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&Hi();break;case 3:Cs(),Ge(Mt),Ge(Et),Zc();break;case 5:Xc(u);break;case 4:Cs();break;case 13:Ge(Je);break;case 19:Ge(Je);break;case 10:qc(u.type._context);break;case 22:case 23:ku()}a=a.return}if(mt=n,at=n=Rr(n.current,null),St=Yt=s,dt=0,Lo=null,Su=ha=qr=0,Ft=Uo=null,zr!==null){for(s=0;s<zr.length;s++)if(a=zr[s],u=a.interleaved,u!==null){a.interleaved=null;var m=u.next,v=a.pending;if(v!==null){var E=v.next;v.next=m,u.next=E}a.pending=u}zr=null}return n}function Xm(n,s){do{var a=at;try{if(Bc(),sa.current=la,oa){for(var u=Ze.memoizedState;u!==null;){var m=u.queue;m!==null&&(m.pending=null),u=u.next}oa=!1}if(Br=0,ht=ut=Ze=null,Io=!1,Ao=0,wu.current=null,a===null||a.return===null){dt=1,Lo=s,at=null;break}e:{var v=n,E=a.return,A=a,M=s;if(s=St,A.flags|=32768,M!==null&&typeof M=="object"&&typeof M.then=="function"){var V=M,Q=A,J=Q.tag;if((Q.mode&1)===0&&(J===0||J===11||J===15)){var G=Q.alternate;G?(Q.updateQueue=G.updateQueue,Q.memoizedState=G.memoizedState,Q.lanes=G.lanes):(Q.updateQueue=null,Q.memoizedState=null)}var ce=Sm(E);if(ce!==null){ce.flags&=-257,_m(ce,E,A,v,s),ce.mode&1&&wm(v,V,s),s=ce,M=V;var he=s.updateQueue;if(he===null){var ge=new Set;ge.add(M),s.updateQueue=ge}else he.add(M);break e}else{if((s&1)===0){wm(v,V,s),Ou();break e}M=Error(r(426))}}else if(Qe&&A.mode&1){var it=Sm(E);if(it!==null){(it.flags&65536)===0&&(it.flags|=256),_m(it,E,A,v,s),zc(Es(M,A));break e}}v=M=Es(M,A),dt!==4&&(dt=2),Uo===null?Uo=[v]:Uo.push(v),v=E;do{switch(v.tag){case 3:v.flags|=65536,s&=-s,v.lanes|=s;var L=xm(v,M,s);Vh(v,L);break e;case 1:A=M;var F=v.type,z=v.stateNode;if((v.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(_r===null||!_r.has(z)))){v.flags|=65536,s&=-s,v.lanes|=s;var ee=bm(v,A,s);Vh(v,ee);break e}}v=v.return}while(v!==null)}eg(a)}catch(ye){s=ye,at===a&&a!==null&&(at=a=a.return);continue}break}while(!0)}function Jm(){var n=pa.current;return pa.current=la,n===null?la:n}function Ou(){(dt===0||dt===3||dt===2)&&(dt=4),mt===null||(qr&268435455)===0&&(ha&268435455)===0||Er(mt,St)}function ba(n,s){var a=Me;Me|=2;var u=Jm();(mt!==n||St!==s)&&(Hn=null,Wr(n,s));do try{MS();break}catch(m){Xm(n,m)}while(!0);if(Bc(),Me=a,pa.current=u,at!==null)throw Error(r(261));return mt=null,St=0,dt}function MS(){for(;at!==null;)Zm(at)}function DS(){for(;at!==null&&!aw();)Zm(at)}function Zm(n){var s=rg(n.alternate,n,Yt);n.memoizedProps=n.pendingProps,s===null?eg(n):at=s,wu.current=null}function eg(n){var s=n;do{var a=s.alternate;if(n=s.return,(s.flags&32768)===0){if(a=NS(a,s,Yt),a!==null){at=a;return}}else{if(a=kS(a,s),a!==null){a.flags&=32767,at=a;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{dt=6,at=null;return}}if(s=s.sibling,s!==null){at=s;return}at=s=n}while(s!==null);dt===0&&(dt=5)}function Kr(n,s,a){var u=qe,m=on.transition;try{on.transition=null,qe=1,$S(n,s,a,u)}finally{on.transition=m,qe=u}return null}function $S(n,s,a,u){do Os();while(jr!==null);if((Me&6)!==0)throw Error(r(327));a=n.finishedWork;var m=n.finishedLanes;if(a===null)return null;if(n.finishedWork=null,n.finishedLanes=0,a===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var v=a.lanes|a.childLanes;if(vw(n,v),n===mt&&(at=mt=null,St=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||ga||(ga=!0,sg(ji,function(){return Os(),null})),v=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||v){v=on.transition,on.transition=null;var E=qe;qe=1;var A=Me;Me|=4,wu.current=null,TS(n,a),qm(a,n),rS(Oc),Ti=!!kc,Oc=kc=null,n.current=a,PS(a),lw(),Me=A,qe=E,on.transition=v}else n.current=a;if(ga&&(ga=!1,jr=n,va=m),v=n.pendingLanes,v===0&&(_r=null),dw(a.stateNode),Lt(n,ot()),s!==null)for(u=n.onRecoverableError,a=0;a<s.length;a++)m=s[a],u(m.value,{componentStack:m.stack,digest:m.digest});if(ma)throw ma=!1,n=ju,ju=null,n;return(va&1)!==0&&n.tag!==0&&Os(),v=n.pendingLanes,(v&1)!==0?n===Cu?zo++:(zo=0,Cu=n):zo=0,xr(),null}function Os(){if(jr!==null){var n=zp(va),s=on.transition,a=qe;try{if(on.transition=null,qe=16>n?16:n,jr===null)var u=!1;else{if(n=jr,jr=null,va=0,(Me&6)!==0)throw Error(r(331));var m=Me;for(Me|=4,fe=n.current;fe!==null;){var v=fe,E=v.child;if((fe.flags&16)!==0){var A=v.deletions;if(A!==null){for(var M=0;M<A.length;M++){var V=A[M];for(fe=V;fe!==null;){var Q=fe;switch(Q.tag){case 0:case 11:case 15:Fo(8,Q,v)}var J=Q.child;if(J!==null)J.return=Q,fe=J;else for(;fe!==null;){Q=fe;var G=Q.sibling,ce=Q.return;if(Lm(Q),Q===V){fe=null;break}if(G!==null){G.return=ce,fe=G;break}fe=ce}}}var he=v.alternate;if(he!==null){var ge=he.child;if(ge!==null){he.child=null;do{var it=ge.sibling;ge.sibling=null,ge=it}while(ge!==null)}}fe=v}}if((v.subtreeFlags&2064)!==0&&E!==null)E.return=v,fe=E;else e:for(;fe!==null;){if(v=fe,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:Fo(9,v,v.return)}var L=v.sibling;if(L!==null){L.return=v.return,fe=L;break e}fe=v.return}}var F=n.current;for(fe=F;fe!==null;){E=fe;var z=E.child;if((E.subtreeFlags&2064)!==0&&z!==null)z.return=E,fe=z;else e:for(E=F;fe!==null;){if(A=fe,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:fa(9,A)}}catch(ye){et(A,A.return,ye)}if(A===E){fe=null;break e}var ee=A.sibling;if(ee!==null){ee.return=A.return,fe=ee;break e}fe=A.return}}if(Me=m,xr(),wn&&typeof wn.onPostCommitFiberRoot=="function")try{wn.onPostCommitFiberRoot(Ci,n)}catch{}u=!0}return u}finally{qe=a,on.transition=s}}return!1}function tg(n,s,a){s=Es(a,s),s=xm(n,s,1),n=wr(n,s,1),s=Pt(),n!==null&&(uo(n,1,s),Lt(n,s))}function et(n,s,a){if(n.tag===3)tg(n,n,a);else for(;s!==null;){if(s.tag===3){tg(s,n,a);break}else if(s.tag===1){var u=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(_r===null||!_r.has(u))){n=Es(a,n),n=bm(s,n,1),s=wr(s,n,1),n=Pt(),s!==null&&(uo(s,1,n),Lt(s,n));break}}s=s.return}}function FS(n,s,a){var u=n.pingCache;u!==null&&u.delete(s),s=Pt(),n.pingedLanes|=n.suspendedLanes&a,mt===n&&(St&a)===a&&(dt===4||dt===3&&(St&130023424)===St&&500>ot()-_u?Wr(n,0):Su|=a),Lt(n,s)}function ng(n,s){s===0&&((n.mode&1)===0?s=1:(s=Ri,Ri<<=1,(Ri&130023424)===0&&(Ri=4194304)));var a=Pt();n=Vn(n,s),n!==null&&(uo(n,s,a),Lt(n,a))}function LS(n){var s=n.memoizedState,a=0;s!==null&&(a=s.retryLane),ng(n,a)}function US(n,s){var a=0;switch(n.tag){case 13:var u=n.stateNode,m=n.memoizedState;m!==null&&(a=m.retryLane);break;case 19:u=n.stateNode;break;default:throw Error(r(314))}u!==null&&u.delete(s),ng(n,a)}var rg;rg=function(n,s,a){if(n!==null)if(n.memoizedProps!==s.pendingProps||Mt.current)$t=!0;else{if((n.lanes&a)===0&&(s.flags&128)===0)return $t=!1,RS(n,s,a);$t=(n.flags&131072)!==0}else $t=!1,Qe&&(s.flags&1048576)!==0&&Mh(s,Yi,s.index);switch(s.lanes=0,s.tag){case 2:var u=s.type;ua(n,s),n=s.pendingProps;var m=ys(s,Et.current);_s(s,a),m=nu(null,s,u,n,m,a);var v=ru();return s.flags|=1,typeof m=="object"&&m!==null&&typeof m.render=="function"&&m.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Dt(u)?(v=!0,Wi(s)):v=!1,s.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,Kc(s),m.updater=ta,s.stateNode=m,m._reactInternals=s,Yc(s,u,n,a),s=du(null,s,u,!0,v,a)):(s.tag=0,Qe&&v&&$c(s),Tt(null,s,m,a),s=s.child),s;case 16:u=s.elementType;e:{switch(ua(n,s),n=s.pendingProps,m=u._init,u=m(u._payload),s.type=u,m=s.tag=VS(u),n=hn(u,n),m){case 0:s=uu(null,s,u,n,a);break e;case 1:s=km(null,s,u,n,a);break e;case 11:s=jm(null,s,u,n,a);break e;case 14:s=Cm(null,s,u,hn(u.type,n),a);break e}throw Error(r(306,u,""))}return s;case 0:return u=s.type,m=s.pendingProps,m=s.elementType===u?m:hn(u,m),uu(n,s,u,m,a);case 1:return u=s.type,m=s.pendingProps,m=s.elementType===u?m:hn(u,m),km(n,s,u,m,a);case 3:e:{if(Om(s),n===null)throw Error(r(387));u=s.pendingProps,v=s.memoizedState,m=v.element,zh(n,s),ea(s,u,null,a);var E=s.memoizedState;if(u=E.element,v.isDehydrated)if(v={element:u,isDehydrated:!1,cache:E.cache,pendingSuspenseBoundaries:E.pendingSuspenseBoundaries,transitions:E.transitions},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){m=Es(Error(r(423)),s),s=Tm(n,s,u,a,m);break e}else if(u!==m){m=Es(Error(r(424)),s),s=Tm(n,s,u,a,m);break e}else for(Gt=gr(s.stateNode.containerInfo.firstChild),Kt=s,Qe=!0,pn=null,a=Qh(s,null,u,a),s.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ws(),u===m){s=qn(n,s,a);break e}Tt(n,s,u,a)}s=s.child}return s;case 5:return Xh(s),n===null&&Uc(s),u=s.type,m=s.pendingProps,v=n!==null?n.memoizedProps:null,E=m.children,Tc(u,m)?E=null:v!==null&&Tc(u,v)&&(s.flags|=32),Nm(n,s),Tt(n,s,E,a),s.child;case 6:return n===null&&Uc(s),null;case 13:return Pm(n,s,a);case 4:return Qc(s,s.stateNode.containerInfo),u=s.pendingProps,n===null?s.child=js(s,null,u,a):Tt(n,s,u,a),s.child;case 11:return u=s.type,m=s.pendingProps,m=s.elementType===u?m:hn(u,m),jm(n,s,u,m,a);case 7:return Tt(n,s,s.pendingProps,a),s.child;case 8:return Tt(n,s,s.pendingProps.children,a),s.child;case 12:return Tt(n,s,s.pendingProps.children,a),s.child;case 10:e:{if(u=s.type._context,m=s.pendingProps,v=s.memoizedProps,E=m.value,We(Xi,u._currentValue),u._currentValue=E,v!==null)if(fn(v.value,E)){if(v.children===m.children&&!Mt.current){s=qn(n,s,a);break e}}else for(v=s.child,v!==null&&(v.return=s);v!==null;){var A=v.dependencies;if(A!==null){E=v.child;for(var M=A.firstContext;M!==null;){if(M.context===u){if(v.tag===1){M=Bn(-1,a&-a),M.tag=2;var V=v.updateQueue;if(V!==null){V=V.shared;var Q=V.pending;Q===null?M.next=M:(M.next=Q.next,Q.next=M),V.pending=M}}v.lanes|=a,M=v.alternate,M!==null&&(M.lanes|=a),Hc(v.return,a,s),A.lanes|=a;break}M=M.next}}else if(v.tag===10)E=v.type===s.type?null:v.child;else if(v.tag===18){if(E=v.return,E===null)throw Error(r(341));E.lanes|=a,A=E.alternate,A!==null&&(A.lanes|=a),Hc(E,a,s),E=v.sibling}else E=v.child;if(E!==null)E.return=v;else for(E=v;E!==null;){if(E===s){E=null;break}if(v=E.sibling,v!==null){v.return=E.return,E=v;break}E=E.return}v=E}Tt(n,s,m.children,a),s=s.child}return s;case 9:return m=s.type,u=s.pendingProps.children,_s(s,a),m=rn(m),u=u(m),s.flags|=1,Tt(n,s,u,a),s.child;case 14:return u=s.type,m=hn(u,s.pendingProps),m=hn(u.type,m),Cm(n,s,u,m,a);case 15:return Em(n,s,s.type,s.pendingProps,a);case 17:return u=s.type,m=s.pendingProps,m=s.elementType===u?m:hn(u,m),ua(n,s),s.tag=1,Dt(u)?(n=!0,Wi(s)):n=!1,_s(s,a),Wh(s,u,m),Yc(s,u,m,a),du(null,s,u,!0,n,a);case 19:return Am(n,s,a);case 22:return Rm(n,s,a)}throw Error(r(156,s.tag))};function sg(n,s){return Dp(n,s)}function zS(n,s,a,u){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(n,s,a,u){return new zS(n,s,a,u)}function Tu(n){return n=n.prototype,!(!n||!n.isReactComponent)}function VS(n){if(typeof n=="function")return Tu(n)?1:0;if(n!=null){if(n=n.$$typeof,n===H)return 11;if(n===re)return 14}return 2}function Rr(n,s){var a=n.alternate;return a===null?(a=an(n.tag,s,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=s,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&14680064,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,s=n.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a}function wa(n,s,a,u,m,v){var E=2;if(u=n,typeof n=="function")Tu(n)&&(E=1);else if(typeof n=="string")E=5;else e:switch(n){case T:return Gr(a.children,m,v,s);case D:E=8,m|=8;break;case K:return n=an(12,a,s,m|2),n.elementType=K,n.lanes=v,n;case X:return n=an(13,a,s,m),n.elementType=X,n.lanes=v,n;case oe:return n=an(19,a,s,m),n.elementType=oe,n.lanes=v,n;case pe:return Sa(a,m,v,s);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case U:E=10;break e;case W:E=9;break e;case H:E=11;break e;case re:E=14;break e;case se:E=16,u=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return s=an(E,a,s,m),s.elementType=n,s.type=u,s.lanes=v,s}function Gr(n,s,a,u){return n=an(7,n,u,s),n.lanes=a,n}function Sa(n,s,a,u){return n=an(22,n,u,s),n.elementType=pe,n.lanes=a,n.stateNode={isHidden:!1},n}function Pu(n,s,a){return n=an(6,n,null,s),n.lanes=a,n}function Iu(n,s,a){return s=an(4,n.children!==null?n.children:[],n.key,s),s.lanes=a,s.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},s}function BS(n,s,a,u,m){this.tag=s,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ic(0),this.expirationTimes=ic(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ic(0),this.identifierPrefix=u,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function Au(n,s,a,u,m,v,E,A,M){return n=new BS(n,s,a,A,M),s===1?(s=1,v===!0&&(s|=8)):s=0,v=an(3,null,null,s),n.current=v,v.stateNode=n,v.memoizedState={element:u,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Kc(v),n}function qS(n,s,a){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:O,key:u==null?null:""+u,children:n,containerInfo:s,implementation:a}}function og(n){if(!n)return yr;n=n._reactInternals;e:{if(Dr(n)!==n||n.tag!==1)throw Error(r(170));var s=n;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Dt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(r(171))}if(n.tag===1){var a=n.type;if(Dt(a))return Ph(n,a,s)}return s}function ig(n,s,a,u,m,v,E,A,M){return n=Au(a,u,!0,n,m,v,E,A,M),n.context=og(null),a=n.current,u=Pt(),m=Cr(a),v=Bn(u,m),v.callback=s??null,wr(a,v,m),n.current.lanes=m,uo(n,m,u),Lt(n,u),n}function _a(n,s,a,u){var m=s.current,v=Pt(),E=Cr(m);return a=og(a),s.context===null?s.context=a:s.pendingContext=a,s=Bn(v,E),s.payload={element:n},u=u===void 0?null:u,u!==null&&(s.callback=u),n=wr(m,s,E),n!==null&&(vn(n,m,E,v),Zi(n,m,E)),E}function ja(n){return n=n.current,n.child?(n.child.tag===5,n.child.stateNode):null}function ag(n,s){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<s?a:s}}function Mu(n,s){ag(n,s),(n=n.alternate)&&ag(n,s)}function HS(){return null}var lg=typeof reportError=="function"?reportError:function(n){console.error(n)};function Du(n){this._internalRoot=n}Ca.prototype.render=Du.prototype.render=function(n){var s=this._internalRoot;if(s===null)throw Error(r(409));_a(n,s,null,null)},Ca.prototype.unmount=Du.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var s=n.containerInfo;Hr(function(){_a(null,n,null,null)}),s[Fn]=null}};function Ca(n){this._internalRoot=n}Ca.prototype.unstable_scheduleHydration=function(n){if(n){var s=qp();n={blockedOn:null,target:n,priority:s};for(var a=0;a<pr.length&&s!==0&&s<pr[a].priority;a++);pr.splice(a,0,n),a===0&&Kp(n)}};function $u(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Ea(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function cg(){}function WS(n,s,a,u,m){if(m){if(typeof u=="function"){var v=u;u=function(){var V=ja(E);v.call(V)}}var E=ig(s,u,n,0,null,!1,!1,"",cg);return n._reactRootContainer=E,n[Fn]=E.current,Co(n.nodeType===8?n.parentNode:n),Hr(),E}for(;m=n.lastChild;)n.removeChild(m);if(typeof u=="function"){var A=u;u=function(){var V=ja(M);A.call(V)}}var M=Au(n,0,!1,null,null,!1,!1,"",cg);return n._reactRootContainer=M,n[Fn]=M.current,Co(n.nodeType===8?n.parentNode:n),Hr(function(){_a(s,M,a,u)}),M}function Ra(n,s,a,u,m){var v=a._reactRootContainer;if(v){var E=v;if(typeof m=="function"){var A=m;m=function(){var M=ja(E);A.call(M)}}_a(s,E,n,m)}else E=WS(a,s,n,m,u);return ja(E)}Vp=function(n){switch(n.tag){case 3:var s=n.stateNode;if(s.current.memoizedState.isDehydrated){var a=co(s.pendingLanes);a!==0&&(ac(s,a|1),Lt(s,ot()),(Me&6)===0&&(ks=ot()+500,xr()))}break;case 13:Hr(function(){var u=Vn(n,1);if(u!==null){var m=Pt();vn(u,n,1,m)}}),Mu(n,1)}},lc=function(n){if(n.tag===13){var s=Vn(n,134217728);if(s!==null){var a=Pt();vn(s,n,134217728,a)}Mu(n,134217728)}},Bp=function(n){if(n.tag===13){var s=Cr(n),a=Vn(n,s);if(a!==null){var u=Pt();vn(a,n,s,u)}Mu(n,s)}},qp=function(){return qe},Hp=function(n,s){var a=qe;try{return qe=n,s()}finally{qe=a}},ec=function(n,s,a){switch(s){case"input":if(Ee(n,a),s=a.name,a.type==="radio"&&s!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<a.length;s++){var u=a[s];if(u!==n&&u.form===n.form){var m=qi(u);if(!m)throw Error(r(90));Ae(u),Ee(u,m)}}}break;case"textarea":$n(n,a);break;case"select":s=a.value,s!=null&&pt(n,!!a.multiple,s,!1)}},kp=Nu,Op=Hr;var KS={usingClientEntryPoint:!1,Events:[No,gs,qi,Rp,Np,Nu]},Vo={findFiberByHostInstance:$r,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},GS={bundleType:Vo.bundleType,version:Vo.version,rendererPackageName:Vo.rendererPackageName,rendererConfig:Vo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:P.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Ap(n),n===null?null:n.stateNode},findFiberByHostInstance:Vo.findFiberByHostInstance||HS,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 Na=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Na.isDisabled&&Na.supportsFiber)try{Ci=Na.inject(GS),wn=Na}catch{}}return Ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KS,Ut.createPortal=function(n,s){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$u(s))throw Error(r(200));return qS(n,s,null,a)},Ut.createRoot=function(n,s){if(!$u(n))throw Error(r(299));var a=!1,u="",m=lg;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(u=s.identifierPrefix),s.onRecoverableError!==void 0&&(m=s.onRecoverableError)),s=Au(n,1,!1,null,null,a,!1,u,m),n[Fn]=s.current,Co(n.nodeType===8?n.parentNode:n),new Du(s)},Ut.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var s=n._reactInternals;if(s===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=Ap(s),n=n===null?null:n.stateNode,n},Ut.flushSync=function(n){return Hr(n)},Ut.hydrate=function(n,s,a){if(!Ea(s))throw Error(r(200));return Ra(null,n,s,!0,a)},Ut.hydrateRoot=function(n,s,a){if(!$u(n))throw Error(r(405));var u=a!=null&&a.hydratedSources||null,m=!1,v="",E=lg;if(a!=null&&(a.unstable_strictMode===!0&&(m=!0),a.identifierPrefix!==void 0&&(v=a.identifierPrefix),a.onRecoverableError!==void 0&&(E=a.onRecoverableError)),s=ig(s,null,n,1,a??null,m,!1,v,E),n[Fn]=s.current,Co(n),u)for(n=0;n<u.length;n++)a=u[n],m=a._getVersion,m=m(a._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[a,m]:s.mutableSourceEagerHydrationData.push(a,m);return new Ca(s)},Ut.render=function(n,s,a){if(!Ea(s))throw Error(r(200));return Ra(null,n,s,!1,a)},Ut.unmountComponentAtNode=function(n){if(!Ea(n))throw Error(r(40));return n._reactRootContainer?(Hr(function(){Ra(null,null,n,!1,function(){n._reactRootContainer=null,n[Fn]=null})}),!0):!1},Ut.unstable_batchedUpdates=Nu,Ut.unstable_renderSubtreeIntoContainer=function(n,s,a,u){if(!Ea(a))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return Ra(n,s,a,!1,u)},Ut.version="18.2.0-next-9e3b772b8-20220608",Ut}var vg;function Ny(){if(vg)return zu.exports;vg=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zu.exports=n_(),zu.exports}var yg;function r_(){if(yg)return ka;yg=1;var e=Ny();return ka.createRoot=e.createRoot,ka.hydrateRoot=e.hydrateRoot,ka}var s_=r_();const un=Js(s_);function _t(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 o_=typeof Symbol=="function"&&Symbol.observable||"@@observable",xg=o_,qu=()=>Math.random().toString(36).substring(7).split("").join("."),i_={INIT:`@@redux/INIT${qu()}`,REPLACE:`@@redux/REPLACE${qu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${qu()}`},al=i_;function lf(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 ky(e,t,r){if(typeof e!="function")throw new Error(_t(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(_t(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(_t(1));return r(ky)(e,t)}let i=e,o=t,l=new Map,d=l,p=0,f=!1;function h(){d===l&&(d=new Map,l.forEach((b,C)=>{d.set(C,b)}))}function g(){if(f)throw new Error(_t(3));return o}function y(b){if(typeof b!="function")throw new Error(_t(4));if(f)throw new Error(_t(5));let C=!0;h();const R=p++;return d.set(R,b),function(){if(C){if(f)throw new Error(_t(6));C=!1,h(),d.delete(R),l=null}}}function x(b){if(!lf(b))throw new Error(_t(7));if(typeof b.type>"u")throw new Error(_t(8));if(typeof b.type!="string")throw new Error(_t(17));if(f)throw new Error(_t(9));try{f=!0,o=i(o,b)}finally{f=!1}return(l=d).forEach(R=>{R()}),b}function w(b){if(typeof b!="function")throw new Error(_t(10));i=b,x({type:al.REPLACE})}function _(){const b=y;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(_t(11));function R(){const P=C;P.next&&P.next(g())}return R(),{unsubscribe:b(R)}},[xg](){return this}}}return x({type:al.INIT}),{dispatch:x,subscribe:y,getState:g,replaceReducer:w,[xg]:_}}function a_(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:al.INIT})>"u")throw new Error(_t(12));if(typeof r(void 0,{type:al.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_t(13))})}function l_(e){const t=Object.keys(e),r={};for(let l=0;l<t.length;l++){const d=t[l];typeof e[d]=="function"&&(r[d]=e[d])}const i=Object.keys(r);let o;try{a_(r)}catch(l){o=l}return function(d={},p){if(o)throw o;let f=!1;const h={};for(let g=0;g<i.length;g++){const y=i[g],x=r[y],w=d[y],_=x(w,p);if(typeof _>"u")throw p&&p.type,new Error(_t(14));h[y]=_,f=f||_!==w}return f=f||i.length!==Object.keys(d).length,f?h:d}}function ll(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...i)=>t(r(...i)))}function c_(...e){return t=>(r,i)=>{const o=t(r,i);let l=()=>{throw new Error(_t(15))};const d={getState:o.getState,dispatch:(f,...h)=>l(f,...h)},p=e.map(f=>f(d));return l=ll(...p)(o.dispatch),{...o,dispatch:l}}}function u_(e){return lf(e)&&"type"in e&&typeof e.type=="string"}var Oy=Symbol.for("immer-nothing"),bg=Symbol.for("immer-draftable"),Xt=Symbol.for("immer-state");function xn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Vs=Object.getPrototypeOf;function Tr(e){return!!e&&!!e[Xt]}function nr(e){return e?Ty(e)||Array.isArray(e)||!!e[bg]||!!e.constructor?.[bg]||Pl(e)||Il(e):!1}var d_=Object.prototype.constructor.toString();function Ty(e){if(!e||typeof e!="object")return!1;const t=Vs(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===d_}function ni(e,t){Tl(e)===0?Object.entries(e).forEach(([r,i])=>{t(r,i,e)}):e.forEach((r,i)=>t(i,r,e))}function Tl(e){const t=e[Xt];return t?t.type_:Array.isArray(e)?1:Pl(e)?2:Il(e)?3:0}function wd(e,t){return Tl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Py(e,t,r){const i=Tl(e);i===2?e.set(t,r):i===3?e.add(r):e[t]=r}function f_(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 Sd(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&&Ty(e))return Vs(e)?{...e}:Object.assign(Object.create(null),e);const r=Object.getOwnPropertyDescriptors(e);delete r[Xt];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const l=i[o],d=r[l];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(r[l]={configurable:!0,writable:!0,enumerable:d.enumerable,value:e[l]})}return Object.create(Vs(e),r)}function cf(e,t=!1){return Al(e)||Tr(e)||!nr(e)||(Tl(e)>1&&(e.set=e.add=e.clear=e.delete=p_),Object.freeze(e),t&&ni(e,(r,i)=>cf(i,!0))),e}function p_(){xn(2)}function Al(e){return Object.isFrozen(e)}var h_={};function es(e){const t=h_[e];return t||xn(0,e),t}var ri;function Iy(){return ri}function m_(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wg(e,t){t&&(es("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function _d(e){jd(e),e.drafts_.forEach(g_),e.drafts_=null}function jd(e){e===ri&&(ri=e.parent_)}function Sg(e){return ri=m_(ri,e)}function g_(e){const t=e[Xt];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function _g(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[Xt].modified_&&(_d(t),xn(4)),nr(e)&&(e=cl(t,e),t.parent_||ul(t,e)),t.patches_&&es("Patches").generateReplacementPatches_(r[Xt].base_,e,t.patches_,t.inversePatches_)):e=cl(t,r,[]),_d(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Oy?e:void 0}function cl(e,t,r){if(Al(t))return t;const i=t[Xt];if(!i)return ni(t,(o,l)=>jg(e,i,t,o,l,r)),t;if(i.scope_!==e)return t;if(!i.modified_)return ul(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,d=!1;i.type_===3&&(l=new Set(o),o.clear(),d=!0),ni(l,(p,f)=>jg(e,i,o,p,f,r,d)),ul(e,o,!1),r&&e.patches_&&es("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function jg(e,t,r,i,o,l,d){if(Tr(o)){const p=l&&t&&t.type_!==3&&!wd(t.assigned_,i)?l.concat(i):void 0,f=cl(e,o,p);if(Py(r,i,f),Tr(f))e.canAutoFreeze_=!1;else return}else d&&r.add(o);if(nr(o)&&!Al(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;cl(e,o),(!t||!t.scope_.parent_)&&ul(e,o)}}function ul(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cf(t,r)}function v_(e,t){const r=Array.isArray(e),i={type_:r?1:0,scope_:t?t.scope_:Iy(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=i,l=uf;r&&(o=[i],l=si);const{revoke:d,proxy:p}=Proxy.revocable(o,l);return i.draft_=p,i.revoke_=d,p}var uf={get(e,t){if(t===Xt)return e;const r=Yr(e);if(!wd(r,t))return y_(e,r,t);const i=r[t];return e.finalized_||!nr(i)?i:i===Hu(e.base_,t)?(Wu(e),e.copy_[t]=Ed(i,e)):i},has(e,t){return t in Yr(e)},ownKeys(e){return Reflect.ownKeys(Yr(e))},set(e,t,r){const i=Ay(Yr(e),t);if(i?.set)return i.set.call(e.draft_,r),!0;if(!e.modified_){const o=Hu(Yr(e),t),l=o?.[Xt];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(f_(r,o)&&(r!==void 0||wd(e.base_,t)))return!0;Wu(e),Cd(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Hu(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Wu(e),Cd(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Yr(e),i=Reflect.getOwnPropertyDescriptor(r,t);return i&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:i.enumerable,value:r[t]}},defineProperty(){xn(11)},getPrototypeOf(e){return Vs(e.base_)},setPrototypeOf(){xn(12)}},si={};ni(uf,(e,t)=>{si[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});si.deleteProperty=function(e,t){return si.set.call(this,e,t,void 0)};si.set=function(e,t,r){return uf.set.call(this,e[0],t,r,e[0])};function Hu(e,t){const r=e[Xt];return(r?Yr(r):e)[t]}function y_(e,t,r){const i=Ay(t,r);return i?"value"in i?i.value:i.get?.call(e.draft_):void 0}function Ay(e,t){if(!(t in e))return;let r=Vs(e);for(;r;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return i;r=Vs(r)}}function Cd(e){e.modified_||(e.modified_=!0,e.parent_&&Cd(e.parent_))}function Wu(e){e.copy_||(e.copy_=Sd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var x_=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,i)=>{if(typeof t=="function"&&typeof r!="function"){const l=r;r=t;const d=this;return function(f=l,...h){return d.produce(f,g=>r.call(this,g,...h))}}typeof r!="function"&&xn(6),i!==void 0&&typeof i!="function"&&xn(7);let o;if(nr(t)){const l=Sg(this),d=Ed(t,void 0);let p=!0;try{o=r(d),p=!1}finally{p?_d(l):jd(l)}return wg(l,i),_g(o,l)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===Oy&&(o=void 0),this.autoFreeze_&&cf(o,!0),i){const l=[],d=[];es("Patches").generateReplacementPatches_(t,o,l,d),i(l,d)}return o}else xn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(d,...p)=>this.produceWithPatches(d,f=>t(f,...p));let i,o;return[this.produce(t,r,(d,p)=>{i=d,o=p}),i,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){nr(e)||xn(8),Tr(e)&&(e=My(e));const t=Sg(this),r=Ed(e,void 0);return r[Xt].isManual_=!0,jd(t),r}finishDraft(e,t){const r=e&&e[Xt];(!r||!r.isManual_)&&xn(9);const{scope_:i}=r;return wg(i,t),_g(void 0,i)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));const i=es("Patches").applyPatches_;return Tr(e)?i(e,t):this.produce(e,o=>i(o,t))}};function Ed(e,t){const r=Pl(e)?es("MapSet").proxyMap_(e,t):Il(e)?es("MapSet").proxySet_(e,t):v_(e,t);return(t?t.scope_:Iy()).drafts_.push(r),r}function My(e){return Tr(e)||xn(10,e),Dy(e)}function Dy(e){if(!nr(e)||Al(e))return e;const t=e[Xt];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Sd(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Sd(e,!0);return ni(r,(i,o)=>{Py(r,i,Dy(o))}),t&&(t.finalized_=!1),r}var Jt=new x_,$y=Jt.produce;Jt.produceWithPatches.bind(Jt);Jt.setAutoFreeze.bind(Jt);Jt.setUseStrictShallowCopy.bind(Jt);Jt.applyPatches.bind(Jt);Jt.createDraft.bind(Jt);Jt.finishDraft.bind(Jt);function b_(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function w_(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function S_(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(i=>typeof i=="function"?`function ${i.name||"unnamed"}()`:typeof i).join(", ");throw new TypeError(`${t}[${r}]`)}}var Cg=e=>Array.isArray(e)?e:[e];function __(e){const t=Array.isArray(e[0])?e[0]:e;return S_(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function j_(e,t){const r=[],{length:i}=e;for(let o=0;o<i;o++)r.push(e[o].apply(null,t));return r}var C_=class{constructor(e){this.value=e}deref(){return this.value}},E_=typeof WeakRef<"u"?WeakRef:C_,R_=0,Eg=1;function Oa(){return{s:R_,v:void 0,o:null,p:null}}function df(e,t={}){let r=Oa();const{resultEqualityCheck:i}=t;let o,l=0;function d(){let p=r;const{length:f}=arguments;for(let y=0,x=f;y<x;y++){const w=arguments[y];if(typeof w=="function"||typeof w=="object"&&w!==null){let _=p.o;_===null&&(p.o=_=new WeakMap);const S=_.get(w);S===void 0?(p=Oa(),_.set(w,p)):p=S}else{let _=p.p;_===null&&(p.p=_=new Map);const S=_.get(w);S===void 0?(p=Oa(),_.set(w,p)):p=S}}const h=p;let g;if(p.s===Eg?g=p.v:(g=e.apply(null,arguments),l++),h.s=Eg,i){const y=o?.deref?.()??o;y!=null&&i(y,g)&&(g=y,l!==0&&l--),o=typeof g=="object"&&g!==null||typeof g=="function"?new E_(g):g}return h.v=g,g}return d.clearCache=()=>{r=Oa(),d.resetResultsCount()},d.resultsCount=()=>l,d.resetResultsCount=()=>{l=0},d}function Fy(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,i=(...o)=>{let l=0,d=0,p,f={},h=o.pop();typeof h=="object"&&(f=h,h=o.pop()),b_(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const g={...r,...f},{memoize:y,memoizeOptions:x=[],argsMemoize:w=df,argsMemoizeOptions:_=[]}=g,S=Cg(x),b=Cg(_),C=__(o),R=y(function(){return l++,h.apply(null,arguments)},...S),N=w(function(){d++;const k=j_(C,arguments);return p=R.apply(null,k),p},...b);return Object.assign(N,{resultFunc:h,memoizedResultFunc:R,dependencies:C,dependencyRecomputations:()=>d,resetDependencyRecomputations:()=>{d=0},lastResult:()=>p,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:y,argsMemoize:w})};return Object.assign(i,{withTypes:()=>i}),i}var pi=Fy(df),N_=Object.assign((e,t=pi)=>{w_(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),i=r.map(l=>e[l]);return t(i,(...l)=>l.reduce((d,p,f)=>(d[r[f]]=p,d),{}))},{withTypes:()=>N_});function Ly(e){return({dispatch:r,getState:i})=>o=>l=>typeof l=="function"?l(r,i,e):o(l)}var k_=Ly(),O_=Ly,T_=(...e)=>{const t=Fy(...e),r=Object.assign((...i)=>{const o=t(...i),l=(d,...p)=>o(Tr(d)?My(d):d,...p);return Object.assign(l,o),l},{withTypes:()=>r});return r};T_(df);var P_=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ll:ll.apply(null,arguments)},I_=e=>e&&typeof e.match=="function";function Zn(e,t){function r(...i){if(t){let o=t(...i);if(!o)throw new Error(zt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:i[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=i=>u_(i)&&i.type===e,r}var Uy=class Xo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Xo.prototype)}static get[Symbol.species](){return Xo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Xo(...t[0].concat(this)):new Xo(...t.concat(this))}};function Rg(e){return nr(e)?$y(e,()=>{}):e}function Ng(e,t,r){if(e.has(t)){let o=e.get(t);return r.update&&(o=r.update(o,t,e),e.set(t,o)),o}if(!r.insert)throw new Error(zt(10));const i=r.insert(t,e);return e.set(t,i),i}function A_(e){return typeof e=="boolean"}var M_=()=>function(t){const{thunk:r=!0,immutableCheck:i=!0,serializableCheck:o=!0,actionCreatorCheck:l=!0}=t??{};let d=new Uy;return r&&(A_(r)?d.push(k_):d.push(O_(r.extraArgument))),d},D_="RTK_autoBatch",zy=e=>t=>{setTimeout(t,e)},$_=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:zy(10),F_=(e={type:"raf"})=>t=>(...r)=>{const i=t(...r);let o=!0,l=!1,d=!1;const p=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?$_:e.type==="callback"?e.queueNotification:zy(e.timeout),h=()=>{d=!1,l&&(l=!1,p.forEach(g=>g()))};return Object.assign({},i,{subscribe(g){const y=()=>o&&g(),x=i.subscribe(y);return p.add(g),()=>{x(),p.delete(g)}},dispatch(g){try{return o=!g?.meta?.[D_],l=!o,l&&(d||(d=!0,f(h))),i.dispatch(g)}finally{o=!0}}})},L_=e=>function(r){const{autoBatch:i=!0}=r??{};let o=new Uy(e);return i&&o.push(F_(typeof i=="object"?i:void 0)),o};function ar(e){const t=M_(),{reducer:r=void 0,middleware:i,devTools:o=!0,preloadedState:l=void 0,enhancers:d=void 0}=e||{};let p;if(typeof r=="function")p=r;else if(lf(r))p=l_(r);else throw new Error(zt(1));let f;typeof i=="function"?f=i(t):f=t();let h=ll;o&&(h=P_({trace:!1,...typeof o=="object"&&o}));const g=c_(...f),y=L_(g);let x=typeof d=="function"?d(y):y();const w=h(...x);return ky(p,l,w)}function Vy(e){const t={},r=[];let i;const o={addCase(l,d){const p=typeof l=="string"?l:l.type;if(!p)throw new Error(zt(28));if(p in t)throw new Error(zt(29));return t[p]=d,o},addMatcher(l,d){return r.push({matcher:l,reducer:d}),o},addDefaultCase(l){return i=l,o}};return e(o),[t,r,i]}function U_(e){return typeof e=="function"}function z_(e,t){let[r,i,o]=Vy(t),l;if(U_(e))l=()=>Rg(e());else{const p=Rg(e);l=()=>p}function d(p=l(),f){let h=[r[f.type],...i.filter(({matcher:g})=>g(f)).map(({reducer:g})=>g)];return h.filter(g=>!!g).length===0&&(h=[o]),h.reduce((g,y)=>{if(y)if(Tr(g)){const w=y(g,f);return w===void 0?g:w}else{if(nr(g))return $y(g,x=>y(x,f));{const x=y(g,f);if(x===void 0){if(g===null)return g;throw new Error(zt(9))}return x}}return g},p)}return d.getInitialState=l,d}var V_="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",By=(e=21)=>{let t="",r=e;for(;r--;)t+=V_[Math.random()*64|0];return t},B_=(e,t)=>I_(e)?e.match(t):e(t);function q_(...e){return t=>e.some(r=>B_(r,t))}var H_=["name","message","stack","code"],Ku=class{constructor(e,t){this.payload=e,this.meta=t}_type},kg=class{constructor(e,t){this.payload=e,this.meta=t}_type},W_=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of H_)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ft=(()=>{function e(t,r,i){const o=Zn(t+"/fulfilled",(f,h,g,y)=>({payload:f,meta:{...y||{},arg:g,requestId:h,requestStatus:"fulfilled"}})),l=Zn(t+"/pending",(f,h,g)=>({payload:void 0,meta:{...g||{},arg:h,requestId:f,requestStatus:"pending"}})),d=Zn(t+"/rejected",(f,h,g,y,x)=>({payload:y,error:(i&&i.serializeError||W_)(f||"Rejected"),meta:{...x||{},arg:g,requestId:h,rejectedWithValue:!!y,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function p(f){return(h,g,y)=>{const x=i?.idGenerator?i.idGenerator(f):By(),w=new AbortController;let _,S;function b(R){S=R,w.abort()}const C=(async function(){let R;try{let P=i?.condition?.(f,{getState:g,extra:y});if(G_(P)&&(P=await P),P===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const k=new Promise((O,T)=>{_=()=>{T({name:"AbortError",message:S||"Aborted"})},w.signal.addEventListener("abort",_)});h(l(x,f,i?.getPendingMeta?.({requestId:x,arg:f},{getState:g,extra:y}))),R=await Promise.race([k,Promise.resolve(r(f,{dispatch:h,getState:g,extra:y,requestId:x,signal:w.signal,abort:b,rejectWithValue:(O,T)=>new Ku(O,T),fulfillWithValue:(O,T)=>new kg(O,T)})).then(O=>{if(O instanceof Ku)throw O;return O instanceof kg?o(O.payload,x,f,O.meta):o(O,x,f)})])}catch(P){R=P instanceof Ku?d(null,x,f,P.payload,P.meta):d(P,x,f)}finally{_&&w.signal.removeEventListener("abort",_)}return i&&!i.dispatchConditionRejection&&d.match(R)&&R.meta.condition||h(R),R})();return Object.assign(C,{abort:b,requestId:x,arg:f,unwrap(){return C.then(K_)}})}}return Object.assign(p,{pending:l,rejected:d,fulfilled:o,settled:q_(d,o),typePrefix:t})}return e.withTypes=()=>e,e})();function K_(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function G_(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Y_=Symbol.for("rtk-slice-createasyncthunk");function Q_(e,t){return`${e}/${t}`}function X_({creators:e}={}){const t=e?.asyncThunk?.[Y_];return function(i){const{name:o,reducerPath:l=o}=i;if(!o)throw new Error(zt(11));const d=(typeof i.reducers=="function"?i.reducers(Z_()):i.reducers)||{},p=Object.keys(d),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},h={addCase(R,N){const P=typeof R=="string"?R:R.type;if(!P)throw new Error(zt(12));if(P in f.sliceCaseReducersByType)throw new Error(zt(13));return f.sliceCaseReducersByType[P]=N,h},addMatcher(R,N){return f.sliceMatchers.push({matcher:R,reducer:N}),h},exposeAction(R,N){return f.actionCreators[R]=N,h},exposeCaseReducer(R,N){return f.sliceCaseReducersByName[R]=N,h}};p.forEach(R=>{const N=d[R],P={reducerName:R,type:Q_(o,R),createNotation:typeof i.reducers=="function"};tj(N)?rj(P,N,h,t):ej(P,N,h)});function g(){const[R={},N=[],P=void 0]=typeof i.extraReducers=="function"?Vy(i.extraReducers):[i.extraReducers],k={...R,...f.sliceCaseReducersByType};return z_(i.initialState,O=>{for(let T in k)O.addCase(T,k[T]);for(let T of f.sliceMatchers)O.addMatcher(T.matcher,T.reducer);for(let T of N)O.addMatcher(T.matcher,T.reducer);P&&O.addDefaultCase(P)})}const y=R=>R,x=new Map;let w;function _(R,N){return w||(w=g()),w(R,N)}function S(){return w||(w=g()),w.getInitialState()}function b(R,N=!1){function P(O){let T=O[R];return typeof T>"u"&&N&&(T=S()),T}function k(O=y){const T=Ng(x,N,{insert:()=>new WeakMap});return Ng(T,O,{insert:()=>{const D={};for(const[K,U]of Object.entries(i.selectors??{}))D[K]=J_(U,O,S,N);return D}})}return{reducerPath:R,getSelectors:k,get selectors(){return k(P)},selectSlice:P}}const C={name:o,reducer:_,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:S,...b(l),injectInto(R,{reducerPath:N,...P}={}){const k=N??l;return R.inject({reducerPath:k,reducer:_},P),{...C,...b(k,!0)}}};return C}}function J_(e,t,r,i){function o(l,...d){let p=t(l);return typeof p>"u"&&i&&(p=r()),e(p,...d)}return o.unwrapped=e,o}var os=X_();function Z_(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function ej({type:e,reducerName:t,createNotation:r},i,o){let l,d;if("reducer"in i){if(r&&!nj(i))throw new Error(zt(17));l=i.reducer,d=i.prepare}else l=i;o.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,d?Zn(e,d):Zn(e))}function tj(e){return e._reducerDefinitionType==="asyncThunk"}function nj(e){return e._reducerDefinitionType==="reducerWithPrepare"}function rj({type:e,reducerName:t},r,i,o){if(!o)throw new Error(zt(18));const{payloadCreator:l,fulfilled:d,pending:p,rejected:f,settled:h,options:g}=r,y=o(e,l,g);i.exposeAction(t,y),d&&i.addCase(y.fulfilled,d),p&&i.addCase(y.pending,p),f&&i.addCase(y.rejected,f),h&&i.addMatcher(y.settled,h),i.exposeCaseReducer(t,{fulfilled:d||Ta,pending:p||Ta,rejected:f||Ta,settled:h||Ta})}function Ta(){}var sj=(e,t)=>{if(typeof e!="function")throw new Error(zt(32))},ff="listenerMiddleware",oj=e=>{let{type:t,actionCreator:r,matcher:i,predicate:o,effect:l}=e;if(t)o=Zn(t).match;else if(r)t=r.type,o=r.match;else if(i)o=i;else if(!o)throw new Error(zt(21));return sj(l),{predicate:o,type:t,effect:l}},ij=Object.assign(e=>{const{type:t,predicate:r,effect:i}=oj(e);return{id:By(),effect:i,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(zt(22))}}},{withTypes:()=>ij}),aj=Object.assign(Zn(`${ff}/add`),{withTypes:()=>aj});Zn(`${ff}/removeAll`);var lj=Object.assign(Zn(`${ff}/remove`),{withTypes:()=>lj});function zt(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 j=Ol();const Xe=Js(j),Og=QS({__proto__:null,default:Xe},[j]);var Gu={exports:{}},Yu={};var Tg;function cj(){if(Tg)return Yu;Tg=1;var e=Ol();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,i=e.useSyncExternalStore,o=e.useRef,l=e.useEffect,d=e.useMemo,p=e.useDebugValue;return Yu.useSyncExternalStoreWithSelector=function(f,h,g,y,x){var w=o(null);if(w.current===null){var _={hasValue:!1,value:null};w.current=_}else _=w.current;w=d(function(){function b(k){if(!C){if(C=!0,R=k,k=y(k),x!==void 0&&_.hasValue){var O=_.value;if(x(O,k))return N=O}return N=k}if(O=N,r(R,k))return O;var T=y(k);return x!==void 0&&x(O,T)?O:(R=k,N=T)}var C=!1,R,N,P=g===void 0?null:g;return[function(){return b(h())},P===null?void 0:function(){return b(P())}]},[h,g,y,x]);var S=i(f,w[0],w[1]);return l(function(){_.hasValue=!0,_.value=S},[S]),p(S),S},Yu}var Pg;function uj(){return Pg||(Pg=1,Gu.exports=cj()),Gu.exports}var dj=uj(),Ie=Xe,Ig=Symbol.for("react-redux-context"),Ag=typeof globalThis<"u"?globalThis:{};function fj(){if(!Ie.createContext)return{};const e=Ag[Ig]??(Ag[Ig]=new Map);let t=e.get(Ie.createContext);return t||(t=Ie.createContext(null),e.set(Ie.createContext,t)),t}var rr=fj(),qy=()=>{throw new Error("uSES not initialized!")};function pf(e=rr){return function(){return Ie.useContext(e)}}var Hy=pf(),Wy=qy,pj=e=>{Wy=e},hj=(e,t)=>e===t;function mj(e=rr){const t=e===rr?Hy:pf(e),r=(i,o={})=>{const{equalityFn:l=hj,devModeChecks:d={}}=typeof o=="function"?{equalityFn:o}:o,{store:p,subscription:f,getServerState:h,stabilityCheck:g,identityFunctionCheck:y}=t();Ie.useRef(!0);const x=Ie.useCallback({[i.name](_){return i(_)}}[i.name],[i,g,d.stabilityCheck]),w=Wy(f.addNestedSub,p.getState,h||p.getState,x,l);return Ie.useDebugValue(w),w};return Object.assign(r,{withTypes:()=>r}),r}var xe=mj(),gj=Symbol.for("react.element"),vj=Symbol.for("react.portal"),yj=Symbol.for("react.fragment"),xj=Symbol.for("react.strict_mode"),bj=Symbol.for("react.profiler"),wj=Symbol.for("react.provider"),Sj=Symbol.for("react.context"),_j=Symbol.for("react.server_context"),Ky=Symbol.for("react.forward_ref"),jj=Symbol.for("react.suspense"),Cj=Symbol.for("react.suspense_list"),hf=Symbol.for("react.memo"),Ej=Symbol.for("react.lazy"),Rj=Ky,Nj=hf;function kj(e){if(typeof e=="object"&&e!==null){const t=e.$$typeof;switch(t){case gj:{const r=e.type;switch(r){case yj:case bj:case xj:case jj:case Cj:return r;default:{const i=r&&r.$$typeof;switch(i){case _j:case Sj:case Ky:case Ej:case hf:case wj:return i;default:return t}}}}case vj:return t}}}function Oj(e){return kj(e)===hf}function Tj(e,t,r,i,{areStatesEqual:o,areOwnPropsEqual:l,areStatePropsEqual:d}){let p=!1,f,h,g,y,x;function w(R,N){return f=R,h=N,g=e(f,h),y=t(i,h),x=r(g,y,h),p=!0,x}function _(){return g=e(f,h),t.dependsOnOwnProps&&(y=t(i,h)),x=r(g,y,h),x}function S(){return e.dependsOnOwnProps&&(g=e(f,h)),t.dependsOnOwnProps&&(y=t(i,h)),x=r(g,y,h),x}function b(){const R=e(f,h),N=!d(R,g);return g=R,N&&(x=r(g,y,h)),x}function C(R,N){const P=!l(N,h),k=!o(R,f,N,h);return f=R,h=N,P&&k?_():P?S():k?b():x}return function(N,P){return p?C(N,P):w(N,P)}}function Pj(e,{initMapStateToProps:t,initMapDispatchToProps:r,initMergeProps:i,...o}){const l=t(e,o),d=r(e,o),p=i(e,o);return Tj(l,d,p,e,o)}function Ij(e,t){const r={};for(const i in e){const o=e[i];typeof o=="function"&&(r[i]=(...l)=>t(o(...l)))}return r}function Rd(e){return function(r){const i=e(r);function o(){return i}return o.dependsOnOwnProps=!1,o}}function Mg(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Gy(e,t){return function(i,{displayName:o}){const l=function(p,f){return l.dependsOnOwnProps?l.mapToProps(p,f):l.mapToProps(p,void 0)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,f){l.mapToProps=e,l.dependsOnOwnProps=Mg(e);let h=l(p,f);return typeof h=="function"&&(l.mapToProps=h,l.dependsOnOwnProps=Mg(h),h=l(p,f)),h},l}}function mf(e,t){return(r,i)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${i.wrappedComponentName}.`)}}function Aj(e){return e&&typeof e=="object"?Rd(t=>Ij(e,t)):e?typeof e=="function"?Gy(e):mf(e,"mapDispatchToProps"):Rd(t=>({dispatch:t}))}function Mj(e){return e?typeof e=="function"?Gy(e):mf(e,"mapStateToProps"):Rd(()=>({}))}function Dj(e,t,r){return{...r,...e,...t}}function $j(e){return function(r,{displayName:i,areMergedPropsEqual:o}){let l=!1,d;return function(f,h,g){const y=e(f,h,g);return l?o(y,d)||(d=y):(l=!0,d=y),d}}}function Fj(e){return e?typeof e=="function"?$j(e):mf(e,"mergeProps"):()=>Dj}function Lj(e){e()}function Uj(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Lj(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let i=e;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0;const o=t={callback:r,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){!i||e===null||(i=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}var Dg={notify(){},get:()=>[]};function Yy(e,t){let r,i=Dg,o=0,l=!1;function d(S){g();const b=i.subscribe(S);let C=!1;return()=>{C||(C=!0,b(),y())}}function p(){i.notify()}function f(){_.onStateChange&&_.onStateChange()}function h(){return l}function g(){o++,r||(r=t?t.addNestedSub(f):e.subscribe(f),i=Uj())}function y(){o--,r&&o===0&&(r(),r=void 0,i.clear(),i=Dg)}function x(){l||(l=!0,g())}function w(){l&&(l=!1,y())}const _={addNestedSub:d,notifyNestedSubs:p,handleChangeWrapper:f,isSubscribed:h,trySubscribe:x,tryUnsubscribe:w,getListeners:()=>i};return _}var zj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dl=zj?Ie.useLayoutEffect:Ie.useEffect;function $g(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Qu(e,t){if($g(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(t,r[o])||!$g(e[r[o]],t[r[o]]))return!1;return!0}var Vj={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Bj={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},qj={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Qy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Hj={[Rj]:qj,[Nj]:Qy};function Fg(e){return Oj(e)?Qy:Hj[e.$$typeof]||Vj}var Wj=Object.defineProperty,Kj=Object.getOwnPropertyNames,Lg=Object.getOwnPropertySymbols,Gj=Object.getOwnPropertyDescriptor,Yj=Object.getPrototypeOf,Ug=Object.prototype;function Nd(e,t){if(typeof t!="string"){if(Ug){const l=Yj(t);l&&l!==Ug&&Nd(e,l)}let r=Kj(t);Lg&&(r=r.concat(Lg(t)));const i=Fg(e),o=Fg(t);for(let l=0;l<r.length;++l){const d=r[l];if(!Bj[d]&&!(o&&o[d])&&!(i&&i[d])){const p=Gj(t,d);try{Wj(e,d,p)}catch{}}}}return e}var Xy=qy,Qj=e=>{Xy=e},Xj=[null,null];function Jj(e,t,r){dl(()=>e(...t),r)}function Zj(e,t,r,i,o,l){e.current=i,r.current=!1,o.current&&(o.current=null,l())}function eC(e,t,r,i,o,l,d,p,f,h,g){if(!e)return()=>{};let y=!1,x=null;const w=()=>{if(y||!p.current)return;const S=t.getState();let b,C;try{b=i(S,o.current)}catch(R){C=R,x=R}C||(x=null),b===l.current?d.current||h():(l.current=b,f.current=b,d.current=!0,g())};return r.onStateChange=w,r.trySubscribe(),w(),()=>{if(y=!0,r.tryUnsubscribe(),r.onStateChange=null,x)throw x}}function tC(e,t){return e===t}function nC(e,t,r,{pure:i,areStatesEqual:o=tC,areOwnPropsEqual:l=Qu,areStatePropsEqual:d=Qu,areMergedPropsEqual:p=Qu,forwardRef:f=!1,context:h=rr}={}){const g=h,y=Mj(e),x=Aj(t),w=Fj(r),_=!!e;return b=>{const C=b.displayName||b.name||"Component",R=`Connect(${C})`,N={shouldHandleStateChanges:_,displayName:R,wrappedComponentName:C,WrappedComponent:b,initMapStateToProps:y,initMapDispatchToProps:x,initMergeProps:w,areStatesEqual:o,areStatePropsEqual:d,areOwnPropsEqual:l,areMergedPropsEqual:p};function P(T){const[D,K,U]=Ie.useMemo(()=>{const{reactReduxForwardedRef:Ae,...He}=T;return[T.context,Ae,He]},[T]),W=Ie.useMemo(()=>{let Ae=g;return D?.Consumer,Ae},[D,g]),H=Ie.useContext(W),X=!!T.store&&!!T.store.getState&&!!T.store.dispatch,oe=!!H&&!!H.store,re=X?T.store:H.store,se=oe?H.getServerState:re.getState,pe=Ie.useMemo(()=>Pj(re.dispatch,N),[re]),[q,ne]=Ie.useMemo(()=>{if(!_)return Xj;const Ae=Yy(re,X?void 0:H.subscription),He=Ae.notifyNestedSubs.bind(Ae);return[Ae,He]},[re,X,H]),I=Ie.useMemo(()=>X?H:{...H,subscription:q},[X,H,q]),B=Ie.useRef(),Y=Ie.useRef(U),ie=Ie.useRef(),ae=Ie.useRef(!1);Ie.useRef(!1);const ue=Ie.useRef(!1),le=Ie.useRef();dl(()=>(ue.current=!0,()=>{ue.current=!1}),[]);const de=Ie.useMemo(()=>()=>ie.current&&U===Y.current?ie.current:pe(re.getState(),U),[re,U]),me=Ie.useMemo(()=>He=>q?eC(_,re,q,pe,Y,B,ae,ue,ie,ne,He):()=>{},[q]);Jj(Zj,[Y,B,ae,U,ie,ne]);let Ne;try{Ne=Xy(me,de,se?()=>pe(se(),U):de)}catch(Ae){throw le.current&&(Ae.message+=`
|
|
49
9
|
The error may be correlated with this previous error:
|
|
50
|
-
${
|
|
10
|
+
${le.current.stack}
|
|
51
11
|
|
|
52
|
-
`),ge}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,ed(C,g)}return ed(j,g)}}var Vj=zj;function Bj({store:e,context:t,children:n,serverState:r,stabilityCheck:o="once",identityFunctionCheck:s="once"}){const i=ie.useMemo(()=>{const u=wx(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=Bj;function Cx(e=Fn){const t=e===Fn?vx:Mf(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var qj=Cx();function Hj(e=Fn){const t=e===Fn?qj:Cx(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var me=Hj();ZC(QC.useSyncExternalStoreWithSelector);Aj(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}`,publications_dismiss_notice_path:()=>"/publications/dismiss_notice"},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},Wj=e=>new Date(`${e}T00:00:00`),Kj={year:"numeric",month:"short",day:"numeric"},go=(e,t)=>Wj(e).toLocaleString("en-us",t||Kj),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},jx=(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"]}),zf=e=>jx(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,Gj=(e,t,n)=>`${it(t)} ${fm(n,t)} / ${fm(e,1)}`,Ex=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"}],Rx={};for(let e of Al)Rx[e.role]=e;const td={};for(let{role:e,xrasRole:t}of Al)td[e]=t;const nd=["info","success","secondary","warning","danger"];function rd(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 od={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Dc={};function Nx(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 Yj(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function Qj(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 Xj(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(od).forEach(b=>{v[b].push(h[1],od[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 Zj(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 Jj(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:Zj(...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=eE(e,n),s=r===t.length-1?"+":"";return[`${Nx(Math.round(o))}${s}`,o]})}function eE(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 tE="_fullscreen_1iid9_6",nE="_map_1iid9_14",Ai={"allocations-map":"_allocations-map_1iid9_1",fullscreen:tE,map:nE},rE="_group_11k83_1",oE="_button_11k83_6",sE="_icon_11k83_16",Fc={group:rE,button:oE,icon:sE};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 iE="_controls_1be4t_1",aE={controls:iE};function lE({creditType:e,organizationType:t,setCreditType:n,setOrganizationType:r}){return a.jsxs("div",{className:aE.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 cE="_legend_odgg9_1",uE="_symbols_odgg9_17",dE="_symbol_odgg9_17",oa={legend:cE,symbols:uE,symbol:dE};function fE(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 pE({activeOrg:e,creditLevels:t,organizationType:n}){if(e||!t)return;const r=t.points.map((o,s)=>a.jsxs("div",{className:oa.symbol,children:[fE(5*(s+1),od[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 hE="_info_oxxoh_1",mE="_user_oxxoh_7",gE="_rp_oxxoh_10",vE="_credits_oxxoh_15",sa={info:hE,user:mE,rp:gE,credits:vE};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 yE({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:[Nx(s)," ACCESS Credits"]}),t!=="allocated"?a.jsxs(a.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",gm(c.rp,"rp","resource provider")]}):"","."]})})}function xE(){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 Yj()))()},[]),w.useEffect(()=>{(async S=>{const[_,j]=await Promise.all(["organizations",`credits_${S}`].map(Qj));if(!v){const C={};_.features.forEach(N=>C[N.id.toString()]=N.properties.name),y(C)}const E=Jj(_,j,x);f(E),S==="exchanged"&&!i&&l(Xj(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(lE,{creditType:x,fullscreen:c,organizationType:g,setCreditType:b,setFullscreen:u,setOrganizationType:h}),a.jsx(pE,{activeOrg:n,creditLevels:i,organizationType:g}),a.jsx(yE,{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 bE=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)},wE="_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:wE,"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 kx={exports:{}},SE="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",_E=SE,CE=_E;function Ox(){}function Tx(){}Tx.resetWarningCache=Ox;var jE=function(){function e(r,o,s,i,l,c){if(c!==CE){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:Tx,resetWarningCache:Ox};return n.PropTypes=n,n};kx.exports=jE();var EE=kx.exports;const q=Js(EE),RE=(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}},sd=e=>({type:"SET_RESOURCE_DATA",payload:e}),NE=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}}),kE=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),OE=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})})),TE=(e,t)=>{const[n,r]=w.useReducer(RE,{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(NE(!0));try{const i=await kE(e,t);r(sd(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}},Vf=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)||[]}},PE=(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}},IE=(e,t,n)=>{const{availableResources:r,availableAllocationTypes:o,allowedActionsOptions:s}=Vf(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(sd({...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(sd({...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}},$E=(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 OE(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]),AE=(e=!1)=>{const[t,n]=w.useState(e);return{isEditing:t,handleEditingChange:o=>{n(o)}}},ME={"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 DE="_blurred_16xcy_16",yn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:DE,"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 Px({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=Vf(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:ME["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})}Px.propTypes={onClose:q.func.isRequired};function FE({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),bE(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(Px,{onClose:()=>u(!1)})]})}function Ur(){return a.jsx("div",{className:"spinner-border",role:"status",children:a.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const LE="_grid_afccc_1",UE="_important_afccc_30",zE="_input_afccc_34",VE="_edited_afccc_38",BE="_disabled_afccc_46",qE="_scroll_afccc_59",jr={grid:LE,important:UE,input:zE,edited:VE,disabled:BE,scroll:qE};function HE({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 WE="_datepicker_19wnv_1",KE="_error_19wnv_1",bm={datepicker:WE,error:KE},GE=({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)},YE={text:HE,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(GE,{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=YE[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 id={"header-buttons":"_header-buttons_15oxx_1","allocation-types-grid":"_allocation-types-grid_15oxx_6","vertical-align-center":"_vertical-align-center_15oxx_10"},Ix=({onAddAllocationType:e,onAddRequiredResource:t})=>a.jsxs("div",{className:id["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"]})]});Ix.propTypes={headerText:q.node,onAddAllocationType:q.func.isRequired,onAddRequiredResource:q.func.isRequired};const $x=Ee.memo(function({columns:t,rows:n}){return a.jsxs("div",{className:id["allocation-types-grid"],children:[a.jsx(hn,{columns:t,rows:n,rowClasses:Array(n.length).fill(id["vertical-align-center"]),scroll:!1}),a.jsx("p",{style:{margin:"0",fontStyle:"italic",fontWeight:"bold"},children:"Note: You may need to contact your Allocations Coordinator if you have added this resource to an allocation type."})]})});$x.propTypes={columns:q.array.isRequired,rows:q.array.isRequired};const qr={"exchange-rates-grid":"_exchange-rates-grid_5qkd5_1","header-container":"_header-container_5qkd5_5","header-buttons":"_header-buttons_5qkd5_11","vertical-align-center":"_vertical-align-center_5qkd5_18","error-summary":"_error-summary_5qkd5_35"},Ax=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))})})]})});Ax.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,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(z=>z.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 Mx({resourceId:e,relativeUrlRoot:t,setExternalSubmit:n}){const{state:r,dispatch:o,handleError:s,fetchData:i}=TE(e,t),{isEditing:l,handleEditingChange:c}=AE(),{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}=Vf(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:z}=IE(u,m,o),{exchangeRateColumns:Z,exchangeRateRows:T,handleAddDiscountRate:L,dateErrors:M}=QE(u,o),W=$E(m,e,t,i,s,o);w.useEffect(()=>{n&&M.length==0?n(W):n(null)},[W,n,M]);const{allocationColumns:B,allocationRows:X}=PE(m,x,C,y,U,F,z),[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(Ax,{columns:Z,rows:T,onAddDiscountRate:L,dateErrors:M}),a.jsx(Bf,{headerText:a.jsx("h2",{children:"Allocation Types"}),header:a.jsx(Ix,{onAddAllocationType:()=>l&&E(!0),onAddRequiredResource:()=>l&&_(!0)}),isEditing:l,onEditingChange:c,warningMessage:`Incorrect allocations
|
|
12
|
+
`),Ae}dl(()=>{le.current=void 0,ie.current=void 0,B.current=Ne});const rt=Ie.useMemo(()=>Ie.createElement(b,{...Ne,ref:K}),[K,b,Ne]);return Ie.useMemo(()=>_?Ie.createElement(W.Provider,{value:I},rt):rt,[W,rt,I])}const O=Ie.memo(P);if(O.WrappedComponent=b,O.displayName=P.displayName=R,f){const D=Ie.forwardRef(function(U,W){return Ie.createElement(O,{...U,reactReduxForwardedRef:W})});return D.displayName=R,D.WrappedComponent=b,Nd(D,b)}return Nd(O,b)}}var rC=nC;function sC({store:e,context:t,children:r,serverState:i,stabilityCheck:o="once",identityFunctionCheck:l="once"}){const d=Ie.useMemo(()=>{const h=Yy(e);return{store:e,subscription:h,getServerState:i?()=>i:void 0,stabilityCheck:o,identityFunctionCheck:l}},[e,i,o,l]),p=Ie.useMemo(()=>e.getState(),[e]);dl(()=>{const{subscription:h}=d;return h.onStateChange=h.notifyNestedSubs,h.trySubscribe(),p!==e.getState()&&h.notifyNestedSubs(),()=>{h.tryUnsubscribe(),h.onStateChange=void 0}},[d,p]);const f=t||rr;return Ie.createElement(f.Provider,{value:d},r)}var lr=sC;function Jy(e=rr){const t=e===rr?Hy:pf(e),r=()=>{const{store:i}=t();return i};return Object.assign(r,{withTypes:()=>r}),r}var oC=Jy();function iC(e=rr){const t=e===rr?oC:Jy(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var Ve=iC();pj(dj.useSyncExternalStoreWithSelector);Qj(j.useSyncExternalStore);const En="https://allocations.access-ci.org",Re={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:()=>`${En}/get-your-first-project`,profile_path:()=>`${En}/profile`,project_types_path:()=>`${En}/project-types`,projects_path:()=>`${En}/projects`,projects_save_users_path:()=>"/projects/save_users",renew_request_path:e=>`${En}/requests/${e}/renew`,request_action_path:(e,t)=>`${En}/requests/${e}/actions/${t}`,request_actions_path:e=>`${En}/requests/${e}/actions`,request_path:e=>`${En}/requests/${e}`,resources_path:()=>`${En}/resources`,search_people_path:()=>`${En}/search/people`,usage_detail_path:(e,t)=>`/usage/${e}/${t}`,publications_dismiss_notice_path:()=>"/publications/dismiss_notice"},roleIcons:{PI:"person-fill-check","Co-PI":"person-fill-add","Allocation Manager":"person-fill-gear",User:"people-fill"}},Fs=(e,t,r="round")=>{const i=Math.pow(10,t||0);return Math[r](e*i)/i},aC=e=>new Date(`${e}T00:00:00`),lC={year:"numeric",month:"short",day:"numeric"},Ls=(e,t)=>aC(e).toLocaleString("en-us",lC),It=(e,{abbreviate:t=!1,decimalPlaces:r=void 0}={})=>{if(t){let i=0;for(;Math.abs(e)/Math.pow(1e3,i)>=1e3;)i+=1;const o=["","K","M","B","T","Q"][i];return`${(e/Math.pow(1e3,i)).toLocaleString("en-US",{maximumSignificantDigits:3})}${o}`}return e.toLocaleString("en-US",{maximumFractionDigits:r,minimumFractionDigits:r})},gf=(e,t)=>{if(e.startDate&&e.endDate){const o=Ls(e.startDate),l=Ls(e.endDate);return`${e.allocationType}: ${o} to ${l}`}const r=Ls(e.entryDate),i=e.status=="Incomplete"?"Started":"Submitted";return`${e.allocationType}: ${i} ${r}`},er=e=>c.jsx("i",{className:`bi bi-${e}`}),hi=e=>{const t=e.match(/^([^\(\)]+) (\(([^\)]+)\))?$/);return{full:e,short:t&&t[3]||null}},zg=e=>{const t=hi(e.name);return t.short||t.full},fl=(e,t)=>e.isCredit>t.isCredit||e.isActive>t.isActive||zg(e)<zg(t)?-1:1,Vg=(...e)=>{for(let t of e)if(t!=null)return t;return null},Zy=(e,t="and",r=", ")=>e.reduce((i,o,l)=>c.jsxs(c.Fragment,{children:[i,e.length-1>l?r:` ${t} `,o]})),vf=e=>e?c.jsxs(c.Fragment,{children:[er("check-circle")," Yes"]}):c.jsxs(c.Fragment,{children:[er("x-circle")," No"]}),yf=e=>Zy(e.users.filter(({role:t})=>["pi","co_pi","allocation_manager"].includes(t)).map(t=>`${t.firstName} ${t.lastName}`),"or"),Bg=(e,t)=>t==1&&e.endsWith("s")?e.slice(0,-1):e,cC=(e,t,r)=>`${It(t)} ${Bg(r,t)} / ${Bg(e,1)}`,ex=e=>{let t=0,r=0;for(let i of e.resources){if(i.isBoolean)continue;let{unitCost:o}=i.exchangeRates.base;t+=i.allocated*o,r+=Math.min(i.used,i.allocated)*o}return t>0?r/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"}],tx={};for(let e of Ml)tx[e.role]=e;const kd={};for(let{role:e,xrasRole:t}of Ml)kd[e]=t;const Od=["info","success","secondary","warning","danger"];function Td(e,t="total"){const r=e.exchangeRates[e.requested<=e.allocated?"base":"current"].unitCost;let i=(e.requested-e.allocated)*r;return t!="total"?i:i+e.allocated*e.exchangeRates.base.unitCost}function mi(e){e&&(Re.routes={...Re.routes,...e})}const Pd={user:{colors:["#ffc42d","#fea92c","#f98f30","#f07537"]},rp:{colors:["#48c0b9","#2e9da4","#207b8b","#1a5b6e"]}},Xu={};function nx(e,t=3){let r=0;for(;e/Math.pow(1e3,r)>1e3;)r+=1;const i=e.toString().length,o=Math.pow(10,i-t);return(Math.round(e/o)*o/Math.pow(1e3,r)).toString()+["","K","M","B","T"][r]}async function uC(){return await(await fetch("https://basemaps-api.arcgis.com/arcgis/rest/services/styles/ArcGIS:Community?type=style&token=AAPK220079f462f24fda89c27fa210c3f887EJPCECuukKD8PnCIBqktgGTKZWPlVXWjRoSsZYGkOJ12QemGItZ4liRZkcUzYyme")).json()}async function dC(e){if(Xu[e])return Xu[e];const t=document.location,r=`${t.protocol}//${t.host}${t.pathname}`,o=await(await fetch(`${r}/${e}`)).json();return Xu[e]=o,o}function fC(e){const t=[...e.creditLines.features.map(i=>i.properties.credits)],r=[...e.rpPoints.features.map(i=>i.properties.rpCredits),...e.userPoints.features.map(i=>i.properties.userCredits)];return{lines:Hg(t),points:Hg(r)}}function qg({activeOrg:e,basemapStyle:t,creditLevels:r,creditType:i,geoJSON:o,organizationType:l}){const d={},p=[];if(o&&r){const h=l==="user"?"rp":"user",g=o[`${l}Points`],y=o[`${h}Points`],x=`${l}Credits`,w=`${h}Credits`;d.organizations={type:"geojson",data:g};const _={user:[],rp:[]},S=[];r.points.forEach((C,R)=>{Object.keys(Pd).forEach(N=>{_[N].push(C[1],Pd[N].colors[R])}),S.push(C[1],5*(R+1))});const b=[];if(r.lines.forEach((C,R)=>{b.push(C[1],1*(R+1))}),p.push({id:"organizations",type:"circle",source:"organizations",paint:{"circle-radius":["interpolate",["linear"],["get",x],...S],"circle-color":["interpolate",["linear"],["get",x],..._[l]],"circle-opacity":e?["match",["id"],e.id,1,.3]:1,"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),e&&i!=="allocated"){d.opp={type:"geojson",data:y};const C=["get",e.id.toString(),["get",`${w}Map`]];p.push({id:"opp",type:"circle",source:"opp",filter:["has",e.id.toString(),["get",`${w}Map`]],paint:{"circle-radius":["interpolate",["linear"],C,...S],"circle-color":["interpolate",["linear"],C,..._[h]],"circle-stroke-color":"#ffffff","circle-stroke-width":1}}),d.credits={type:"geojson",data:o.creditLines},p.push({id:"credits",type:"line",source:"credits",filter:["==",["get",`${l}_organization_id`],e.id],paint:{"line-color":"#444444","line-opacity":.4,"line-width":["interpolate",["linear"],["get","credits"],...b]}})}}const f=t||{version:8,sources:{},layers:[]};return{...f,sources:{...f.sources,...d},layers:[...f.layers.filter(h=>h.id!=="Marine waterbody/label/2x large"),...p]}}function pC(e,t,r,i,o=20){return[...Array(o+1).keys()].map(l=>l/o).map(l=>{let d=l*(r-e)+e,p=l*(i-t)+t+Math.abs(Math.sin(l*Math.PI)*(r-e)*.1);return[d,p]})}function hC(e,t,r){const i={};return e.features.forEach(l=>i[l.id]={type:l.type,geometry:l.geometry,id:l.id,properties:{name:l.properties.name,abbr:l.properties.abbr,userCredits:0,userCreditsMap:{},rpCredits:0,rpCreditsMap:{}}},{}),{creditLines:{type:"FeatureCollection",features:t.result.filter(l=>i[l.user_organization_id]!==void 0&&(r==="allocated"||i[l.rp_organization_id]!==void 0)).map(l=>{const d=i[l.user_organization_id],p=i[l.rp_organization_id];if(d.properties.userCredits+=l.credits,p&&(p.properties.rpCredits+=l.credits),d.properties.userCreditsMap[l.rp_organization_id]=(d.properties.userCreditsMap[l.rp_organization_id]||0)+l.credits,p&&(p.properties.rpCreditsMap[l.user_organization_id]=(p.properties.rpCreditsMap[l.user_organization_id]||0)+l.credits),r!=="allocated")return{type:"Feature",geometry:{type:"LineString",coordinates:pC(...i[l.user_organization_id].geometry.coordinates,...i[l.rp_organization_id].geometry.coordinates)},properties:l}}).filter(l=>l!==void 0)},userPoints:{type:"FeatureCollection",features:Object.values(i).filter(l=>l.properties.userCredits>0).sort((l,d)=>l.properties.userCredits>d.properties.userCredits?-1:1)},rpPoints:{type:"FeatureCollection",features:Object.values(i).filter(l=>l.properties.rpCredits>0).sort((l,d)=>l.properties.rpCredits>d.properties.rpCredits?-1:1)}}}function Hg(e,t=[0,.3,.6,.9]){return t.map((r,i)=>{const o=mC(e,r),l=i===t.length-1?"+":"";return[`${nx(Math.round(o))}${l}`,o]})}function mC(e,t){e.sort((l,d)=>l-d);const r=(e.length-1)*t,i=Math.floor(r),o=r-i;return e[i+1]!==void 0?e[i]+o*(e[i+1]-e[i]):e[i]}const gC="_fullscreen_1iid9_6",vC="_map_1iid9_14",Pa={"allocations-map":"_allocations-map_1iid9_1",fullscreen:gC,map:vC},yC="_group_11k83_1",xC="_button_11k83_6",bC="_icon_11k83_16",Ju={group:yC,button:xC,icon:bC};function Wg({choices:e,disabledValues:t=[],label:r,value:i,setValue:o}){const l=[];return e.forEach(([d,p])=>l.push(c.jsx("input",{type:"radio",className:"btn-check",name:d,id:d,autoComplete:"off",checked:i===d,onChange:()=>o(d),disabled:t.includes(d)},d),c.jsxs("label",{className:`btn btn-outline-primary ${Ju.button}`,htmlFor:d,disabled:t.includes(d),children:[i===d?c.jsx("i",{className:`bi bi-check ${Ju.icon}`}):null," ",p]},`${d}-label`))),c.jsx("div",{className:"mb-2",children:c.jsx("div",{className:`btn-group ${Ju.group}`,role:"group","aria-label":r,children:l})})}const wC="_controls_1be4t_1",SC={controls:wC};function _C({creditType:e,organizationType:t,setCreditType:r,setOrganizationType:i}){return c.jsxs("div",{className:SC.controls,children:[c.jsx("h2",{children:"ACCESS Allocations"}),c.jsx(Wg,{choices:[["allocated","Allocations"],["exchanged","Exchanges"],["used","Usage"]],label:"Credit Type",value:e,setValue:r}),c.jsx(Wg,{choices:[["user","By Research Institution"],["rp","By Resource Provider"]],disabledValues:e==="allocated"?["rp"]:[],label:"Organization Type",value:t,setValue:i})]})}const jC="_legend_odgg9_1",CC="_symbols_odgg9_17",EC="_symbol_odgg9_17",Ha={legend:jC,symbols:CC,symbol:EC};function RC(e,t){const r=2*e+2;return c.jsx("svg",{viewBox:`0 0 ${r} ${r}`,xmlns:"http://www.w3.org/2000/svg",stroke:"white",strokeWidth:"1",height:r,width:r,children:c.jsx("circle",{fill:t,cx:e+1,cy:e+1,r:e})})}function NC({activeOrg:e,creditLevels:t,organizationType:r}){if(e||!t)return;const i=t.points.map((o,l)=>c.jsxs("div",{className:Ha.symbol,children:[RC(5*(l+1),Pd[r].colors[l]),c.jsx("br",{}),c.jsx("span",{className:"label",children:o[0]})]},o[0]));return c.jsxs("div",{className:Ha.legend,children:[c.jsxs("h2",{className:"fs-6 mt-0 mb-0",children:["ACCESS Credits ",c.jsx("small",{children:"or credit equivalents"})]}),c.jsx("div",{className:Ha.symbols,children:i})]})}const kC="_info_oxxoh_1",OC="_user_oxxoh_7",TC="_rp_oxxoh_10",PC="_credits_oxxoh_15",Wa={info:kC,user:OC,rp:TC,credits:PC};function Kg(e,t,r){e.sort((o,l)=>l[1]-o[1]);const i=e.slice(0,3).map(o=>o[0]);return e.length>3&&(i[2]=`${e.length-2} other ${r}s`),i.reduce((o,l,d,p)=>[o,c.jsx("span",{className:`name ${Wa[t]}`,children:l},l),[""," and ",", "][p.length-d-1]],[])}function IC({activeOrg:e,creditType:t,organizationMap:r,organizationType:i}){if(!e||!r)return;const o=e.properties,l=o[`${i}Credits`],d=i==="rp"?"user":"rp",p=JSON.parse(o[`${i}CreditsMap`]),f={user:[],rp:[]};return f[i].push([o.name,l]),Object.keys(p).forEach(h=>f[d].push([r[h],p[h]])),c.jsx("div",{className:`${Ha.legend} ${Wa.info}`,children:c.jsxs("p",{className:Wa[i],children:["Researchers at ",Kg(f.user,"user","research institution")," ",t==="allocated"?"were ":"",t," ",c.jsxs("span",{className:Wa.credits,children:[nx(l)," ACCESS Credits"]}),t!=="allocated"?c.jsxs(c.Fragment,{children:[" ",t==="exchanged"?"for":"on"," resources at"," ",Kg(f.rp,"rp","resource provider")]}):"","."]})})}function AC(){const e=j.useRef(null),t=j.useRef(null),[r,i]=j.useState(null),[o,l]=j.useState(null),[d,p]=j.useState(null),[f,h]=j.useState(!1),[g,y]=j.useState(null),[x,w]=j.useState(null),[_,S]=j.useState(null),[b,C]=j.useState("user"),[R,N]=j.useState("exchanged");return j.useEffect(()=>{(async()=>l(await uC()))()},[]),j.useEffect(()=>{(async P=>{const[k,O]=await Promise.all(["organizations",`credits_${P}`].map(dC));if(!_){const D={};k.features.forEach(K=>D[K.id.toString()]=K.properties.name),S(D)}const T=hC(k,O,R);y(T),P==="exchanged"&&!d&&p(fC(T))})(R)},[R]),j.useEffect(()=>{x&&x.setStyle(qg({activeOrg:r,basemapStyle:o,creditLevels:d,creditType:R,geoJSON:g,organizationType:b}))},[r,g,x,b]),j.useEffect(()=>{x&&(x.on("mousemove","organizations",P=>i(P.features.length?P.features[0]:null)),x.on("mouseleave","organizations",()=>i(null)))},[x]),j.useEffect(()=>{x&&x.resize()},[f]),j.useEffect(()=>{R==="allocated"&&C("user")},[R]),j.useLayoutEffect(()=>w(new maplibregl.Map({container:t.current,style:qg({activeOrg:r,basemapStyle:o,creditLevels:d,creditType:R,geoJSON:g,organizationType:b}),center:[-111.01,38.88],zoom:3.4,hash:!0})),[]),j.useLayoutEffect(()=>e.current.addEventListener("keydown",P=>{P.key==="Escape"&&h(!1)}),[]),c.jsxs("section",{className:`${Pa["allocations-map"]} ${f?Pa.fullscreen:"border border-3 border-primary"}`,ref:e,children:[c.jsx("div",{className:Pa.map,ref:t}),c.jsx(_C,{creditType:R,fullscreen:f,organizationType:b,setCreditType:N,setFullscreen:h,setOrganizationType:C}),c.jsx(NC,{activeOrg:r,creditLevels:d,organizationType:b}),c.jsx(IC,{activeOrg:r,creditType:R,organizationMap:_,organizationType:b}),c.jsx("button",{title:`${f?"Exit":"Enter"} Fullscreen`,className:Pa.fullscreen,onClick:()=>h(!f),children:c.jsx("i",{className:`bi ${f?"bi-fullscreen-exit":"bi-arrows-fullscreen"}`,"aria-label":"Fullscreen"})})]})}const MC=async(e,t)=>{try{const r=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,l)=>({resource_id:o.resource_id,relative_order:l+1}))})});if(!r.ok){const o=await r.json();throw new Error(o.error||"Failed to update resource order")}const i=await r.json();console.log(i.message)}catch(r){console.error("Error updating resource order:",r)}},Gg=e=>[...e].sort((t,r)=>t.relative_order===null&&r.relative_order===null?t.display_resource_name.localeCompare(r.display_resource_name):t.relative_order===null?1:r.relative_order===null?-1:t.relative_order-r.relative_order),Yg=(e,t)=>{t.current||(t.current=setInterval(()=>{window.scrollBy(0,e*10)},16))},Zu=e=>{e.current&&(clearInterval(e.current),e.current=null)},yn={"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","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 ed={exports:{}},td,Qg;function DC(){if(Qg)return td;Qg=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return td=e,td}var nd,Xg;function $C(){if(Xg)return nd;Xg=1;var e=DC();function t(){}function r(){}return r.resetWarningCache=t,nd=function(){function i(d,p,f,h,g,y){if(y!==e){var x=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 x.name="Invariant Violation",x}}i.isRequired=i;function o(){return i}var l={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:o,element:i,elementType:i,instanceOf:o,node:i,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return l.PropTypes=l,l},nd}var Jg;function FC(){return Jg||(Jg=1,ed.exports=$C()()),ed.exports}var LC=FC();const ve=Js(LC),UC=(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(r=>r.allocation_type_id===t.payload.allocationTypeId?{...r,...t.payload.updates}:r)}}};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(r=>r.id===t.payload.rateId?{...r,...t.payload.changes}:r)}}}};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(r=>r.id!==t.payload)}}}};default:return e}},Id=e=>({type:"SET_RESOURCE_DATA",payload:e}),zC=e=>({type:"SET_LOADING",payload:e}),Zg=(e,t)=>({type:"SET_SUCCESS_MESSAGE",payload:{message:e,color:t}}),Ts=(e,t)=>({type:"UPDATE_RESOURCE_FIELD",field:e,value:t}),rd=(e,t)=>({type:"UPDATE_ALLOCATION",payload:{allocationTypeId:e,updates:t}}),VC=async(e,t)=>await(await fetch(`${t}/resources/${e}.json`)).json(),BC=async(e,t,r,i)=>(console.log("update resource",r),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:r,required_resources:i})})),qC=(e,t)=>{const[r,i]=j.useReducer(UC,{resourceData:null,loading:!0,errors:[],successMessage:{message:"",color:""}}),o=j.useCallback(async(d,p)=>{let f=[p];try{const h=await d.json();h.errors?f=h.errors:h.message&&(f=[h.message])}catch(h){console.error("Error parsing error response:",h)}i({type:"SET_ERRORS",payload:f})},[]),l=j.useCallback(async()=>{i(zC(!0));try{const d=await VC(e,t);i(Id(d))}catch(d){console.error("Failed to fetch resource data:",d),i({type:"SET_ERRORS",payload:"Failed to fetch resource data. Please try again later."})}},[e,t]);return j.useEffect(()=>{l()},[l]),{state:r,dispatch:i,handleError:o,fetchData:l}},xf=e=>({allowedActionsOptions:e?.resource_state_types_available?.map(t=>({value:t.resource_state_type_id,label:t.display_resource_state_type,additionalInfo:t.action_types.map(r=>r.display_action_type).join(", ")}))||[],resourceTypesOptions:e?.resource_types_available?.map(t=>({value:t.resource_type_id,label:t.display_resource_type}))||[],unitTypesOptions:e?.unit_types_available?.map(t=>({value:t.unit_type_id,label:t.display_unit_type}))||[],availableResources:e?.required_resources_available||[],availableAllocationTypes:e?.unassigned_allocation_types||[]}),HC=(e,t,r,i,o,l,d)=>{const f=(()=>{if(!e)return[];const y=new Set;return e.allocation_types?.forEach(x=>{x.required_resources?.forEach(w=>{y.add(w.resource_name)})}),Array.from(y).sort((x,w)=>x.localeCompare(w)).map(x=>({key:x,name:`Require ${x}`,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"},...f],allocationRows:e?.allocation_types?e.allocation_types.map(y=>({display_name:y.display_name,allocation_type_id:y.allocation_type_id,allowed_actions:{options:i,value:y.allowed_action?.resource_state_type_id||"",onChange:x=>o(y.allocation_type_id,x)},comment:{value:y.comment||"",onChange:x=>l(y.allocation_type_id,x)},...Object.fromEntries(f.map(x=>[x.key,{checked:y.required_resources?.some(w=>w.resource_name===x.key)||!1,onChange:w=>d(y.allocation_type_id,x.key,w,y)}]))})):[],requiredResourcesColumns:f}},WC=(e,t,r)=>{const{availableResources:i,availableAllocationTypes:o,allowedActionsOptions:l}=xf(e),[d,p]=j.useState(!1),[f,h]=j.useState(!1),[g,y]=j.useState([]),[x,w]=j.useState(""),_=j.useCallback((k,O)=>{r(rd(k,{allowed_action:{resource_state_type_id:O}}))},[r]),S=j.useCallback((k,O)=>{r(rd(k,{comment:O}))},[r]),b=j.useCallback((k,O,T,D)=>{const K=T?[...D.required_resources||[],{resource_name:O,required_resource_id:e.required_resources_available.find(U=>U.resource_name===O).resource_id}]:(D.required_resources||[]).filter(U=>U.resource_name!==O);r(rd(k,{required_resources:K}))},[e,r]);j.useEffect(()=>{if(d&&t){const k=t.allocation_types.flatMap(O=>O.required_resources||[]).map(O=>O.required_resource_id);y(k)}},[d,t]);const C=j.useCallback((k,O)=>{y(T=>O?[...T,k]:T.filter(D=>D!==k))},[]),R=j.useCallback(()=>{const k=t.allocation_types.flatMap(K=>K.required_resources||[]).map(K=>K.required_resource_id),O=g.filter(K=>!k.includes(K)),T=k.filter(K=>!g.includes(K)),D=t.allocation_types.map(K=>{const U=K.required_resources||[],W=O.map(X=>{const oe=i.find(re=>re.resource_id===X);return{resource_name:oe.resource_name,required_resource_id:oe.resource_id}}),H=U.filter(X=>!T.includes(X.required_resource_id)).concat(W.filter(X=>!U.some(oe=>oe.required_resource_id===X.required_resource_id)));return{...K,required_resources:H}});r(Id({...e,resource_details:{...t,allocation_types:D}})),y([]),p(!1)},[g,i,t,e,r]),N=j.useCallback(k=>{const O=k.target.value;w(O)},[]),P=j.useCallback(()=>{if(!x)return;const k=o.find(T=>T.allocation_type_id.toString()===x),O=t.allocation_types?.some(T=>T.allocation_type_id===k.allocation_type_id);if(k&&!O){const T=l[0]?.value,D=[...t.allocation_types||[],{allocation_type_id:k.allocation_type_id,display_name:k.display_name,allowed_action:{resource_state_type_id:T},comment:"",required_resources:[]}];r(Id({...e,resource_details:{...t,allocation_types:D}})),h(!1)}},[x,o,t,e,r,l]);return{showAddResourceModal:d,setShowAddResourceModal:p,showAddAllocationTypeModal:f,setShowAddAllocationTypeModal:h,selectedNewResource:g,handleSelectNewResource:C,handleSaveResources:R,selectedNewAllocationType:x,handleSelectNewAllocationType:N,handleSaveAllocationType:P,handleAllowedActionChange:_,handleCommentChange:S,handleRequiredResourceChange:b}},KC=(e,t,r,i,o,l)=>j.useCallback(async()=>{if(!e)return;const d={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=>({allocation_type_id:f.allocation_type_id,allowed_action:{resource_state_type_id:f.allowed_action?.resource_state_type_id},comment:f.comment||""})),exchange_rates:{base_rate:e.exchange_rates?.base_rate,discount_rates:e.exchange_rates?.discount_rates?.map(f=>({id:f.id,exchange_rate:f.exchange_rate,begin_date:f.begin_date,end_date:f.end_date}))}},p={};e.allocation_types.forEach(f=>{f.required_resources.forEach(h=>{p[h.required_resource_id]||(p[h.required_resource_id]=[]),p[h.required_resource_id].push(f.allocation_type_id)})});try{const f=await BC(t,r,d,p);if(f.ok){const h=await f.json();return l(Zg(h.message||"Resource updated successfully!","success")),await i(),!0}else return await o(f,"Failed to update resource"),!1}catch{return l(Zg("Error updating resource. Please try again later.","danger")),!1}},[e,t,r,i,o]),GC=(e=!1)=>{const[t,r]=j.useState(e);return{isEditing:t,handleEditingChange:o=>{r(o)}}},YC={"form-wrapper":"_form-wrapper_mu0yh_1"},pl=({show:e,onClose:t,title:r,children:i,onSave:o,buttonText:l,cancelText:d="Cancel",canSave:p=!0})=>e?c.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:c.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:c.jsx("div",{className:"modal-dialog",role:"document",children:c.jsxs("div",{className:"modal-content",children:[c.jsxs("div",{className:"modal-header",children:[c.jsx("button",{type:"button",className:"close","data-dismiss":"modal",onClick:t,"aria-label":"Close",children:c.jsx("h3",{"aria-hidden":"true",className:"text-danger",children:"×"})}),c.jsx("h3",{className:"modal-title",children:r})]}),c.jsx("div",{className:"modal-body",children:i}),c.jsxs("div",{className:"modal-footer",style:{padding:"15px",textAlign:"right",borderTop:"1px solid #e5e5e5",backgroundColor:"#f8f9fa"},children:[c.jsx("button",{className:"btn btn-danger",onClick:t,children:d}),c.jsx("button",{className:"btn btn-success",onClick:o,disabled:!p,children:l})]})]})})})}):null;pl.propTypes={show:ve.bool.isRequired,onClose:ve.func.isRequired,title:ve.string.isRequired,children:ve.node.isRequired,onSave:ve.func.isRequired,buttonText:ve.string,cancelText:ve.string,canSave:ve.bool};const Ye=({children:e,color:t,dismissable:r=!1})=>c.jsxs("div",{className:`alert alert-${t} mt-3 alert-dismissible show`,role:"alert",children:[e,r&&c.jsx("button",{type:"button",className:"close","data-dismiss":"alert","aria-label":"Close",children:c.jsx("span",{"aria-hidden":"true",children:"×"})})]}),Bs=({label:e,options:t,value:r,onChange:i,...o})=>c.jsxs("div",{className:"form-group",children:[e&&c.jsx("label",{children:e}),c.jsx("select",{className:"form-control",value:r,onChange:i,...o,children:t.map(l=>c.jsxs("option",{value:l.value,children:[l.label,l.additionalInfo&&` - ${l.additionalInfo}`]},l.value))})]});Bs.propTypes={label:ve.string,options:ve.arrayOf(ve.shape({value:ve.oneOfType([ve.string,ve.number]).isRequired,label:ve.string.isRequired,additionalInfo:ve.string})).isRequired,value:ve.oneOfType([ve.string,ve.number]),onChange:ve.func.isRequired};function Ds({label:e,type:t="text",value:r,onChange:i,disabled:o=!1,infoText:l="",style:d,inputClassName:p,inputAddon:f}){return c.jsxs(c.Fragment,{children:[e&&c.jsx("label",{children:e}),l&&c.jsx("small",{className:"form-text help-block",children:l}),t==="textarea"?c.jsx("textarea",{className:`form-control ${p||""}`,value:r,onChange:i,disabled:o,rows:"6"}):f?c.jsxs("div",{className:"input-prepend",children:[c.jsx("span",{className:"add-on",children:f}),c.jsx("input",{type:t,className:`form-control ${p||""}`,style:d,value:r,onChange:i,disabled:o})]}):c.jsx("input",{type:t,className:`form-control ${p||""}`,style:d,value:r,onChange:i,disabled:o})]})}const QC="_blurred_16xcy_16",Wn={"advanced-settings":"_advanced-settings_16xcy_1","header-wrapper":"_header-wrapper_16xcy_5","content-container":"_content-container_16xcy_11",blurred:QC,"warning-banner":"_warning-banner_16xcy_21","alt-warning-banner":"_alt-warning-banner_16xcy_40 _warning-banner_16xcy_21"},bf=({headerText:e,header:t,children:r,isEditing:i=!1,onEditingChange:o,warningMessage:l=""})=>{const d=e&&e.type==="label";return c.jsxs("div",{className:Wn["advanced-settings"],children:[(e||t)&&c.jsxs("div",{className:Wn["header-wrapper"],children:[e,t&&c.jsx("div",{className:`${Wn["header-buttons-container"]} ${i?"":Wn.blurred}`,children:t})]}),c.jsxs("div",{style:{width:"100%"},children:[!i&&c.jsxs("div",{className:d?`${Wn["alt-warning-banner"]}`:Wn["warning-banner"],children:[c.jsxs("span",{className:Wn["warning-text"],children:[c.jsx("strong",{children:"CAUTION! "})," ",l]}),c.jsx("button",{className:"btn btn-danger",onClick:()=>o(!0),children:"I understand the risks"})]}),c.jsx("div",{className:`${Wn["content-container"]} ${i?"":Wn.blurred}`,children:r})]})]})};bf.propTypes={headerText:ve.node,header:ve.node,children:ve.node.isRequired,isEditing:ve.bool,onEditingChange:ve.func.isRequired,warningMessage:ve.string};const wf=Xe.memo(function({resourceDetails:t,resourceTypesOptions:r,unitTypesOptions:i,dispatch:o,isDollarValueEditing:l,onDollarValueEditingChange:d,showDollarValue:p=!0,showResourceId:f=!0,useAdvancedSettings:h=!0}){const g="Dollar Value per SUs",y=p?c.jsx(Ds,{label:h?null:g,value:t.dollar_value,onChange:x=>o(Ts("dollar_value",x.target.value)),type:"number",inputAddon:"$",inputClassName:"span4"}):null;return c.jsxs(c.Fragment,{children:[c.jsx(Ds,{label:"Resource Name",value:t.resource_name,onChange:x=>o(Ts("resource_name",x.target.value)),inputClassName:"span8"}),f&&c.jsx(Ds,{label:"Resource Repository Key",value:t.resource_repository_key,disabled:!0,inputClassName:"span8"}),h&&p?c.jsx(bf,{headerText:c.jsx("label",{children:g}),isEditing:l,onEditingChange:d,warningMessage:"Dollar value is for reporting and should only be modified if the SU rate changes.",children:y}):y,c.jsx(Ds,{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:x=>o(Ts("description",x.target.value)),inputClassName:"span8"}),c.jsx(Bs,{label:"Resource Type",options:r,value:t.resource_type_id,onChange:x=>o(Ts("resource_type_id",x.target.value)),className:"span8"}),c.jsx(Bs,{label:"Unit Type",options:i,value:t.unit_type_id,onChange:x=>o(Ts("unit_type_id",x.target.value)),className:"span8"}),c.jsx(Ds,{label:`Minimum exchange amount, in ${i.find(x=>x.value.toString()===t.unit_type_id.toString())?.label}`,value:t.min_exchange,onChange:x=>o(Ts("min_exchange",x.target.value)),inputClassName:"span8"})]})});wf.propTypes={resourceDetails:ve.object.isRequired,resourceTypesOptions:ve.array.isRequired,unitTypesOptions:ve.array.isRequired,dispatch:ve.func.isRequired,isDollarValueEditing:ve.bool,onDollarValueEditingChange:ve.func,showDollarValue:ve.bool,showResourceId:ve.bool,useAdvancedSettings:ve.bool};function rx({onClose:e}){const[t,r]=j.useState(!0),[i,o]=j.useState([]),[l,d]=j.useState(null),[p,f]=j.useState(-1),[h,g]=j.useState(null),y=xf(h);y.resourceTypesOptions.unshift({value:0,label:"Select a resource type..."}),y.unitTypesOptions.unshift({value:0,label:"Select a unit type..."}),j.useEffect(()=>{(async()=>{const R=await fetch("/resources/addable.json");r(!1),R.status==200?o(await R.json()):d("Error retrieving resource list.")})()},[]),j.useEffect(()=>{if(p===-1)return g(null);(async()=>{const R=await fetch(`/resources/addable/${p}.json`);R.status==200?g(await R.json()):d("Error retrieving resource details.")})()},[p]);let x=null;t?x=c.jsx("p",{children:"Loading…"}):l!==null?x=c.jsx(Ye,{color:"danger",children:l}):i.length==0&&(x=c.jsx(Ye,{children:"There are currently no resources available to add."}));const w=[{value:-1,label:"Select a resource..."}].concat(i.map(R=>({value:R.xras_cider_resource_id,label:R.resource_descriptive_name}))),_=h?h.resource_details:null,S=!l&&_&&_.resource_name.length>0&&_.resource_type_id>0&&_.unit_type_id>0,b=R=>{R.type=="UPDATE_RESOURCE_FIELD"&&g({...h,resource_details:{...h.resource_details,[R.field]:R.value}})},C=()=>{(async()=>{const R=await fetch("/resources",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector('meta[name="csrf-token"]').content},body:JSON.stringify({..._,resource_repository_key:p})});if(R.status==200){const N=await R.json();window.location=`/resources/${N.resource_id}`}else d("Error saving resource.")})()};return x===null&&(x=c.jsxs(c.Fragment,{children:[c.jsx("h2",{children:"Select a Resource to Add"}),c.jsx(Bs,{options:w,onChange:R=>f(parseInt(R.target.value))}),!h&&p!==-1?c.jsx("p",{children:"Loading…"}):null,h&&c.jsxs(c.Fragment,{children:[c.jsx("h2",{children:"Resource Properties"}),c.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"}),c.jsx("div",{className:YC["form-wrapper"],children:c.jsx(wf,{resourceDetails:_,resourceTypesOptions:y.resourceTypesOptions,unitTypesOptions:y.unitTypesOptions,showResourceId:!1,showDollarValue:!1,dispatch:b})})]})]})),c.jsx(pl,{show:!0,onClose:e,title:"Add a Resource from CIDeR",onSave:C,buttonText:"Save",canSave:S,children:x})}rx.propTypes={onClose:ve.func.isRequired};function XC({availableResources:e,unavailableResources:t=[],canAdd:r=!1,relativeUrlRoot:i}){const o=j.useMemo(()=>Gg(e),[e]),l=j.useMemo(()=>Gg(t),[t]),[d,p]=j.useState(o),[f,h]=j.useState(!1),g=j.useRef(null),y=j.useRef(null),x="Active",w="Inactive",[_,S]=j.useState(x),b=k=>{S(k),console.log(k),k==x?p(o):p(l)};function C(k,O){O.preventDefault(),S(k),b(k)}j.useEffect(()=>{p(o)},[o]);const R=(k,O)=>{g.current=O},N=(k,O)=>{if(k.preventDefault(),g.current===O)return;const T=[...d],D=T[g.current];T.splice(g.current,1),T.splice(O,0,D),g.current=O,p(T);const{clientY:K}=k,U=130;K<U?Yg(-1,y):window.innerHeight-K<U?Yg(1,y):Zu(y)},P=()=>{g.current=null,Zu(y),MC(i,d)};return j.useEffect(()=>()=>Zu(y),[]),c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:yn["resources-container"],children:[r&&c.jsx("button",{className:"btn btn-primary pull-right",onClick:()=>h(!0),children:"Add a Resource from CIDeR"}),c.jsx("h2",{children:"Select a resource from the list to modify"}),c.jsx("p",{className:yn["drag-instruction"],children:"Drag items to reorder the list."}),c.jsxs("div",{className:"w-full max-w-md mx-auto p-4",children:[c.jsxs("ul",{className:"nav nav-tabs",children:[c.jsx("li",{className:"nav-item",children:c.jsx("a",{className:`nav-link ${_===x?"active":""}`,"data-toggle":_===x?"tab":void 0,style:{cursor:"default",..._===x?{border:"1px solid #ddd",borderBottomColor:"transparent",color:"#555",backgroundColor:"#fff"}:{}},onClick:k=>C(x,k),children:x})}),c.jsx("li",{className:"nav-item",children:c.jsx("a",{className:`nav-link ${_===w?"active":""}`,"data-toggle":_===w?"tab":void 0,style:{cursor:"default"},onClick:k=>C(w,k),children:w})})]}),c.jsxs("div",{className:yn["resources-list"],children:[c.jsxs("div",{className:yn["resources-header"],children:[c.jsx("span",{className:yn["header-name"],children:"Resource Name"}),c.jsx("span",{className:yn["header-repo"],children:"Repository Key"})]}),d.map((k,O)=>c.jsxs("div",{className:`${yn["resources-item"]}`,draggable:!0,onDragStart:T=>R(T,O),onDragOver:T=>N(T,O),onDrop:P,children:[c.jsx("span",{className:yn["drag-handle"]}),c.jsx("span",{className:yn["resource-name"],children:c.jsx("a",{href:`${i}/resources/${k.resource_id}`,className:yn["resource-link"],children:k.display_resource_name})}),c.jsx("span",{className:yn["resource-repo"],children:k.resource_repository_key||"N/A"})]},k.resource_id))]})]})]}),f&&c.jsx(rx,{onClose:()=>h(!1)})]})}function is(){return c.jsx("div",{className:"spinner-border",role:"status",children:c.jsx("span",{className:"visually-hidden",children:"Loading..."})})}const JC="_grid_afccc_1",ZC="_important_afccc_30",e1="_input_afccc_34",t1="_edited_afccc_38",n1="_disabled_afccc_46",r1="_scroll_afccc_59",Xr={grid:JC,important:ZC,input:e1,edited:t1,disabled:n1,scroll:r1};function s1({column:e,row:t,style:r={}}){const i=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)),c.jsx("td",{className:o.join(" "),style:r,children:i})}const Sf=({title:e,placement:t,children:r})=>(j.useEffect(()=>($('[data-toggle="tooltip"]').tooltip(),()=>{$('[data-toggle="tooltip"]').tooltip("destroy")}),[]),c.jsx("span",{"data-toggle":"tooltip","data-placement":t,title:e,style:{margin:"10px"},children:r}));Sf.propTypes={title:ve.string.isRequired,placement:ve.oneOf(["top","bottom","left","right"]),children:ve.node.isRequired};Sf.defaultProps={placement:"top"};const o1="_datepicker_19wnv_1",i1="_error_19wnv_1",ev={datepicker:o1,error:i1},a1=({value:e,onChange:t,disabled:r=!1,style:i,className:o="",minDate:l="",maxDate:d="",error:p=""})=>{const f=p;return c.jsx("div",{className:`w-full ${o}`,children:c.jsx("input",{type:"date",style:i,className:`${ev.datepicker} ${f?ev.error:""}`,value:e||"",onChange:h=>t(h.target.value),disabled:r,min:l||"1900-01-01",max:d||"2100-12-31"})})},qo=(e,t,r)=>{if(t.onChange){t.onChange(r,e);return}const i=e[t.key];i?.onChange&&i.onChange(r)},l1={text:s1,select:({column:e,row:t,style:r})=>c.jsx("td",{style:r,children:c.jsx(Bs,{label:"",options:t[e.key].options,value:t[e.key].value,onChange:i=>qo(t,e,i.target.value),style:{width:"100%",margin:0}})}),input:({column:e,row:t,style:r})=>c.jsx("td",{style:r,children:c.jsx(Ds,{label:"",type:"text",disabled:t[e.key].disabled,value:t[e.key].value,onChange:i=>qo(t,e,i.target.value),style:{width:"92%",margin:0}})}),checkbox:({column:e,row:t,style:r})=>c.jsx("td",{style:r,children:c.jsx("input",{type:"checkbox",checked:t[e.key].checked,onChange:i=>qo(t,e,i.target.checked)})}),date:({column:e,row:t,style:r})=>{const i=t[e.key];return!i?.value&&typeof i!="object"?c.jsx("td",{style:r,children:i||""}):c.jsx("td",{style:r,children:c.jsx(a1,{value:i.value,onChange:o=>qo(t,e,o),disabled:i.disabled,style:{width:"92%",margin:0},minDate:e.minDate,maxDate:e.maxDate,error:i.error})})},action:({column:e,row:t,style:r})=>c.jsx("td",{style:r,children:t.rate_type==="Discount"&&c.jsx("button",{className:"btn btn-link text-danger",onClick:()=>qo(t,e,t[e.key]?.id),children:c.jsx("i",{className:"fa fa-trash"})})})};function An({columns:e,rows:t,classes:r,frozenColumns:i=0,minWidth:o,rowClasses:l=[],scroll:d=!0,scrollBehavior:p="smooth",scrollRowIndex:f=0}){const h=j.useRef();j.useLayoutEffect(()=>{if(!d||!h.current)return;const S=h.current.querySelector(`tbody tr:nth-child(${f+1})`);S&&S.scrollIntoView({behavior:p,block:"nearest",inline:"nearest"})},[d,f,p]);const g=[0];for(let S=0;S<i;S++)g[S+1]=g[S]+(e[S].width||100);const y=(S,b)=>S<i?{position:"sticky",left:`${g[S]}px`,minWidth:`${e[S].width||100}px`,width:`${e[S].width||100}px`,zIndex:b||1}:{},x=e.map((S,b)=>c.jsxs("th",{className:S.headerClass||S.class||"",style:y(b,100),children:[S.formatHeader?S.formatHeader(S.name,S):S.name,S.tooltip&&c.jsx(Sf,{title:S.tooltip,placement:"bottom",children:c.jsx("i",{className:"icon-info-sign"})})]},S.key)),w=t.map((S,b)=>{const C=e.map((R,N)=>{const P=l1[R.type||"text"];return c.jsx(P,{column:R,row:S,style:y(N)},R.key)});return c.jsx("tr",{className:l[b]||"",children:C},b)}),_={};return o&&(_.minWidth=o),c.jsx("div",{className:`${Xr.grid} ${d?Xr.scroll:""} ${r||""}`,ref:h,children:c.jsxs("table",{className:"table table-bordered",style:_,children:[c.jsx("thead",{children:c.jsx("tr",{children:x})}),c.jsx("tbody",{children:w})]})})}const Ad={"header-buttons":"_header-buttons_15oxx_1","allocation-types-grid":"_allocation-types-grid_15oxx_6","vertical-align-center":"_vertical-align-center_15oxx_10"},sx=({onAddAllocationType:e,onAddRequiredResource:t})=>c.jsxs("div",{className:Ad["header-buttons"],children:[c.jsxs("button",{className:"btn btn-primary",onClick:e,children:[c.jsx("i",{className:"fa fa-plus"})," Add Allocation Type"]}),c.jsxs("button",{className:"btn btn-primary",onClick:t,children:[c.jsx("i",{className:"fa fa-plus"})," Add Required Resource"]})]});sx.propTypes={headerText:ve.node,onAddAllocationType:ve.func.isRequired,onAddRequiredResource:ve.func.isRequired};const ox=Xe.memo(function({columns:t,rows:r}){return c.jsxs("div",{className:Ad["allocation-types-grid"],children:[c.jsx(An,{columns:t,rows:r,rowClasses:Array(r.length).fill(Ad["vertical-align-center"]),scroll:!1}),c.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."})]})});ox.propTypes={columns:ve.array.isRequired,rows:ve.array.isRequired};const Ps={"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=Xe.memo(function({columns:t,rows:r,onAddDiscountRate:i,dateErrors:o=[]}){return c.jsxs("div",{className:Ps["exchange-rates-grid"],children:[c.jsxs("div",{className:Ps["header-container"],children:[c.jsx("h2",{className:Ps["header-title"],children:"Exchange Rates"}),c.jsx("div",{className:Ps["header-buttons"],children:c.jsxs("button",{className:"btn btn-primary",onClick:i,children:[c.jsx("i",{className:"fa fa-plus"})," Add Discount Rate"]})})]}),c.jsx(An,{columns:t,rows:r,rowClasses:Array(r.length).fill(Ps["vertical-align-center"]),scroll:!1}),o.length>0&&c.jsx("div",{className:Ps["error-summary"],children:c.jsx("ul",{children:o.map((l,d)=>c.jsx("li",{children:l},d))})})]})});ix.propTypes={columns:ve.array.isRequired,rows:ve.array.isRequired,onAddDiscountRate:ve.func.isRequired,dateErrors:ve.array};const c1=(e,t)=>{const r=j.useCallback(w=>{t({type:"DELETE_EXCHANGE_RATE",payload:w}),(e?.resource_details?.exchange_rates?.discount_rates.filter(S=>S.id!==w)||[]).forEach(S=>{S.begin_date&&S.end_date&&t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:S.id,changes:{start_date_error:"",end_date_error:""}}})})},[t,e]),i=[{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:r}],o=w=>{t({type:"UPDATE_BASE_RATE",payload:w})},l=(w,_)=>{const S={exchange_rate:_},b={};_?b.rate_error="":b.rate_error="Exchange Rate cannot be empty",t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:w,changes:{...S,...b}}})},d=()=>{const w=[];return(e?.resource_details?.exchange_rates?.discount_rates||[]).forEach(S=>{S.start_date_error&&w.push(S.start_date_error),S.end_date_error&&w.push(S.end_date_error),S.rate_error&&w.push(S.rate_error)}),w.filter((S,b)=>S&&S!==""&&(!S.includes("overlaps")||w.indexOf(S)===b))},p=w=>{const _=new Date(w);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(_)},f=(w,_,S,b)=>{const C=new Date(w).getTime(),R=new Date(_).getTime(),N=new Date(S).getTime(),P=new Date(b).getTime();return C<=P&&N<=R},h=(w,_)=>{let S="";if(w.begin_date&&w.end_date){const b=_.filter(C=>C.id!==w.id);for(const C of b)if(C.begin_date&&C.end_date&&f(w.begin_date,w.end_date,C.begin_date,C.end_date)){S=`The selected date range (${p(w.begin_date)} to ${p(w.end_date)}) overlaps with an existing discount rate (${p(C.begin_date)} to ${p(C.end_date)})`;break}}return S},g=(w,_,S)=>{const b={start_date:"begin_date",end_date:"end_date"},C=U=>{const W=new Date(U);return new Intl.DateTimeFormat("en-US",{timeZone:"UTC",month:"numeric",day:"numeric",year:"numeric"}).format(W)},R=e?.resource_details?.exchange_rates?.discount_rates||[],N=R.find(U=>U.id===w);if(!N)return;const P={[b[_]]:S},k={},O=_==="end_date",T=()=>{if(!S)return k[`${_}_error`]="Date cannot be empty or invalid",!1;const U=i.find(oe=>oe.key===_),W=U?.minDate||"1900-01-01",H=U?.maxDate||"2100-12-31",X=O&&N.begin_date?N.begin_date:W;return S<X?(k[`${_}_error`]=`${_.replace("_"," ")} ${C(S)} cannot be before ${C(X)}`,!1):S>H?(k[`${_}_error`]=`${_.replace("_"," ")} cannot be after ${C(H)}`,!1):(k[`${_}_error`]="",!0)},D=()=>{const U=_==="end_date"?S:N.end_date;if(_==="start_date"&&U){if(S>U)return k.end_date_error=`end date ${C(U)} cannot be before ${C(S)}`,!1;k.end_date_error=k.end_date_error||""}return!0},K=()=>{console.log("validating overlaps");const U=_==="start_date"?S:N.begin_date,W=_==="end_date"?S:N.end_date;if(U&&W){const H=h({...N,begin_date:U,end_date:W},R);return k.start_date_error=H,k.end_date_error=H,!H}return!0};if(!T()){t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:w,changes:{...P,...k}}});return}D(),K(),O&&!N.begin_date?k.start_date_error="Date cannot be empty or invalid":!O&&!N.end_date&&(k.end_date_error="Date cannot be empty or invalid"),t({type:"UPDATE_EXCHANGE_RATE",payload:{rateId:w,changes:{...P,...k}}})},y=()=>{const w=e?.resource_details?.exchange_rates?.discount_rates||[];let S=new Date;w.forEach(k=>{if(k.end_date){const O=new Date(k.end_date);O>S&&(S=O)}});const b=new Date(S);b.setDate(b.getDate()+1);const C=b.toISOString().split("T")[0],R=new Date(b);R.setDate(R.getDate()+15);const N=R.toISOString().split("T")[0],P={id:Date.now(),exchange_rate:"1.0",begin_date:C,end_date:N,is_new:!0};t({type:"ADD_EXCHANGE_RATE",payload:P})};return{exchangeRateColumns:i,exchangeRateRows:(()=>{const w=e?.resource_details?.exchange_rates,_=w?.base_rate??"",S=w?.discount_rates||[],b=new Date().toISOString().split("T")[0],C=e?.resource_details?.unit_type||"Resource Units",R=N=>!N||Number(N)===0?"-":`${(1/Number(N)).toFixed(2)} ${C}`;return[{rate_type:"Base Rate",rate:{value:_.toString(),onChange:N=>o(N)},conversion:R(_)},...S.map(N=>{const P=N.is_new||N.begin_date>b,k=P||N.begin_date==="",O=N.is_new||N.end_date>=b||N.end_date==="";return{rate_type:"Discount",rate:{value:N.exchange_rate?.toString()||"",onChange:P?T=>l(N.id,T):null,disabled:!P},conversion:R(N.exchange_rate),start_date:{value:N.begin_date||"",onChange:T=>g(N.id,"start_date",T),error:N.start_date_error,disabled:!k},end_date:{value:N.end_date||"",onChange:T=>g(N.id,"end_date",T),error:N.end_date_error,disabled:!O},actions:{id:N.id}}})]})(),handleAddDiscountRate:y,handleDeleteRate:r,dateErrors:d()}};function ax({resourceId:e,relativeUrlRoot:t,setExternalSubmit:r}){const{state:i,dispatch:o,handleError:l,fetchData:d}=qC(e,t),{isEditing:p,handleEditingChange:f}=GC(),{resourceData:h,loading:g,errors:y,successMessage:x}=i,w=h?.resource_details,_=h?.uses_exchange_rates,{allowedActionsOptions:S,resourceTypesOptions:b,unitTypesOptions:C,availableResources:R,availableAllocationTypes:N}=xf(h),{showAddResourceModal:P,setShowAddResourceModal:k,showAddAllocationTypeModal:O,setShowAddAllocationTypeModal:T,selectedNewResource:D,handleSelectNewResource:K,handleSaveResources:U,selectedNewAllocationType:W,handleSelectNewAllocationType:H,handleSaveAllocationType:X,handleAllowedActionChange:oe,handleCommentChange:re,handleRequiredResourceChange:se}=WC(h,w,o),{exchangeRateColumns:pe,exchangeRateRows:q,handleAddDiscountRate:ne,dateErrors:I}=c1(h,o),B=KC(w,e,t,d,l,o);j.useEffect(()=>{r&&I.length==0?r(B):r(null)},[B,r,I]);const{allocationColumns:Y,allocationRows:ie}=HC(w,R,D,S,oe,re,se),[ae,ue]=j.useState(!1);return g?c.jsx(is,{}):y.length>0?c.jsx("div",{children:y.map((le,de)=>c.jsx(Ye,{color:"danger",dismissable:!0,children:le},de))}):h?c.jsxs("div",{className:"edit-resource",children:[x.message&&c.jsx(Ye,{color:x.color,dismissable:!0,children:x.message}),c.jsxs("div",{children:[c.jsx("h2",{children:"Resource Properties"}),c.jsx("div",{style:{marginBottom:"0.75rem"},children:c.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"})}),c.jsx(wf,{resourceDetails:w,resourceTypesOptions:b,unitTypesOptions:C,dispatch:o,isDollarValueEditing:ae,onDollarValueEditingChange:ue})]}),_&&c.jsx(ix,{columns:pe,rows:q,onAddDiscountRate:ne,dateErrors:I}),c.jsx(bf,{headerText:c.jsx("h2",{children:"Allocation Types"}),header:c.jsx(sx,{onAddAllocationType:()=>p&&T(!0),onAddRequiredResource:()=>p&&k(!0)}),isEditing:p,onEditingChange:f,warningMessage:`Incorrect allocations
|
|
53
13
|
process settings can make a resource unavailable for allocation.
|
|
54
|
-
Please proceed with caution.`,children:a.jsx($x,{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."})}Mx.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}`,XE=(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 ZE(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)},ZE=(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(ad).sort(Qa),showDeleteModal:!1,status:h,type:x})),allocationType:n,allowedActions:JE(r),endDate:o,entryDate:f,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:p,isMaximize:n=="Maximize",requestId:s,resources:l.map(ad).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},JE=e=>{const t={};for(let{actionType:n,allowedResources:r,opportunityId:o,opportunityName:s}of e){let i={name:n,resources:r.map(ad).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,ad=({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})))},Dx=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((n,r)=>n===t[r])),Mi=(e,t)=>{const n=ze(e,t);for(let r of n.actions)if(r.actionId==t.payload.actionId)return r},rn=(e,t)=>e.projects[t.payload.grantNumber],ze=(e,t)=>e.requests[t.payload.requestId],eR=(e,t)=>rn(e,t).users.find(({username:n})=>n==t.payload.username),ld=({allocated:e,isActive:t,isCredit:n})=>e>0&&t&&!n,Cm=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!Dx(e.resourceIds,e.initialResourceIds),Fx=()=>document.querySelector("meta[name=csrf-token]").content,tR=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=Ue("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({})}),Lx=Ue("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),Ux=Ue("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:n})=>n({grantNumber:e,requestId:t})),aa=Ue("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=Ue("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:Fx()};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=Ue("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:Fx(),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=Ue("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:n})=>{const o=t().api.projects[e].users,s=o.filter(u=>!Dx(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:td[u.role],initialRole:td[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})}),zx=Ue("publications/dismissNotice",async(e,{rejectWithValue:t})=>{try{const n=await fetch(ne.routes.publications_dismiss_notice_path(),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("meta[name=csrf-token]").content},body:JSON.stringify({acknowledged:!0})}),r=await n.json();return n.ok?r:t(r)}catch(n){return t({error:n.message})}}),Vx=Lr({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null,showUpdatePublications:!1},reducers:{addResource:(e,t)=>{const{resourceId:n}=t.payload,r=ze(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(ld).map(s=>s.resourceId),role:"user",initialResourceIds:[],initialRole:"user",hasChanges:!0,isNew:!0}),n.usersNewRowIndex=n.users.length-1)},closeUsageDetailModal:(e,t)=>{const n=ze(e,t);n.usageDetail=null,n.usageDetailStatus=null},resetResources:(e,t)=>{const n=ze(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=ze(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=ze(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-=rd(l,"difference");s&&(s.requested=mo(i,s.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const n=ze(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=eR(e,t);n.role=t.payload.role,Cm(n)},toggleActionsModal:(e,t)=>{const n=ze(e,t);n.showActionsModal=!n.showActionsModal},toggleConfirmModal:(e,t)=>{const n=ze(e,t);n.showConfirmModal=!n.showConfirmModal},toggleDeleteModal:(e,t)=>{const n=Mi(e,t);n.showDeleteModal=!n.showDeleteModal},toggleResourcesModal:(e,t)=>{const n=ze(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(ld).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&&XE(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(Lx.rejected,(t,n)=>{const{grantNumber:r}=n.payload;t.projects[r]={error:"Failed to load project data."}}).addCase(Ux.rejected,(t,n)=>{const{requestId:r}=n.payload;t.requests[r]={error:"Failed to load request data."}}).addCase(aa.pending,(t,n)=>{const r=ze(t,{payload:n.meta.arg});r.usageDetailStatus=Ve.pending}).addCase(aa.fulfilled,(t,n)=>{const r=ze(t,n);r.usageDetail=n.payload.usageDetail,r.usageDetailStatus=Ve.success}).addCase(aa.rejected,(t,n)=>{const r=ze(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=ze(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=ze(t,{payload:n.meta.arg});r.exchangeStatus=Ve.pending,r.showResourcesModal=!1}).addCase(ca.fulfilled,(t,n)=>{const r=ze(t,n);r.exchangeActionId=n.payload.exchangeActionId,r.exchangeActionEditable=!1,r.exchangeErrors=[],r.exchangeStatus=Ve.success}).addCase(ca.rejected,(t,n)=>{const r=ze(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}).addCase(zx.fulfilled,(t,n)=>{var r;(r=n.payload)!=null&&r.success&&(t.showUpdatePublications=!1)})}}),nR=e=>e.api.showUpdatePublications,rR=e=>e.api.error,oR=e=>e.api.projectsList,sR=e=>e.api.projectListLoading,iR=(e,t)=>rn(e.api,{payload:{grantNumber:t}}),aR=(e,t)=>ze(e.api,{payload:{requestId:t}}),lR=e=>e.api.username,{addResource:cR,addUser:uR,closeUsageDetailModal:dR,hideAlert:wD,resetResources:fR,resetUsers:pR,setRequest:hR,setResourceQuestionValues:mR,setResourceRequest:gR,setResourcesReason:vR,setTab:yR,setUserRole:xR,toggleActionsModal:bR,toggleConfirmModal:wR,toggleDeleteModal:SR,toggleResourcesModal:_R,toggleUsersResources:CR}=Vx.actions,Bx=Vx.reducer,jR=e=>{const t=H(rR),n=H(sR),r=H(oR),o=me();return w.useEffect(()=>{o(ia(e))},[]),{error:t,loading:n,projects:r}},kt=(e,t)=>{const n=H(s=>iR(s,e)),r=H(lR),o=me();return w.useEffect(()=>{!n&&!t&&o(Lx({grantNumber:e}))},[t]),{project:n,addUser:s=>o(uR({grantNumber:e,user:s})),resetUsers:()=>o(pR({grantNumber:e})),saveUsers:()=>o(ua({grantNumber:e})),setRequest:s=>o(hR({grantNumber:e,requestId:s})),setTab:s=>o(yR({grantNumber:e,tab:s})),setUserRole:(s,i)=>o(xR({grantNumber:e,username:s,role:i})),statuses:Ve,toggleUsersResources:(s,i,l)=>o(CR({grantNumber:e,username:i,resourceId:l,checked:s})),username:r}},ut=(e,t)=>{const n=H(o=>aR(o,e)),r=me();return w.useEffect(()=>{n||r(Ux({grantNumber:t,requestId:e}))},[t,e]),{request:n,addResource:o=>r(cR({requestId:e,resourceId:o})),closeUsageDetailModal:()=>r(dR({requestId:e})),deleteAction:o=>r(la({actionId:o,requestId:e})),openUsageDetailModal:o=>r(aa({grantNumber:n.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>r(fR({requestId:e})),saveResources:()=>r(ca({requestId:e})),setResourceQuestionValues:(o,s,i)=>r(mR({requestId:e,resourceId:o,attributeSetId:s,values:i})),setResourceRequest:(o,s)=>r(gR({requestId:e,resourceId:o,requested:s})),setResourcesReason:o=>r(vR({requestId:e,reason:o})),statuses:Ve,toggleActionsModal:()=>r(bR({requestId:e})),toggleConfirmModal:()=>r(wR({requestId:e})),toggleDeleteModal:o=>r(SR({requestId:e,actionId:o})),toggleResourcesModal:()=>r(_R({requestId:e}))}},ER="_project_qqnbz_1",RR="_expand_qqnbz_5",jm={project:ER,expand:RR},NR="_returnedForCorrectionsNotes_jujbd_1",kR={returnedForCorrectionsNotes:NR};function qx(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},Hx=Ee.createContext(Ja),OR=Ee.createContext(!1);let TR=!!(typeof window<"u"&&window.document&&window.document.createElement),zc=new WeakMap;function PR(e=!1){let t=w.useContext(Hx),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=zc.get(s);i==null?zc.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==i.state&&(t.current=i.id,zc.delete(s))}n.current=++t.current}return n.current}function IR(e){let t=w.useContext(Hx);t===Ja&&!TR&&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=PR(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function $R(e){let t=Ee.useId(),[n]=w.useState(FR()),r=n?"react-aria":`react-aria${Ja.prefix}`;return e||`${r}-${t}`}const Wx=typeof Ee.useId=="function"?$R:IR;function AR(){return!1}function MR(){return!0}function DR(e){return()=>{}}function FR(){return typeof Ee.useSyncExternalStore=="function"?Ee.useSyncExternalStore(DR,AR,MR):w.useContext(OR)}const LR=w.createContext(null),Uo=LR,UR=w.createContext(null),$r=(e,t=null)=>e!=null?String(e):t||null,Ln=UR;function zR(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e},[e]),t}function Te(e){const t=zR(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 VR(e,t){const n=Em(e),r=Em(t);return o=>{n&&n(o),r&&r(o)}}function mn(e,t){return w.useMemo(()=>VR(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 BR=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],qR=["activeKey","getControlledId","getControllerId"],HR=["as"];function cd(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 Kx(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=cd(e,BR);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=cd(v,qR),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 Gx=w.forwardRef((e,t)=>{let{as:n="div"}=e,r=cd(e,HR);const[o,{isActive:s,onEnter:i,onEntering:l,onEntered:c,onExit:u,onExiting:d,onExited:f,mountOnEnter:p,unmountOnExit:m,transition:v=Wf}]=Kx(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}))})})})});Gx.displayName="TabPanel";const Yx=e=>{const{id:t,generateChildId:n,onSelect:r,activeKey:o,defaultActiveKey:s,transition:i,mountOnEnter:l,unmountOnExit:c,children:u}=e,[d,f]=qx(o,s,r),p=Wx(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})})};Yx.Panel=Gx;const Qx=Yx;var Xx={exports:{}};/*!
|
|
55
|
-
|
|
56
|
-
Licensed under the MIT License (MIT), see
|
|
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})()})(Xx);var WR=Xx.exports;const oe=Js(WR);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 KR(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,el(e,t)}const Rm={disabled:!1},Zx=Ee.createContext(null);var GR=function(t){return t.scrollTop},fs="unmounted",Gn="exited",Sn="entering",Xn="entered",tl="exiting",qn=function(e){KR(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&&GR(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(Zx.Provider,{value:null},typeof i=="function"?i(o,l):Ee.cloneElement(Ee.Children.only(i),l))},t}(Ee.Component);qn.contextType=Zx;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 YR=qn;function zo(e){return e&&e.ownerDocument||document}function QR(e){var t=zo(e);return t&&t.defaultView||window}function XR(e,t){return QR(e).getComputedStyle(e,t)}var ZR=/([A-Z])/g;function JR(e){return e.replace(ZR,"-$1").toLowerCase()}var eN=/^ms-/;function Di(e){return JR(e).replace(eN,"-ms-")}var tN=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function nN(e){return!!(e&&tN.test(e))}function Pn(e,t){var n="",r="";if(typeof t=="string")return e.style.getPropertyValue(Di(t))||XR(e).getPropertyValue(Di(t));Object.keys(t).forEach(function(o){var s=t[o];!s&&s!==0?e.style.removeProperty(Di(o)):nN(o)?r+=o+"("+s+") ":n+=Di(o)+": "+s+";"}),r&&(n+="transform: "+r+";"),e.style.cssText+=";"+n}const Vo=!!(typeof window<"u"&&window.document&&window.document.createElement);var ud=!1,dd=!1;try{var Vc={get passive(){return ud=!0},get once(){return dd=ud=!0}};Vo&&(window.addEventListener("test",Vc,Vc),window.removeEventListener("test",Vc,!0))}catch{}function Gf(e,t,n,r){if(r&&typeof r!="boolean"&&!dd){var o=r.once,s=r.capture,i=n;!dd&&o&&(i=n.__once||function l(c){this.removeEventListener(t,l,s),n.call(this,c)},n.__once=i),e.addEventListener(t,i,ud?r:s)}e.addEventListener(t,n,r)}function fd(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(){fd(e,t,n,r)}}function rN(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 oN(e){var t=Pn(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function sN(e,t,n){n===void 0&&(n=5);var r=!1,o=setTimeout(function(){r||rN(e,"transitionend",!0)},t+n),s=Nn(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),s()}}function Jx(e,t,n,r){n==null&&(n=oN(e)||0);var o=sN(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 e0(e,t){const n=Nm(e,"transitionDuration"),r=Nm(e,"transitionDelay"),o=Jx(e,s=>{s.target===e&&(o(),t(s))},n+r)}function t0(e){e.offsetHeight}function nl(e){return e&&"setState"in e?Sr.findDOMNode(e):e??null}const iN=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(YR,{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})})}),n0=iN,aN={[Sn]:"show",[Xn]:"show"},r0=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)=>{t0(c),r==null||r(c,u)},[r]);return a.jsx(n0,{ref:s,addEndListener:e0,...i,onEnter:l,childRef:t.ref,children:(c,u)=>w.cloneElement(t,{...u,className:oe("fade",e,t.props.className,aN[c],n[c])})})});r0.displayName="Fade";const No=r0;function Yf(e){return typeof e=="boolean"?e?No:Wf:e}const o0=({transition:e,...t})=>a.jsx(Qx,{...t,transition:Yf(e)});o0.displayName="TabContainer";const lN=o0,cN=["xxl","xl","lg","md","sm","xs"],uN="xs",s0=w.createContext({prefixes:{},breakpoints:cN,minBreakpoint:uN});function he(e,t){const{prefixes:n}=w.useContext(s0);return e||n[t]||t}function Ml(){const{dir:e}=w.useContext(s0);return e==="rtl"}const i0=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})));i0.displayName="TabContent";const a0=i0,l0=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}]=Kx({...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")})})})})});l0.displayName="TabPane";const c0=l0,dN={eventKey:q.oneOfType([q.string,q.number]),title:q.node.isRequired,disabled:q.bool,tabClassName:q.string,tabAttrs:q.object},u0=()=>{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")};u0.propTypes=dN;const ts=Object.assign(u0,{Container:lN,Content:a0,Pane:c0});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 fN(e){var t=pN(e,"string");return typeof t=="symbol"?t:String(t)}function pN(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 d0(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(fN)),u=t[r],d=d0(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:{}},pd={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})(pd,pd.exports);var hN=pd.exports;(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var n=hN,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 mN=Function.prototype.bind.call(Function.prototype.call,[].slice);function _n(e,t){return mN(e.querySelectorAll(t))}function f0(){const[,e]=w.useReducer(t=>!t,!1);return e}const p0=w.createContext(null);p0.displayName="NavContext";const Qf=p0,gN="data-rr-ui-",vN="rrUi";function Bo(e){return`${gN}${e}`}function yN(e){return`${vN}${e}`}const xN=["as","disabled"];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}function wN(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"&&wN(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=bN(e,xN);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 SN=["as","active","eventKey"];function _N(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 h0({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 m0=w.forwardRef((e,t)=>{let{as:n=Zf,active:r,eventKey:o}=e,s=_N(e,SN);const[i,l]=h0(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}))});m0.displayName="NavItem";const CN=m0,jN=["as","onSelect","activeKey","role","onKeyDown"];function EN(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,s;for(s=0;s<r.length;s++)o=r[s],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Tm=()=>{},Pm=Bo("event-key"),g0=w.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:o,role:s,onKeyDown:i}=e,l=EN(e,jN);const c=f0(),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[yN("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}))})})});g0.displayName="Nav";const RN=Object.assign(g0,{Item:CN}),v0=w.createContext(null);v0.displayName="NavbarContext";const y0=v0,x0=w.createContext(null);x0.displayName="CardHeaderContext";const NN=x0,b0=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})));b0.displayName="NavItem";const w0=b0;function rl(){return w.useState(null)}function kN(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 S0(e){const t=w.useRef(null);return w.useEffect(()=>{t.current=e}),t.current}const ON=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",TN=typeof document<"u",ol=TN||ON?w.useLayoutEffect:w.useEffect,PN=["onKeyDown"];function IN(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 $N(e){return!e||e.trim()==="#"}const _0=w.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=IN(e,PN);const[o]=Xf(Object.assign({tagName:"a"},r)),s=Te(i=>{o.onKeyDown(i),n==null||n(i)});return $N(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}))});_0.displayName="Anchor";const C0=_0,j0=w.forwardRef(({bsPrefix:e,className:t,as:n=C0,active:r,eventKey:o,disabled:s=!1,...i},l)=>{e=he(e,"nav-link");const[c,u]=h0({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")})});j0.displayName="NavLink";const E0=j0,R0=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(y0),h=w.useContext(NN);return g?(m=g.bsPrefix,y=l??!0):h&&({cardHeaderBsPrefix:v}=h),a.jsx(RN,{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})});R0.displayName="Nav";const AN=Object.assign(R0,{Item:w0,Link:E0});function Im(e,t){let n=0;return w.Children.map(e,r=>w.isValidElement(r)?t(r,n++):r)}function MN(e,t){let n=0;w.Children.forEach(e,r=>{w.isValidElement(r)&&t(r,n++)})}function DN(e){let t;return MN(e,n=>{t==null&&(t=n.props.eventKey)}),t}function FN(e){const{title:t,eventKey:n,disabled:r,tabClassName:o,tabAttrs:s,id:i}=e.props;return t==null?null:a.jsx(w0,{as:"li",role:"presentation",children:a.jsx(E0,{as:"button",type:"button",eventKey:n,disabled:r,id:i,className:o,...s,children:t})})}const N0=e=>{const{id:t,onSelect:n,transition:r,mountOnEnter:o=!1,unmountOnExit:s=!1,variant:i="tabs",children:l,activeKey:c=DN(l),...u}=Dl(e,{activeKey:"onSelect"});return a.jsxs(Qx,{id:t,activeKey:c,onSelect:n,transition:Yf(r),mountOnEnter:o,unmountOnExit:s,children:[a.jsx(AN,{...u,role:"tablist",as:"ul",variant:i,children:Im(l,FN)}),a.jsx(a0,{children:Im(l,d=>{const f={...d.props};return delete f.title,delete f.disabled,delete f.tabClassName,delete f.tabAttrs,a.jsx(c0,{...f})})})]})};N0.displayName="Tabs";const LN=N0,$m={Explore:"Discover",Discover:"Accelerate",Accelerate:"Maximize"};function UN(e,t){const n={isEnabled:!1};if(!(e.allocationType in $m))return n.isRenewalEnabled="Renewal"in e.allowedActions,n;if(n.allocationType=$m[e.allocationType],!("Renewal"in e.allowedActions))return n.isRenewalEnabled=!1,n;if(n.isRenewalEnabled=zN(e))return n;const r=HN(e);if(!BN(e,r)||!qN(e,r))return n;for(let o of t)if(o.opportunityName.includes(n.allocationType)){n.opportunityId=o.opportunityId,n.isEnabled=!0;break}return n}function zN(e){return VN(e)<31}function VN(e){const t=new Date(e.endDate);return Math.max(0,Math.ceil((t-new Date)/(1e3*60*60*24)))}function BN(e,t){return t.allocated>=k0(e)?!0:e.actions.some(function(n){return n.type=="Supplement"&&n.status=="Approved"&&n.resources.some(r=>r.isCredit&&r.allocated>0)})}function k0(e){switch(e.allocationType){case"Explore":return 4e5;case"Discover":return 15e5;case"Accelerate":return 3e6}return 0}function qN(e,t){switch(e.allocationType){case"Explore":return t.usage>=.9;case"Discover":return t.usage>=.75;case"Accelerate":return t.exchanged>=.75*k0(e)}return!1}function HN(e){let t=0,n=0;for(let r of e.actions){if(r.status!="Approved")continue;let o=r.type=="Exchange"||r.type=="Transfer";for(let s of r.resources)s.isCredit&&(o||(t+=s.allocated),n+=s.allocated)}return{allocated:t,exchanged:t-n,usage:t>0?(t-n)/t:0}}const WN=w.createContext(null),Fl=WN;var Am=Object.prototype.hasOwnProperty;function Mm(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=Mm(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=Mm(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(Am.call(e,n)&&++r&&!Am.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 KN(e){const t=Jf();return[e[0],w.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var yt="top",zt="bottom",Vt="right",xt="left",ep="auto",ci=[yt,zt,Vt,xt],ko="start",Hs="end",GN="clippingParents",O0="viewport",ns="popper",YN="reference",Dm=ci.reduce(function(e,t){return e.concat([t+"-"+ko,t+"-"+Hs])},[]),T0=[].concat(ci,[ep]).reduce(function(e,t){return e.concat([t,t+"-"+ko,t+"-"+Hs])},[]),QN="beforeRead",XN="read",ZN="afterRead",JN="beforeMain",ek="main",tk="afterMain",nk="beforeWrite",rk="write",ok="afterWrite",sk=[QN,XN,ZN,JN,ek,tk,nk,rk,ok];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 hd(){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 P0(){return!/^((?!chrome|android).)*safari/i.test(hd())}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=!P0()&&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 I0(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 ik(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 Fm(e){return!dn(e)||Un(e).position==="fixed"?null:e.offsetParent}function ak(e){var t=/firefox/i.test(hd()),n=/Trident/i.test(hd());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=Fm(e);n&&ik(n)&&Un(n).position==="static";)n=Fm(n);return n&&(dr(n)==="html"||dr(n)==="body"&&Un(n).position==="static")?t:n||ak(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 lk(e,t,n){var r=_s(e,t,n);return r>n?n:r}function $0(){return{top:0,right:0,bottom:0,left:0}}function A0(e){return Object.assign({},$0(),e)}function M0(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var ck=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,A0(typeof t!="number"?t:M0(t,ci))};function uk(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,Vt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=ck(o.padding,n),p=np(s),m=c==="y"?yt:xt,v=c==="y"?zt:Vt,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 dk(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)||I0(t.elements.popper,o)&&(t.elements.arrow=o))}const fk={name:"arrow",enabled:!0,phase:"main",fn:uk,effect:dk,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Po(e){return e.split("-")[1]}var pk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function hk(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 Lm(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===Vt)&&s===Hs){S=zt;var N=f&&j===_&&_.visualViewport?_.visualViewport.height:j[E];y-=N-r.height,y*=c?1:-1}if(o===xt||(o===yt||o===zt)&&s===Hs){b=Vt;var R=f&&j===_&&_.visualViewport?_.visualViewport.width:j[C];m-=R-r.width,m*=c?1:-1}}var O=Object.assign({position:l},u&&pk),k=d===!0?hk({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 mk(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,Lm(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,Lm(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 gk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mk,data:{}};var Fi={passive:!0};function vk(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 yk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:vk,data:{}};var xk={left:"right",right:"left",bottom:"top",top:"bottom"};function da(e){return e.replace(/left|right|bottom|top/g,function(t){return xk[t]})}var bk={start:"end",end:"start"};function Um(e){return e.replace(/start|end/g,function(t){return bk[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 wk(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=P0();(u||!u&&t==="fixed")&&(l=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:l+sp(e),y:c}}function Sk(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 D0(e){return["html","body","#document"].indexOf(dr(e))>=0?e.ownerDocument.body:dn(e)&&ip(e)?e:D0(Ll(e))}function Cs(e,t){var n;t===void 0&&(t=[]);var r=D0(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 md(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function _k(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 zm(e,t,n){return t===O0?md(wk(e,n)):Ar(t)?_k(t,n):md(Sk(mr(e)))}function Ck(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)&&I0(o,r)&&dr(o)!=="body"}):[]}function jk(e,t,n,r){var o=t==="clippingParents"?Ck(e):[].concat(t),s=[].concat(o,[n]),i=s[0],l=s.reduce(function(c,u){var d=zm(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},zm(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 F0(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 zt:c={x:i,y:t.y+t.height};break;case Vt: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?GN:l,u=n.rootBoundary,d=u===void 0?O0: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=A0(typeof g!="number"?g:M0(g,ci)),x=p===ns?YN:ns,b=e.rects.popper,S=e.elements[v?x:p],_=jk(Ar(S)?S:S.contextElement||mr(e.elements.popper),c,d,i),j=To(e.elements.reference),E=F0({reference:j,element:b,strategy:"absolute",placement:o}),C=md(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=[Vt,zt].indexOf(P)>=0?1:-1,F=[yt,zt].indexOf(P)>=0?"y":"x";R[P]+=k[F]*U})}return R}function Ek(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?T0:c,d=Po(r),f=d?l?Dm:Dm.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 Rk(e){if(un(e)===ep)return[];var t=da(e);return[Um(e),t,Um(t)]}function Nk(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)]:Rk(g)),S=[g].concat(b).reduce(function(J,ee){return J.concat(un(ee)===ep?Ek(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,zt].indexOf(k)>=0,F=U?"width":"height",z=Ws(t,{placement:O,boundary:d,rootBoundary:f,altBoundary:p,padding:u}),Z=U?P?Vt:xt:P?zt:yt;_[F]>j[F]&&(Z=da(Z));var T=da(Z),L=[];if(s&&L.push(z[k]<=0),l&&L.push(z[Z]<=0,z[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 kk={name:"flip",enabled:!0,phase:"main",fn:Nk,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 Bm(e){return[yt,Vt,zt,xt].some(function(t){return e[t]>=0})}function Ok(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=Bm(c),f=Bm(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 Tk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ok};function Pk(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,Vt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function Ik(e){var t=e.state,n=e.options,r=e.name,o=n.offset,s=o===void 0?[0,0]:o,i=T0.reduce(function(d,f){return d[f]=Pk(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 $k={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ik};function Ak(e){var t=e.state,n=e.name;t.modifiersData[n]=F0({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Mk={name:"popperOffsets",enabled:!0,phase:"read",fn:Ak,data:{}};function Dk(e){return e==="x"?"y":"x"}function Fk(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),_=Dk(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"?zt:Vt,z=S==="y"?"height":"width",Z=j[S],T=Z+g[U],L=Z-g[F],M=m?-C[z]/2:0,W=x===ko?E[z]:C[z],B=x===ko?-C[z]:-E[z],X=t.elements.arrow,J=m&&X?np(X):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:$0(),Q=ee[U],te=ee[F],ue=_s(0,E[z],J[z]),Ce=b?E[z]/2-M-ue-Q-R.mainAxis:W-ue-Q-R.mainAxis,De=b?-E[z]/2+M+ue+te+R.mainAxis:B+ue+te+R.mainAxis,Ze=t.elements.arrow&&ui(t.elements.arrow),ge=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-ge,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"?zt:Vt,be=j[_],Bt=_==="y"?"height":"width",$t=be+g[dt],hi=be-g[ot],zr=[yt,xt].indexOf(h)!==-1,mi=(re=O==null?void 0:O[_])!=null?re:0,ae=zr?$t:be-E[Bt]-C[Bt]-mi+R.altAxis,vn=zr?be+E[Bt]+C[Bt]-mi-R.altAxis:hi,Ho=m&&zr?lk(ae,be,vn):_s(m?ae:$t,be,m?vn:hi);j[_]=Ho,k[_]=Ho-be}t.modifiersData[r]=k}}const Lk={name:"preventOverflow",enabled:!0,phase:"main",fn:Fk,requiresIfExists:["offset"]};function Uk(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function zk(e){return e===Ot(e)||!dn(e)?op(e):Uk(e)}function Vk(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 Bk(e,t,n){n===void 0&&(n=!1);var r=dn(t),o=dn(t)&&Vk(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=zk(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 qk(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 Hk(e){var t=qk(e);return sk.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function Wk(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Kk(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 qm={placement:"bottom",modifiers:[],strategy:"absolute"};function Hm(){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 Gk(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,s=o===void 0?qm:o;return function(l,c,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},qm,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=Hk(Kk([].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(Hm(x,b)){d.rects={reference:Bk(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:Wk(function(){return new Promise(function(g){m.forceUpdate(),g(d)})}),destroy:function(){y(),p=!0}};if(!Hm(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 Yk=Gk({defaultModifiers:[Tk,Mk,gk,yk,$k,kk,Lk,fk]}),Qk=["enabled","placement","strategy","modifiers"];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={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},Jk={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:n}=e.elements;if("removeAttribute"in t){const r=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==n.id);r.length?t.setAttribute("aria-describedby",r.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:n,reference:r}=e.elements,o=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&o==="tooltip"&&"setAttribute"in r){const s=r.getAttribute("aria-describedby");if(s&&s.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",s?`${s},${n.id}`:n.id)}}},eO=[];function L0(e,t,n={}){let{enabled:r=!0,placement:o="bottom",strategy:s="absolute",modifiers:i=eO}=n,l=Xk(n,Qk);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]=KN(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=Yk(e,t,Object.assign({},l,{placement:o,strategy:s,modifiers:[...y,Jk,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 tO=function(){},nO=tO;const rO=Js(nO),Wm=()=>{};function oO(e){return e.button===0}function sO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const fa=e=>e&&("current"in e?e.current:e),Km={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function U0(e,t=Wm,{disabled:n,clickTrigger:r="click"}={}){const o=w.useRef(!1),s=w.useRef(!1),i=w.useCallback(u=>{const d=fa(e);rO(!!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||sO(u)||!oO(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=zo(fa(e)),p=f.defaultView||window;let m=(u=p.event)!=null?u:(d=p.parent)==null?void 0:d.event,v=null;Km[r]&&(v=Nn(f,Km[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",Wm))),()=>{v==null||v(),y(),g(),h.forEach(x=>x())}},[e,n,r,i,l,c])}function iO(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function aO(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function z0({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=iO(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:s?"fixed":c.strategy,modifiers:aO(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 lO=["children"];function cO(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 uO=()=>{};function V0(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=L0(x,h,z0({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||uO,"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 U0(h,v,{clickTrigger:l,disabled:!m}),[S,_]}const dO={usePopper:!0};function ap(e){let{children:t}=e,n=cO(e,lO);const[r,o]=V0(n);return a.jsx(a.Fragment,{children:t(r,o)})}ap.displayName="DropdownMenu";ap.defaultProps=dO;const B0=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Gm=()=>{};function q0(){const e=Wx(),{show:t=!1,toggle:n=Gm,setToggle:r,menuElement:o}=w.useContext(Fl)||{},s=w.useCallback(l=>{n(!t,l)},[t,n]),i={id:e,ref:r||Gm,onClick:s,"aria-expanded":!!t};return o&&B0(o)&&(i["aria-haspopup"]=!0),[i,{show:t,toggle:n}]}function H0({children:e}){const[t,n]=q0();return a.jsx(a.Fragment,{children:e(t,n)})}H0.displayName="DropdownToggle";const fO=["eventKey","disabled","onClick","active","as"];function pO(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 W0({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 K0=w.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:o,active:s,as:i=Zf}=e,l=pO(e,fO);const[c]=W0({key:n,href:l.href,disabled:r,onClick:o,active:s});return a.jsx(i,Object.assign({},l,{ref:t},c))});K0.displayName="DropdownItem";const G0=w.createContext(Vo?window:void 0);G0.Provider;function Ul(){return w.useContext(G0)}function Ym(){const e=f0(),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]=qx(t,e,r),[f,p]=Ym(),m=f.current,[v,y]=Ym(),g=v.current,h=S0(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&&B0(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 kN(w.useCallback(()=>c.document,[c]),"keydown",O=>{var k,P;const{key:U}=O,F=O.target,z=(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"&&z||U==="Escape"&&F.type==="search")||!z&&!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=H0;di.Item=K0;const Y0=w.createContext({});Y0.displayName="DropdownContext";const Q0=Y0,X0=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})));X0.displayName="DropdownDivider";const hO=X0,Z0=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})));Z0.displayName="DropdownHeader";const mO=Z0,J0=w.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:o,active:s,as:i=C0,...l},c)=>{const u=he(e,"dropdown-item"),[d,f]=W0({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")})});J0.displayName="DropdownItem";const gO=J0,eb=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})));eb.displayName="DropdownItemText";const vO=eb,tb=w.createContext(null);tb.displayName="InputGroupContext";const nb=tb;function rb(e,t){return e}function ob(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 sb=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(y0),v=he(e,"dropdown-menu"),{align:y,drop:g,isRTL:h}=w.useContext(Q0);n=n||y;const x=w.useContext(nb),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=ob(p,g,h),[_,{hasShown:j,popper:E,show:C,toggle:N}]=V0({flip:o,rootCloseEvent:r,show:s,usePopper:!m&&b.length===0,offset:[0,2],popperConfig:c,placement:S});if(_.ref=mn(rb(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)})});sb.displayName="DropdownMenu";const yO=sb,ib=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")})});ib.displayName="Button";const xO=ib,ab=w.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:o=xO,...s},i)=>{const l=he(e,"dropdown-toggle"),c=w.useContext(Fl);r!==void 0&&(s.bsPrefix=r);const[u]=q0();return u.ref=mn(u.ref,rb(i)),a.jsx(o,{className:oe(n,l,t&&`${l}-split`,(c==null?void 0:c.show)&&"show"),...u,...s})});ab.displayName="DropdownToggle";const bO=ab,lb=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(nb),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=ob(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(Q0.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])})})})});lb.displayName="Dropdown";const Li=Object.assign(lb,{Toggle:bO,Menu:yO,Item:gO,ItemText:vO,Divider:hO,Header:mO});var Ui;function Qm(e){if((!Ui&&Ui!==0||e)&&Vo){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 wO(e){const t=w.useRef(e);return t.current=e,t}function lp(e){const t=wO(e);w.useEffect(()=>()=>t.current(),[])}function Bc(e){e===void 0&&(e=zo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function SO(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Xm=Bo("modal-open");class _O{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return SO(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(Xm,""),Pn(o,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(Xm),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=_O,qc=(e,t)=>Vo?e==null?(t||zo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function gd(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 CO({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 jO({children:e,in:t,onExited:n,onEntered:r,transition:o}){const[s,i]=w.useState(!t);t&&s&&i(!1);const l=CO({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 vd(e,t,n){return e?a.jsx(e,Object.assign({},n)):t?a.jsx(jO,Object.assign({},n,{transition:t})):a.jsx(Wf,Object.assign({},n))}function cb(e){return e.code==="Escape"||e.keyCode===27}const EO=["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 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}let Hc;function NO(e){return Hc||(Hc=new cp({ownerDocument:e==null?void 0:e.document})),Hc}function kO(e){const t=Ul(),n=e||NO(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 ub=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=RO(e,EO);const z=Ul(),Z=gd(j),T=kO(_),L=Jf(),M=S0(n),[W,B]=w.useState(!n),X=w.useRef(null);w.useImperativeHandle(t,()=>T,[T]),Vo&&!M&&n&&(X.current=Bc(z==null?void 0:z.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:z==null?void 0:z.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(z==null?void 0:z.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&&cb(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 ge=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(ge):a.jsx("div",Object.assign({},ge,{children:w.cloneElement(i,{role:"document"})}));Ie=vd(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=vd(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)})});ub.displayName="Modal";const OO=Object.assign(ub,{Manager:cp});function yd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function TO(e,t){e.classList?e.classList.add(t):yd(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Zm(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function PO(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Zm(e.className,t):e.setAttribute("class",Zm(e.className&&e.className.baseVal||"",t))}const Wr={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class IO 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(TO(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();PO(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 $O(e){return Wc||(Wc=new IO(e)),Wc}const db=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})));db.displayName="ModalBody";const AO=db,MO=w.createContext({onHide(){}}),fb=MO,pb=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})})});pb.displayName="ModalDialog";const hb=pb,mb=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})));mb.displayName="ModalFooter";const DO=mb,FO={"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=FO;const LO=up,UO=w.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:o,...s},i)=>{const l=w.useContext(fb),c=Te(()=>{l==null||l.onHide(),r==null||r()});return a.jsxs("div",{ref:i,...s,children:[o,n&&a.jsx(LO,{"aria-label":e,variant:t,onClick:c})]})}),zO=UO,gb=w.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...o},s)=>(e=he(e,"modal-header"),a.jsx(zO,{ref:s,...o,className:oe(t,e),closeLabel:n,closeButton:r})));gb.displayName="ModalHeader";const VO=gb,BO=e=>w.forwardRef((t,n)=>a.jsx("div",{...t,ref:n,className:oe(t.className,e)})),qO=BO("h4"),vb=w.forwardRef(({className:e,bsPrefix:t,as:n=qO,...r},o)=>(t=he(t,"modal-title"),a.jsx(n,{ref:o,className:oe(e,t),...r})));vb.displayName="ModalTitle";const HO=vb;function WO(e){return a.jsx(No,{...e,timeout:null})}function KO(e){return a.jsx(No,{...e,timeout:null})}const yb=w.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:o,children:s,dialogAs:i=hb,"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},z)=>{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(z,ee),te=Te(h),ue=Ml();e=he(e,"modal");const Ce=w.useMemo(()=>({onHide:te}),[te]);function De(){return U||$O({isRTL:ue})}function Ze(ae){if(!Vo)return;const vn=De().getScrollbarWidth()>0,Ho=ae.scrollHeight>zo(ae).documentElement.clientHeight;T({paddingRight:vn&&!Ho?Qm():void 0,paddingLeft:!vn&&Ho?Qm():void 0})}const ge=Te(()=>{J&&Ze(J.dialog)});lp(()=>{fd(window,"resize",ge),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=Jx(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",ge)},$t=ae=>{ae&&(ae.style.display=""),k==null||k(ae),fd(window,"resize",ge)},hi=w.useCallback(ae=>a.jsx("div",{...ae,className:oe(`${e}-backdrop`,P,!p&&"show")}),[p,P,e]),zr={...n,...Z};zr.display="block";const mi=ae=>a.jsx("div",{role:"dialog",...ae,style:zr,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(fb.Provider,{value:Ce,children:a.jsx(OO,{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?WO:void 0,backdropTransition:p?KO:void 0,renderBackdrop:hi,renderDialog:mi})})});yb.displayName="Modal";const ce=Object.assign(yb,{Body:AO,Header:VO,Title:HO,Footer:DO,Dialog:hb,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),GO=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 YO({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((d,f)=>d.opportunityId<f.opportunityId?-1:1);const l=[],c=UN(n,i);l.push({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]})}),c.isEnabled?l.push({id:"upgrade",action:ne.routes.renew_request_path(e,{opportunity_id:c.opportunityId}),method:"post",isEnabled:!0,button:"Request an upgrade",enabled:a.jsxs("p",{children:["Running low on credits well before your project's end date? You could be ready for the next level. Upgrade your ",n.allocationType," allocation to ",c.allocationType,"!"]})}):l.push({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","."]})}),l.push({id:"renewal",action:i.map(d=>[d.opportunityName,`${ne.routes.renew_request_path(e)}?opportunity_id=${d.opportunityId}`,"post"]),isEnabled:c.isRenewalEnabled,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."]})]})}),l.sort((d,f)=>d.isEnabled<f.isEnabled?1:-1),l.push({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."]})});const u=l.map(({id:d,action:f,isEnabled:p,button:m,enabled:v,disabled:y,method:g})=>a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-4 mb-2 d-grid",children:Array.isArray(f)&&f.length&&p?a.jsxs(Li,{className:"d-flex flex-column",children:[a.jsx(Li.Toggle,{as:GO,children:m}),a.jsx(Li.Menu,{children:f.map(([h,x,b])=>a.jsx(Li.Item,{href:x,"data-method":b,children:h},x))})]}):a.jsx("a",{className:`btn btn-secondary d-flex flex-column justify-content-center ${p?"":"disabled"}`,href:p?f:"","data-method":g,children:a.jsx("span",{children:m})})}),a.jsx("div",{className:"col-sm-8 mb-2",children:p?v:y})]},d));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]}),"."]}),u]})]})}function QO({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-Ex(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 XO({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,type:i="button"}){const l=a.jsx("i",{className:`bi bi-${n}`}),c={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",{...c,children:l}):a.jsx("button",{...c,type:i,children:l})}function xb({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 JO({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(xb,{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 eT({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(xb,{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 tT={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function nT(e,t){const n=`offset${e[0].toUpperCase()}${e.slice(1)}`,r=t[n],o=tT[e];return r+parseInt(Pn(t,o[0]),10)+parseInt(Pn(t,o[1]),10)}const rT={[Gn]:"collapse",[tl]:"collapsing",[Sn]:"collapsing",[Xn]:"collapse show"},oT=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=nT,...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`,t0(j)},r),[r,m,g]),_=w.useMemo(()=>rs(j=>{j.style[g]=null},o),[g,o]);return a.jsx(n0,{ref:y,addEndListener:e0,...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,rT[j],g==="width"&&"collapse-horizontal")})})}),sT=oT;function bb(e,t){return Array.isArray(e)?e.includes(t):e===t}const wb=w.createContext({});wb.displayName="AccordionContext";const zl=wb,Sb=w.forwardRef(({as:e="div",bsPrefix:t,className:n,children:r,eventKey:o,...s},i)=>{const{activeEventKey:l}=w.useContext(zl);return t=he(t,"accordion-collapse"),a.jsx(sT,{ref:i,in:bb(l,o),...s,className:oe(n,t),children:a.jsx(e,{children:w.Children.only(r)})})});Sb.displayName="AccordionCollapse";const _b=Sb,Cb=w.createContext({eventKey:""});Cb.displayName="AccordionItemContext";const dp=Cb,jb=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(_b,{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)})})});jb.displayName="AccordionBody";const iT=jb;function aT(e,t){const{activeEventKey:n,onSelect:r,alwaysOpen:o}=w.useContext(zl);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 Eb=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=aT(i,r),{activeEventKey:c}=w.useContext(zl);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,!bb(c,i)&&"collapsed")})});Eb.displayName="AccordionButton";const Rb=Eb,Nb=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(Rb,{onClick:o,children:r})})));Nb.displayName="AccordionHeader";const lT=Nb,kb=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)})})});kb.displayName="AccordionItem";const cT=kb,Ob=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(zl.Provider,{value:f,children:a.jsx(n,{ref:t,...u,className:oe(s,d,l&&`${d}-flush`)})})});Ob.displayName="Accordion";const pa=Object.assign(Ob,{Button:Rb,Collapse:_b,Item:cT,Header:lT,Body:iT}),xd=2**31-1;function Tb(e,t,n){const r=n-Date.now();e.current=r<=xd?setTimeout(t,r):setTimeout(()=>Tb(e,t,n),xd)}function uT(){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<=xd?t.current=setTimeout(o,s):Tb(t,o,Date.now()+s))}return{set:r,clear:n,handleRef:t}},[])}const dT=()=>{};function fT(e,t,{disabled:n,clickTrigger:r}={}){const o=t||dT;U0(e,o,{disabled:n,clickTrigger:r});const s=Te(i=>{cb(i)&&o(i)});w.useEffect(()=>{if(n||e==null)return;const i=zo(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 Pb=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=gd(e.container),y=gd(e.target),[g,h]=w.useState(!e.show),x=L0(y,u,z0({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(fT(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=vd(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});Pb.displayName="Overlay";const pT=Pb,Ib=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})));Ib.displayName="PopoverHeader";const hT=Ib,$b=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})));$b.displayName="PopoverBody";const Ab=$b;function Mb(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function Db(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const mT=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=Mb(v,m);let g=r;return u&&!l&&(g={...r,...Db(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(Ab,{children:o}):o]})}),gT=Object.assign(mT,{Header:hT,Body:Ab,POPPER_OFFSET:[0,8]}),Fb=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=Mb(p,f);let v=r;return c&&!i&&(v={...r,...Db(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})]})});Fb.displayName="Tooltip";const Vl=Object.assign(Fb,{TOOLTIP_OFFSET:[0,6]});function vT(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(yd(t.current,n))return gT.POPPER_OFFSET;if(yd(t.current,r))return Vl.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[o]]}function yT(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 Lb=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]=vT(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(pT,{...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,_;yT(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}})}})});Lb.displayName="Overlay";const Ub=Lb;function xT(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function Jm(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 bT=({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=uT(),v=w.useRef(""),[y,g]=d0(o,s,i),h=xT(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)=>{Jm(j,F,"fromElement")},[j]),k=w.useCallback((...F)=>{Jm(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(Ub,{...d,show:y,onHide:E,flip:u,placement:c,popperConfig:r,target:f.current,children:t})]})},fp=bT;function wT({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:nd[m%nd.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(Vl,{children:["Please contact ",zf(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 ST=[{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(" ")}}],_T=({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:ST}):null};function CT({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(wT,{requestId:e,grantNumber:t}),r.isManager?a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-lg-6",children:a.jsx(_T,{requestId:e,grantNumber:t})}),a.jsx("div",{className:"col-lg-6",children:a.jsx(eT,{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 jT(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 zb(e){var t=jT(e,"string");return Mr(t)=="symbol"?t:String(t)}function ao(e,t,n){return t=zb(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eg(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?eg(Object(n),!0).forEach(function(r){ao(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ET(e){if(Array.isArray(e))return e}function RT(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 bd(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 Vb(e,t){if(e){if(typeof e=="string")return bd(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 bd(e,t)}}function NT(){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 Be(e,t){return ET(e)||RT(e,t)||Vb(e,t)||NT()}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 kT=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Bb(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,kT),y=w.useState(l!==void 0?l:n),g=Be(y,2),h=g[0],x=g[1],b=w.useState(c!==void 0?c:o),S=Be(b,2),_=S[0],j=S[1],E=w.useState(m!==void 0?m:i),C=Be(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,z=c!==void 0?c:_,Z=m!==void 0?m:N;return K(K({},v),{},{inputValue:F,menuIsOpen:z,onChange:O,onInputChange:k,onMenuClose:U,onMenuOpen:P,value:Z})}function OT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tg(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,zb(r.key),r)}}function TT(e,t,n){return t&&tg(e.prototype,t),n&&tg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function PT(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 qb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qb=function(){return!!e})()}function IT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $T(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 IT(e)}function AT(e){var t=qb();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 $T(this,o)}}function MT(e){if(Array.isArray(e))return bd(e)}function DT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FT(){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 MT(e)||DT(e)||Vb(e)||FT()}function LT(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 UT(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 zT=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(UT(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var s=LT(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-",Hb="comm",hp="rule",mp="decl",VT="@import",Wb="@keyframes",BT="@layer",qT=Math.abs,Bl=String.fromCharCode,HT=Object.assign;function WT(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 Kb(e){return e.trim()}function KT(e,t){return(e=t.exec(e))?e[0]:e}function pe(e,t,n){return e.replace(t,n)}function wd(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 zi(e,t){return t.push(e),e}function GT(e,t){return e.map(t).join("")}var ql=1,Ao=1,Gb=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 HT(Hl("",null,null,"",null,null,0),e,{length:-e.length},t)}function YT(){return Ae}function QT(){return Ae=wt>0?Ye(qo,--wt):0,Ao--,Ae===10&&(Ao=1,ql--),Ae}function jt(){return Ae=wt<Gb?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 Yb(e){return ql=Ao=1,Gb=on(qo=e),wt=0,[]}function Qb(e){return qo="",e}function ma(e){return Kb(fi(wt-1,Sd(e===91?e+2:e===40?e+1:e)))}function XT(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 Sd(e){for(;jt();)switch(Ae){case e:return wt;case 34:case 39:e!==34&&e!==39&&Sd(Ae);break;case 40:e===41&&Sd(e);break;case 92:jt();break}return wt}function JT(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 eP(e){for(;!Ys(fn());)jt();return fi(e,wt)}function tP(e){return Qb(ga("",null,null,null,[""],e=Yb(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){wd(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+=XT(v);break;case 92:E+=ZT(ha()-1,7);continue;case 47:switch(fn()){case 42:case 47:zi(nP(JT(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&&zi(m>32?rg(E+";",r,n,f-1):rg(pe(E," ","")+";",r,n,f-2),c);break;case 59:E+=";";default:if(zi(j=ng(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&&zi(ng(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&&QT()==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+=eP(ha())),x++;break;case 45:v===45&&on(E)==2&&(y=0)}}return s}function ng(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=qT(y=i[v])),b=e;h<m;++h)(b=Kb(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 nP(e,t,n){return Hl(e,t,n,Hb,Bl(YT()),Gs(e,2,-2),0)}function rg(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 rP(e,t,n,r){switch(e.type){case BT:if(e.children.length)break;case VT:case mp:return e.return=e.return||e.value;case Hb:return"";case Wb: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 oP(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 sP(e){return function(t){t.root||(t=t.return)&&e(t)}}function iP(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var aP=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)},lP=function(t,n){var r=-1,o=44;do switch(Ys(o)){case 0:o===38&&fn()===12&&(n[r]=1),t[r]+=aP(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},cP=function(t,n){return Qb(lP(Yb(t),n))},og=new WeakMap,uP=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&&!og.get(r))&&!o){og.set(t,!0);for(var s=[],i=cP(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]}}},dP=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Xb(e,t){switch(WT(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~wd(e,"stretch")?Xb(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-(~wd(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 fP=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case mp:t.return=Xb(t.value,t.length);break;case Wb:return vo([os(t,{value:pe(t.value,"@","@"+fe)})],o);case hp:if(t.length)return GT(t.props,function(s){switch(KT(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""})}},pP=[fP],hP=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||pP,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=[uP,dP];{var d,f=[rP,sP(function(y){d.insert(y)})],p=oP(u.concat(o,f)),m=function(g){return vo(tP(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 zT({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},Zb={exports:{}},ye={};/** @license React v16.13.1
|
|
61
|
-
* react-is.production.min.js
|
|
62
|
-
*
|
|
63
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the MIT license found in the
|
|
66
|
-
* LICENSE file in the root directory of this source tree.
|
|
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,mP=We?Symbol.for("react.suspense_list"):60120,ec=We?Symbol.for("react.memo"):60115,tc=We?Symbol.for("react.lazy"):60116,gP=We?Symbol.for("react.block"):60121,vP=We?Symbol.for("react.fundamental"):60117,yP=We?Symbol.for("react.responder"):60118,xP=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 Jb(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 Jb(e)||It(e)===xp};ye.isConcurrentMode=Jb;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===mP||typeof e=="object"&&e!==null&&(e.$$typeof===tc||e.$$typeof===ec||e.$$typeof===Yl||e.$$typeof===Ql||e.$$typeof===Zl||e.$$typeof===vP||e.$$typeof===yP||e.$$typeof===xP||e.$$typeof===gP)};ye.typeOf=It;Zb.exports=ye;var bP=Zb.exports,ew=bP,wP={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},SP={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tw={};tw[ew.ForwardRef]=wP;tw[ew.Memo]=SP;var _P=!0;function CP(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var nw=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||_P===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},jP=function(t,n,r){nw(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 EP(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 RP={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},NP=/[A-Z]|^ms/g,kP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rw=function(t){return t.charCodeAt(1)===45},sg=function(t){return t!=null&&typeof t!="boolean"},Kc=iP(function(e){return rw(e)?e:e.replace(NP,"-$&").toLowerCase()}),ig=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(kP,function(r,o,s){return sn={name:o,styles:s,next:sn},o})}return RP[t]!==1&&!rw(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 OP(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 OP(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]+"}":sg(i)&&(r+=Kc(s)+":"+ig(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++)sg(i[l])&&(r+=Kc(s)+":"+ig(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 ag=/label:\s*([^\s;\n{]+)\s*(;|$)/g,sn,ow=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]);ag.lastIndex=0;for(var c="",u;(u=ag.exec(s))!==null;)c+="-"+u[1];var d=EP(s)+c;return{name:d,styles:s,next:sn}},TP=function(t){return t()},PP=ba.useInsertionEffect?ba.useInsertionEffect:!1,IP=PP||TP,bp={}.hasOwnProperty,sw=w.createContext(typeof HTMLElement<"u"?hP({key:"css"}):null);sw.Provider;var $P=function(t){return w.forwardRef(function(n,r){var o=w.useContext(sw);return t(n,o,r)})},AP=w.createContext({}),_d="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",MP=function(t,n){var r={};for(var o in n)bp.call(n,o)&&(r[o]=n[o]);return r[_d]=t,r},DP=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return nw(n,r,o),IP(function(){return jP(n,r,o)}),null},FP=$P(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=CP(t.registered,s,e.className):e.className!=null&&(i=e.className+" ");var l=ow(s,void 0,w.useContext(AP));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(DP,{cache:t,serialized:l,isStringTag:typeof o=="string"}),w.createElement(o,c))}),LP=FP,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]=LP,s[1]=MP(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 ow(t)}var UP=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 zP(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const VP=Math.min,BP=Math.max,ll=Math.round,Vi=Math.floor,cl=e=>({x:e,y:e});function qP(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function iw(e){return lw(e)?(e.nodeName||"").toLowerCase():"#document"}function Zt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function aw(e){var t;return(t=(lw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lw(e){return e instanceof Node||e instanceof Zt(e).Node}function Cd(e){return e instanceof Element||e instanceof Zt(e).Element}function Sp(e){return e instanceof HTMLElement||e instanceof Zt(e).HTMLElement}function lg(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zt(e).ShadowRoot}function cw(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 HP(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function WP(e){return["html","body","#document"].includes(iw(e))}function _p(e){return Zt(e).getComputedStyle(e)}function KP(e){if(iw(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lg(e)&&e.host||aw(e);return lg(t)?t.host:t}function uw(e){const t=KP(e);return WP(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sp(t)&&cw(t)?t:uw(t)}function ul(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=uw(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Zt(o);return s?t.concat(i,i.visualViewport||[],cw(o)?o:[],i.frameElement&&n?ul(i.frameElement):[]):t.concat(o,ul(o,[],n))}function GP(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 Cd(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}=GP(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 YP=cl(0);function QP(e){const t=Zt(e);return!HP()||!t.visualViewport?YP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function XP(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Zt(e)?!1:t}function cg(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?Cd(r)&&(i=Gc(r)):i=Gc(e));const l=XP(s,n,r)?QP(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&&Cd(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 qP({width:d,height:f,x:c,y:u})}function ZP(e,t){let n=null,r;const o=aw(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),v=Vi(o.clientWidth-(u+f)),y=Vi(o.clientHeight-(d+p)),g=Vi(u),x={rootMargin:-m+"px "+-v+"px "+-y+"px "+-g+"px",threshold:BP(0,VP(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 JP(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=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?cg(e):null;c&&g();function g(){const h=cg(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 jd=w.useLayoutEffect,eI=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dl=function(){};function tI(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function nI(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(tI(e,i)));return s.filter(function(l){return l}).map(function(l){return String(l).trim()}).join(" ")}var ug=function(t){return fI(t)?t.filter(Boolean):Mr(t)==="object"&&t!==null?[t]:[]},dw=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,eI);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 rI(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 oI(e){return nc(e)?window.innerHeight:e.clientHeight}function fw(e){return nc(e)?window.pageYOffset:e.scrollTop}function fl(e,t){if(nc(e)){window.scrollTo(0,t);return}e.scrollTop=t}function sI(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 iI(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=fw(e),s=t-o,i=10,l=0;function c(){l+=i;var u=iI(l,o,s,n);fl(e,u),l<n?window.requestAnimationFrame(c):r(e)}c()}function dg(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 aI(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 fg(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function lI(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var pw=!1,cI={get passive(){return pw=!0}},qi=typeof window<"u"?window:{};qi.addEventListener&&qi.removeEventListener&&(qi.addEventListener("p",dl,cI),qi.removeEventListener("p",dl,!1));var uI=pw;function dI(e){return e!=null}function fI(e){return Array.isArray(e)}function Hi(e,t,n){return e?t:n}var pI=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=Be(i,1),c=l[0];return!r.includes(c)});return s.reduce(function(i,l){var c=Be(l,2),u=c[0],d=c[1];return i[u]=d,i},{})},hI=["children","innerProps"],mI=["children","innerProps"];function gI(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,s=e.shouldScroll,i=e.isFixedPosition,l=e.controlHeight,c=sI(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:oI(c),b=fw(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 z=t;return(!i&&C>=r||i&&j>=r)&&(z=i?j-_:C-_),s&&Bi(c,O,k),{placement:"top",maxHeight:z}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}function vI(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var hw=function(t){return t==="auto"?"bottom":t},yI=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,vI(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})},mw=w.createContext(null),xI=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(mw)||{},d=u.setPortalPlacement,f=w.useRef(null),p=w.useState(o),m=Be(p,2),v=m[0],y=m[1],g=w.useState(null),h=Be(g,2),x=h[0],b=h[1],S=c.spacing.controlHeight;return jd(function(){var _=f.current;if(_){var j=i==="fixed",E=l&&!j,C=gI({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||hw(s),maxHeight:v})})},bI=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)},wI=bI,SI=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})},_I=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)},gw=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")})},CI=gw,jI=gw,EI=function(t){var n=t.children,r=n===void 0?"No options":n,o=t.innerProps,s=gn(t,hI);return G("div",Y({},Pe(K(K({},s),{},{children:r,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),r)},RI=function(t){var n=t.children,r=n===void 0?"Loading...":n,o=t.innerProps,s=gn(t,mI);return G("div",Y({},Pe(K(K({},s),{},{children:r,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),r)},NI=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}},kI=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(hw(i)),f=Be(d,2),p=f[0],m=f[1],v=w.useMemo(function(){return{setPortalPlacement:m}},[]),y=w.useState(null),g=Be(y,2),h=g[0],x=g[1],b=w.useCallback(function(){if(o){var E=aI(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]);jd(function(){b()},[b]);var S=w.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),o&&c.current&&(u.current=JP(o,c.current,b,{elementResize:"ResizeObserver"in window}))},[o,b]);jd(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(mw.Provider,{value:v},n?Of.createPortal(j,n):j)},OI=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},TI=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)},PI=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")})},II=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)},$I=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},AI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"indicatorsContainer",{indicators:!0}),r),n)},pg,MI=["size"],DI=["innerProps","isRtl","size"],FI={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},vw=function(t){var n=t.size,r=gn(t,MI);return G("svg",Y({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:FI},r))},jp=function(t){return G(vw,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"}))},yw=function(t){return G(vw,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"}))},xw=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}})},LI=xw,UI=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||G(yw,null))},zI=xw,VI=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))},BI=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})},qI=function(t){var n=t.innerProps;return G("span",Y({},n,Pe(t,"indicatorSeparator",{"indicator-separator":!0})))},HI=UP(pg||(pg=zP([`
|
|
14
|
+
Please proceed with caution.`,children:c.jsx(ox,{columns:Y,rows:ie})}),c.jsx(pl,{show:P,onClose:()=>k(!1),title:"Add Required Resource",onSave:U,buttonText:"Save",children:c.jsx("div",{children:R.map(le=>c.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"0.5rem"},children:[c.jsx("input",{type:"checkbox",style:{margin:0},checked:D.includes(le.resource_id),onChange:de=>K(le.resource_id,de.target.checked)}),le.resource_name]},le.resource_id))})}),c.jsx(pl,{show:O,onClose:()=>T(!1),title:"Add Allocation Type",onSave:X,buttonText:"Save",children:c.jsx(Bs,{label:"Select Allocation Type",options:[{value:"",label:"Select an allocation type to add",disabled:!0},...N.map(le=>({value:le.allocation_type_id,label:le.display_name}))],value:W,onChange:H})})]}):c.jsx("div",{children:"No resource data available."})}ax.propTypes={resourceId:ve.number.isRequired,relativeUrlRoot:ve.string.isRequired,setExternalSubmit:ve.func};const yt={error:"error",pending:"pending",success:"success"},hl=e=>e.endDate||e.startDate||(e.actions[0]||{}).entryDate,tv=e=>`${{pi:"01",co_pi:"02",allocation_manager:"03"}[e.role]||"04"} ${e.lastName}, ${e.firstName}`,u1=(e,{grantNumber:t,projectManager:r,requestMasterId:i,requests:o,title:l,users:d},p)=>{t=t||i,o.sort((g,y)=>hl(g)>hl(y)?-1:1);const f=o.find(g=>g.timeStatus=="current"),h=f?f.requestId:null;e.projects[t]={currentRequestId:h,grantNumber:t,isManager:r,requestsList:o.map(g=>{const{actions:y,allocationType:x,endDate:w,requestId:_,startDate:S,status:b}=g,C=y.map(({entryDate:R})=>R).sort()[0].split("T")[0];return d1(e,g,{entryDate:C,grantNumber:t}),{allocationType:x,endDate:w,entryDate:C,requestId:_,startDate:S,status:b}}),selectedRequestId:h||o[0].requestId,status:p,tab:"overview",title:l,users:d.map(({eligibleReason:g,email:y,firstName:x,isEligible:w,lastName:_,organization:S,resources:b,role:C,username:R})=>{const N=b.filter(D=>D.userAccountState=="active"&&D.unitType!="ACCESS Credits"),P=N.map(D=>D.xrasResourceId),k=N.filter(D=>D.resourceProviderState=="pending-active").map(D=>D.xrasResourceId),O=b.filter(D=>D.userAccountState!="active").map(D=>D.xrasResourceId),T={};for(let D of N)T[D.xrasResourceId]=D.resourceUsername;return{eligibility:w,eligibilityReason:g,email:y,firstName:x,initialResourceIds:[...P],initialRole:C,lastName:_,organization:S,resourceAccountPendingIds:k,resourceAccountInactiveIds:O,resourceIds:P,resourceUsernames:T,role:C,username:R}}).sort((g,y)=>tv(g)<tv(y)?-1:1),usersNewRowIndex:0,usersStatus:null},e.projects[t].currentUser=e.projects[t].users.find(({username:g})=>g==e.username)},d1=(e,{actions:t,allocationType:r,allowedActions:i,endDate:o,requestId:l,requestType:d,resources:p,startDate:f,status:h,timeStatus:g},{entryDate:y,grantNumber:x})=>{p=p||[];const w={actions:t.map(({actionId:b,actionStatusType:C,actionType:R,allowedOperations:N,approvedStartDate:P,detailAvailable:k,entryDate:O,isRequest:T,requestedStartDate:D,resources:K})=>({actionId:b,allowedOperations:N,detailAvailable:k,date:(O||P||D).split("T")[0],deleteStatus:null,isRequest:T,resources:K.map(Md).sort(fl),showDeleteModal:!1,status:C,type:R})),allocationType:r,allowedActions:f1(i),endDate:o,entryDate:y,exchangeActionId:null,exchangeActionEditable:!0,exchangeErrors:[],exchangeStatus:null,grantNumber:x,isMaximize:r=="Maximize",requestId:l,resources:p.map(Md).filter(b=>b.isCredit||b.allocated>0).sort(fl),resourcesReason:"",returnedForCorrections:!!t.find(b=>b.returnedForCorrections),returnedForCorrectionsNotes:t.map(b=>b.adminComments).join(","),showActionsModal:!1,showConfirmModal:!1,showResourcesModal:!1,startDate:f,status:h,timeStatus:g,type:d,usageDetail:null,usageDetailStatus:null,usesCredits:["Explore","Discover","Accelerate"].includes(r)};let _={};for(let b of w.actions)if(["Exchange","Transfer"].includes(b.type)&&["Submitted","Under Review","Incomplete"].includes(b.status)){w.exchangeActionId=b.actionId,w.exchangeActionEditable=b.status==="Incomplete";for(let C of b.resources)_[C.resourceId]=C;for(let C of w.resources)C.resourceId in _&&(C.requested+=_[C.resourceId].requested,delete _[C.resourceId]);w.resources.push(...Object.values(_).map(C=>({...C,isNew:!0})));break}const S=w.allowedActions.Exchange||w.allowedActions.Transfer;if(S){_={};for(let b of S.resources)_[b.resourceId]=b;for(let b of w.resources)b.resourceId in _&&(b.questions=_[b.resourceId].questions||[],b.requires=_[b.resourceId].requires||[])}w.resources.length&&!w.resources.find(b=>b.isCredit)&&w.resources.push(S&&S.resources.find(b=>b.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[l]=w},f1=e=>{const t={};for(let{actionType:r,allowedResources:i,opportunityId:o,opportunityName:l}of e){let d={name:r,resources:i.map(Md).sort(fl),opportunityId:o,opportunityName:l};r in t?(Array.isArray(t[r])||(t[r]=[t[r]]),t[r].push(d)):t[r]=d}return"Transfer"in t&&!("Exchange"in t)&&(t.Exchange=t.Transfer),t},nv=(e,t)=>e.relativeOrder<t.relativeOrder?-1:1,Md=({allocationState:e,amountAllocated:t,amountApproved:r,amountRequested:i,amountUsed:o,attributeSets:l,baseExchangeRate:d,currentExchangeRate:p,currentExchangeRateEndDate:f,currentExchangeRateType:h,dependentResourceXrasIds:g,displayResourceName:y,endDate:x,exchangeRate:w,minimumExchange:_,organizationId:S,organizationFaviconUrl:b,organizationName:C,resourceRepositoryKey:R,resourceType:N,startDate:P,unitType:k,userGuideUrl:O,xrasResourceId:T})=>{const D=k=="Yes / No",K=k=="ACCESS Credits";return{allocated:Fs(Vg(t,r)||0,0,"floor"),decimalPlaces:0,endDate:x,exchangeRates:{base:{type:"base",unitCost:D?0:d||w},current:{endDate:f,type:(h||"base").toLowerCase(),unitCost:D?0:p||w}},icon:K?"credit":N.toLowerCase(),isActive:e=="active",isBoolean:D,isCredit:K,isFake:!1,isUnderReview:!1,isNew:!1,minimumExchange:_,name:y.trim(),questions:(l||[]).filter(({isActive:U})=>U).sort(nv).map(U=>({attributeSetId:U.attributeSetId,attributes:U.attributes.sort(nv).map(W=>({required:W.isRequired,resourceAttributeId:W.resourceAttributeId,label:W.attributeName})),fieldType:U.attributeSetRelationType,label:U.attributeSetName,resourceId:T,values:[]})),resourceProvider:{organizationId:S,name:C,favicon:b},requested:Fs(Vg(i,t)||0,0,"floor"),requires:g||[],resourceId:T,resourceRepositoryKey:R,startDate:P,type:N,unit:k,used:Fs(o||0,0,"ceil"),userGuideUrl:O}},rv=(e,t)=>{const r=t.allowedActions.Exchange;if(!r)return;const i={};for(let f of r.resources)i[f.resourceId]=f;const o=t.resources.map(f=>f.resourceId),l=i[e].requires||[];let d=!l.some(f=>o.includes(f));const p=[e,...d?l:[]].filter(f=>f in i&&!o.includes(f));t.resources.push(...p.map(f=>({...i[f],allocated:0,isNew:!0,used:0,requested:0})))},lx=(e,t)=>(e=[...e].sort(),t=[...t].sort(),e.length===t.length&&e.every((r,i)=>r===t[i])),Ia=(e,t)=>{const r=vt(e,t);for(let i of r.actions)if(i.actionId==t.payload.actionId)return i},Rn=(e,t)=>e.projects[t.payload.grantNumber],vt=(e,t)=>e.requests[t.payload.requestId],p1=(e,t)=>Rn(e,t).users.find(({username:r})=>r==t.payload.username),Dd=({allocated:e,isActive:t,isCredit:r})=>e>0&&t&&!r,sv=e=>e.hasChanges=e.isNew||e.role!=e.initialRole||!lx(e.resourceIds,e.initialResourceIds),cx=()=>document.querySelector("meta[name=csrf-token]").content,h1=async e=>{const t=new URLSearchParams({q:e});return(await(await fetch(`${Re.routes.search_people_path()}?${t}`)).json()).map(({eligible_reason:i,email:o,first_name:l,is_eligible:d,last_name:p,username:f,organization:h})=>({eligibility:d,eligibilityReason:i,email:o,firstName:l,lastName:p,username:f,organization:h}))},Ka=ft("api/fetchProjectsList",async(e,{rejectWithValue:t})=>{const r=await fetch(`${Re.routes.projects_path()}.json`);return r.status==200?{username:e,projectsList:(await r.json()).result}:t({})}),ux=ft("api/fetchProjectDetail",async({grantNumber:e},{rejectWithValue:t})=>t({grantNumber:e})),dx=ft("api/fetchRequestDetail",async({grantNumber:e,requestId:t},{rejectWithValue:r})=>r({grantNumber:e,requestId:t})),Ga=ft("api/fetchUsageDetail",async({grantNumber:e,requestId:t,resourceRepositoryKey:r},{rejectWithValue:i})=>{const o=await fetch(`${Re.routes.usage_detail_path(e,r)}.json`);return o.status==200?{grantNumber:e,requestId:t,resourceRepositoryKey:r,usageDetail:(await o.json()).usage}:i({grantNumber:e,requestId:t,resourceRepositoryKey:r})}),Ya=ft("api/deleteAction",async({actionId:e,requestId:t},{getState:r,rejectWithValue:i})=>{const o=r().api.requests[t],l=o.actions.find(h=>h.actionId==e);if(!l||!l.allowedOperations||!l.allowedOperations.includes("Delete"))return i({actionId:e,requestId:t});const d=Re.routes.request_action_path(o.requestId,l.actionId),p={_method:"delete",authenticity_token:cx()};return(await fetch(d,{body:Object.keys(p).map(h=>`${encodeURIComponent(h)}=${encodeURIComponent(p[h])}`).join("&"),headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},method:"POST"})).status==200?{actionId:e,requestId:t}:i({actionId:e,requestId:t})}),Qa=ft("api/saveResources",async({requestId:e},{getState:t,rejectWithValue:r})=>{const i=t().api.requests[e],o={},l={};for(let{allocated:y,isFake:x,questions:w,requested:_,resourceId:S}of i.resources)if(_!=y&&!x){o[S]={resource_id:S,requested:1,amount:_-y};for(let{attributes:b,values:C,fieldType:R}of w)if(C.length){let N=b[0].resourceAttributeId,P=["drop_down","single_sel","multi_sel"].includes(R),O={resource_attribute_id:R=="multi_sel"?C:P?C[0]:N};P||(O.attribute_value=C[0]),l[N]=O}}const d={authenticity_token:cx(),request_action:{action_type:i.allowedActions.Exchange.name,user_comments:i.resourcesReason,resource_attributes:l},requested_resources:o},p=i.exchangeActionId?Re.routes.request_action_path(i.requestId,i.exchangeActionId):Re.routes.request_actions_path(i.requestId),f=await fetch(`${p}.json`,{body:JSON.stringify(d),headers:{"Content-Type":"application/json"},method:i.exchangeActionId?"PUT":"POST"});let h,g;try{const y=await f.json();h=y.errors,g=y.actionId}catch{h=["Unable to save exchange"],g=null}return f.status==200?{requestId:e,exchangeActionId:g}:r({requestId:e,exchangeActionId:g,errors:h})}),Xa=ft("api/saveUsers",async({grantNumber:e},{getState:t,rejectWithValue:r})=>{const o=t().api.projects[e].users,l=o.filter(g=>!lx(g.resourceIds,g.initialResourceIds)||g.isNew).length==0?[]:o.map(g=>({username:g.username,resources:g.resourceIds})),d=o.filter(g=>g.role!=g.initialRole).map(g=>({username:g.username,role:kd[g.role],initialRole:kd[g.initialRole]})),p={grantNumber:e,resourceChanges:l,roleChanges:d,authenticity_token:document.querySelector("meta[name=csrf-token]").content},f=await fetch(Re.routes.projects_save_users_path(),{method:"POST",body:JSON.stringify(p),headers:{"Content-Type":"application/json"}});if(f.status==200)return{grantNumber:e};let h;try{h=(await f.json()).errors}catch{h=["Unable to save changes"]}return r({grantNumber:e,errors:h})}),fx=ft("publications/dismissNotice",async(e,{rejectWithValue:t})=>{try{const r=await fetch(Re.routes.publications_dismiss_notice_path(),{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":document.querySelector("meta[name=csrf-token]").content},body:JSON.stringify({acknowledged:!0})}),i=await r.json();return r.ok?i:t(i)}catch(r){return t({error:r.message})}}),px=os({name:"api",initialState:{error:null,projectsList:[],projectListLoading:!1,projects:{},requests:{},username:null,showUpdatePublications:!1},reducers:{addResource:(e,t)=>{const{resourceId:r}=t.payload,i=vt(e,t);rv(r,i)},addUser:(e,t)=>{const r=Rn(e,t),i=e.requests[r.currentRequestId],{user:o}=t.payload;r.users.map(({username:l})=>l).includes(o.username)||(r.users.push({...o,resourceIds:i.resources.filter(Dd).map(l=>l.resourceId),role:"user",initialResourceIds:[],initialRole:"user",hasChanges:!0,isNew:!0}),r.usersNewRowIndex=r.users.length-1)},closeUsageDetailModal:(e,t)=>{const r=vt(e,t);r.usageDetail=null,r.usageDetailStatus=null},resetResources:(e,t)=>{const r=vt(e,t);r.resourcesReason="",r.resources=r.resources.filter(i=>i.isCredit||i.allocated).map(i=>({...i,requested:i.allocated}))},resetUsers:(e,t)=>{const r=Rn(e,t);r.users=r.users.filter(({isNew:i})=>!i).map(i=>({...i,resourceIds:[...i.initialResourceIds],role:i.initialRole,hasChanges:!1}))},setRequest:(e,t)=>{const r=Rn(e,t);r&&(r.selectedRequestId=t.payload.requestId,r.tab=="users"&&r.currentRequestId!=r.selectedRequestId&&(r.tab="overview"))},setResourceQuestionValues:(e,t)=>{const{attributeSetId:r,resourceId:i,values:o}=t.payload,l=vt(e,t);for(let d of l.resources)if(d.resourceId==i){for(let p of d.questions)if(p.attributeSetId==r){p.values=o;break}break}},setResourceRequest:(e,t)=>{const{resourceId:r,requested:i}=t.payload,o=vt(e,t);let l,d=0;for(let p of o.resources)p.resourceId==r&&(p.requested=i,p.requested!=p.allocated&&rv(p.resourceId,o)),p.isCredit?(l=p,d+=p.allocated*p.exchangeRates.base.unitCost):d-=Td(p,"difference");l&&(l.requested=Fs(d,l.decimalPlaces,"floor"))},setResourcesReason:(e,t)=>{const r=vt(e,t);r.resourcesReason=t.payload.reason},setTab:(e,t)=>{const r=Rn(e,t);r&&(r.tab=t.payload.tab)},setUserRole:(e,t)=>{const r=p1(e,t);r.role=t.payload.role,sv(r)},toggleActionsModal:(e,t)=>{const r=vt(e,t);r.showActionsModal=!r.showActionsModal},toggleConfirmModal:(e,t)=>{const r=vt(e,t);r.showConfirmModal=!r.showConfirmModal},toggleDeleteModal:(e,t)=>{const r=Ia(e,t);r.showDeleteModal=!r.showDeleteModal},toggleResourcesModal:(e,t)=>{const r=vt(e,t);r.showResourcesModal=!r.showResourcesModal},toggleUsersResources:(e,t)=>{const r=Rn(e,t),i=e.requests[r.currentRequestId],{username:o,resourceId:l,checked:d}=t.payload,p=o?[r.users.find(f=>f.username==o)]:r.users;for(let f of p){if(l){let h=f.resourceIds.indexOf(l);d&&h==-1?f.resourceIds.push(l):!d&&h>=0&&f.resourceIds.splice(h,1)}else f.resourceIds=d?i.resources.filter(Dd).map(({resourceId:h})=>h):[];sv(f)}}},extraReducers:e=>{e.addCase(Ka.pending,t=>{t.projectListLoading=!0}).addCase(Ka.fulfilled,(t,r)=>{r.payload.projectsList.sort((i,o)=>hl(i.requests[0])>hl(o.requests[0])?-1:1),t.username=r.payload.username,t.projectsList=r.payload.projectsList.map(i=>{const{grantNumber:o,requestMasterId:l,requests:d,status:p,title:f}=i,g=i.requests.filter(y=>y.actions.filter(x=>x.returnedForCorrections).length>0).length>0?"Returned for Corrections":p||d&&(d.find(({timeStatus:y})=>y=="current")?"Active":d[0].timeStatus=="past"?"Inactive":d[0].status);return d&&u1(t,i,g),{grantNumber:o||l,status:g,title:f}}),t.projectListLoading=!1}).addCase(Ka.rejected,t=>{t.error="Failed to load project list.",t.projectListLoading=!1}).addCase(ux.rejected,(t,r)=>{const{grantNumber:i}=r.payload;t.projects[i]={error:"Failed to load project data."}}).addCase(dx.rejected,(t,r)=>{const{requestId:i}=r.payload;t.requests[i]={error:"Failed to load request data."}}).addCase(Ga.pending,(t,r)=>{const i=vt(t,{payload:r.meta.arg});i.usageDetailStatus=yt.pending}).addCase(Ga.fulfilled,(t,r)=>{const i=vt(t,r);i.usageDetail=r.payload.usageDetail,i.usageDetailStatus=yt.success}).addCase(Ga.rejected,(t,r)=>{const i=vt(t,r);i.usageDetailStatus=yt.error}).addCase(Ya.pending,(t,r)=>{const i=Ia(t,{payload:r.meta.arg});i.deleteStatus=yt.pending}).addCase(Ya.fulfilled,(t,r)=>{const i=vt(t,r),o=Ia(t,r);o.isRequest?(i.error="This request has been deleted.",o.allowedOperations=[]):i.actions=i.actions.filter(l=>l.actionId!=o.actionId),o.deleteStatus=yt.success,o.showDeleteModal=!1}).addCase(Ya.rejected,(t,r)=>{const i=Ia(t,r);i.deleteStatus=yt.error}).addCase(Qa.pending,(t,r)=>{const i=vt(t,{payload:r.meta.arg});i.exchangeStatus=yt.pending,i.showResourcesModal=!1}).addCase(Qa.fulfilled,(t,r)=>{const i=vt(t,r);i.exchangeActionId=r.payload.exchangeActionId,i.exchangeActionEditable=!1,i.exchangeErrors=[],i.exchangeStatus=yt.success}).addCase(Qa.rejected,(t,r)=>{const i=vt(t,r);i.exchangeActionId=r.payload.exchangeActionId,i.exchangeActionEditable=!0,i.exchangeErrors=r.payload.errors,i.exchangeStatus=yt.error}).addCase(Xa.pending,(t,r)=>{const i=Rn(t,{payload:r.meta.arg});i.usersStatus=yt.pending}).addCase(Xa.fulfilled,(t,r)=>{const i=Rn(t,r);i.users=i.users.map(o=>({...o,initialResourceIds:[...o.resourceIds],initialRole:o.role,hasChanges:!1,isNew:!1})),i.usersStatus=yt.success}).addCase(Xa.rejected,(t,r)=>{const i=Rn(t,r);i.usersErrors=r.payload.errors,i.usersStatus=yt.error}).addCase(fx.fulfilled,(t,r)=>{r.payload?.success&&(t.showUpdatePublications=!1)})}}),m1=e=>e.api.showUpdatePublications,g1=e=>e.api.error,v1=e=>e.api.projectsList,y1=e=>e.api.projectListLoading,x1=(e,t)=>Rn(e.api,{payload:{grantNumber:t}}),b1=(e,t)=>vt(e.api,{payload:{requestId:t}}),w1=e=>e.api.username,{addResource:S1,addUser:_1,closeUsageDetailModal:j1,hideAlert:ZA,resetResources:C1,resetUsers:E1,setRequest:R1,setResourceQuestionValues:N1,setResourceRequest:k1,setResourcesReason:O1,setTab:T1,setUserRole:P1,toggleActionsModal:I1,toggleConfirmModal:A1,toggleDeleteModal:M1,toggleResourcesModal:D1,toggleUsersResources:$1}=px.actions,hx=px.reducer,F1=e=>{const t=xe(g1),r=xe(y1),i=xe(v1),o=Ve();return j.useEffect(()=>{o(Ka(e))},[]),{error:t,loading:r,projects:i}},Zt=(e,t)=>{const r=xe(l=>x1(l,e)),i=xe(w1),o=Ve();return j.useEffect(()=>{!r&&!t&&o(ux({grantNumber:e}))},[t]),{project:r,addUser:l=>o(_1({grantNumber:e,user:l})),resetUsers:()=>o(E1({grantNumber:e})),saveUsers:()=>o(Xa({grantNumber:e})),setRequest:l=>o(R1({grantNumber:e,requestId:l})),setTab:l=>o(T1({grantNumber:e,tab:l})),setUserRole:(l,d)=>o(P1({grantNumber:e,username:l,role:d})),statuses:yt,toggleUsersResources:(l,d,p)=>o($1({grantNumber:e,username:d,resourceId:p,checked:l})),username:i}},At=(e,t)=>{const r=xe(o=>b1(o,e)),i=Ve();return j.useEffect(()=>{r||i(dx({grantNumber:t,requestId:e}))},[t,e]),{request:r,addResource:o=>i(S1({requestId:e,resourceId:o})),closeUsageDetailModal:()=>i(j1({requestId:e})),deleteAction:o=>i(Ya({actionId:o,requestId:e})),openUsageDetailModal:o=>i(Ga({grantNumber:r.grantNumber,requestId:e,resourceRepositoryKey:o})),resetResources:()=>i(C1({requestId:e})),saveResources:()=>i(Qa({requestId:e})),setResourceQuestionValues:(o,l,d)=>i(N1({requestId:e,resourceId:o,attributeSetId:l,values:d})),setResourceRequest:(o,l)=>i(k1({requestId:e,resourceId:o,requested:l})),setResourcesReason:o=>i(O1({requestId:e,reason:o})),statuses:yt,toggleActionsModal:()=>i(I1({requestId:e})),toggleConfirmModal:()=>i(A1({requestId:e})),toggleDeleteModal:o=>i(M1({requestId:e,actionId:o})),toggleResourcesModal:()=>i(D1({requestId:e}))}},L1="_project_qqnbz_1",U1="_expand_qqnbz_5",ov={project:L1,expand:U1},z1="_returnedForCorrectionsNotes_jujbd_1",V1={returnedForCorrectionsNotes:z1};function mx(e,t,r){const i=j.useRef(e!==void 0),[o,l]=j.useState(t),d=e!==void 0,p=i.current;return i.current=d,!d&&p&&o!==t&&l(t),[d?e:o,j.useCallback((...f)=>{const[h,...g]=f;let y=r?.(h,...g);return l(h),y},[r])]}const _f={prefix:String(Math.round(Math.random()*1e10)),current:0},gx=Xe.createContext(_f),B1=Xe.createContext(!1);let q1=!!(typeof window<"u"&&window.document&&window.document.createElement),sd=new WeakMap;function H1(e=!1){let t=j.useContext(gx),r=j.useRef(null);if(r.current===null&&!e){var i,o;let l=(o=Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(i=o.ReactCurrentOwner)===null||i===void 0?void 0:i.current;if(l){let d=sd.get(l);d==null?sd.set(l,{id:t.current,state:l.memoizedState}):l.memoizedState!==d.state&&(t.current=d.id,sd.delete(l))}r.current=++t.current}return r.current}function W1(e){let t=j.useContext(gx);t===_f&&!q1&&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 r=H1(!!e),i=`react-aria${t.prefix}`;return e||`${i}-${r}`}function K1(e){let t=Xe.useId(),[r]=j.useState(X1()),i=r?"react-aria":`react-aria${_f.prefix}`;return e||`${i}-${t}`}const vx=typeof Xe.useId=="function"?K1:W1;function G1(){return!1}function Y1(){return!0}function Q1(e){return()=>{}}function X1(){return typeof Xe.useSyncExternalStore=="function"?Xe.useSyncExternalStore(Q1,G1,Y1):j.useContext(B1)}const Zs=j.createContext(null),sr=j.createContext(null),ts=(e,t=null)=>e!=null?String(e):t||null;function J1(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e},[e]),t}function tt(e){const t=J1(e);return j.useCallback(function(...r){return t.current&&t.current(...r)},[t])}const iv=e=>!e||typeof e=="function"?e:t=>{e.current=t};function Z1(e,t){const r=iv(e),i=iv(t);return o=>{r&&r(o),i&&i(o)}}function Mn(e,t){return j.useMemo(()=>Z1(e,t),[e,t])}function jf({children:e,in:t,onExited:r,mountOnEnter:i,unmountOnExit:o}){const l=j.useRef(null),d=j.useRef(t),p=tt(r);j.useEffect(()=>{t?d.current=!0:p(l.current)},[t,p]);const f=Mn(l,e.ref),h=j.cloneElement(e,{ref:f});return t?h:o||!d.current&&i?null:h}const eE=["active","eventKey","mountOnEnter","transition","unmountOnExit","role","onEnter","onEntering","onEntered","onExit","onExiting","onExited"],tE=["activeKey","getControlledId","getControllerId"],nE=["as"];function $d(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function yx(e){let{active:t,eventKey:r,mountOnEnter:i,transition:o,unmountOnExit:l,role:d="tabpanel",onEnter:p,onEntering:f,onEntered:h,onExit:g,onExiting:y,onExited:x}=e,w=$d(e,eE);const _=j.useContext(Zs);if(!_)return[Object.assign({},w,{role:d}),{eventKey:r,isActive:t,mountOnEnter:i,transition:o,unmountOnExit:l,onEnter:p,onEntering:f,onEntered:h,onExit:g,onExiting:y,onExited:x}];const{activeKey:S,getControlledId:b,getControllerId:C}=_,R=$d(_,tE),N=ts(r);return[Object.assign({},w,{role:d,id:b(r),"aria-labelledby":C(r)}),{eventKey:r,isActive:t==null&&N!=null?ts(S)===N:t,transition:o||R.transition,mountOnEnter:i??R.mountOnEnter,unmountOnExit:l??R.unmountOnExit,onEnter:p,onEntering:f,onEntered:h,onExit:g,onExiting:y,onExited:x}]}const xx=j.forwardRef((e,t)=>{let{as:r="div"}=e,i=$d(e,nE);const[o,{isActive:l,onEnter:d,onEntering:p,onEntered:f,onExit:h,onExiting:g,onExited:y,mountOnEnter:x,unmountOnExit:w,transition:_=jf}]=yx(i);return c.jsx(Zs.Provider,{value:null,children:c.jsx(sr.Provider,{value:null,children:c.jsx(_,{in:l,onEnter:d,onEntering:p,onEntered:f,onExit:h,onExiting:g,onExited:y,mountOnEnter:x,unmountOnExit:w,children:c.jsx(r,Object.assign({},o,{ref:t,hidden:!l,"aria-hidden":!l}))})})})});xx.displayName="TabPanel";const Cf=e=>{const{id:t,generateChildId:r,onSelect:i,activeKey:o,defaultActiveKey:l,transition:d,mountOnEnter:p,unmountOnExit:f,children:h}=e,[g,y]=mx(o,l,i),x=vx(t),w=j.useMemo(()=>r||((S,b)=>x?`${x}-${b}-${S}`:null),[x,r]),_=j.useMemo(()=>({onSelect:y,activeKey:g,transition:d,mountOnEnter:p||!1,unmountOnExit:f||!1,getControlledId:S=>w(S,"tabpane"),getControllerId:S=>w(S,"tab")}),[y,g,d,p,f,w]);return c.jsx(Zs.Provider,{value:_,children:c.jsx(sr.Provider,{value:y||null,children:h})})};Cf.Panel=xx;var od={exports:{}};var av;function rE(){return av||(av=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var l="",d=0;d<arguments.length;d++){var p=arguments[d];p&&(l=o(l,i(p)))}return l}function i(l){if(typeof l=="string"||typeof l=="number")return l;if(typeof l!="object")return"";if(Array.isArray(l))return r.apply(null,l);if(l.toString!==Object.prototype.toString&&!l.toString.toString().includes("[native code]"))return l.toString();var d="";for(var p in l)t.call(l,p)&&l[p]&&(d=o(d,p));return d}function o(l,d){return d?l?l+" "+d:l+d:l}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(od)),od.exports}var sE=rE();const Te=Js(sE);function Ef(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}function ml(e,t){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ml(e,t)}function oE(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ml(e,t)}var bx=Ny();const Qr=Js(bx),lv={disabled:!1},wx=Xe.createContext(null);var iE=function(t){return t.scrollTop},Jo="unmounted",kr="exited",Gn="entering",Or="entered",gl="exiting",cr=(function(e){oE(t,e);function t(i,o){var l;l=e.call(this,i,o)||this;var d=o,p=d&&!d.isMounting?i.enter:i.appear,f;return l.appearStatus=null,i.in?p?(f=kr,l.appearStatus=Gn):f=Or:i.unmountOnExit||i.mountOnEnter?f=Jo:f=kr,l.state={status:f},l.nextCallback=null,l}t.getDerivedStateFromProps=function(o,l){var d=o.in;return d&&l.status===Jo?{status:kr}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(o){var l=null;if(o!==this.props){var d=this.state.status;this.props.in?d!==Gn&&d!==Or&&(l=Gn):(d===Gn||d===Or)&&(l=gl)}this.updateStatus(!1,l)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var o=this.props.timeout,l,d,p;return l=d=p=o,o!=null&&typeof o!="number"&&(l=o.exit,d=o.enter,p=o.appear!==void 0?o.appear:d),{exit:l,enter:d,appear:p}},r.updateStatus=function(o,l){if(o===void 0&&(o=!1),l!==null)if(this.cancelNextCallback(),l===Gn){if(this.props.unmountOnExit||this.props.mountOnEnter){var d=this.props.nodeRef?this.props.nodeRef.current:Qr.findDOMNode(this);d&&iE(d)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===kr&&this.setState({status:Jo})},r.performEnter=function(o){var l=this,d=this.props.enter,p=this.context?this.context.isMounting:o,f=this.props.nodeRef?[p]:[Qr.findDOMNode(this),p],h=f[0],g=f[1],y=this.getTimeouts(),x=p?y.appear:y.enter;if(!o&&!d||lv.disabled){this.safeSetState({status:Or},function(){l.props.onEntered(h)});return}this.props.onEnter(h,g),this.safeSetState({status:Gn},function(){l.props.onEntering(h,g),l.onTransitionEnd(x,function(){l.safeSetState({status:Or},function(){l.props.onEntered(h,g)})})})},r.performExit=function(){var o=this,l=this.props.exit,d=this.getTimeouts(),p=this.props.nodeRef?void 0:Qr.findDOMNode(this);if(!l||lv.disabled){this.safeSetState({status:kr},function(){o.props.onExited(p)});return}this.props.onExit(p),this.safeSetState({status:gl},function(){o.props.onExiting(p),o.onTransitionEnd(d.exit,function(){o.safeSetState({status:kr},function(){o.props.onExited(p)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(o,l){l=this.setNextCallback(l),this.setState(o,l)},r.setNextCallback=function(o){var l=this,d=!0;return this.nextCallback=function(p){d&&(d=!1,l.nextCallback=null,o(p))},this.nextCallback.cancel=function(){d=!1},this.nextCallback},r.onTransitionEnd=function(o,l){this.setNextCallback(l);var d=this.props.nodeRef?this.props.nodeRef.current:Qr.findDOMNode(this),p=o==null&&!this.props.addEndListener;if(!d||p){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var f=this.props.nodeRef?[this.nextCallback]:[d,this.nextCallback],h=f[0],g=f[1];this.props.addEndListener(h,g)}o!=null&&setTimeout(this.nextCallback,o)},r.render=function(){var o=this.state.status;if(o===Jo)return null;var l=this.props,d=l.children;l.in,l.mountOnEnter,l.unmountOnExit,l.appear,l.enter,l.exit,l.timeout,l.addEndListener,l.onEnter,l.onEntering,l.onEntered,l.onExit,l.onExiting,l.onExited,l.nodeRef;var p=Ef(l,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Xe.createElement(wx.Provider,{value:null},typeof d=="function"?d(o,p):Xe.cloneElement(Xe.Children.only(d),p))},t})(Xe.Component);cr.contextType=wx;cr.propTypes={};function Is(){}cr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Is,onEntering:Is,onEntered:Is,onExit:Is,onExiting:Is,onExited:Is};cr.UNMOUNTED=Jo;cr.EXITED=kr;cr.ENTERING=Gn;cr.ENTERED=Or;cr.EXITING=gl;function eo(e){return e&&e.ownerDocument||document}function aE(e){var t=eo(e);return t&&t.defaultView||window}function lE(e,t){return aE(e).getComputedStyle(e,t)}var cE=/([A-Z])/g;function uE(e){return e.replace(cE,"-$1").toLowerCase()}var dE=/^ms-/;function Aa(e){return uE(e).replace(dE,"-ms-")}var fE=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function pE(e){return!!(e&&fE.test(e))}function tr(e,t){var r="",i="";if(typeof t=="string")return e.style.getPropertyValue(Aa(t))||lE(e).getPropertyValue(Aa(t));Object.keys(t).forEach(function(o){var l=t[o];!l&&l!==0?e.style.removeProperty(Aa(o)):pE(o)?i+=o+"("+l+") ":r+=Aa(o)+": "+l+";"}),i&&(r+="transform: "+i+";"),e.style.cssText+=";"+r}const to=!!(typeof window<"u"&&window.document&&window.document.createElement);var Fd=!1,Ld=!1;try{var id={get passive(){return Fd=!0},get once(){return Ld=Fd=!0}};to&&(window.addEventListener("test",id,id),window.removeEventListener("test",id,!0))}catch{}function Rf(e,t,r,i){if(i&&typeof i!="boolean"&&!Ld){var o=i.once,l=i.capture,d=r;!Ld&&o&&(d=r.__once||function p(f){this.removeEventListener(t,p,l),r.call(this,f)},r.__once=d),e.addEventListener(t,d,Fd?i:l)}e.addEventListener(t,r,i)}function Ud(e,t,r,i){var o=i&&typeof i!="boolean"?i.capture:i;e.removeEventListener(t,r,o),r.__once&&e.removeEventListener(t,r.__once,o)}function Jn(e,t,r,i){return Rf(e,t,r,i),function(){Ud(e,t,r,i)}}function hE(e,t,r,i){if(i===void 0&&(i=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(t,r,i),e.dispatchEvent(o)}}function mE(e){var t=tr(e,"transitionDuration")||"",r=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*r}function gE(e,t,r){r===void 0&&(r=5);var i=!1,o=setTimeout(function(){i||hE(e,"transitionend",!0)},t+r),l=Jn(e,"transitionend",function(){i=!0},{once:!0});return function(){clearTimeout(o),l()}}function Sx(e,t,r,i){r==null&&(r=mE(e)||0);var o=gE(e,r,i),l=Jn(e,"transitionend",t);return function(){o(),l()}}function cv(e,t){const r=tr(e,t)||"",i=r.indexOf("ms")===-1?1e3:1;return parseFloat(r)*i}function _x(e,t){const r=cv(e,"transitionDuration"),i=cv(e,"transitionDelay"),o=Sx(e,l=>{l.target===e&&(o(),t(l))},r+i)}function jx(e){e.offsetHeight}function vl(e){return e&&"setState"in e?Qr.findDOMNode(e):e??null}const Cx=Xe.forwardRef(({onEnter:e,onEntering:t,onEntered:r,onExit:i,onExiting:o,onExited:l,addEndListener:d,children:p,childRef:f,...h},g)=>{const y=j.useRef(null),x=Mn(y,f),w=O=>{x(vl(O))},_=O=>T=>{O&&y.current&&O(y.current,T)},S=j.useCallback(_(e),[e]),b=j.useCallback(_(t),[t]),C=j.useCallback(_(r),[r]),R=j.useCallback(_(i),[i]),N=j.useCallback(_(o),[o]),P=j.useCallback(_(l),[l]),k=j.useCallback(_(d),[d]);return c.jsx(cr,{ref:g,...h,onEnter:S,onEntered:C,onEntering:b,onExit:R,onExited:P,onExiting:N,addEndListener:k,nodeRef:y,children:typeof p=="function"?(O,T)=>p(O,{...T,ref:w}):Xe.cloneElement(p,{ref:w})})}),vE={[Gn]:"show",[Or]:"show"},ns=j.forwardRef(({className:e,children:t,transitionClasses:r={},onEnter:i,...o},l)=>{const d={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},p=j.useCallback((f,h)=>{jx(f),i?.(f,h)},[i]);return c.jsx(Cx,{ref:l,addEndListener:_x,...d,onEnter:p,childRef:t.ref,children:(f,h)=>j.cloneElement(t,{...h,className:Te("fade",e,t.props.className,vE[f],r[f])})})});ns.displayName="Fade";function Nf(e){return typeof e=="boolean"?e?ns:jf:e}const Ex=({transition:e,...t})=>c.jsx(Cf,{...t,transition:Nf(e)});Ex.displayName="TabContainer";const yE=["xxl","xl","lg","md","sm","xs"],xE="xs",kf=j.createContext({prefixes:{},breakpoints:yE,minBreakpoint:xE}),{Consumer:eM,Provider:tM}=kf;function ze(e,t){const{prefixes:r}=j.useContext(kf);return e||r[t]||t}function Dl(){const{dir:e}=j.useContext(kf);return e==="rtl"}const Of=j.forwardRef(({className:e,bsPrefix:t,as:r="div",...i},o)=>(t=ze(t,"tab-content"),c.jsx(r,{ref:o,className:Te(e,t),...i})));Of.displayName="TabContent";const Tf=j.forwardRef(({bsPrefix:e,transition:t,...r},i)=>{const[{className:o,as:l="div",...d},{isActive:p,onEnter:f,onEntering:h,onEntered:g,onExit:y,onExiting:x,onExited:w,mountOnEnter:_,unmountOnExit:S,transition:b=ns}]=yx({...r,transition:Nf(t)}),C=ze(e,"tab-pane");return c.jsx(Zs.Provider,{value:null,children:c.jsx(sr.Provider,{value:null,children:c.jsx(b,{in:p,onEnter:f,onEntering:h,onEntered:g,onExit:y,onExiting:x,onExited:w,mountOnEnter:_,unmountOnExit:S,children:c.jsx(l,{...d,ref:i,className:Te(o,C,p&&"active")})})})})});Tf.displayName="TabPane";const bE={eventKey:ve.oneOfType([ve.string,ve.number]),title:ve.node.isRequired,disabled:ve.bool,tabClassName:ve.string,tabAttrs:ve.object},Rx=()=>{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")};Rx.propTypes=bE;const Ho=Object.assign(Rx,{Container:Ex,Content:Of,Pane:Tf});function je(){return je=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},je.apply(null,arguments)}function uv(e){return"default"+e.charAt(0).toUpperCase()+e.substr(1)}function wE(e){var t=SE(e,"string");return typeof t=="symbol"?t:String(t)}function SE(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Nx(e,t,r){var i=j.useRef(e!==void 0),o=j.useState(t),l=o[0],d=o[1],p=e!==void 0,f=i.current;return i.current=p,!p&&f&&l!==t&&d(t),[p?e:l,j.useCallback(function(h){for(var g=arguments.length,y=new Array(g>1?g-1:0),x=1;x<g;x++)y[x-1]=arguments[x];r&&r.apply(void 0,[h].concat(y)),d(h)},[r])]}function $l(e,t){return Object.keys(t).reduce(function(r,i){var o,l=r,d=l[uv(i)],p=l[i],f=Ef(l,[uv(i),i].map(wE)),h=t[i],g=Nx(p,d,e[h]),y=g[0],x=g[1];return je({},f,(o={},o[i]=y,o[h]=x,o))},e)}var Ma={exports:{}},Da={exports:{}},dv;function _E(){return dv||(dv=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(i){function o(d,p,f,h,g,y){var x=h||"<<anonymous>>",w=y||f;if(p[f]==null)return d?new Error("Required "+g+" `"+w+"` was not specified "+("in `"+x+"`.")):null;for(var _=arguments.length,S=Array(_>6?_-6:0),b=6;b<_;b++)S[b-6]=arguments[b];return i.apply(void 0,[p,f,x,g,w].concat(S))}var l=o.bind(null,!1);return l.isRequired=o.bind(null,!0),l}e.exports=t.default})(Da,Da.exports)),Da.exports}var fv;function jE(){return fv||(fv=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var r=_E(),i=o(r);function o(d){return d&&d.__esModule?d:{default:d}}function l(){for(var d=arguments.length,p=Array(d),f=0;f<d;f++)p[f]=arguments[f];function h(){for(var g=arguments.length,y=Array(g),x=0;x<g;x++)y[x]=arguments[x];var w=null;return p.forEach(function(_){if(w==null){var S=_.apply(void 0,y);S!=null&&(w=S)}}),w}return(0,i.default)(h)}e.exports=t.default})(Ma,Ma.exports)),Ma.exports}jE();var CE=Function.prototype.bind.call(Function.prototype.call,[].slice);function Yn(e,t){return CE(e.querySelectorAll(t))}function kx(){const[,e]=j.useReducer(t=>!t,!1);return e}const Fl=j.createContext(null);Fl.displayName="NavContext";const EE="data-rr-ui-",RE="rrUi";function no(e){return`${EE}${e}`}function NE(e){return`${RE}${e}`}const kE=["as","disabled"];function OE(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function TE(e){return!e||e.trim()==="#"}function Pf({tagName:e,disabled:t,href:r,target:i,rel:o,role:l,onClick:d,tabIndex:p=0,type:f}){e||(r!=null||i!=null||o!=null?e="a":e="button");const h={tagName:e};if(e==="button")return[{type:f||"button",disabled:t},h];const g=x=>{if((t||e==="a"&&TE(r))&&x.preventDefault(),t){x.stopPropagation();return}d?.(x)},y=x=>{x.key===" "&&(x.preventDefault(),g(x))};return e==="a"&&(r||(r="#"),t&&(r=void 0)),[{role:l??"button",disabled:void 0,tabIndex:t?void 0:p,href:r,target:e==="a"?i:void 0,"aria-disabled":t||void 0,rel:e==="a"?o:void 0,onClick:g,onKeyDown:y},h]}const If=j.forwardRef((e,t)=>{let{as:r,disabled:i}=e,o=OE(e,kE);const[l,{tagName:d}]=Pf(Object.assign({tagName:r,disabled:i},o));return c.jsx(d,Object.assign({},o,l,{ref:t}))});If.displayName="Button";const PE=["as","active","eventKey"];function IE(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function Ox({key:e,onClick:t,active:r,id:i,role:o,disabled:l}){const d=j.useContext(sr),p=j.useContext(Fl),f=j.useContext(Zs);let h=r;const g={role:o};if(p){!o&&p.role==="tablist"&&(g.role="tab");const y=p.getControllerId(e??null),x=p.getControlledId(e??null);g[no("event-key")]=e,g.id=y||i,h=r==null&&e!=null?p.activeKey===e:r,(h||!(f!=null&&f.unmountOnExit)&&!(f!=null&&f.mountOnEnter))&&(g["aria-controls"]=x)}return g.role==="tab"&&(g["aria-selected"]=h,h||(g.tabIndex=-1),l&&(g.tabIndex=-1,g["aria-disabled"]=!0)),g.onClick=tt(y=>{l||(t?.(y),e!=null&&d&&!y.isPropagationStopped()&&d(e,y))}),[g,{isActive:h}]}const Tx=j.forwardRef((e,t)=>{let{as:r=If,active:i,eventKey:o}=e,l=IE(e,PE);const[d,p]=Ox(Object.assign({key:ts(o,l.href),active:i},l));return d[no("active")]=p.isActive,c.jsx(r,Object.assign({},l,d,{ref:t}))});Tx.displayName="NavItem";const AE=["as","onSelect","activeKey","role","onKeyDown"];function ME(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}const pv=()=>{},hv=no("event-key"),Px=j.forwardRef((e,t)=>{let{as:r="div",onSelect:i,activeKey:o,role:l,onKeyDown:d}=e,p=ME(e,AE);const f=kx(),h=j.useRef(!1),g=j.useContext(sr),y=j.useContext(Zs);let x,w;y&&(l=l||"tablist",o=y.activeKey,x=y.getControlledId,w=y.getControllerId);const _=j.useRef(null),S=N=>{const P=_.current;if(!P)return null;const k=Yn(P,`[${hv}]:not([aria-disabled=true])`),O=P.querySelector("[aria-selected=true]");if(!O||O!==document.activeElement)return null;const T=k.indexOf(O);if(T===-1)return null;let D=T+N;return D>=k.length&&(D=0),D<0&&(D=k.length-1),k[D]},b=(N,P)=>{N!=null&&(i?.(N,P),g?.(N,P))},C=N=>{if(d?.(N),!y)return;let P;switch(N.key){case"ArrowLeft":case"ArrowUp":P=S(-1);break;case"ArrowRight":case"ArrowDown":P=S(1);break;default:return}P&&(N.preventDefault(),b(P.dataset[NE("EventKey")]||null,N),h.current=!0,f())};j.useEffect(()=>{if(_.current&&h.current){const N=_.current.querySelector(`[${hv}][aria-selected=true]`);N?.focus()}h.current=!1});const R=Mn(t,_);return c.jsx(sr.Provider,{value:b,children:c.jsx(Fl.Provider,{value:{role:l,activeKey:ts(o),getControlledId:x||pv,getControllerId:w||pv},children:c.jsx(r,Object.assign({},p,{onKeyDown:C,ref:R,role:l}))})})});Px.displayName="Nav";const DE=Object.assign(Px,{Item:Tx}),Af=j.createContext(null);Af.displayName="NavbarContext";const Ix=j.createContext(null);Ix.displayName="CardHeaderContext";const Mf=j.forwardRef(({className:e,bsPrefix:t,as:r="div",...i},o)=>(t=ze(t,"nav-item"),c.jsx(r,{ref:o,className:Te(e,t),...i})));Mf.displayName="NavItem";function yl(){return j.useState(null)}function $E(e,t,r,i=!1){const o=tt(r);j.useEffect(()=>{const l=typeof e=="function"?e():e;return l.addEventListener(t,o,i),()=>l.removeEventListener(t,o,i)},[e])}function Df(){const e=j.useRef(!0),t=j.useRef(()=>e.current);return j.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function Ax(e){const t=j.useRef(null);return j.useEffect(()=>{t.current=e}),t.current}const FE=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",LE=typeof document<"u",xl=LE||FE?j.useLayoutEffect:j.useEffect,UE=["onKeyDown"];function zE(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function VE(e){return!e||e.trim()==="#"}const $f=j.forwardRef((e,t)=>{let{onKeyDown:r}=e,i=zE(e,UE);const[o]=Pf(Object.assign({tagName:"a"},i)),l=tt(d=>{o.onKeyDown(d),r?.(d)});return VE(i.href)||i.role==="button"?c.jsx("a",Object.assign({ref:t},i,o,{onKeyDown:l})):c.jsx("a",Object.assign({ref:t},i,{onKeyDown:r}))});$f.displayName="Anchor";const Ff=j.forwardRef(({bsPrefix:e,className:t,as:r=$f,active:i,eventKey:o,disabled:l=!1,...d},p)=>{e=ze(e,"nav-link");const[f,h]=Ox({key:ts(o,d.href),active:i,disabled:l,...d});return c.jsx(r,{...d,...f,ref:p,disabled:l,className:Te(t,e,l&&"disabled",h.isActive&&"active")})});Ff.displayName="NavLink";const Mx=j.forwardRef((e,t)=>{const{as:r="div",bsPrefix:i,variant:o,fill:l=!1,justify:d=!1,navbar:p,navbarScroll:f,className:h,activeKey:g,...y}=$l(e,{activeKey:"onSelect"}),x=ze(i,"nav");let w,_,S=!1;const b=j.useContext(Af),C=j.useContext(Ix);return b?(w=b.bsPrefix,S=p??!0):C&&({cardHeaderBsPrefix:_}=C),c.jsx(DE,{as:r,ref:t,activeKey:g,className:Te(h,{[x]:!S,[`${w}-nav`]:S,[`${w}-nav-scroll`]:S&&f,[`${_}-${o}`]:!!_,[`${x}-${o}`]:!!o,[`${x}-fill`]:l,[`${x}-justified`]:d}),...y})});Mx.displayName="Nav";const BE=Object.assign(Mx,{Item:Mf,Link:Ff});function mv(e,t){let r=0;return j.Children.map(e,i=>j.isValidElement(i)?t(i,r++):i)}function qE(e,t){let r=0;j.Children.forEach(e,i=>{j.isValidElement(i)&&t(i,r++)})}function HE(e){let t;return qE(e,r=>{t==null&&(t=r.props.eventKey)}),t}function WE(e){const{title:t,eventKey:r,disabled:i,tabClassName:o,tabAttrs:l,id:d}=e.props;return t==null?null:c.jsx(Mf,{as:"li",role:"presentation",children:c.jsx(Ff,{as:"button",type:"button",eventKey:r,disabled:i,id:d,className:o,...l,children:t})})}const Dx=e=>{const{id:t,onSelect:r,transition:i,mountOnEnter:o=!1,unmountOnExit:l=!1,variant:d="tabs",children:p,activeKey:f=HE(p),...h}=$l(e,{activeKey:"onSelect"});return c.jsxs(Cf,{id:t,activeKey:f,onSelect:r,transition:Nf(i),mountOnEnter:o,unmountOnExit:l,children:[c.jsx(BE,{...h,role:"tablist",as:"ul",variant:d,children:mv(p,WE)}),c.jsx(Of,{children:mv(p,g=>{const y={...g.props};return delete y.title,delete y.disabled,delete y.tabClassName,delete y.tabAttrs,c.jsx(Tf,{...y})})})]})};Dx.displayName="Tabs";const gv={Explore:"Discover",Discover:"Accelerate",Accelerate:"Maximize"};function KE(e,t){const r={isEnabled:!1};if(!(e.allocationType in gv))return r.isRenewalEnabled="Renewal"in e.allowedActions,r;if(r.allocationType=gv[e.allocationType],!("Renewal"in e.allowedActions))return r.isRenewalEnabled=!1,r;if(r.isRenewalEnabled=GE(e))return r;const i=JE(e);if(!QE(e,i)||!XE(e,i))return r;for(let o of t)if(o.opportunityName.includes(r.allocationType)){r.opportunityId=o.opportunityId,r.isEnabled=!0;break}return r}function GE(e){return YE(e)<31}function YE(e){const t=new Date(e.endDate);return Math.max(0,Math.ceil((t-new Date)/(1e3*60*60*24)))}function QE(e,t){return t.allocated>=$x(e)?!0:e.actions.some(function(r){return r.type=="Supplement"&&r.status=="Approved"&&r.resources.some(i=>i.isCredit&&i.allocated>0)})}function $x(e){switch(e.allocationType){case"Explore":return 4e5;case"Discover":return 15e5;case"Accelerate":return 3e6}return 0}function XE(e,t){switch(e.allocationType){case"Explore":return t.usage>=.9;case"Discover":return t.usage>=.75;case"Accelerate":return t.exchanged>=.75*$x(e)}return!1}function JE(e){let t=0,r=0;for(let i of e.actions){if(i.status!="Approved")continue;let o=i.type=="Exchange"||i.type=="Transfer";for(let l of i.resources)l.isCredit&&(o||(t+=l.allocated),r+=l.allocated)}return{allocated:t,exchanged:t-r,usage:t>0?(t-r)/t:0}}const Ll=j.createContext(null);var vv=Object.prototype.hasOwnProperty;function yv(e,t,r){for(r of e.keys())if(Zo(r,t))return r}function Zo(e,t){var r,i,o;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array){if((i=e.length)===t.length)for(;i--&&Zo(e[i],t[i]););return i===-1}if(r===Set){if(e.size!==t.size)return!1;for(i of e)if(o=i,o&&typeof o=="object"&&(o=yv(t,o),!o)||!t.has(o))return!1;return!0}if(r===Map){if(e.size!==t.size)return!1;for(i of e)if(o=i[0],o&&typeof o=="object"&&(o=yv(t,o),!o)||!Zo(i[1],t.get(o)))return!1;return!0}if(r===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(r===DataView){if((i=e.byteLength)===t.byteLength)for(;i--&&e.getInt8(i)===t.getInt8(i););return i===-1}if(ArrayBuffer.isView(e)){if((i=e.byteLength)===t.byteLength)for(;i--&&e[i]===t[i];);return i===-1}if(!r||typeof e=="object"){i=0;for(r in e)if(vv.call(e,r)&&++i&&!vv.call(t,r)||!(r in t)||!Zo(e[r],t[r]))return!1;return Object.keys(t).length===i}}return e!==e&&t!==t}function ZE(e){const t=Df();return[e[0],j.useCallback(r=>{if(t())return e[1](r)},[t,e[1]])]}var Vt="top",ln="bottom",cn="right",Bt="left",Lf="auto",gi=[Vt,ln,cn,Bt],qs="start",oi="end",eR="clippingParents",Fx="viewport",Wo="popper",tR="reference",xv=gi.reduce(function(e,t){return e.concat([t+"-"+qs,t+"-"+oi])},[]),Lx=[].concat(gi,[Lf]).reduce(function(e,t){return e.concat([t,t+"-"+qs,t+"-"+oi])},[]),nR="beforeRead",rR="read",sR="afterRead",oR="beforeMain",iR="main",aR="afterMain",lR="beforeWrite",cR="write",uR="afterWrite",dR=[nR,rR,sR,oR,iR,aR,lR,cR,uR];function On(e){return e.split("-")[0]}function en(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function rs(e){var t=en(e).Element;return e instanceof t||e instanceof Element}function Tn(e){var t=en(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Uf(e){if(typeof ShadowRoot>"u")return!1;var t=en(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Jr=Math.max,bl=Math.min,Hs=Math.round;function zd(){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 Ux(){return!/^((?!chrome|android).)*safari/i.test(zd())}function Ws(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var i=e.getBoundingClientRect(),o=1,l=1;t&&Tn(e)&&(o=e.offsetWidth>0&&Hs(i.width)/e.offsetWidth||1,l=e.offsetHeight>0&&Hs(i.height)/e.offsetHeight||1);var d=rs(e)?en(e):window,p=d.visualViewport,f=!Ux()&&r,h=(i.left+(f&&p?p.offsetLeft:0))/o,g=(i.top+(f&&p?p.offsetTop:0))/l,y=i.width/o,x=i.height/l;return{width:y,height:x,top:g,right:h+y,bottom:g+x,left:h,x:h,y:g}}function zf(e){var t=Ws(e),r=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:i}}function zx(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Uf(r)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Pr(e){return e?(e.nodeName||"").toLowerCase():null}function or(e){return en(e).getComputedStyle(e)}function fR(e){return["table","td","th"].indexOf(Pr(e))>=0}function Ir(e){return((rs(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ul(e){return Pr(e)==="html"?e:e.assignedSlot||e.parentNode||(Uf(e)?e.host:null)||Ir(e)}function bv(e){return!Tn(e)||or(e).position==="fixed"?null:e.offsetParent}function pR(e){var t=/firefox/i.test(zd()),r=/Trident/i.test(zd());if(r&&Tn(e)){var i=or(e);if(i.position==="fixed")return null}var o=Ul(e);for(Uf(o)&&(o=o.host);Tn(o)&&["html","body"].indexOf(Pr(o))<0;){var l=or(o);if(l.transform!=="none"||l.perspective!=="none"||l.contain==="paint"||["transform","perspective"].indexOf(l.willChange)!==-1||t&&l.willChange==="filter"||t&&l.filter&&l.filter!=="none")return o;o=o.parentNode}return null}function vi(e){for(var t=en(e),r=bv(e);r&&fR(r)&&or(r).position==="static";)r=bv(r);return r&&(Pr(r)==="html"||Pr(r)==="body"&&or(r).position==="static")?t:r||pR(e)||t}function Vf(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ei(e,t,r){return Jr(e,bl(t,r))}function hR(e,t,r){var i=ei(e,t,r);return i>r?r:i}function Vx(){return{top:0,right:0,bottom:0,left:0}}function Bx(e){return Object.assign({},Vx(),e)}function qx(e,t){return t.reduce(function(r,i){return r[i]=e,r},{})}var mR=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Bx(typeof t!="number"?t:qx(t,gi))};function gR(e){var t,r=e.state,i=e.name,o=e.options,l=r.elements.arrow,d=r.modifiersData.popperOffsets,p=On(r.placement),f=Vf(p),h=[Bt,cn].indexOf(p)>=0,g=h?"height":"width";if(!(!l||!d)){var y=mR(o.padding,r),x=zf(l),w=f==="y"?Vt:Bt,_=f==="y"?ln:cn,S=r.rects.reference[g]+r.rects.reference[f]-d[f]-r.rects.popper[g],b=d[f]-r.rects.reference[f],C=vi(l),R=C?f==="y"?C.clientHeight||0:C.clientWidth||0:0,N=S/2-b/2,P=y[w],k=R-x[g]-y[_],O=R/2-x[g]/2+N,T=ei(P,O,k),D=f;r.modifiersData[i]=(t={},t[D]=T,t.centerOffset=T-O,t)}}function vR(e){var t=e.state,r=e.options,i=r.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||zx(t.elements.popper,o)&&(t.elements.arrow=o))}const yR={name:"arrow",enabled:!0,phase:"main",fn:gR,effect:vR,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ks(e){return e.split("-")[1]}var xR={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bR(e,t){var r=e.x,i=e.y,o=t.devicePixelRatio||1;return{x:Hs(r*o)/o||0,y:Hs(i*o)/o||0}}function wv(e){var t,r=e.popper,i=e.popperRect,o=e.placement,l=e.variation,d=e.offsets,p=e.position,f=e.gpuAcceleration,h=e.adaptive,g=e.roundOffsets,y=e.isFixed,x=d.x,w=x===void 0?0:x,_=d.y,S=_===void 0?0:_,b=typeof g=="function"?g({x:w,y:S}):{x:w,y:S};w=b.x,S=b.y;var C=d.hasOwnProperty("x"),R=d.hasOwnProperty("y"),N=Bt,P=Vt,k=window;if(h){var O=vi(r),T="clientHeight",D="clientWidth";if(O===en(r)&&(O=Ir(r),or(O).position!=="static"&&p==="absolute"&&(T="scrollHeight",D="scrollWidth")),O=O,o===Vt||(o===Bt||o===cn)&&l===oi){P=ln;var K=y&&O===k&&k.visualViewport?k.visualViewport.height:O[T];S-=K-i.height,S*=f?1:-1}if(o===Bt||(o===Vt||o===ln)&&l===oi){N=cn;var U=y&&O===k&&k.visualViewport?k.visualViewport.width:O[D];w-=U-i.width,w*=f?1:-1}}var W=Object.assign({position:p},h&&xR),H=g===!0?bR({x:w,y:S},en(r)):{x:w,y:S};if(w=H.x,S=H.y,f){var X;return Object.assign({},W,(X={},X[P]=R?"0":"",X[N]=C?"0":"",X.transform=(k.devicePixelRatio||1)<=1?"translate("+w+"px, "+S+"px)":"translate3d("+w+"px, "+S+"px, 0)",X))}return Object.assign({},W,(t={},t[P]=R?S+"px":"",t[N]=C?w+"px":"",t.transform="",t))}function wR(e){var t=e.state,r=e.options,i=r.gpuAcceleration,o=i===void 0?!0:i,l=r.adaptive,d=l===void 0?!0:l,p=r.roundOffsets,f=p===void 0?!0:p,h={placement:On(t.placement),variation:Ks(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,wv(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:d,roundOffsets:f})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,wv(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:f})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const SR={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:wR,data:{}};var $a={passive:!0};function _R(e){var t=e.state,r=e.instance,i=e.options,o=i.scroll,l=o===void 0?!0:o,d=i.resize,p=d===void 0?!0:d,f=en(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return l&&h.forEach(function(g){g.addEventListener("scroll",r.update,$a)}),p&&f.addEventListener("resize",r.update,$a),function(){l&&h.forEach(function(g){g.removeEventListener("scroll",r.update,$a)}),p&&f.removeEventListener("resize",r.update,$a)}}const jR={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_R,data:{}};var CR={left:"right",right:"left",bottom:"top",top:"bottom"};function Ja(e){return e.replace(/left|right|bottom|top/g,function(t){return CR[t]})}var ER={start:"end",end:"start"};function Sv(e){return e.replace(/start|end/g,function(t){return ER[t]})}function Bf(e){var t=en(e),r=t.pageXOffset,i=t.pageYOffset;return{scrollLeft:r,scrollTop:i}}function qf(e){return Ws(Ir(e)).left+Bf(e).scrollLeft}function RR(e,t){var r=en(e),i=Ir(e),o=r.visualViewport,l=i.clientWidth,d=i.clientHeight,p=0,f=0;if(o){l=o.width,d=o.height;var h=Ux();(h||!h&&t==="fixed")&&(p=o.offsetLeft,f=o.offsetTop)}return{width:l,height:d,x:p+qf(e),y:f}}function NR(e){var t,r=Ir(e),i=Bf(e),o=(t=e.ownerDocument)==null?void 0:t.body,l=Jr(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),d=Jr(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),p=-i.scrollLeft+qf(e),f=-i.scrollTop;return or(o||r).direction==="rtl"&&(p+=Jr(r.clientWidth,o?o.clientWidth:0)-l),{width:l,height:d,x:p,y:f}}function Hf(e){var t=or(e),r=t.overflow,i=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+i)}function Hx(e){return["html","body","#document"].indexOf(Pr(e))>=0?e.ownerDocument.body:Tn(e)&&Hf(e)?e:Hx(Ul(e))}function ti(e,t){var r;t===void 0&&(t=[]);var i=Hx(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=en(i),d=o?[l].concat(l.visualViewport||[],Hf(i)?i:[]):i,p=t.concat(d);return o?p:p.concat(ti(Ul(d)))}function Vd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function kR(e,t){var r=Ws(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function _v(e,t,r){return t===Fx?Vd(RR(e,r)):rs(t)?kR(t,r):Vd(NR(Ir(e)))}function OR(e){var t=ti(Ul(e)),r=["absolute","fixed"].indexOf(or(e).position)>=0,i=r&&Tn(e)?vi(e):e;return rs(i)?t.filter(function(o){return rs(o)&&zx(o,i)&&Pr(o)!=="body"}):[]}function TR(e,t,r,i){var o=t==="clippingParents"?OR(e):[].concat(t),l=[].concat(o,[r]),d=l[0],p=l.reduce(function(f,h){var g=_v(e,h,i);return f.top=Jr(g.top,f.top),f.right=bl(g.right,f.right),f.bottom=bl(g.bottom,f.bottom),f.left=Jr(g.left,f.left),f},_v(e,d,i));return p.width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p}function Wx(e){var t=e.reference,r=e.element,i=e.placement,o=i?On(i):null,l=i?Ks(i):null,d=t.x+t.width/2-r.width/2,p=t.y+t.height/2-r.height/2,f;switch(o){case Vt:f={x:d,y:t.y-r.height};break;case ln:f={x:d,y:t.y+t.height};break;case cn:f={x:t.x+t.width,y:p};break;case Bt:f={x:t.x-r.width,y:p};break;default:f={x:t.x,y:t.y}}var h=o?Vf(o):null;if(h!=null){var g=h==="y"?"height":"width";switch(l){case qs:f[h]=f[h]-(t[g]/2-r[g]/2);break;case oi:f[h]=f[h]+(t[g]/2-r[g]/2);break}}return f}function ii(e,t){t===void 0&&(t={});var r=t,i=r.placement,o=i===void 0?e.placement:i,l=r.strategy,d=l===void 0?e.strategy:l,p=r.boundary,f=p===void 0?eR:p,h=r.rootBoundary,g=h===void 0?Fx:h,y=r.elementContext,x=y===void 0?Wo:y,w=r.altBoundary,_=w===void 0?!1:w,S=r.padding,b=S===void 0?0:S,C=Bx(typeof b!="number"?b:qx(b,gi)),R=x===Wo?tR:Wo,N=e.rects.popper,P=e.elements[_?R:x],k=TR(rs(P)?P:P.contextElement||Ir(e.elements.popper),f,g,d),O=Ws(e.elements.reference),T=Wx({reference:O,element:N,placement:o}),D=Vd(Object.assign({},N,T)),K=x===Wo?D:O,U={top:k.top-K.top+C.top,bottom:K.bottom-k.bottom+C.bottom,left:k.left-K.left+C.left,right:K.right-k.right+C.right},W=e.modifiersData.offset;if(x===Wo&&W){var H=W[o];Object.keys(U).forEach(function(X){var oe=[cn,ln].indexOf(X)>=0?1:-1,re=[Vt,ln].indexOf(X)>=0?"y":"x";U[X]+=H[re]*oe})}return U}function PR(e,t){t===void 0&&(t={});var r=t,i=r.placement,o=r.boundary,l=r.rootBoundary,d=r.padding,p=r.flipVariations,f=r.allowedAutoPlacements,h=f===void 0?Lx:f,g=Ks(i),y=g?p?xv:xv.filter(function(_){return Ks(_)===g}):gi,x=y.filter(function(_){return h.indexOf(_)>=0});x.length===0&&(x=y);var w=x.reduce(function(_,S){return _[S]=ii(e,{placement:S,boundary:o,rootBoundary:l,padding:d})[On(S)],_},{});return Object.keys(w).sort(function(_,S){return w[_]-w[S]})}function IR(e){if(On(e)===Lf)return[];var t=Ja(e);return[Sv(e),t,Sv(t)]}function AR(e){var t=e.state,r=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var o=r.mainAxis,l=o===void 0?!0:o,d=r.altAxis,p=d===void 0?!0:d,f=r.fallbackPlacements,h=r.padding,g=r.boundary,y=r.rootBoundary,x=r.altBoundary,w=r.flipVariations,_=w===void 0?!0:w,S=r.allowedAutoPlacements,b=t.options.placement,C=On(b),R=C===b,N=f||(R||!_?[Ja(b)]:IR(b)),P=[b].concat(N).reduce(function(ae,ue){return ae.concat(On(ue)===Lf?PR(t,{placement:ue,boundary:g,rootBoundary:y,padding:h,flipVariations:_,allowedAutoPlacements:S}):ue)},[]),k=t.rects.reference,O=t.rects.popper,T=new Map,D=!0,K=P[0],U=0;U<P.length;U++){var W=P[U],H=On(W),X=Ks(W)===qs,oe=[Vt,ln].indexOf(H)>=0,re=oe?"width":"height",se=ii(t,{placement:W,boundary:g,rootBoundary:y,altBoundary:x,padding:h}),pe=oe?X?cn:Bt:X?ln:Vt;k[re]>O[re]&&(pe=Ja(pe));var q=Ja(pe),ne=[];if(l&&ne.push(se[H]<=0),p&&ne.push(se[pe]<=0,se[q]<=0),ne.every(function(ae){return ae})){K=W,D=!1;break}T.set(W,ne)}if(D)for(var I=_?3:1,B=function(ue){var le=P.find(function(de){var me=T.get(de);if(me)return me.slice(0,ue).every(function(Ne){return Ne})});if(le)return K=le,"break"},Y=I;Y>0;Y--){var ie=B(Y);if(ie==="break")break}t.placement!==K&&(t.modifiersData[i]._skip=!0,t.placement=K,t.reset=!0)}}const MR={name:"flip",enabled:!0,phase:"main",fn:AR,requiresIfExists:["offset"],data:{_skip:!1}};function jv(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Cv(e){return[Vt,cn,ln,Bt].some(function(t){return e[t]>=0})}function DR(e){var t=e.state,r=e.name,i=t.rects.reference,o=t.rects.popper,l=t.modifiersData.preventOverflow,d=ii(t,{elementContext:"reference"}),p=ii(t,{altBoundary:!0}),f=jv(d,i),h=jv(p,o,l),g=Cv(f),y=Cv(h);t.modifiersData[r]={referenceClippingOffsets:f,popperEscapeOffsets:h,isReferenceHidden:g,hasPopperEscaped:y},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":g,"data-popper-escaped":y})}const $R={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:DR};function FR(e,t,r){var i=On(e),o=[Bt,Vt].indexOf(i)>=0?-1:1,l=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,d=l[0],p=l[1];return d=d||0,p=(p||0)*o,[Bt,cn].indexOf(i)>=0?{x:p,y:d}:{x:d,y:p}}function LR(e){var t=e.state,r=e.options,i=e.name,o=r.offset,l=o===void 0?[0,0]:o,d=Lx.reduce(function(g,y){return g[y]=FR(y,t.rects,l),g},{}),p=d[t.placement],f=p.x,h=p.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=f,t.modifiersData.popperOffsets.y+=h),t.modifiersData[i]=d}const UR={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:LR};function zR(e){var t=e.state,r=e.name;t.modifiersData[r]=Wx({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const VR={name:"popperOffsets",enabled:!0,phase:"read",fn:zR,data:{}};function BR(e){return e==="x"?"y":"x"}function qR(e){var t=e.state,r=e.options,i=e.name,o=r.mainAxis,l=o===void 0?!0:o,d=r.altAxis,p=d===void 0?!1:d,f=r.boundary,h=r.rootBoundary,g=r.altBoundary,y=r.padding,x=r.tether,w=x===void 0?!0:x,_=r.tetherOffset,S=_===void 0?0:_,b=ii(t,{boundary:f,rootBoundary:h,padding:y,altBoundary:g}),C=On(t.placement),R=Ks(t.placement),N=!R,P=Vf(C),k=BR(P),O=t.modifiersData.popperOffsets,T=t.rects.reference,D=t.rects.popper,K=typeof S=="function"?S(Object.assign({},t.rects,{placement:t.placement})):S,U=typeof K=="number"?{mainAxis:K,altAxis:K}:Object.assign({mainAxis:0,altAxis:0},K),W=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(O){if(l){var X,oe=P==="y"?Vt:Bt,re=P==="y"?ln:cn,se=P==="y"?"height":"width",pe=O[P],q=pe+b[oe],ne=pe-b[re],I=w?-D[se]/2:0,B=R===qs?T[se]:D[se],Y=R===qs?-D[se]:-T[se],ie=t.elements.arrow,ae=w&&ie?zf(ie):{width:0,height:0},ue=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Vx(),le=ue[oe],de=ue[re],me=ei(0,T[se],ae[se]),Ne=N?T[se]/2-I-me-le-U.mainAxis:B-me-le-U.mainAxis,rt=N?-T[se]/2+I+me+de+U.mainAxis:Y+me+de+U.mainAxis,st=t.elements.arrow&&vi(t.elements.arrow),Ae=st?P==="y"?st.clientTop||0:st.clientLeft||0:0,He=(X=W?.[P])!=null?X:0,Z=pe+Ne-He-Ae,te=pe+rt-He,Pe=ei(w?bl(q,Z):q,pe,w?Jr(ne,te):ne);O[P]=Pe,H[P]=Pe-pe}if(p){var Ee,bt=P==="x"?Vt:Bt,ct=P==="x"?ln:cn,Fe=O[k],pt=k==="y"?"height":"width",Ct=Fe+b[bt],Ar=Fe-b[ct],$n=[Vt,Bt].indexOf(C)!==-1,Mr=(Ee=W?.[k])!=null?Ee:0,Oe=$n?Ct:Fe-T[pt]-D[pt]-Mr+U.altAxis,Ht=$n?Fe+T[pt]+D[pt]-Mr-U.altAxis:Ar,bn=w&&$n?hR(Oe,Fe,Ht):ei(w?Oe:Ct,Fe,w?Ht:Ar);O[k]=bn,H[k]=bn-Fe}t.modifiersData[i]=H}}const HR={name:"preventOverflow",enabled:!0,phase:"main",fn:qR,requiresIfExists:["offset"]};function WR(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function KR(e){return e===en(e)||!Tn(e)?Bf(e):WR(e)}function GR(e){var t=e.getBoundingClientRect(),r=Hs(t.width)/e.offsetWidth||1,i=Hs(t.height)/e.offsetHeight||1;return r!==1||i!==1}function YR(e,t,r){r===void 0&&(r=!1);var i=Tn(t),o=Tn(t)&&GR(t),l=Ir(t),d=Ws(e,o,r),p={scrollLeft:0,scrollTop:0},f={x:0,y:0};return(i||!i&&!r)&&((Pr(t)!=="body"||Hf(l))&&(p=KR(t)),Tn(t)?(f=Ws(t,!0),f.x+=t.clientLeft,f.y+=t.clientTop):l&&(f.x=qf(l))),{x:d.left+p.scrollLeft-f.x,y:d.top+p.scrollTop-f.y,width:d.width,height:d.height}}function QR(e){var t=new Map,r=new Set,i=[];e.forEach(function(l){t.set(l.name,l)});function o(l){r.add(l.name);var d=[].concat(l.requires||[],l.requiresIfExists||[]);d.forEach(function(p){if(!r.has(p)){var f=t.get(p);f&&o(f)}}),i.push(l)}return e.forEach(function(l){r.has(l.name)||o(l)}),i}function XR(e){var t=QR(e);return dR.reduce(function(r,i){return r.concat(t.filter(function(o){return o.phase===i}))},[])}function JR(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function ZR(e){var t=e.reduce(function(r,i){var o=r[i.name];return r[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,r},{});return Object.keys(t).map(function(r){return t[r]})}var Ev={placement:"bottom",modifiers:[],strategy:"absolute"};function Rv(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function eN(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,i=r===void 0?[]:r,o=t.defaultOptions,l=o===void 0?Ev:o;return function(p,f,h){h===void 0&&(h=l);var g={placement:"bottom",orderedModifiers:[],options:Object.assign({},Ev,l),modifiersData:{},elements:{reference:p,popper:f},attributes:{},styles:{}},y=[],x=!1,w={state:g,setOptions:function(C){var R=typeof C=="function"?C(g.options):C;S(),g.options=Object.assign({},l,g.options,R),g.scrollParents={reference:rs(p)?ti(p):p.contextElement?ti(p.contextElement):[],popper:ti(f)};var N=XR(ZR([].concat(i,g.options.modifiers)));return g.orderedModifiers=N.filter(function(P){return P.enabled}),_(),w.update()},forceUpdate:function(){if(!x){var C=g.elements,R=C.reference,N=C.popper;if(Rv(R,N)){g.rects={reference:YR(R,vi(N),g.options.strategy==="fixed"),popper:zf(N)},g.reset=!1,g.placement=g.options.placement,g.orderedModifiers.forEach(function(U){return g.modifiersData[U.name]=Object.assign({},U.data)});for(var P=0;P<g.orderedModifiers.length;P++){if(g.reset===!0){g.reset=!1,P=-1;continue}var k=g.orderedModifiers[P],O=k.fn,T=k.options,D=T===void 0?{}:T,K=k.name;typeof O=="function"&&(g=O({state:g,options:D,name:K,instance:w})||g)}}}},update:JR(function(){return new Promise(function(b){w.forceUpdate(),b(g)})}),destroy:function(){S(),x=!0}};if(!Rv(p,f))return w;w.setOptions(h).then(function(b){!x&&h.onFirstUpdate&&h.onFirstUpdate(b)});function _(){g.orderedModifiers.forEach(function(b){var C=b.name,R=b.options,N=R===void 0?{}:R,P=b.effect;if(typeof P=="function"){var k=P({state:g,name:C,instance:w,options:N}),O=function(){};y.push(k||O)}})}function S(){y.forEach(function(b){return b()}),y=[]}return w}}const tN=eN({defaultModifiers:[$R,VR,SR,jR,UR,MR,HR,yR]}),nN=["enabled","placement","strategy","modifiers"];function rN(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}const sN={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},oN={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:({state:e})=>()=>{const{reference:t,popper:r}=e.elements;if("removeAttribute"in t){const i=(t.getAttribute("aria-describedby")||"").split(",").filter(o=>o.trim()!==r.id);i.length?t.setAttribute("aria-describedby",i.join(",")):t.removeAttribute("aria-describedby")}},fn:({state:e})=>{var t;const{popper:r,reference:i}=e.elements,o=(t=r.getAttribute("role"))==null?void 0:t.toLowerCase();if(r.id&&o==="tooltip"&&"setAttribute"in i){const l=i.getAttribute("aria-describedby");if(l&&l.split(",").indexOf(r.id)!==-1)return;i.setAttribute("aria-describedby",l?`${l},${r.id}`:r.id)}}},iN=[];function Kx(e,t,r={}){let{enabled:i=!0,placement:o="bottom",strategy:l="absolute",modifiers:d=iN}=r,p=rN(r,nN);const f=j.useRef(d),h=j.useRef(),g=j.useCallback(()=>{var b;(b=h.current)==null||b.update()},[]),y=j.useCallback(()=>{var b;(b=h.current)==null||b.forceUpdate()},[]),[x,w]=ZE(j.useState({placement:o,update:g,forceUpdate:y,attributes:{},styles:{popper:{},arrow:{}}})),_=j.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:b})=>{const C={},R={};Object.keys(b.elements).forEach(N=>{C[N]=b.styles[N],R[N]=b.attributes[N]}),w({state:b,styles:C,attributes:R,update:g,forceUpdate:y,placement:b.placement})}}),[g,y,w]),S=j.useMemo(()=>(Zo(f.current,d)||(f.current=d),f.current),[d]);return j.useEffect(()=>{!h.current||!i||h.current.setOptions({placement:o,strategy:l,modifiers:[...S,_,sN]})},[l,o,_,i,S]),j.useEffect(()=>{if(!(!i||e==null||t==null))return h.current=tN(e,t,Object.assign({},p,{placement:o,strategy:l,modifiers:[...S,oN,_]})),()=>{h.current!=null&&(h.current.destroy(),h.current=void 0,w(b=>Object.assign({},b,{attributes:{},styles:{popper:{}}})))}},[i,e,t]),x}function ai(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var ad,Nv;function aN(){if(Nv)return ad;Nv=1;var e=function(){};return ad=e,ad}var lN=aN();const cN=Js(lN),kv=()=>{};function uN(e){return e.button===0}function dN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Za=e=>e&&("current"in e?e.current:e),Ov={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Gx(e,t=kv,{disabled:r,clickTrigger:i="click"}={}){const o=j.useRef(!1),l=j.useRef(!1),d=j.useCallback(h=>{const g=Za(e);cN(!!g,"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=!g||dN(h)||!uN(h)||!!ai(g,h.target)||l.current,l.current=!1},[e]),p=tt(h=>{const g=Za(e);g&&ai(g,h.target)&&(l.current=!0)}),f=tt(h=>{o.current||t(h)});j.useEffect(()=>{var h,g;if(r||e==null)return;const y=eo(Za(e)),x=y.defaultView||window;let w=(h=x.event)!=null?h:(g=x.parent)==null?void 0:g.event,_=null;Ov[i]&&(_=Jn(y,Ov[i],p,!0));const S=Jn(y,i,d,!0),b=Jn(y,i,R=>{if(R===w){w=void 0;return}f(R)});let C=[];return"ontouchstart"in y.documentElement&&(C=[].slice.call(y.body.children).map(R=>Jn(R,"mousemove",kv))),()=>{_?.(),S(),b(),C.forEach(R=>R())}},[e,r,i,d,p,f])}function fN(e){const t={};return Array.isArray(e)?(e?.forEach(r=>{t[r.name]=r}),t):e||t}function pN(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Yx({enabled:e,enableEvents:t,placement:r,flip:i,offset:o,fixed:l,containerPadding:d,arrowElement:p,popperConfig:f={}}){var h,g,y,x,w;const _=fN(f.modifiers);return Object.assign({},f,{placement:r,enabled:e,strategy:l?"fixed":f.strategy,modifiers:pN(Object.assign({},_,{eventListeners:{enabled:t,options:(h=_.eventListeners)==null?void 0:h.options},preventOverflow:Object.assign({},_.preventOverflow,{options:d?Object.assign({padding:d},(g=_.preventOverflow)==null?void 0:g.options):(y=_.preventOverflow)==null?void 0:y.options}),offset:{options:Object.assign({offset:o},(x=_.offset)==null?void 0:x.options)},arrow:Object.assign({},_.arrow,{enabled:!!p,options:Object.assign({},(w=_.arrow)==null?void 0:w.options,{element:p})}),flip:Object.assign({enabled:!!i},_.flip)}))})}const hN=["children"];function mN(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}const gN=()=>{};function Qx(e={}){const t=j.useContext(Ll),[r,i]=yl(),o=j.useRef(!1),{flip:l,offset:d,rootCloseEvent:p,fixed:f=!1,placement:h,popperConfig:g={},enableEventListeners:y=!0,usePopper:x=!!t}=e,w=t?.show==null?!!e.show:t.show;w&&!o.current&&(o.current=!0);const _=O=>{t?.toggle(!1,O)},{placement:S,setMenu:b,menuElement:C,toggleElement:R}=t||{},N=Kx(R,C,Yx({placement:h||S||"bottom-start",enabled:x,enableEvents:y??w,offset:d,flip:l,fixed:f,arrowElement:r,popperConfig:g})),P=Object.assign({ref:b||gN,"aria-labelledby":R?.id},N.attributes.popper,{style:N.styles.popper}),k={show:w,placement:S,hasShown:o.current,toggle:t?.toggle,popper:x?N:null,arrowProps:x?Object.assign({ref:i},N.attributes.arrow,{style:N.styles.arrow}):{}};return Gx(C,_,{clickTrigger:p,disabled:!w}),[P,k]}const vN={usePopper:!0};function Wf(e){let{children:t}=e,r=mN(e,hN);const[i,o]=Qx(r);return c.jsx(c.Fragment,{children:t(i,o)})}Wf.displayName="DropdownMenu";Wf.defaultProps=vN;const Xx=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},Tv=()=>{};function Jx(){const e=vx(),{show:t=!1,toggle:r=Tv,setToggle:i,menuElement:o}=j.useContext(Ll)||{},l=j.useCallback(p=>{r(!t,p)},[t,r]),d={id:e,ref:i||Tv,onClick:l,"aria-expanded":!!t};return o&&Xx(o)&&(d["aria-haspopup"]=!0),[d,{show:t,toggle:r}]}function Zx({children:e}){const[t,r]=Jx();return c.jsx(c.Fragment,{children:e(t,r)})}Zx.displayName="DropdownToggle";const yN=["eventKey","disabled","onClick","active","as"];function xN(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function eb({key:e,href:t,active:r,disabled:i,onClick:o}){const l=j.useContext(sr),d=j.useContext(Fl),{activeKey:p}=d||{},f=ts(e,t),h=r==null&&e!=null?ts(p)===f:r;return[{onClick:tt(y=>{i||(o?.(y),l&&!y.isPropagationStopped()&&l(f,y))}),"aria-disabled":i||void 0,"aria-selected":h,[no("dropdown-item")]:""},{isActive:h}]}const tb=j.forwardRef((e,t)=>{let{eventKey:r,disabled:i,onClick:o,active:l,as:d=If}=e,p=xN(e,yN);const[f]=eb({key:r,href:p.href,disabled:i,onClick:o,active:l});return c.jsx(d,Object.assign({},p,{ref:t},f))});tb.displayName="DropdownItem";const nb=j.createContext(to?window:void 0);nb.Provider;function zl(){return j.useContext(nb)}function Pv(){const e=kx(),t=j.useRef(null),r=j.useCallback(i=>{t.current=i,e()},[e]);return[t,r]}function yi({defaultShow:e,show:t,onSelect:r,onToggle:i,itemSelector:o=`* [${no("dropdown-item")}]`,focusFirstItemOnShow:l,placement:d="bottom-start",children:p}){const f=zl(),[h,g]=mx(t,e,i),[y,x]=Pv(),w=y.current,[_,S]=Pv(),b=_.current,C=Ax(h),R=j.useRef(null),N=j.useRef(!1),P=j.useContext(sr),k=j.useCallback((W,H,X=H?.type)=>{g(W,{originalEvent:H,source:X})},[g]),O=tt((W,H)=>{r?.(W,H),k(!1,H,"select"),H.isPropagationStopped()||P?.(W,H)}),T=j.useMemo(()=>({toggle:k,placement:d,show:h,menuElement:w,toggleElement:b,setMenu:x,setToggle:S}),[k,d,h,w,b,x,S]);w&&C&&!h&&(N.current=w.contains(w.ownerDocument.activeElement));const D=tt(()=>{b&&b.focus&&b.focus()}),K=tt(()=>{const W=R.current;let H=l;if(H==null&&(H=y.current&&Xx(y.current)?"keyboard":!1),H===!1||H==="keyboard"&&!/^key.+$/.test(W))return;const X=Yn(y.current,o)[0];X&&X.focus&&X.focus()});j.useEffect(()=>{h?K():N.current&&(N.current=!1,D())},[h,N,D,K]),j.useEffect(()=>{R.current=null});const U=(W,H)=>{if(!y.current)return null;const X=Yn(y.current,o);let oe=X.indexOf(W)+H;return oe=Math.max(0,Math.min(oe,X.length)),X[oe]};return $E(j.useCallback(()=>f.document,[f]),"keydown",W=>{var H,X;const{key:oe}=W,re=W.target,se=(H=y.current)==null?void 0:H.contains(re),pe=(X=_.current)==null?void 0:X.contains(re);if(/input|textarea/i.test(re.tagName)&&(oe===" "||oe!=="Escape"&&se||oe==="Escape"&&re.type==="search")||!se&&!pe||oe==="Tab"&&(!y.current||!h))return;R.current=W.type;const ne={originalEvent:W,source:W.type};switch(oe){case"ArrowUp":{const I=U(re,-1);I&&I.focus&&I.focus(),W.preventDefault();return}case"ArrowDown":if(W.preventDefault(),!h)g(!0,ne);else{const I=U(re,1);I&&I.focus&&I.focus()}return;case"Tab":Rf(re.ownerDocument,"keyup",I=>{var B;(I.key==="Tab"&&!I.target||!((B=y.current)!=null&&B.contains(I.target)))&&g(!1,ne)},{once:!0});break;case"Escape":oe==="Escape"&&(W.preventDefault(),W.stopPropagation()),g(!1,ne);break}}),c.jsx(sr.Provider,{value:O,children:c.jsx(Ll.Provider,{value:T,children:p})})}yi.displayName="Dropdown";yi.Menu=Wf;yi.Toggle=Zx;yi.Item=tb;const Kf=j.createContext({});Kf.displayName="DropdownContext";const rb=j.forwardRef(({className:e,bsPrefix:t,as:r="hr",role:i="separator",...o},l)=>(t=ze(t,"dropdown-divider"),c.jsx(r,{ref:l,className:Te(e,t),role:i,...o})));rb.displayName="DropdownDivider";const sb=j.forwardRef(({className:e,bsPrefix:t,as:r="div",role:i="heading",...o},l)=>(t=ze(t,"dropdown-header"),c.jsx(r,{ref:l,className:Te(e,t),role:i,...o})));sb.displayName="DropdownHeader";const ob=j.forwardRef(({bsPrefix:e,className:t,eventKey:r,disabled:i=!1,onClick:o,active:l,as:d=$f,...p},f)=>{const h=ze(e,"dropdown-item"),[g,y]=eb({key:r,href:p.href,disabled:i,onClick:o,active:l});return c.jsx(d,{...p,...g,ref:f,className:Te(t,h,y.isActive&&"active",i&&"disabled")})});ob.displayName="DropdownItem";const ib=j.forwardRef(({className:e,bsPrefix:t,as:r="span",...i},o)=>(t=ze(t,"dropdown-item-text"),c.jsx(r,{ref:o,className:Te(e,t),...i})));ib.displayName="DropdownItemText";const Gf=j.createContext(null);Gf.displayName="InputGroupContext";function ab(e,t){return e}function lb(e,t,r){const i=r?"top-end":"top-start",o=r?"top-start":"top-end",l=r?"bottom-end":"bottom-start",d=r?"bottom-start":"bottom-end",p=r?"right-start":"left-start",f=r?"right-end":"left-end",h=r?"left-start":"right-start",g=r?"left-end":"right-end";let y=e?d:l;return t==="up"?y=e?o:i:t==="end"?y=e?g:h:t==="start"?y=e?f:p:t==="down-centered"?y="bottom":t==="up-centered"&&(y="top"),y}const cb=j.forwardRef(({bsPrefix:e,className:t,align:r,rootCloseEvent:i,flip:o=!0,show:l,renderOnMount:d,as:p="div",popperConfig:f,variant:h,...g},y)=>{let x=!1;const w=j.useContext(Af),_=ze(e,"dropdown-menu"),{align:S,drop:b,isRTL:C}=j.useContext(Kf);r=r||S;const R=j.useContext(Gf),N=[];if(r)if(typeof r=="object"){const W=Object.keys(r);if(W.length){const H=W[0],X=r[H];x=X==="start",N.push(`${_}-${H}-${X}`)}}else r==="end"&&(x=!0);const P=lb(x,b,C),[k,{hasShown:O,popper:T,show:D,toggle:K}]=Qx({flip:o,rootCloseEvent:i,show:l,usePopper:!w&&N.length===0,offset:[0,2],popperConfig:f,placement:P});if(k.ref=Mn(ab(y),k.ref),xl(()=>{D&&T?.update()},[D]),!O&&!d&&!R)return null;typeof p!="string"&&(k.show=D,k.close=()=>K?.(!1),k.align=r);let U=g.style;return T!=null&&T.placement&&(U={...g.style,...k.style},g["x-placement"]=T.placement),c.jsx(p,{...g,...k,style:U,...(N.length||w)&&{"data-bs-popper":"static"},className:Te(t,_,D&&"show",x&&`${_}-end`,h&&`${_}-${h}`,...N)})});cb.displayName="DropdownMenu";const ub=j.forwardRef(({as:e,bsPrefix:t,variant:r="primary",size:i,active:o=!1,disabled:l=!1,className:d,...p},f)=>{const h=ze(t,"btn"),[g,{tagName:y}]=Pf({tagName:e,disabled:l,...p}),x=y;return c.jsx(x,{...g,...p,ref:f,disabled:l,className:Te(d,h,o&&"active",r&&`${h}-${r}`,i&&`${h}-${i}`,p.href&&l&&"disabled")})});ub.displayName="Button";const db=j.forwardRef(({bsPrefix:e,split:t,className:r,childBsPrefix:i,as:o=ub,...l},d)=>{const p=ze(e,"dropdown-toggle"),f=j.useContext(Ll);i!==void 0&&(l.bsPrefix=i);const[h]=Jx();return h.ref=Mn(h.ref,ab(d)),c.jsx(o,{className:Te(r,p,t&&`${p}-split`,f?.show&&"show"),...h,...l})});db.displayName="DropdownToggle";const fb=j.forwardRef((e,t)=>{const{bsPrefix:r,drop:i="down",show:o,className:l,align:d="start",onSelect:p,onToggle:f,focusFirstItemOnShow:h,as:g="div",navbar:y,autoClose:x=!0,...w}=$l(e,{show:"onToggle"}),_=j.useContext(Gf),S=ze(r,"dropdown"),b=Dl(),C=T=>x===!1?T==="click":x==="inside"?T!=="rootClose":x==="outside"?T!=="select":!0,R=tt((T,D)=>{var K,U;!((K=D.originalEvent)==null||(U=K.target)==null)&&U.classList.contains("dropdown-toggle")&&D.source==="mousedown"||(D.originalEvent.currentTarget===document&&(D.source!=="keydown"||D.originalEvent.key==="Escape")&&(D.source="rootClose"),C(D.source)&&f?.(T,D))}),P=lb(d==="end",i,b),k=j.useMemo(()=>({align:d,drop:i,isRTL:b}),[d,i,b]),O={down:S,"down-centered":`${S}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return c.jsx(Kf.Provider,{value:k,children:c.jsx(yi,{placement:P,show:o,onSelect:p,onToggle:R,focusFirstItemOnShow:h,itemSelector:`.${S}-item:not(.disabled):not(:disabled)`,children:_?w.children:c.jsx(g,{...w,ref:t,className:Te(l,o&&"show",O[i])})})})});fb.displayName="Dropdown";const Fa=Object.assign(fb,{Toggle:db,Menu:cb,Item:ob,ItemText:ib,Divider:rb,Header:sb});var La;function Iv(e){if((!La&&La!==0||e)&&to){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),La=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return La}function bN(e){const t=j.useRef(e);return t.current=e,t}function Yf(e){const t=bN(e);j.useEffect(()=>()=>t.current(),[])}function ld(e){e===void 0&&(e=eo());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function wN(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const Av=no("modal-open");class Qf{constructor({ownerDocument:t,handleContainerOverflow:r=!0,isRTL:i=!1}={}){this.handleContainerOverflow=r,this.isRTL=i,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return wN(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const r={overflow:"hidden"},i=this.isRTL?"paddingLeft":"paddingRight",o=this.getElement();t.style={overflow:o.style.overflow,[i]:o.style[i]},t.scrollBarWidth&&(r[i]=`${parseInt(tr(o,i)||"0",10)+t.scrollBarWidth}px`),o.setAttribute(Av,""),tr(o,r)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const r=this.getElement();r.removeAttribute(Av),Object.assign(r.style,t.style)}add(t){let r=this.modals.indexOf(t);return r!==-1||(r=this.modals.length,this.modals.push(t),this.setModalAttributes(t),r!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),r}remove(t){const r=this.modals.indexOf(t);r!==-1&&(this.modals.splice(r,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 cd=(e,t)=>to?e==null?(t||eo()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Bd(e,t){const r=zl(),[i,o]=j.useState(()=>cd(e,r?.document));if(!i){const l=cd(e);l&&o(l)}return j.useEffect(()=>{},[t,i]),j.useEffect(()=>{const l=cd(e);l!==i&&o(l)},[e,i]),i}function SN({in:e,onTransition:t}){const r=j.useRef(null),i=j.useRef(!0),o=tt(t);return xl(()=>{if(!r.current)return;let l=!1;return o({in:e,element:r.current,initial:i.current,isStale:()=>l}),()=>{l=!0}},[e,o]),xl(()=>(i.current=!1,()=>{i.current=!0}),[]),r}function _N({children:e,in:t,onExited:r,onEntered:i,transition:o}){const[l,d]=j.useState(!t);t&&l&&d(!1);const p=SN({in:!!t,onTransition:h=>{const g=()=>{h.isStale()||(h.in?i?.(h.element,h.initial):(d(!0),r?.(h.element)))};Promise.resolve(o(h)).then(g,y=>{throw h.in||d(!0),y})}}),f=Mn(p,e.ref);return l&&!t?null:j.cloneElement(e,{ref:f})}function qd(e,t,r){return e?c.jsx(e,Object.assign({},r)):t?c.jsx(_N,Object.assign({},r,{transition:t})):c.jsx(jf,Object.assign({},r))}function pb(e){return e.code==="Escape"||e.keyCode===27}const jN=["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 CN(e,t){if(e==null)return{};var r={},i=Object.keys(e),o,l;for(l=0;l<i.length;l++)o=i[l],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}let ud;function EN(e){return ud||(ud=new Qf({ownerDocument:e?.document})),ud}function RN(e){const t=zl(),r=e||EN(t),i=j.useRef({dialog:null,backdrop:null});return Object.assign(i.current,{add:()=>r.add(i.current),remove:()=>r.remove(i.current),isTopModal:()=>r.isTopModal(i.current),setDialogRef:j.useCallback(o=>{i.current.dialog=o},[]),setBackdropRef:j.useCallback(o=>{i.current.backdrop=o},[])})}const hb=j.forwardRef((e,t)=>{let{show:r=!1,role:i="dialog",className:o,style:l,children:d,backdrop:p=!0,keyboard:f=!0,onBackdropClick:h,onEscapeKeyDown:g,transition:y,runTransition:x,backdropTransition:w,runBackdropTransition:_,autoFocus:S=!0,enforceFocus:b=!0,restoreFocus:C=!0,restoreFocusOptions:R,renderDialog:N,renderBackdrop:P=te=>c.jsx("div",Object.assign({},te)),manager:k,container:O,onShow:T,onHide:D=()=>{},onExit:K,onExited:U,onExiting:W,onEnter:H,onEntering:X,onEntered:oe}=e,re=CN(e,jN);const se=zl(),pe=Bd(O),q=RN(k),ne=Df(),I=Ax(r),[B,Y]=j.useState(!r),ie=j.useRef(null);j.useImperativeHandle(t,()=>q,[q]),to&&!I&&r&&(ie.current=ld(se?.document)),r&&B&&Y(!1);const ae=tt(()=>{if(q.add(),rt.current=Jn(document,"keydown",me),Ne.current=Jn(document,"focus",()=>setTimeout(le),!0),T&&T(),S){var te,Pe;const Ee=ld((te=(Pe=q.dialog)==null?void 0:Pe.ownerDocument)!=null?te:se?.document);q.dialog&&Ee&&!ai(q.dialog,Ee)&&(ie.current=Ee,q.dialog.focus())}}),ue=tt(()=>{if(q.remove(),rt.current==null||rt.current(),Ne.current==null||Ne.current(),C){var te;(te=ie.current)==null||te.focus==null||te.focus(R),ie.current=null}});j.useEffect(()=>{!r||!pe||ae()},[r,pe,ae]),j.useEffect(()=>{B&&ue()},[B,ue]),Yf(()=>{ue()});const le=tt(()=>{if(!b||!ne()||!q.isTopModal())return;const te=ld(se?.document);q.dialog&&te&&!ai(q.dialog,te)&&q.dialog.focus()}),de=tt(te=>{te.target===te.currentTarget&&(h?.(te),p===!0&&D())}),me=tt(te=>{f&&pb(te)&&q.isTopModal()&&(g?.(te),te.defaultPrevented||D())}),Ne=j.useRef(),rt=j.useRef(),st=(...te)=>{Y(!0),U?.(...te)};if(!pe)return null;const Ae=Object.assign({role:i,ref:q.setDialogRef,"aria-modal":i==="dialog"?!0:void 0},re,{style:l,className:o,tabIndex:-1});let He=N?N(Ae):c.jsx("div",Object.assign({},Ae,{children:j.cloneElement(d,{role:"document"})}));He=qd(y,x,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!r,onExit:K,onExiting:W,onExited:st,onEnter:H,onEntering:X,onEntered:oe,children:He});let Z=null;return p&&(Z=P({ref:q.setBackdropRef,onClick:de}),Z=qd(w,_,{in:!!r,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Z})),c.jsx(c.Fragment,{children:Qr.createPortal(c.jsxs(c.Fragment,{children:[Z,He]}),pe)})});hb.displayName="Modal";const NN=Object.assign(hb,{Manager:Qf});function Hd(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function kN(e,t){e.classList?e.classList.add(t):Hd(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function Mv(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function ON(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=Mv(e.className,t):e.setAttribute("class",Mv(e.className&&e.className.baseVal||"",t))}const As={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class TN extends Qf{adjustAndStore(t,r,i){const o=r.style[t];r.dataset[t]=o,tr(r,{[t]:`${parseFloat(tr(r,t))+i}px`})}restore(t,r){const i=r.dataset[t];i!==void 0&&(delete r.dataset[t],tr(r,{[t]:i}))}setContainerStyle(t){super.setContainerStyle(t);const r=this.getElement();if(kN(r,"modal-open"),!t.scrollBarWidth)return;const i=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Yn(r,As.FIXED_CONTENT).forEach(l=>this.adjustAndStore(i,l,t.scrollBarWidth)),Yn(r,As.STICKY_CONTENT).forEach(l=>this.adjustAndStore(o,l,-t.scrollBarWidth)),Yn(r,As.NAVBAR_TOGGLER).forEach(l=>this.adjustAndStore(o,l,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const r=this.getElement();ON(r,"modal-open");const i=this.isRTL?"paddingLeft":"paddingRight",o=this.isRTL?"marginLeft":"marginRight";Yn(r,As.FIXED_CONTENT).forEach(l=>this.restore(i,l)),Yn(r,As.STICKY_CONTENT).forEach(l=>this.restore(o,l)),Yn(r,As.NAVBAR_TOGGLER).forEach(l=>this.restore(o,l))}}let dd;function PN(e){return dd||(dd=new TN(e)),dd}const mb=j.forwardRef(({className:e,bsPrefix:t,as:r="div",...i},o)=>(t=ze(t,"modal-body"),c.jsx(r,{ref:o,className:Te(e,t),...i})));mb.displayName="ModalBody";const gb=j.createContext({onHide(){}}),Xf=j.forwardRef(({bsPrefix:e,className:t,contentClassName:r,centered:i,size:o,fullscreen:l,children:d,scrollable:p,...f},h)=>{e=ze(e,"modal");const g=`${e}-dialog`,y=typeof l=="string"?`${e}-fullscreen-${l}`:`${e}-fullscreen`;return c.jsx("div",{...f,ref:h,className:Te(g,t,o&&`${e}-${o}`,i&&`${g}-centered`,p&&`${g}-scrollable`,l&&y),children:c.jsx("div",{className:Te(`${e}-content`,r),children:d})})});Xf.displayName="ModalDialog";const vb=j.forwardRef(({className:e,bsPrefix:t,as:r="div",...i},o)=>(t=ze(t,"modal-footer"),c.jsx(r,{ref:o,className:Te(e,t),...i})));vb.displayName="ModalFooter";const IN={"aria-label":ve.string,onClick:ve.func,variant:ve.oneOf(["white"])},Jf=j.forwardRef(({className:e,variant:t,"aria-label":r="Close",...i},o)=>c.jsx("button",{ref:o,type:"button",className:Te("btn-close",t&&`btn-close-${t}`,e),"aria-label":r,...i}));Jf.displayName="CloseButton";Jf.propTypes=IN;const AN=j.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:r=!1,onHide:i,children:o,...l},d)=>{const p=j.useContext(gb),f=tt(()=>{p?.onHide(),i?.()});return c.jsxs("div",{ref:d,...l,children:[o,r&&c.jsx(Jf,{"aria-label":e,variant:t,onClick:f})]})}),yb=j.forwardRef(({bsPrefix:e,className:t,closeLabel:r="Close",closeButton:i=!1,...o},l)=>(e=ze(e,"modal-header"),c.jsx(AN,{ref:l,...o,className:Te(t,e),closeLabel:r,closeButton:i})));yb.displayName="ModalHeader";const MN=(e=>j.forwardRef((t,r)=>c.jsx("div",{...t,ref:r,className:Te(t.className,e)}))),DN=MN("h4"),xb=j.forwardRef(({className:e,bsPrefix:t,as:r=DN,...i},o)=>(t=ze(t,"modal-title"),c.jsx(r,{ref:o,className:Te(e,t),...i})));xb.displayName="ModalTitle";function $N(e){return c.jsx(ns,{...e,timeout:null})}function FN(e){return c.jsx(ns,{...e,timeout:null})}const bb=j.forwardRef(({bsPrefix:e,className:t,style:r,dialogClassName:i,contentClassName:o,children:l,dialogAs:d=Xf,"data-bs-theme":p,"aria-labelledby":f,"aria-describedby":h,"aria-label":g,show:y=!1,animation:x=!0,backdrop:w=!0,keyboard:_=!0,onEscapeKeyDown:S,onShow:b,onHide:C,container:R,autoFocus:N=!0,enforceFocus:P=!0,restoreFocus:k=!0,restoreFocusOptions:O,onEntered:T,onExit:D,onExiting:K,onEnter:U,onEntering:W,onExited:H,backdropClassName:X,manager:oe,...re},se)=>{const[pe,q]=j.useState({}),[ne,I]=j.useState(!1),B=j.useRef(!1),Y=j.useRef(!1),ie=j.useRef(null),[ae,ue]=yl(),le=Mn(se,ue),de=tt(C),me=Dl();e=ze(e,"modal");const Ne=j.useMemo(()=>({onHide:de}),[de]);function rt(){return oe||PN({isRTL:me})}function st(Oe){if(!to)return;const Ht=rt().getScrollbarWidth()>0,bn=Oe.scrollHeight>eo(Oe).documentElement.clientHeight;q({paddingRight:Ht&&!bn?Iv():void 0,paddingLeft:!Ht&&bn?Iv():void 0})}const Ae=tt(()=>{ae&&st(ae.dialog)});Yf(()=>{Ud(window,"resize",Ae),ie.current==null||ie.current()});const He=()=>{B.current=!0},Z=Oe=>{B.current&&ae&&Oe.target===ae.dialog&&(Y.current=!0),B.current=!1},te=()=>{I(!0),ie.current=Sx(ae.dialog,()=>{I(!1)})},Pe=Oe=>{Oe.target===Oe.currentTarget&&te()},Ee=Oe=>{if(w==="static"){Pe(Oe);return}if(Y.current||Oe.target!==Oe.currentTarget){Y.current=!1;return}C?.()},bt=Oe=>{_?S?.(Oe):(Oe.preventDefault(),w==="static"&&te())},ct=(Oe,Ht)=>{Oe&&st(Oe),U?.(Oe,Ht)},Fe=Oe=>{ie.current==null||ie.current(),D?.(Oe)},pt=(Oe,Ht)=>{W?.(Oe,Ht),Rf(window,"resize",Ae)},Ct=Oe=>{Oe&&(Oe.style.display=""),H?.(Oe),Ud(window,"resize",Ae)},Ar=j.useCallback(Oe=>c.jsx("div",{...Oe,className:Te(`${e}-backdrop`,X,!x&&"show")}),[x,X,e]),$n={...r,...pe};$n.display="block";const Mr=Oe=>c.jsx("div",{role:"dialog",...Oe,style:$n,className:Te(t,e,ne&&`${e}-static`,!x&&"show"),onClick:w?Ee:void 0,onMouseUp:Z,"data-bs-theme":p,"aria-label":g,"aria-labelledby":f,"aria-describedby":h,children:c.jsx(d,{...re,onMouseDown:He,className:i,contentClassName:o,children:l})});return c.jsx(gb.Provider,{value:Ne,children:c.jsx(NN,{show:y,ref:le,backdrop:w,container:R,keyboard:!0,autoFocus:N,enforceFocus:P,restoreFocus:k,restoreFocusOptions:O,onEscapeKeyDown:bt,onShow:b,onHide:C,onEnter:ct,onEntering:pt,onEntered:T,onExit:Fe,onExiting:K,onExited:Ct,manager:rt(),transition:x?$N:void 0,backdropTransition:x?FN:void 0,renderBackdrop:Ar,renderDialog:Mr})})});bb.displayName="Modal";const De=Object.assign(bb,{Body:mb,Header:yb,Title:xb,Footer:vb,Dialog:Xf,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),LN=Xe.forwardRef(({children:e,onClick:t},r)=>c.jsx("a",{className:"btn btn-secondary d-flex flex-column justify-content-center flex-grow-1",href:"",ref:r,onClick:i=>{i.preventDefault(),t(i)},children:c.jsx("span",{className:"dropdown-toggle",children:e})}));function UN({requestId:e,grantNumber:t}){const{request:r,toggleActionsModal:i}=At(e,t),{project:o}=Zt(t||r.grantNumber);if(!r||!o||r.error||o.error)return;const l=Re.routes.request_action_path(e,"new"),d=r.allowedActions.Renewal?Array.isArray(r.allowedActions.Renewal)?[...r.allowedActions.Renewal]:[r.allowedActions.Renewal]:[];d.sort((g,y)=>g.opportunityId<y.opportunityId?-1:1);const p=[],f=KE(r,d);p.push({id:"extension",action:`${l}?action_type=Extension`,isEnabled:"Extension"in r.allowedActions,button:"Request an Extension",enabled:r.usesCredits?c.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."}):c.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:c.jsxs("p",{children:["Your project is not currently eligible for an extension of its end date.",r.usesCredits?c.jsxs(c.Fragment,{children:[" ","Extensions can be requested starting 90 days before your project's current end date."]}):null]})}),f.isEnabled?p.push({id:"upgrade",action:Re.routes.renew_request_path(e,{opportunity_id:f.opportunityId}),method:"post",isEnabled:!0,button:"Request an upgrade",enabled:c.jsxs("p",{children:["Running low on credits well before your project's end date? You could be ready for the next level. Upgrade your ",r.allocationType," allocation to ",f.allocationType,"!"]})}):p.push({id:"supplement",action:`${l}?action_type=Supplement`,isEnabled:"Supplement"in r.allowedActions,button:"Request a Supplement",enabled:r.usesCredits?c.jsxs("p",{children:["Need more credits to complete your project? Great news! Your"," ",r.allocationType," project is eligible for a supplement of"," ",{Explore:"200,000",Discover:"750,000",Accelerate:"1,500,000"}[r.allocationType]," ","additional ACCESS credits."]}):c.jsxs("p",{children:["Need more units to complete your research? Great news! Your"," ",r.allocationType," project is eligible for a supplement of additional units."]}),disabled:c.jsxs("p",{children:["Your project is not currently eligible for a supplement of additional"," ",r.usesCredits?"ACCESS Credits":"units","."]})}),p.push({id:"renewal",action:d.map(g=>[g.opportunityName,`${Re.routes.renew_request_path(e)}?opportunity_id=${g.opportunityId}`,"post"]),isEnabled:f.isRenewalEnabled,button:"Request a Renewal",enabled:c.jsxs("p",{children:["Your ",r.allocationType," project can be renewed! The requirements for renewing your project depend on the"," ",c.jsx("a",{href:Re.routes.project_types_path(),target:"_blank",children:"new project type you select"}),"."]}),disabled:c.jsxs("p",{children:["Your project is not currently eligible for renewal.",r.usesCredits&&c.jsxs(c.Fragment,{children:[" ","Renewals are available starting 30 days before the project's current end date."]}),r.isMaximize&&c.jsxs(c.Fragment,{children:[" ","You can submit a renewal request to the Maximize ACCESS opportunity closest to your project's current end date."]})]})}),p.sort((g,y)=>g.isEnabled<y.isEnabled?1:-1),p.push({id:"help",action:[["Learn How to Manage Allocations",Re.routes.how_to_path(),"get"],["Open a Help Ticket","https://support.access-ci.org/open-a-ticket","get"]],isEnabled:!0,button:"Request Help",enabled:c.jsxs("p",{children:["Need to change something else about your project or expecting another option? Submit a help ticket that includes"," ",c.jsxs("em",{children:["grant number ",o.grantNumber]})," and a detailed description of the problem."]})});const h=p.map(({id:g,action:y,isEnabled:x,button:w,enabled:_,disabled:S,method:b})=>c.jsxs("div",{className:"row",children:[c.jsx("div",{className:"col-sm-4 mb-2 d-grid",children:Array.isArray(y)&&y.length&&x?c.jsxs(Fa,{className:"d-flex flex-column",children:[c.jsx(Fa.Toggle,{as:LN,children:w}),c.jsx(Fa.Menu,{children:y.map(([C,R,N])=>c.jsx(Fa.Item,{href:R,"data-method":N,children:C},R))})]}):c.jsx("a",{className:`btn btn-secondary d-flex flex-column justify-content-center ${x?"":"disabled"}`,href:x?y:"","data-method":b,children:c.jsx("span",{children:w})})}),c.jsx("div",{className:"col-sm-8 mb-2",children:x?_:S})]},g));return c.jsxs(De,{size:"lg",show:r.showActionsModal,onHide:i,children:[c.jsx(De.Header,{closeButton:!0,children:c.jsx(De.Title,{children:"Manage Your Project"})}),c.jsxs(De.Body,{children:[c.jsxs("p",{children:["Please select an action to manage your project"," ",c.jsxs("strong",{children:[o.grantNumber,": ",o.title]}),"."]}),h]})]})}function zN({requestId:e,grantNumber:t}){const{request:r,toggleActionsModal:i,toggleConfirmModal:o}=At(e,t),{project:l}=Zt(t||r.grantNumber);if(!r||!l||r.error||l.error)return;const d=r.usesCredits?"credits":"units",p=(1-ex(r))*100;return c.jsxs(De,{size:"lg",show:r.showConfirmModal,onHide:o,scrollable:!0,children:[c.jsx(De.Header,{closeButton:!0,children:c.jsx(De.Title,{children:"Consider Requesting an Exchange"})}),c.jsx(De.Body,{children:c.jsxs("p",{children:[c.jsxs("strong",{children:[Math.round(p),"% of your allocation is unused."]})," ","Are you sure you want to request more ",d,"? You can exchange"," ",r.usesCredits?"credits for resources or ":""," one resource for another by changing the ",c.jsx("strong",{children:"balance"})," numbers in the table on the previous screen."]})}),c.jsx(De.Footer,{children:c.jsxs("div",{className:"d-flex",children:[c.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Return to Exchange"}),c.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{o(),i()},children:["Request More ",d]})]})})]})}function VN({requestId:e,grantNumber:t,actionId:r}){const{deleteAction:i,request:o,toggleDeleteModal:l}=At(e,t);if(!o||o.error)return;const d=o.actions.find(x=>x.actionId==r);if(!d)return;const{deleteStatus:p,isRequest:f}=d,h=p==yt.pending,g=p==yt.error,y=()=>l(r);return c.jsxs(De,{show:d.showDeleteModal,onHide:y,scrollable:!0,children:[c.jsx(De.Header,{closeButton:!0,children:c.jsx(De.Title,{children:"Confirm Deletion"})}),c.jsxs(De.Body,{children:[g&&c.jsxs(Ye,{color:"danger",children:["Deletion of the ",f?"request":"action"," failed."]}),c.jsxs("p",{children:["Are you sure you want to delete"," ",!f&&c.jsxs(c.Fragment,{children:["action"," ",c.jsxs("strong",{children:[d.type,": ",Ls(d.date)]})," ","on"," "]}),"request ",c.jsx("strong",{children:gf(o)}),"? Deletions cannot be undone."]})]}),c.jsx(De.Footer,{children:c.jsxs("div",{className:"d-flex",children:[c.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:y,disabled:h,children:"Cancel"}),c.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>i(r),disabled:h,children:h?"Deleting...":"Delete"})]})})]})}function Gs({color:e="primary",href:t,icon:r,onClick:i,target:o,title:l,type:d="button"}){const p=c.jsx("i",{className:`bi bi-${r}`}),f={className:`btn btn-sm ms-1 text-${e}`,href:t,onClick:i,style:{"--bs-btn-padding-x":"0.1rem","--bs-btn-padding-y":"0.1rem","--bs-btn-line-height":"1"},target:o,title:l};return t?c.jsx("a",{...f,children:p}):c.jsx("button",{...f,type:d,children:p})}function wb({action:e,request:t,toggleDeleteModal:r}){const i=e.allowedOperations||[],o=["Exchange","Transfer"].includes(e.type),l=[];i.includes("Edit")&&!o&&l.push(c.jsx(Gs,{href:e.isRequest?Re.routes.edit_request_path(t.requestId):Re.routes.edit_request_action_path(t.requestId,e.actionId),icon:"pencil",title:"Edit action"},"edit")),i.includes("Delete")&&!o&&l.push(c.jsx(Gs,{color:"danger",icon:"trash",onClick:()=>r(e.actionId),title:"Edit action"},"delete"));const d=`${e.type}: ${Ls(e.date)}`;return c.jsxs(c.Fragment,{children:[e.detailAvailable&&!o?c.jsx("a",{href:Re.routes.request_action_path(t.requestId,e.actionId),children:d}):d,l]})}function Xn({resource:e,userGuide:t=!0}){const{full:r,short:i}=hi(e.name),o=i?c.jsx("abbr",{title:r,children:i}):r;return c.jsxs(c.Fragment,{children:[er(Re.resourceTypeIcons[e.icon])," ",o,!e.isCredit&&e.userGuideUrl&&t?c.jsx(Gs,{icon:"book",href:e.userGuideUrl,target:"_blank",title:`${e.name} User Guide`}):null]})}function Ys({status:e,title:t}){const r={Active:"primary",Approved:"primary",New:"secondary",Pending:"secondary","Under Review":"secondary","Returned for Corrections":"secondary"}[e]||"dark";return c.jsx("span",{className:`badge text-bg-${r} align-self-center`,title:t,children:e})}const BN=e=>c.jsx("span",{className:e<0?"text-danger":"",children:e===0?"":e.toLocaleString()});function qN({requestId:e,grantNumber:t}){const{request:r,toggleDeleteModal:i}=At(e,t),{project:o,setRequest:l}=Zt(t||r.grantNumber);if(!r||!o)return;const d=o.requestsList;let p=0;for(;p<d.length&&d[p].requestId!==e;)p++;const f=d[p+1],h=d[p-1],g=(S,b)=>S?c.jsxs("button",{type:"button",className:"btn btn-light btn-sm",onClick:()=>l(S.requestId),children:[b=="prev"?c.jsx("i",{className:"bi bi-chevron-left"}):null,gf(S),b=="next"?c.jsx("i",{className:"bi bi-chevron-right"}):null]}):c.jsx("span",{}),y=new Set,x=[];for(let S of r.actions)for(let b of S.resources)y.has(b.resourceId)||(y.add(b.resourceId),x.push(b));x.sort(fl);const w=[{key:"action",name:"Action Details",format:(S,b)=>c.jsx(wb,{action:b,request:r,toggleDeleteModal:i})},{key:"status",name:"Status",format:S=>c.jsx(Ys,{status:S})},...x.map(S=>({key:`resource${S.resourceId}`,name:S.name,icon:S.icon,class:"text-end",format:S.isBoolean?b=>b?vf(b):null:BN,formatHeader:(b,C)=>c.jsx(Xn,{resource:C,userGuide:!1})}))],_=r.actions.map(S=>{const b={...S};for(let{resourceId:C}of x)b[`resource${C}`]=0;for(let{resourceId:C,approved:R,requested:N}of S.resources)b[`resource${C}`]=R||N||0;return b});return c.jsxs("div",{className:"history",children:[c.jsx(An,{columns:w,rows:_}),c.jsxs("div",{className:"buttons d-flex justify-content-between",children:[g(f,"prev"),g(h,"next")]})]})}function HN({requestId:e,grantNumber:t}){const{request:r,toggleDeleteModal:i}=At(e,t);if(!r)return;const o=[{key:"type",name:"Action Details",format:(l,d)=>c.jsx(wb,{action:d,request:r,toggleDeleteModal:i})},{key:"status",name:"Status",format:l=>c.jsx(Ys,{status:l})}];if(r.actions&&r.actions.length)return c.jsx(An,{rows:r.actions,columns:o})}function Ko(...e){return e.filter(t=>t!=null).reduce((t,r)=>{if(typeof r!="function")throw new Error("Invalid Argument Type, must only provide functions, undefined, or null.");return t===null?r:function(...o){t.apply(this,o),r.apply(this,o)}},null)}const WN={height:["marginTop","marginBottom"],width:["marginLeft","marginRight"]};function KN(e,t){const r=`offset${e[0].toUpperCase()}${e.slice(1)}`,i=t[r],o=WN[e];return i+parseInt(tr(t,o[0]),10)+parseInt(tr(t,o[1]),10)}const GN={[kr]:"collapse",[gl]:"collapsing",[Gn]:"collapsing",[Or]:"collapse show"},YN=Xe.forwardRef(({onEnter:e,onEntering:t,onEntered:r,onExit:i,onExiting:o,className:l,children:d,dimension:p="height",in:f=!1,timeout:h=300,mountOnEnter:g=!1,unmountOnExit:y=!1,appear:x=!1,getDimensionValue:w=KN,..._},S)=>{const b=typeof p=="function"?p():p,C=j.useMemo(()=>Ko(O=>{O.style[b]="0"},e),[b,e]),R=j.useMemo(()=>Ko(O=>{const T=`scroll${b[0].toUpperCase()}${b.slice(1)}`;O.style[b]=`${O[T]}px`},t),[b,t]),N=j.useMemo(()=>Ko(O=>{O.style[b]=null},r),[b,r]),P=j.useMemo(()=>Ko(O=>{O.style[b]=`${w(b,O)}px`,jx(O)},i),[i,w,b]),k=j.useMemo(()=>Ko(O=>{O.style[b]=null},o),[b,o]);return c.jsx(Cx,{ref:S,addEndListener:_x,..._,"aria-expanded":_.role?f:null,onEnter:C,onEntering:R,onEntered:N,onExit:P,onExiting:k,childRef:d.ref,in:f,timeout:h,mountOnEnter:g,unmountOnExit:y,appear:x,children:(O,T)=>Xe.cloneElement(d,{...T,className:Te(l,d.props.className,GN[O],b==="width"&&"collapse-horizontal")})})});function Sb(e,t){return Array.isArray(e)?e.includes(t):e===t}const xi=j.createContext({});xi.displayName="AccordionContext";const Zf=j.forwardRef(({as:e="div",bsPrefix:t,className:r,children:i,eventKey:o,...l},d)=>{const{activeEventKey:p}=j.useContext(xi);return t=ze(t,"accordion-collapse"),c.jsx(YN,{ref:d,in:Sb(p,o),...l,className:Te(r,t),children:c.jsx(e,{children:j.Children.only(i)})})});Zf.displayName="AccordionCollapse";const Vl=j.createContext({eventKey:""});Vl.displayName="AccordionItemContext";const _b=j.forwardRef(({as:e="div",bsPrefix:t,className:r,onEnter:i,onEntering:o,onEntered:l,onExit:d,onExiting:p,onExited:f,...h},g)=>{t=ze(t,"accordion-body");const{eventKey:y}=j.useContext(Vl);return c.jsx(Zf,{eventKey:y,onEnter:i,onEntering:o,onEntered:l,onExit:d,onExiting:p,onExited:f,children:c.jsx(e,{ref:g,...h,className:Te(r,t)})})});_b.displayName="AccordionBody";function QN(e,t){const{activeEventKey:r,onSelect:i,alwaysOpen:o}=j.useContext(xi);return l=>{let d=e===r?null:e;o&&(Array.isArray(r)?r.includes(e)?d=r.filter(p=>p!==e):d=[...r,e]:d=[e]),i?.(d,l),t?.(l)}}const ep=j.forwardRef(({as:e="button",bsPrefix:t,className:r,onClick:i,...o},l)=>{t=ze(t,"accordion-button");const{eventKey:d}=j.useContext(Vl),p=QN(d,i),{activeEventKey:f}=j.useContext(xi);return e==="button"&&(o.type="button"),c.jsx(e,{ref:l,onClick:p,...o,"aria-expanded":Array.isArray(f)?f.includes(d):d===f,className:Te(r,t,!Sb(f,d)&&"collapsed")})});ep.displayName="AccordionButton";const jb=j.forwardRef(({as:e="h2",bsPrefix:t,className:r,children:i,onClick:o,...l},d)=>(t=ze(t,"accordion-header"),c.jsx(e,{ref:d,...l,className:Te(r,t),children:c.jsx(ep,{onClick:o,children:i})})));jb.displayName="AccordionHeader";const Cb=j.forwardRef(({as:e="div",bsPrefix:t,className:r,eventKey:i,...o},l)=>{t=ze(t,"accordion-item");const d=j.useMemo(()=>({eventKey:i}),[i]);return c.jsx(Vl.Provider,{value:d,children:c.jsx(e,{ref:l,...o,className:Te(r,t)})})});Cb.displayName="AccordionItem";const Eb=j.forwardRef((e,t)=>{const{as:r="div",activeKey:i,bsPrefix:o,className:l,onSelect:d,flush:p,alwaysOpen:f,...h}=$l(e,{activeKey:"onSelect"}),g=ze(o,"accordion"),y=j.useMemo(()=>({activeEventKey:i,onSelect:d,alwaysOpen:f}),[i,d,f]);return c.jsx(xi.Provider,{value:y,children:c.jsx(r,{ref:t,...h,className:Te(l,g,p&&`${g}-flush`)})})});Eb.displayName="Accordion";const el=Object.assign(Eb,{Button:ep,Collapse:Zf,Item:Cb,Header:jb,Body:_b}),Wd=2**31-1;function Rb(e,t,r){const i=r-Date.now();e.current=i<=Wd?setTimeout(t,i):setTimeout(()=>Rb(e,t,r),Wd)}function XN(){const e=Df(),t=j.useRef();return Yf(()=>clearTimeout(t.current)),j.useMemo(()=>{const r=()=>clearTimeout(t.current);function i(o,l=0){e()&&(r(),l<=Wd?t.current=setTimeout(o,l):Rb(t,o,Date.now()+l))}return{set:i,clear:r,handleRef:t}},[])}const JN=()=>{};function ZN(e,t,{disabled:r,clickTrigger:i}={}){const o=t||JN;Gx(e,o,{disabled:r,clickTrigger:i});const l=tt(d=>{pb(d)&&o(d)});j.useEffect(()=>{if(r||e==null)return;const d=eo(Za(e));let p=(d.defaultView||window).event;const f=Jn(d,"keyup",h=>{if(h===p){p=void 0;return}l(h)});return()=>{f()}},[e,r,l])}const Nb=j.forwardRef((e,t)=>{const{flip:r,offset:i,placement:o,containerPadding:l,popperConfig:d={},transition:p,runTransition:f}=e,[h,g]=yl(),[y,x]=yl(),w=Mn(g,t),_=Bd(e.container),S=Bd(e.target),[b,C]=j.useState(!e.show),R=Kx(S,h,Yx({placement:o,enableEvents:!!e.show,containerPadding:l||5,flip:r,offset:i,arrowElement:y,popperConfig:d}));e.show&&b&&C(!1);const N=(...W)=>{C(!0),e.onExited&&e.onExited(...W)},P=e.show||!b;if(ZN(h,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!P)return null;const{onExit:k,onExiting:O,onEnter:T,onEntering:D,onEntered:K}=e;let U=e.children(Object.assign({},R.attributes.popper,{style:R.styles.popper,ref:w}),{popper:R,placement:o,show:!!e.show,arrowProps:Object.assign({},R.attributes.arrow,{style:R.styles.arrow,ref:x})});return U=qd(p,f,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:U,onExit:k,onExiting:O,onExited:N,onEnter:T,onEntering:D,onEntered:K}),_?Qr.createPortal(U,_):null});Nb.displayName="Overlay";const kb=j.forwardRef(({className:e,bsPrefix:t,as:r="div",...i},o)=>(t=ze(t,"popover-header"),c.jsx(r,{ref:o,className:Te(e,t),...i})));kb.displayName="PopoverHeader";const tp=j.forwardRef(({className:e,bsPrefix:t,as:r="div",...i},o)=>(t=ze(t,"popover-body"),c.jsx(r,{ref:o,className:Te(e,t),...i})));tp.displayName="PopoverBody";function Ob(e,t){let r=e;return e==="left"?r=t?"end":"start":e==="right"&&(r=t?"start":"end"),r}function Tb(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const ek=j.forwardRef(({bsPrefix:e,placement:t="right",className:r,style:i,children:o,body:l,arrowProps:d,hasDoneInitialMeasure:p,popper:f,show:h,...g},y)=>{const x=ze(e,"popover"),w=Dl(),[_]=t?.split("-")||[],S=Ob(_,w);let b=i;return h&&!p&&(b={...i,...Tb(f?.strategy)}),c.jsxs("div",{ref:y,role:"tooltip",style:b,"x-placement":_,className:Te(r,x,_&&`bs-popover-${S}`),...g,children:[c.jsx("div",{className:"popover-arrow",...d}),l?c.jsx(tp,{children:o}):o]})}),tk=Object.assign(ek,{Header:kb,Body:tp,POPPER_OFFSET:[0,8]}),Pb=j.forwardRef(({bsPrefix:e,placement:t="right",className:r,style:i,children:o,arrowProps:l,hasDoneInitialMeasure:d,popper:p,show:f,...h},g)=>{e=ze(e,"tooltip");const y=Dl(),[x]=t?.split("-")||[],w=Ob(x,y);let _=i;return f&&!d&&(_={...i,...Tb(p?.strategy)}),c.jsxs("div",{ref:g,style:_,role:"tooltip","x-placement":x,className:Te(r,e,`bs-tooltip-${w}`),...h,children:[c.jsx("div",{className:"tooltip-arrow",...l}),c.jsx("div",{className:`${e}-inner`,children:o})]})});Pb.displayName="Tooltip";const Bl=Object.assign(Pb,{TOOLTIP_OFFSET:[0,6]});function nk(e){const t=j.useRef(null),r=ze(void 0,"popover"),i=ze(void 0,"tooltip"),o=j.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(Hd(t.current,r))return tk.POPPER_OFFSET;if(Hd(t.current,i))return Bl.TOOLTIP_OFFSET}return[0,0]}}}),[e,r,i]);return[t,[o]]}function rk(e,t){const{ref:r}=e,{ref:i}=t;e.ref=r.__wrapped||(r.__wrapped=o=>r(vl(o))),t.ref=i.__wrapped||(i.__wrapped=o=>i(vl(o)))}const np=j.forwardRef(({children:e,transition:t=ns,popperConfig:r={},rootClose:i=!1,placement:o="top",show:l=!1,...d},p)=>{const f=j.useRef({}),[h,g]=j.useState(null),[y,x]=nk(d.offset),w=Mn(p,y),_=t===!0?ns:t||void 0,S=tt(b=>{g(b),r==null||r.onFirstUpdate==null||r.onFirstUpdate(b)});return xl(()=>{h&&d.target&&(f.current.scheduleUpdate==null||f.current.scheduleUpdate())},[h,d.target]),j.useEffect(()=>{l||g(null)},[l]),c.jsx(Nb,{...d,ref:w,popperConfig:{...r,modifiers:x.concat(r.modifiers||[]),onFirstUpdate:S},transition:_,rootClose:i,placement:o,show:l,children:(b,{arrowProps:C,popper:R,show:N})=>{var P,k;rk(b,C);const O=R?.placement,T=Object.assign(f.current,{state:R?.state,scheduleUpdate:R?.update,placement:O,outOfBoundaries:(R==null||(P=R.state)==null||(k=P.modifiersData.hide)==null?void 0:k.isReferenceHidden)||!1,strategy:r.strategy}),D=!!h;return typeof e=="function"?e({...b,placement:O,show:N,...!t&&N&&{className:"show"},popper:T,arrowProps:C,hasDoneInitialMeasure:D}):j.cloneElement(e,{...b,placement:O,arrowProps:C,popper:T,hasDoneInitialMeasure:D,className:Te(e.props.className,!t&&N&&"show"),style:{...e.props.style,...b.style}})}})});np.displayName="Overlay";function sk(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function Dv(e,t,r){const[i]=t,o=i.currentTarget,l=i.relatedTarget||i.nativeEvent[r];(!l||l!==o)&&!ai(o,l)&&e(...t)}ve.oneOf(["click","hover","focus"]);const rp=({trigger:e=["hover","focus"],overlay:t,children:r,popperConfig:i={},show:o,defaultShow:l=!1,onToggle:d,delay:p,placement:f,flip:h=f&&f.indexOf("auto")!==-1,...g})=>{const y=j.useRef(null),x=Mn(y,r.ref),w=XN(),_=j.useRef(""),[S,b]=Nx(o,l,d),C=sk(p),{onFocus:R,onBlur:N,onClick:P}=typeof r!="function"?j.Children.only(r).props:{},k=re=>{x(vl(re))},O=j.useCallback(()=>{if(w.clear(),_.current="show",!C.show){b(!0);return}w.set(()=>{_.current==="show"&&b(!0)},C.show)},[C.show,b,w]),T=j.useCallback(()=>{if(w.clear(),_.current="hide",!C.hide){b(!1);return}w.set(()=>{_.current==="hide"&&b(!1)},C.hide)},[C.hide,b,w]),D=j.useCallback((...re)=>{O(),R?.(...re)},[O,R]),K=j.useCallback((...re)=>{T(),N?.(...re)},[T,N]),U=j.useCallback((...re)=>{b(!S),P?.(...re)},[P,b,S]),W=j.useCallback((...re)=>{Dv(O,re,"fromElement")},[O]),H=j.useCallback((...re)=>{Dv(T,re,"toElement")},[T]),X=e==null?[]:[].concat(e),oe={ref:k};return X.indexOf("click")!==-1&&(oe.onClick=U),X.indexOf("focus")!==-1&&(oe.onFocus=D,oe.onBlur=K),X.indexOf("hover")!==-1&&(oe.onMouseOver=W,oe.onMouseOut=H),c.jsxs(c.Fragment,{children:[typeof r=="function"?r(oe):j.cloneElement(r,oe),c.jsx(np,{...g,show:S,onHide:T,flip:h,placement:f,popperConfig:i,target:y.current,children:t})]})};function ok({requestId:e,grantNumber:t}){const{request:r}=At(e,t),{project:i}=Zt(t||r.grantNumber),{setTab:o}=Zt(t||r.grantNumber);if(!r||!i)return;let l;const d={};for(let x of i.users||[])for(let w of x.resourceIds)d[w]=d[w]||0,d[w]+=1;const p=(r.resources||[]).filter(x=>x.isCredit?(l=x,!1):x.allocated>0).map((x,w)=>({...x,userCount:d[x.resourceId]||0,color:Od[w%Od.length]})),f=l?l.allocated:0,h="Exchange"in r.allowedActions,g=r.exchangeActionId!==null,y=[{key:"name",name:"Resource",format:(x,w)=>c.jsx(Xn,{resource:w})},{key:"isActive",name:"Status",format:x=>c.jsx(Ys,{status:x?"Active":"Inactive"})},{key:"used",name:"Balance",class:"position-relative",format:(x,w)=>{if(w.isBoolean)return vf(w.allocated);const _=w.allocated-x,S=Math.max(_,0)*100/w.allocated;return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:`usage bg-${w.color}`,style:{width:`${Math.min(S,100)}%`}}),It(_,{abbreviate:!0})," of"," ",It(w.allocated,{abbreviate:!0})," ",w.unit," ","remaining (",Math.round(S),"%)"]})}},{key:"endDate",name:"End Date",format:x=>Ls(x)}];return i.isManager&&y.push({key:"userCount",name:"Users",class:"text-end",format:It}),i.currentUser&&y.push({key:"resourceUsername",name:"My Username",format:(x,w)=>{const _=i.currentUser.resourceUsernames[w.resourceId];if(_)return _;if(i.currentUser.resourceAccountPendingIds.includes(w.resourceId))return c.jsx(Ys,{status:"Pending",title:"Creation of your account by the resource provider is pending."});if(i.currentUser.resourceIds.includes(w.resourceId)||!w.isActive)return c.jsx(c.Fragment,{children:"—"});if(i.isManager)return c.jsx("a",{href:"#",onClick:b=>{b.preventDefault(),o("users")},children:"Grant access"});const S=c.jsxs(Bl,{children:["Please contact ",yf(i)," to request access to this resource."]});return c.jsx(rp,{overlay:S,children:c.jsx("a",{href:"#",onClick:b=>{b.preventDefault()},children:"Request access"})})}}),c.jsxs("div",{className:"overview",children:[h&&!g&&f>Re.creditAlertThreshold?c.jsxs("button",{onClick:()=>o("resources"),className:"alert alert-info d-flex justify-content-between align-items-center w-100",children:[c.jsxs("span",{children:[c.jsxs("span",{className:"fs-3",children:[er(Re.resourceTypeIcons[l.icon])," ",It(f)]})," ",l.unit," available"]}),c.jsxs("span",{className:"align-middle d-flex align-items-center",children:["Exchange credits for resources!"," ",c.jsx("span",{className:"fs-3",children:er("chevron-right")})]})]}):null,p.length?c.jsx(An,{columns:y,rows:p}):null]})}const ik=[{key:"role",name:"Role",format:e=>c.jsxs(c.Fragment,{children:[er(Re.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((r,i)=>{const o=t.length-i;return`${r}${o>2?",":o==2&&t.length>1?" and":""}`}).join(" ")}}],ak=({requestId:e,grantNumber:t})=>{const{project:r}=Zt(t);if(!r)return;const i=Ml.map(({role:o,name:l})=>({role:l,users:(r.users||[]).filter(d=>d.role===o).map(d=>`${d.firstName} ${d.lastName}`)})).filter(o=>o.users.length>0);return i.length?c.jsx(An,{rows:i,columns:ik}):null};function lk({requestId:e,grantNumber:t}){const{request:r}=At(e,t),{project:i}=Zt(t||r.grantNumber);if(!(!r||!i||r.error||i.error)&&r)return c.jsxs("div",{className:"overview",children:[c.jsx(ok,{requestId:e,grantNumber:t}),i.isManager?c.jsxs("div",{className:"row",children:[c.jsx("div",{className:"col-lg-6",children:c.jsx(ak,{requestId:e,grantNumber:t})}),c.jsx("div",{className:"col-lg-6",children:c.jsx(HN,{requestId:e})})]}):null]})}function ss(e){"@babel/helpers - typeof";return ss=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},ss(e)}function ck(e,t){if(ss(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(ss(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ib(e){var t=ck(e,"string");return ss(t)=="symbol"?t:t+""}function $s(e,t,r){return(t=Ib(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,i)}return r}function be(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$v(Object(r),!0).forEach(function(i){$s(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$v(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function uk(e){if(Array.isArray(e))return e}function dk(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,o,l,d,p=[],f=!0,h=!1;try{if(l=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;f=!1}else for(;!(f=(i=l.call(r)).done)&&(p.push(i.value),p.length!==t);f=!0);}catch(g){h=!0,o=g}finally{try{if(!f&&r.return!=null&&(d=r.return(),Object(d)!==d))return}finally{if(h)throw o}}return p}}function Kd(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Ab(e,t){if(e){if(typeof e=="string")return Kd(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kd(e,t):void 0}}function fk(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xt(e,t){return uk(e)||dk(e,t)||Ab(e,t)||fk()}function Dn(e,t){if(e==null)return{};var r,i,o=Ef(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var pk=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Mb(e){var t=e.defaultInputValue,r=t===void 0?"":t,i=e.defaultMenuIsOpen,o=i===void 0?!1:i,l=e.defaultValue,d=l===void 0?null:l,p=e.inputValue,f=e.menuIsOpen,h=e.onChange,g=e.onInputChange,y=e.onMenuClose,x=e.onMenuOpen,w=e.value,_=Dn(e,pk),S=j.useState(p!==void 0?p:r),b=xt(S,2),C=b[0],R=b[1],N=j.useState(f!==void 0?f:o),P=xt(N,2),k=P[0],O=P[1],T=j.useState(w!==void 0?w:d),D=xt(T,2),K=D[0],U=D[1],W=j.useCallback(function(q,ne){typeof h=="function"&&h(q,ne),U(q)},[h]),H=j.useCallback(function(q,ne){var I;typeof g=="function"&&(I=g(q,ne)),R(I!==void 0?I:q)},[g]),X=j.useCallback(function(){typeof x=="function"&&x(),O(!0)},[x]),oe=j.useCallback(function(){typeof y=="function"&&y(),O(!1)},[y]),re=p!==void 0?p:C,se=f!==void 0?f:k,pe=w!==void 0?w:K;return be(be({},_),{},{inputValue:re,menuIsOpen:se,onChange:W,onInputChange:H,onMenuClose:oe,onMenuOpen:X,value:pe})}function hk(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fv(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Ib(i.key),i)}}function mk(e,t,r){return t&&Fv(e.prototype,t),r&&Fv(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function gk(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&&ml(e,t)}function wl(e){return wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wl(e)}function Db(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Db=function(){return!!e})()}function vk(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yk(e,t){if(t&&(ss(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vk(e)}function xk(e){var t=Db();return function(){var r,i=wl(e);if(t){var o=wl(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return yk(this,r)}}function bk(e){if(Array.isArray(e))return Kd(e)}function wk(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Sk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sp(e){return bk(e)||wk(e)||Ab(e)||Sk()}function _k(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 jk(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 Ck=(function(){function e(r){var i=this;this._insertTag=function(o){var l;i.tags.length===0?i.insertionPoint?l=i.insertionPoint.nextSibling:i.prepend?l=i.container.firstChild:l=i.before:l=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(o,l),i.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(i){i.forEach(this._insertTag)},t.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(jk(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var l=_k(o);try{l.insertRule(i,l.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(i));this.ctr++},t.flush=function(){this.tags.forEach(function(i){return i.parentNode&&i.parentNode.removeChild(i)}),this.tags=[],this.ctr=0},e})(),Ot="-ms-",Sl="-moz-",Le="-webkit-",$b="comm",op="rule",ip="decl",Ek="@import",Fb="@keyframes",Rk="@layer",Nk=Math.abs,ql=String.fromCharCode,kk=Object.assign;function Ok(e,t){return jt(e,0)^45?(((t<<2^jt(e,0))<<2^jt(e,1))<<2^jt(e,2))<<2^jt(e,3):0}function Lb(e){return e.trim()}function Tk(e,t){return(e=t.exec(e))?e[0]:e}function Ue(e,t,r){return e.replace(t,r)}function Gd(e,t){return e.indexOf(t)}function jt(e,t){return e.charCodeAt(t)|0}function li(e,t,r){return e.slice(t,r)}function Nn(e){return e.length}function ap(e){return e.length}function Ua(e,t){return t.push(e),e}function Pk(e,t){return e.map(t).join("")}var Hl=1,Qs=1,Ub=0,qt=0,lt=0,ro="";function Wl(e,t,r,i,o,l,d){return{value:e,root:t,parent:r,type:i,props:o,children:l,line:Hl,column:Qs,length:d,return:""}}function Go(e,t){return kk(Wl("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ik(){return lt}function Ak(){return lt=qt>0?jt(ro,--qt):0,Qs--,lt===10&&(Qs=1,Hl--),lt}function Qt(){return lt=qt<Ub?jt(ro,qt++):0,Qs++,lt===10&&(Qs=1,Hl++),lt}function Pn(){return jt(ro,qt)}function tl(){return qt}function bi(e,t){return li(ro,e,t)}function ci(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 zb(e){return Hl=Qs=1,Ub=Nn(ro=e),qt=0,[]}function Vb(e){return ro="",e}function nl(e){return Lb(bi(qt-1,Yd(e===91?e+2:e===40?e+1:e)))}function Mk(e){for(;(lt=Pn())&<<33;)Qt();return ci(e)>2||ci(lt)>3?"":" "}function Dk(e,t){for(;--t&&Qt()&&!(lt<48||lt>102||lt>57&<<65||lt>70&<<97););return bi(e,tl()+(t<6&&Pn()==32&&Qt()==32))}function Yd(e){for(;Qt();)switch(lt){case e:return qt;case 34:case 39:e!==34&&e!==39&&Yd(lt);break;case 40:e===41&&Yd(e);break;case 92:Qt();break}return qt}function $k(e,t){for(;Qt()&&e+lt!==57;)if(e+lt===84&&Pn()===47)break;return"/*"+bi(t,qt-1)+"*"+ql(e===47?e:Qt())}function Fk(e){for(;!ci(Pn());)Qt();return bi(e,qt)}function Lk(e){return Vb(rl("",null,null,null,[""],e=zb(e),0,[0],e))}function rl(e,t,r,i,o,l,d,p,f){for(var h=0,g=0,y=d,x=0,w=0,_=0,S=1,b=1,C=1,R=0,N="",P=o,k=l,O=i,T=N;b;)switch(_=R,R=Qt()){case 40:if(_!=108&&jt(T,y-1)==58){Gd(T+=Ue(nl(R),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:T+=nl(R);break;case 9:case 10:case 13:case 32:T+=Mk(_);break;case 92:T+=Dk(tl()-1,7);continue;case 47:switch(Pn()){case 42:case 47:Ua(Uk($k(Qt(),tl()),t,r),f);break;default:T+="/"}break;case 123*S:p[h++]=Nn(T)*C;case 125*S:case 59:case 0:switch(R){case 0:case 125:b=0;case 59+g:C==-1&&(T=Ue(T,/\f/g,"")),w>0&&Nn(T)-y&&Ua(w>32?Uv(T+";",i,r,y-1):Uv(Ue(T," ","")+";",i,r,y-2),f);break;case 59:T+=";";default:if(Ua(O=Lv(T,t,r,h,g,o,p,N,P=[],k=[],y),l),R===123)if(g===0)rl(T,t,O,O,P,l,y,p,k);else switch(x===99&&jt(T,3)===110?100:x){case 100:case 108:case 109:case 115:rl(e,O,O,i&&Ua(Lv(e,O,O,0,0,o,p,N,o,P=[],y),k),o,k,y,p,i?P:k);break;default:rl(T,O,O,O,[""],k,0,p,k)}}h=g=w=0,S=C=1,N=T="",y=d;break;case 58:y=1+Nn(T),w=_;default:if(S<1){if(R==123)--S;else if(R==125&&S++==0&&Ak()==125)continue}switch(T+=ql(R),R*S){case 38:C=g>0?1:(T+="\f",-1);break;case 44:p[h++]=(Nn(T)-1)*C,C=1;break;case 64:Pn()===45&&(T+=nl(Qt())),x=Pn(),g=y=Nn(N=T+=Fk(tl())),R++;break;case 45:_===45&&Nn(T)==2&&(S=0)}}return l}function Lv(e,t,r,i,o,l,d,p,f,h,g){for(var y=o-1,x=o===0?l:[""],w=ap(x),_=0,S=0,b=0;_<i;++_)for(var C=0,R=li(e,y+1,y=Nk(S=d[_])),N=e;C<w;++C)(N=Lb(S>0?x[C]+" "+R:Ue(R,/&\f/g,x[C])))&&(f[b++]=N);return Wl(e,t,r,o===0?op:p,f,h,g)}function Uk(e,t,r){return Wl(e,t,r,$b,ql(Ik()),li(e,2,-2),0)}function Uv(e,t,r,i){return Wl(e,t,r,ip,li(e,0,i),li(e,i+1,-1),i)}function Us(e,t){for(var r="",i=ap(e),o=0;o<i;o++)r+=t(e[o],o,e,t)||"";return r}function zk(e,t,r,i){switch(e.type){case Rk:if(e.children.length)break;case Ek:case ip:return e.return=e.return||e.value;case $b:return"";case Fb:return e.return=e.value+"{"+Us(e.children,i)+"}";case op:e.value=e.props.join(",")}return Nn(r=Us(e.children,i))?e.return=e.value+"{"+r+"}":""}function Vk(e){var t=ap(e);return function(r,i,o,l){for(var d="",p=0;p<t;p++)d+=e[p](r,i,o,l)||"";return d}}function Bk(e){return function(t){t.root||(t=t.return)&&e(t)}}function qk(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Hk=function(t,r,i){for(var o=0,l=0;o=l,l=Pn(),o===38&&l===12&&(r[i]=1),!ci(l);)Qt();return bi(t,qt)},Wk=function(t,r){var i=-1,o=44;do switch(ci(o)){case 0:o===38&&Pn()===12&&(r[i]=1),t[i]+=Hk(qt-1,r,i);break;case 2:t[i]+=nl(o);break;case 4:if(o===44){t[++i]=Pn()===58?"&\f":"",r[i]=t[i].length;break}default:t[i]+=ql(o)}while(o=Qt());return t},Kk=function(t,r){return Vb(Wk(zb(t),r))},zv=new WeakMap,Gk=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,i=t.parent,o=t.column===i.column&&t.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!zv.get(i))&&!o){zv.set(t,!0);for(var l=[],d=Kk(r,l),p=i.props,f=0,h=0;f<d.length;f++)for(var g=0;g<p.length;g++,h++)t.props[h]=l[f]?d[f].replace(/&\f/g,p[g]):p[g]+" "+d[f]}}},Yk=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function Bb(e,t){switch(Ok(e,t)){case 5103:return Le+"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 Le+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Le+e+Sl+e+Ot+e+e;case 6828:case 4268:return Le+e+Ot+e+e;case 6165:return Le+e+Ot+"flex-"+e+e;case 5187:return Le+e+Ue(e,/(\w+).+(:[^]+)/,Le+"box-$1$2"+Ot+"flex-$1$2")+e;case 5443:return Le+e+Ot+"flex-item-"+Ue(e,/flex-|-self/,"")+e;case 4675:return Le+e+Ot+"flex-line-pack"+Ue(e,/align-content|flex-|-self/,"")+e;case 5548:return Le+e+Ot+Ue(e,"shrink","negative")+e;case 5292:return Le+e+Ot+Ue(e,"basis","preferred-size")+e;case 6060:return Le+"box-"+Ue(e,"-grow","")+Le+e+Ot+Ue(e,"grow","positive")+e;case 4554:return Le+Ue(e,/([^-])(transform)/g,"$1"+Le+"$2")+e;case 6187:return Ue(Ue(Ue(e,/(zoom-|grab)/,Le+"$1"),/(image-set)/,Le+"$1"),e,"")+e;case 5495:case 3959:return Ue(e,/(image-set\([^]*)/,Le+"$1$`$1");case 4968:return Ue(Ue(e,/(.+:)(flex-)?(.*)/,Le+"box-pack:$3"+Ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Le+e+e;case 4095:case 3583:case 4068:case 2532:return Ue(e,/(.+)-inline(.+)/,Le+"$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(Nn(e)-1-t>6)switch(jt(e,t+1)){case 109:if(jt(e,t+4)!==45)break;case 102:return Ue(e,/(.+:)(.+)-([^]+)/,"$1"+Le+"$2-$3$1"+Sl+(jt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Gd(e,"stretch")?Bb(Ue(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(jt(e,t+1)!==115)break;case 6444:switch(jt(e,Nn(e)-3-(~Gd(e,"!important")&&10))){case 107:return Ue(e,":",":"+Le)+e;case 101:return Ue(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Le+(jt(e,14)===45?"inline-":"")+"box$3$1"+Le+"$2$3$1"+Ot+"$2box$3")+e}break;case 5936:switch(jt(e,t+11)){case 114:return Le+e+Ot+Ue(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Le+e+Ot+Ue(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Le+e+Ot+Ue(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Le+e+Ot+e+e}return e}var Qk=function(t,r,i,o){if(t.length>-1&&!t.return)switch(t.type){case ip:t.return=Bb(t.value,t.length);break;case Fb:return Us([Go(t,{value:Ue(t.value,"@","@"+Le)})],o);case op:if(t.length)return Pk(t.props,function(l){switch(Tk(l,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Us([Go(t,{props:[Ue(l,/:(read-\w+)/,":"+Sl+"$1")]})],o);case"::placeholder":return Us([Go(t,{props:[Ue(l,/:(plac\w+)/,":"+Le+"input-$1")]}),Go(t,{props:[Ue(l,/:(plac\w+)/,":"+Sl+"$1")]}),Go(t,{props:[Ue(l,/:(plac\w+)/,Ot+"input-$1")]})],o)}return""})}},Xk=[Qk],Jk=function(t){var r=t.key;if(r==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(S){var b=S.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var o=t.stylisPlugins||Xk,l={},d,p=[];d=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(S){for(var b=S.getAttribute("data-emotion").split(" "),C=1;C<b.length;C++)l[b[C]]=!0;p.push(S)});var f,h=[Gk,Yk];{var g,y=[zk,Bk(function(S){g.insert(S)})],x=Vk(h.concat(o,y)),w=function(b){return Us(Lk(b),x)};f=function(b,C,R,N){g=R,w(b?b+"{"+C.styles+"}":C.styles),N&&(_.inserted[C.name]=!0)}}var _={key:r,sheet:new Ck({key:r,container:d,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:l,registered:{},insert:f};return _.sheet.hydrate(p),_},fd={exports:{}},Be={};var Vv;function Zk(){if(Vv)return Be;Vv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,l=e?Symbol.for("react.profiler"):60114,d=e?Symbol.for("react.provider"):60109,p=e?Symbol.for("react.context"):60110,f=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,x=e?Symbol.for("react.suspense_list"):60120,w=e?Symbol.for("react.memo"):60115,_=e?Symbol.for("react.lazy"):60116,S=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,R=e?Symbol.for("react.scope"):60119;function N(k){if(typeof k=="object"&&k!==null){var O=k.$$typeof;switch(O){case t:switch(k=k.type,k){case f:case h:case i:case l:case o:case y:return k;default:switch(k=k&&k.$$typeof,k){case p:case g:case _:case w:case d:return k;default:return O}}case r:return O}}}function P(k){return N(k)===h}return Be.AsyncMode=f,Be.ConcurrentMode=h,Be.ContextConsumer=p,Be.ContextProvider=d,Be.Element=t,Be.ForwardRef=g,Be.Fragment=i,Be.Lazy=_,Be.Memo=w,Be.Portal=r,Be.Profiler=l,Be.StrictMode=o,Be.Suspense=y,Be.isAsyncMode=function(k){return P(k)||N(k)===f},Be.isConcurrentMode=P,Be.isContextConsumer=function(k){return N(k)===p},Be.isContextProvider=function(k){return N(k)===d},Be.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===t},Be.isForwardRef=function(k){return N(k)===g},Be.isFragment=function(k){return N(k)===i},Be.isLazy=function(k){return N(k)===_},Be.isMemo=function(k){return N(k)===w},Be.isPortal=function(k){return N(k)===r},Be.isProfiler=function(k){return N(k)===l},Be.isStrictMode=function(k){return N(k)===o},Be.isSuspense=function(k){return N(k)===y},Be.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===i||k===h||k===l||k===o||k===y||k===x||typeof k=="object"&&k!==null&&(k.$$typeof===_||k.$$typeof===w||k.$$typeof===d||k.$$typeof===p||k.$$typeof===g||k.$$typeof===b||k.$$typeof===C||k.$$typeof===R||k.$$typeof===S)},Be.typeOf=N,Be}var Bv;function eO(){return Bv||(Bv=1,fd.exports=Zk()),fd.exports}var pd,qv;function tO(){if(qv)return pd;qv=1;var e=eO(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};l[e.ForwardRef]=i,l[e.Memo]=o;function d(_){return e.isMemo(_)?o:l[_.$$typeof]||t}var p=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,x=Object.prototype;function w(_,S,b){if(typeof S!="string"){if(x){var C=y(S);C&&C!==x&&w(_,C,b)}var R=f(S);h&&(R=R.concat(h(S)));for(var N=d(_),P=d(S),k=0;k<R.length;++k){var O=R[k];if(!r[O]&&!(b&&b[O])&&!(P&&P[O])&&!(N&&N[O])){var T=g(S,O);try{p(_,O,T)}catch{}}}}return _}return pd=w,pd}tO();var nO=!0;function rO(e,t,r){var i="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):i+=o+" "}),i}var qb=function(t,r,i){var o=t.key+"-"+r.name;(i===!1||nO===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},sO=function(t,r,i){qb(t,r,i);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var l=r;do t.insert(r===l?"."+o:"",l,t.sheet,!0),l=l.next;while(l!==void 0)}};function oO(e){for(var t=0,r,i=0,o=e.length;o>=4;++i,o-=4)r=e.charCodeAt(i)&255|(e.charCodeAt(++i)&255)<<8|(e.charCodeAt(++i)&255)<<16|(e.charCodeAt(++i)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(i+2)&255)<<16;case 2:t^=(e.charCodeAt(i+1)&255)<<8;case 1:t^=e.charCodeAt(i)&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 iO={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},aO=/[A-Z]|^ms/g,lO=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hb=function(t){return t.charCodeAt(1)===45},Hv=function(t){return t!=null&&typeof t!="boolean"},hd=qk(function(e){return Hb(e)?e:e.replace(aO,"-$&").toLowerCase()}),Wv=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(lO,function(i,o,l){return kn={name:o,styles:l,next:kn},o})}return iO[t]!==1&&!Hb(t)&&typeof r=="number"&&r!==0?r+"px":r};function ui(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return kn={name:r.name,styles:r.styles,next:kn},r.name;if(r.styles!==void 0){var i=r.next;if(i!==void 0)for(;i!==void 0;)kn={name:i.name,styles:i.styles,next:kn},i=i.next;var o=r.styles+";";return o}return cO(e,t,r)}case"function":{if(e!==void 0){var l=kn,d=r(e);return kn=l,ui(e,t,d)}break}}return r}function cO(e,t,r){var i="";if(Array.isArray(r))for(var o=0;o<r.length;o++)i+=ui(e,t,r[o])+";";else for(var l in r){var d=r[l];if(typeof d!="object")Hv(d)&&(i+=hd(l)+":"+Wv(l,d)+";");else if(Array.isArray(d)&&typeof d[0]=="string"&&t==null)for(var p=0;p<d.length;p++)Hv(d[p])&&(i+=hd(l)+":"+Wv(l,d[p])+";");else{var f=ui(e,t,d);switch(l){case"animation":case"animationName":{i+=hd(l)+":"+f+";";break}default:i+=l+"{"+f+"}"}}}return i}var Kv=/label:\s*([^\s;\n{]+)\s*(;|$)/g,kn,Wb=function(t,r,i){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var o=!0,l="";kn=void 0;var d=t[0];d==null||d.raw===void 0?(o=!1,l+=ui(i,r,d)):l+=d[0];for(var p=1;p<t.length;p++)l+=ui(i,r,t[p]),o&&(l+=d[p]);Kv.lastIndex=0;for(var f="",h;(h=Kv.exec(l))!==null;)f+="-"+h[1];var g=oO(l)+f;return{name:g,styles:l,next:kn}},uO=function(t){return t()},dO=Og.useInsertionEffect?Og.useInsertionEffect:!1,fO=dO||uO,lp={}.hasOwnProperty,Kb=j.createContext(typeof HTMLElement<"u"?Jk({key:"css"}):null);Kb.Provider;var pO=function(t){return j.forwardRef(function(r,i){var o=j.useContext(Kb);return t(r,o,i)})},hO=j.createContext({}),Qd="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",mO=function(t,r){var i={};for(var o in r)lp.call(r,o)&&(i[o]=r[o]);return i[Qd]=t,i},gO=function(t){var r=t.cache,i=t.serialized,o=t.isStringTag;return qb(r,i,o),fO(function(){return sO(r,i,o)}),null},vO=pO(function(e,t,r){var i=e.css;typeof i=="string"&&t.registered[i]!==void 0&&(i=t.registered[i]);var o=e[Qd],l=[i],d="";typeof e.className=="string"?d=rO(t.registered,l,e.className):e.className!=null&&(d=e.className+" ");var p=Wb(l,void 0,j.useContext(hO));d+=t.key+"-"+p.name;var f={};for(var h in e)lp.call(e,h)&&h!=="css"&&h!==Qd&&(f[h]=e[h]);return f.ref=r,f.className=d,j.createElement(j.Fragment,null,j.createElement(gO,{cache:t,serialized:p,isStringTag:typeof o=="string"}),j.createElement(o,f))}),yO=vO,we=function(t,r){var i=arguments;if(r==null||!lp.call(r,"css"))return j.createElement.apply(void 0,i);var o=i.length,l=new Array(o);l[0]=yO,l[1]=mO(t,r);for(var d=2;d<o;d++)l[d]=i[d];return j.createElement.apply(null,l)};function cp(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Wb(t)}var xO=function(){var t=cp.apply(void 0,arguments),r="animation-"+t.name;return{name:r,styles:"@keyframes "+r+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function bO(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const wO=Math.min,SO=Math.max,_l=Math.round,za=Math.floor,jl=e=>({x:e,y:e});function _O(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Gb(e){return Qb(e)?(e.nodeName||"").toLowerCase():"#document"}function ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Yb(e){var t;return(t=(Qb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qb(e){return e instanceof Node||e instanceof ir(e).Node}function jO(e){return e instanceof Element||e instanceof ir(e).Element}function up(e){return e instanceof HTMLElement||e instanceof ir(e).HTMLElement}function Gv(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ir(e).ShadowRoot}function Xb(e){const{overflow:t,overflowX:r,overflowY:i,display:o}=dp(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+r)&&!["inline","contents"].includes(o)}function CO(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function EO(e){return["html","body","#document"].includes(Gb(e))}function dp(e){return ir(e).getComputedStyle(e)}function RO(e){if(Gb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Gv(e)&&e.host||Yb(e);return Gv(t)?t.host:t}function Jb(e){const t=RO(e);return EO(t)?e.ownerDocument?e.ownerDocument.body:e.body:up(t)&&Xb(t)?t:Jb(t)}function Cl(e,t,r){var i;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=Jb(e),l=o===((i=e.ownerDocument)==null?void 0:i.body),d=ir(o);return l?t.concat(d,d.visualViewport||[],Xb(o)?o:[],d.frameElement&&r?Cl(d.frameElement):[]):t.concat(o,Cl(o,[],r))}function NO(e){const t=dp(e);let r=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const o=up(e),l=o?e.offsetWidth:r,d=o?e.offsetHeight:i,p=_l(r)!==l||_l(i)!==d;return p&&(r=l,i=d),{width:r,height:i,$:p}}function fp(e){return jO(e)?e:e.contextElement}function Yv(e){const t=fp(e);if(!up(t))return jl(1);const r=t.getBoundingClientRect(),{width:i,height:o,$:l}=NO(t);let d=(l?_l(r.width):r.width)/i,p=(l?_l(r.height):r.height)/o;return(!d||!Number.isFinite(d))&&(d=1),(!p||!Number.isFinite(p))&&(p=1),{x:d,y:p}}const kO=jl(0);function OO(e){const t=ir(e);return!CO()||!t.visualViewport?kO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TO(e,t,r){return!1}function Qv(e,t,r,i){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),l=fp(e);let d=jl(1);t&&(d=Yv(e));const p=TO()?OO(l):jl(0);let f=(o.left+p.x)/d.x,h=(o.top+p.y)/d.y,g=o.width/d.x,y=o.height/d.y;if(l){const x=ir(l),w=i;let _=x.frameElement;for(;_&&i&&w!==x;){const S=Yv(_),b=_.getBoundingClientRect(),C=dp(_),R=b.left+(_.clientLeft+parseFloat(C.paddingLeft))*S.x,N=b.top+(_.clientTop+parseFloat(C.paddingTop))*S.y;f*=S.x,h*=S.y,g*=S.x,y*=S.y,f+=R,h+=N,_=ir(_).frameElement}}return _O({width:g,height:y,x:f,y:h})}function PO(e,t){let r=null,i;const o=Yb(e);function l(){var p;clearTimeout(i),(p=r)==null||p.disconnect(),r=null}function d(p,f){p===void 0&&(p=!1),f===void 0&&(f=1),l();const{left:h,top:g,width:y,height:x}=e.getBoundingClientRect();if(p||t(),!y||!x)return;const w=za(g),_=za(o.clientWidth-(h+y)),S=za(o.clientHeight-(g+x)),b=za(h),R={rootMargin:-w+"px "+-_+"px "+-S+"px "+-b+"px",threshold:SO(0,wO(1,f))||1};let N=!0;function P(k){const O=k[0].intersectionRatio;if(O!==f){if(!N)return d();O?d(!1,O):i=setTimeout(()=>{d(!1,1e-7)},100)}N=!1}try{r=new IntersectionObserver(P,{...R,root:o.ownerDocument})}catch{r=new IntersectionObserver(P,R)}r.observe(e)}return d(!0),l}function IO(e,t,r,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:l=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:p=typeof IntersectionObserver=="function",animationFrame:f=!1}=i,h=fp(e),g=o||l?[...h?Cl(h):[],...Cl(t)]:[];g.forEach(C=>{o&&C.addEventListener("scroll",r,{passive:!0}),l&&C.addEventListener("resize",r)});const y=h&&p?PO(h,r):null;let x=-1,w=null;d&&(w=new ResizeObserver(C=>{let[R]=C;R&&R.target===h&&w&&(w.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var N;(N=w)==null||N.observe(t)})),r()}),h&&!f&&w.observe(h),w.observe(t));let _,S=f?Qv(e):null;f&&b();function b(){const C=Qv(e);S&&(C.x!==S.x||C.y!==S.y||C.width!==S.width||C.height!==S.height)&&r(),S=C,_=requestAnimationFrame(b)}return r(),()=>{var C;g.forEach(R=>{o&&R.removeEventListener("scroll",r),l&&R.removeEventListener("resize",r)}),y?.(),(C=w)==null||C.disconnect(),w=null,f&&cancelAnimationFrame(_)}}var Xd=j.useLayoutEffect,AO=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],El=function(){};function MO(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function DO(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];var l=[].concat(i);if(t&&e)for(var d in t)t.hasOwnProperty(d)&&t[d]&&l.push("".concat(MO(e,d)));return l.filter(function(p){return p}).map(function(p){return String(p).trim()}).join(" ")}var Xv=function(t){return WO(t)?t.filter(Boolean):ss(t)==="object"&&t!==null?[t]:[]},Zb=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 r=Dn(t,AO);return be({},r)},nt=function(t,r,i){var o=t.cx,l=t.getStyles,d=t.getClassNames,p=t.className;return{css:l(r,t),className:o(i??{},d(r,t),p)}};function $O(e,t,r){if(r){var i=r(e,t);if(typeof i=="string")return i}return e}function Kl(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function FO(e){return Kl(e)?window.innerHeight:e.clientHeight}function e0(e){return Kl(e)?window.pageYOffset:e.scrollTop}function Rl(e,t){if(Kl(e)){window.scrollTo(0,t);return}e.scrollTop=t}function LO(e){var t=getComputedStyle(e),r=t.position==="absolute",i=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(r&&t.position==="static")&&i.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function UO(e,t,r,i){return r*((e=e/i-1)*e*e+1)+t}function Va(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:El,o=e0(e),l=t-o,d=10,p=0;function f(){p+=d;var h=UO(p,o,l,r);Rl(e,h),p<r?window.requestAnimationFrame(f):i(e)}f()}function Jv(e,t){var r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),o=t.offsetHeight/3;i.bottom+o>r.bottom?Rl(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):i.top-o<r.top&&Rl(e,Math.max(t.offsetTop-o,0))}function zO(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 Zv(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function VO(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var t0=!1,BO={get passive(){return t0=!0}},Ba=typeof window<"u"?window:{};Ba.addEventListener&&Ba.removeEventListener&&(Ba.addEventListener("p",El,BO),Ba.removeEventListener("p",El,!1));var qO=t0;function HO(e){return e!=null}function WO(e){return Array.isArray(e)}function qa(e,t,r){return e?t:r}var KO=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];var l=Object.entries(t).filter(function(d){var p=xt(d,1),f=p[0];return!i.includes(f)});return l.reduce(function(d,p){var f=xt(p,2),h=f[0],g=f[1];return d[h]=g,d},{})},GO=["children","innerProps"],YO=["children","innerProps"];function QO(e){var t=e.maxHeight,r=e.menuEl,i=e.minHeight,o=e.placement,l=e.shouldScroll,d=e.isFixedPosition,p=e.controlHeight,f=LO(r),h={placement:"bottom",maxHeight:t};if(!r||!r.offsetParent)return h;var g=f.getBoundingClientRect(),y=g.height,x=r.getBoundingClientRect(),w=x.bottom,_=x.height,S=x.top,b=r.offsetParent.getBoundingClientRect(),C=b.top,R=d?window.innerHeight:FO(f),N=e0(f),P=parseInt(getComputedStyle(r).marginBottom,10),k=parseInt(getComputedStyle(r).marginTop,10),O=C-k,T=R-S,D=O+N,K=y-N-S,U=w-R+N+P,W=N+S-k,H=160;switch(o){case"auto":case"bottom":if(T>=_)return{placement:"bottom",maxHeight:t};if(K>=_&&!d)return l&&Va(f,U,H),{placement:"bottom",maxHeight:t};if(!d&&K>=i||d&&T>=i){l&&Va(f,U,H);var X=d?T-P:K-P;return{placement:"bottom",maxHeight:X}}if(o==="auto"||d){var oe=t,re=d?O:D;return re>=i&&(oe=Math.min(re-P-p,t)),{placement:"top",maxHeight:oe}}if(o==="bottom")return l&&Rl(f,U),{placement:"bottom",maxHeight:t};break;case"top":if(O>=_)return{placement:"top",maxHeight:t};if(D>=_&&!d)return l&&Va(f,W,H),{placement:"top",maxHeight:t};if(!d&&D>=i||d&&O>=i){var se=t;return(!d&&D>=i||d&&O>=i)&&(se=d?O-k:D-k),l&&Va(f,W,H),{placement:"top",maxHeight:se}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return h}function XO(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var n0=function(t){return t==="auto"?"bottom":t},JO=function(t,r){var i,o=t.placement,l=t.theme,d=l.borderRadius,p=l.spacing,f=l.colors;return be((i={label:"menu"},$s(i,XO(o),"100%"),$s(i,"position","absolute"),$s(i,"width","100%"),$s(i,"zIndex",1),i),r?{}:{backgroundColor:f.neutral0,borderRadius:d,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:p.menuGutter,marginTop:p.menuGutter})},r0=j.createContext(null),ZO=function(t){var r=t.children,i=t.minMenuHeight,o=t.maxMenuHeight,l=t.menuPlacement,d=t.menuPosition,p=t.menuShouldScrollIntoView,f=t.theme,h=j.useContext(r0)||{},g=h.setPortalPlacement,y=j.useRef(null),x=j.useState(o),w=xt(x,2),_=w[0],S=w[1],b=j.useState(null),C=xt(b,2),R=C[0],N=C[1],P=f.spacing.controlHeight;return Xd(function(){var k=y.current;if(k){var O=d==="fixed",T=p&&!O,D=QO({maxHeight:o,menuEl:k,minHeight:i,placement:l,shouldScroll:T,isFixedPosition:O,controlHeight:P});S(D.maxHeight),N(D.placement),g?.(D.placement)}},[o,l,d,p,i,g,P]),r({ref:y,placerProps:be(be({},t),{},{placement:R||n0(l),maxHeight:_})})},eT=function(t){var r=t.children,i=t.innerRef,o=t.innerProps;return we("div",je({},nt(t,"menu",{menu:!0}),{ref:i},o),r)},tT=eT,nT=function(t,r){var i=t.maxHeight,o=t.theme.spacing.baseUnit;return be({maxHeight:i,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},r?{}:{paddingBottom:o,paddingTop:o})},rT=function(t){var r=t.children,i=t.innerProps,o=t.innerRef,l=t.isMulti;return we("div",je({},nt(t,"menuList",{"menu-list":!0,"menu-list--is-multi":l}),{ref:o},i),r)},s0=function(t,r){var i=t.theme,o=i.spacing.baseUnit,l=i.colors;return be({textAlign:"center"},r?{}:{color:l.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},sT=s0,oT=s0,iT=function(t){var r=t.children,i=r===void 0?"No options":r,o=t.innerProps,l=Dn(t,GO);return we("div",je({},nt(be(be({},l),{},{children:i,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),i)},aT=function(t){var r=t.children,i=r===void 0?"Loading...":r,o=t.innerProps,l=Dn(t,YO);return we("div",je({},nt(be(be({},l),{},{children:i,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),i)},lT=function(t){var r=t.rect,i=t.offset,o=t.position;return{left:r.left,position:o,top:i,width:r.width,zIndex:1}},cT=function(t){var r=t.appendTo,i=t.children,o=t.controlElement,l=t.innerProps,d=t.menuPlacement,p=t.menuPosition,f=j.useRef(null),h=j.useRef(null),g=j.useState(n0(d)),y=xt(g,2),x=y[0],w=y[1],_=j.useMemo(function(){return{setPortalPlacement:w}},[]),S=j.useState(null),b=xt(S,2),C=b[0],R=b[1],N=j.useCallback(function(){if(o){var T=zO(o),D=p==="fixed"?0:window.pageYOffset,K=T[x]+D;(K!==C?.offset||T.left!==C?.rect.left||T.width!==C?.rect.width)&&R({offset:K,rect:T})}},[o,p,x,C?.offset,C?.rect.left,C?.rect.width]);Xd(function(){N()},[N]);var P=j.useCallback(function(){typeof h.current=="function"&&(h.current(),h.current=null),o&&f.current&&(h.current=IO(o,f.current,N,{elementResize:"ResizeObserver"in window}))},[o,N]);Xd(function(){P()},[P]);var k=j.useCallback(function(T){f.current=T,P()},[P]);if(!r&&p!=="fixed"||!C)return null;var O=we("div",je({ref:k},nt(be(be({},t),{},{offset:C.offset,position:p,rect:C.rect}),"menuPortal",{"menu-portal":!0}),l),i);return we(r0.Provider,{value:_},r?bx.createPortal(O,r):O)},uT=function(t){var r=t.isDisabled,i=t.isRtl;return{label:"container",direction:i?"rtl":void 0,pointerEvents:r?"none":void 0,position:"relative"}},dT=function(t){var r=t.children,i=t.innerProps,o=t.isDisabled,l=t.isRtl;return we("div",je({},nt(t,"container",{"--is-disabled":o,"--is-rtl":l}),i),r)},fT=function(t,r){var i=t.theme.spacing,o=t.isMulti,l=t.hasValue,d=t.selectProps.controlShouldRenderValue;return be({alignItems:"center",display:o&&l&&d?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},r?{}:{padding:"".concat(i.baseUnit/2,"px ").concat(i.baseUnit*2,"px")})},pT=function(t){var r=t.children,i=t.innerProps,o=t.isMulti,l=t.hasValue;return we("div",je({},nt(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":l}),i),r)},hT=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},mT=function(t){var r=t.children,i=t.innerProps;return we("div",je({},nt(t,"indicatorsContainer",{indicators:!0}),i),r)},ey,gT=["size"],vT=["innerProps","isRtl","size"],yT={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},o0=function(t){var r=t.size,i=Dn(t,gT);return we("svg",je({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:yT},i))},pp=function(t){return we(o0,je({size:20},t),we("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"}))},i0=function(t){return we(o0,je({size:20},t),we("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"}))},a0=function(t,r){var i=t.isFocused,o=t.theme,l=o.spacing.baseUnit,d=o.colors;return be({label:"indicatorContainer",display:"flex",transition:"color 150ms"},r?{}:{color:i?d.neutral60:d.neutral20,padding:l*2,":hover":{color:i?d.neutral80:d.neutral40}})},xT=a0,bT=function(t){var r=t.children,i=t.innerProps;return we("div",je({},nt(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),i),r||we(i0,null))},wT=a0,ST=function(t){var r=t.children,i=t.innerProps;return we("div",je({},nt(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),i),r||we(pp,null))},_T=function(t,r){var i=t.isDisabled,o=t.theme,l=o.spacing.baseUnit,d=o.colors;return be({label:"indicatorSeparator",alignSelf:"stretch",width:1},r?{}:{backgroundColor:i?d.neutral10:d.neutral20,marginBottom:l*2,marginTop:l*2})},jT=function(t){var r=t.innerProps;return we("span",je({},r,nt(t,"indicatorSeparator",{"indicator-separator":!0})))},CT=xO(ey||(ey=bO([`
|
|
68
17
|
0%, 80%, 100% { opacity: 0; }
|
|
69
18
|
40% { opacity: 1; }
|
|
70
|
-
`]))),WI=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(HI," 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"},"","")})},KI=function(t){var n=t.innerProps,r=t.isRtl,o=t.size,s=o===void 0?4:o,i=gn(t,DI);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}))},GI=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}})},YI=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)},QI=YI,XI=["data"],ZI=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},JI=function(t){var n=t.children,r=t.cx,o=t.getStyles,s=t.getClassNames,i=t.Heading,l=t.headingProps,c=t.innerProps,u=t.label,d=t.theme,f=t.selectProps;return G("div",Y({},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))},e2=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"})},t2=function(t){var n=dw(t);n.data;var r=gn(n,XI);return G("div",Y({},Pe(t,"groupHeading",{"group-heading":!0}),r))},n2=JI,r2=["innerRef","isDisabled","isHidden","inputClassName"],o2=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)":""},s2),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:l.neutral80})},bw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},s2={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"},bw)},i2=function(t){return K({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},bw)},a2=function(t){var n=t.cx,r=t.value,o=dw(t),s=o.innerRef,i=o.isDisabled,l=o.isHidden,c=o.inputClassName,u=gn(o,r2);return G("div",Y({},Pe(t,"input",{"input-container":!0}),{"data-value":r||""}),G("input",Y({className:n({input:!0},c),ref:s,style:i2(l),disabled:i},u)))},l2=a2,c2=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})},u2=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})},d2=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}})},ww=function(t){var n=t.children,r=t.innerProps;return G("div",r,n)},f2=ww,p2=ww;function h2(e){var t=e.children,n=e.innerProps;return G("div",Y({role:"button"},n),t||G(jp,{size:14}))}var m2=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}))},g2=m2,v2=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}})},y2=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)},x2=y2,b2=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})},w2=function(t){var n=t.children,r=t.innerProps;return G("div",Y({},Pe(t,"placeholder",{placeholder:!0}),r),n)},S2=w2,_2=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})},C2=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)},j2=C2,E2={ClearIndicator:VI,Control:QI,DropdownIndicator:UI,DownChevron:yw,CrossIcon:jp,Group:n2,GroupHeading:t2,IndicatorsContainer:AI,IndicatorSeparator:qI,Input:l2,LoadingIndicator:KI,Menu:wI,MenuList:_I,MenuPortal:kI,LoadingMessage:RI,NoOptionsMessage:EI,MultiValue:g2,MultiValueContainer:f2,MultiValueLabel:p2,MultiValueRemove:h2,Option:x2,Placeholder:S2,SelectContainer:TI,SingleValue:j2,ValueContainer:II},R2=function(t){return K(K({},E2),t.components)},hg=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function N2(e,t){return!!(e===t||hg(e)&&hg(t))}function k2(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!N2(e[n],t[n]))return!1;return!0}function O2(e,t){t===void 0&&(t=k2);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 T2={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"},P2=function(t){return G("span",Y({css:T2},t))},mg=P2,I2={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:"",".")}},$2=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({},I2),f||{})},[f]),N=w.useMemo(function(){var F="";if(n&&C.onChange){var z=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||z||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="",z=r||o,Z=!!(r&&l&&l.includes(r));if(z&&C.onFocus){var T={focused:z,label:p(z),isDisabled:y(z,l),isSelected:Z,options:s,context:z===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 z=b({count:s.length});F=C.onFilter({inputValue:m,resultsMessage:z})}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 z=o?"value":h?"menu":"input";F=C.guidance({"aria-label":j,context:z,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(mg,{id:u},k&&U),G(mg,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!k&&U))},A2=$2,Ed=[{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źẑżžẓẕƶȥɀⱬꝣ"}],M2=new RegExp("["+Ed.map(function(e){return e.letters}).join("")+"]","g"),Sw={};for(var Qc=0;Qc<Ed.length;Qc++)for(var Xc=Ed[Qc],Zc=0;Zc<Xc.letters.length;Zc++)Sw[Xc.letters[Zc]]=Xc.base;var _w=function(t){return t.replace(M2,function(n){return Sw[n]})},D2=O2(_w),gg=function(t){return t.replace(/^\s+|\s+$/g,"")},F2=function(t){return"".concat(t.label," ").concat(t.value)},L2=function(t){return function(n,r){if(n.data.__isNew__)return!0;var o=K({ignoreCase:!0,ignoreAccents:!0,stringify:F2,trim:!0,matchFrom:"any"},t),s=o.ignoreCase,i=o.ignoreAccents,l=o.stringify,c=o.trim,u=o.matchFrom,d=c?gg(r):r,f=c?gg(l(n)):l(n);return s&&(d=d.toLowerCase(),f=f.toLowerCase()),i&&(d=D2(d),f=_w(f)),u==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},U2=["innerRef"];function z2(e){var t=e.innerRef,n=gn(e,U2),r=pI(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 V2=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function B2(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&&V2(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=uI?{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 vg=["boxSizing","height","overflow","paddingRight","position"],yg={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function xg(e){e.preventDefault()}function bg(e){e.stopPropagation()}function wg(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Sg(){return"ontouchstart"in window||navigator.maxTouchPoints}var _g=!!(typeof window<"u"&&window.document&&window.document.createElement),ss=0,Kr={capture:!1,passive:!1};function q2(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(_g){var u=document.body,d=u&&u.style;if(r&&vg.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(yg).forEach(function(v){var y=yg[v];d&&(d[v]=y)}),d&&(d.paddingRight="".concat(m,"px"))}u&&Sg()&&(u.addEventListener("touchmove",xg,Kr),c&&(c.addEventListener("touchstart",wg,Kr),c.addEventListener("touchmove",bg,Kr))),ss+=1}},[r]),l=w.useCallback(function(c){if(_g){var u=document.body,d=u&&u.style;ss=Math.max(ss-1,0),r&&ss<1&&vg.forEach(function(f){var p=o.current[f];d&&(d[f]=p)}),u&&Sg()&&(u.removeEventListener("touchmove",xg,Kr),c&&(c.removeEventListener("touchstart",wg,Kr),c.removeEventListener("touchmove",bg,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 H2=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},W2={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function K2(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=B2({isEnabled:o,onBottomArrive:s,onBottomLeave:i,onTopArrive:l,onTopLeave:c}),d=q2({isEnabled:n}),f=function(m){u(m),d(m)};return G(w.Fragment,null,n&&G("div",{onClick:H2,css:W2}),t(f))}var G2={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Y2=function(t){var n=t.name,r=t.onFocus;return G("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:G2,value:"",onChange:function(){}})},Q2=Y2;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 X2(){return Ep(/^iPhone/i)}function Cw(){return Ep(/^Mac/i)}function Z2(){return Ep(/^iPad/i)||Cw()&&navigator.maxTouchPoints>1}function J2(){return X2()||Z2()}function e$(){return Cw()||J2()}var t$=function(t){return t.label},n$=function(t){return t.label},r$=function(t){return t.value},o$=function(t){return!!t.isDisabled},s$={clearIndicator:zI,container:OI,control:GI,dropdownIndicator:LI,group:ZI,groupHeading:e2,indicatorsContainer:$I,indicatorSeparator:BI,input:o2,loadingIndicator:WI,loadingMessage:jI,menu:yI,menuList:SI,menuPortal:NI,multiValue:c2,multiValueLabel:u2,multiValueRemove:d2,noOptionsMessage:CI,option:v2,placeholder:b2,singleValue:_2,valueContainer:PI},i$={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%)"},a$=4,jw=4,l$=38,c$=jw*2,u$={baseUnit:jw,controlHeight:l$,menuGutter:c$},Jc={borderRadius:a$,colors:i$,spacing:u$},d$={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:fg(),captureMenuScroll:!fg(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:L2(),formatGroupLabel:t$,getOptionLabel:n$,getOptionValue:r$,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:o$,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!lI(),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 Cg(e,t,n,r){var o=Nw(e,t,n),s=kw(e,t,n),i=Rw(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 Cg(e,i,t,l)}).filter(function(i){return Eg(e,i)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var s=Cg(e,n,t,r);return Eg(e,s)?s:void 0}).filter(dI)}function Ew(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 f$(e,t){return Ew(va(e,t))}function Eg(e,t){var n=e.inputValue,r=n===void 0?"":n,o=t.data,s=t.isSelected,i=t.label,l=t.value;return(!Tw(e)||!s)&&Ow(e,{label:i,value:l,data:o},r)}function p$(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 h$(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},Rw=function(t,n){return t.getOptionLabel(n)},pl=function(t,n){return t.getOptionValue(n)};function Nw(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function kw(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 Ow(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var Tw=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},m$=1,Rp=function(e){PT(n,e);var t=AT(n);function n(r){var o;if(OT(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=e$(),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 jg(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 nI.apply(void 0,[o.props.classNamePrefix].concat(u))},o.getOptionLabel=function(c){return Rw(o.props,c)},o.getOptionValue=function(c){return pl(o.props,c)},o.getStyles=function(c,u){var d=o.props.unstyled,f=s$[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 R2(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 Ew(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 Tw(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||++m$),o.state.selectValue=ug(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 TT(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&&dg(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&&(dg(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 Nw(this.props,o,s)}},{key:"isOptionSelected",value:function(o,s){return kw(this.props,o,s)}},{key:"filterOption",value:function(o,s){return Ow(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(z2,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 z=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,ge=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:ge,onMouseOver:ge,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 z(ue,"".concat(ee,"-").concat(ue.index))}))}else if(B.type==="option")return z(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(xI,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(K2,{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(Q2,{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(A2,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=ug(v),b={};if(i&&(v!==i.value||m!==i.options||y!==i.menuIsOpen||g!==i.inputValue)){var S=y?f$(o,x):[],_=y?jg(va(o,x),"".concat(p,"-option")):[],j=l?p$(s,x):null,E=h$(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=d$;var g$=w.forwardRef(function(e,t){var n=Bb(e);return w.createElement(Rp,Y({ref:t},n))}),Pw=g$;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(Vl,{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(Ub,{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 v$="_items_c2dbg_1",y$="_item_c2dbg_1",x$="_details_c2dbg_14",b$="_text_c2dbg_20",w$="_number_c2dbg_35",S$="_outer_c2dbg_50",_$="_inner_c2dbg_61",xn={items:v$,item:y$,details:x$,text:b$,number:w$,outer:S$,inner:_$},is=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function C$({requestId:e,grantNumber:t,creditColorClass:n="gray-300",colorClasses:r=nd}){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+=rd(p));const c=[],u=[];let d=-.25;const f=[...l,i].map((p,m)=>{if(!p)return null;const v=m+1,g=rd(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 Rg=e=>e;function j$({classes:e,clean:t=Rg,format:n=Rg,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 E$({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=()=>{Ex(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"," ",jx(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,z=[];for(let A of C)!A.isCredit&&F(A)&&z.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=z.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 ",zf(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:z}));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},ge=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:Gj(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)=>ge(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(j$,{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(C$,{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(Pw,{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:ge(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 R$({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 N$({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(R$,{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 Iw({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 k$({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(Iw,{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=>Rx[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 O$=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function T$(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,O$),p=f.inputValue,m=w.useRef(void 0),v=w.useRef(!1),y=w.useState(Array.isArray(n)?n:void 0),g=Be(y,2),h=g[0],x=g[1],b=w.useState(typeof p<"u"?p:""),S=Be(b,2),_=S[0],j=S[1],E=w.useState(n===!0),C=Be(E,2),N=C[0],R=C[1],O=w.useState(void 0),k=Be(O,2),P=k[0],U=k[1],F=w.useState([]),z=Be(F,2),Z=z[0],T=z[1],L=w.useState(!1),M=Be(L,2),W=M[0],B=M[1],X=w.useState({}),J=Be(X,2),ee=J[0],Q=J[1],te=w.useState(void 0),ue=Be(te,2),Ce=ue[0],De=ue[1],Ze=w.useState(void 0),ge=Be(Ze,2),Ie=ge[0],A=ge[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=rI(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 P$=w.forwardRef(function(e,t){var n=T$(e),r=Bb(n);return w.createElement(Rp,Y({ref:t},r))}),I$=P$;const Rd=({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 $$({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(ld),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 ",zf(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=z=>u(z),U=0;for(let z of g)U+=z.resourceIds.length;F=g.length*h.length}else k=`all users for ${O.name}`,P=z=>u(z,null,O.key),U=g.filter(({resourceIds:z})=>z.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(Rd,{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(Iw,{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(Rd,{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(I$,{classNames:{control:()=>"react-select"},loadOptions:async R=>(await tR(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 A$=(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}},M$=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:D$(t)},t))})]}):null;function D$(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},$w=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:Ng,addProject:F$,changePublicationType:Nd,dataLoaded:L$,deleteAuthor:U$,hideError:Aw,setFormValid:z$,setGrantNumber:Mw,setPublication:V$,setPublicationId:B$,setShowEditModal:Dw,resetState:q$,toggleRequest:H$,updateAuthor:W$,updateErrors:Xs,updateField:K$,updatePublication:ya,updateSaving:kg,updateSelectedResources:G$,updateShowSaved:kd,setResourcesNoneSelected:Og}=$w.actions,Y$=e=>e.publicationEdit.publication,Q$=e=>e.publicationEdit.publication.doi,X$=e=>e.publicationEdit.publication_types,Fw=e=>e.publicationEdit.publication.authors,Lw=e=>e.publicationEdit.projects,Z$=si([Lw],e=>e.filter(t=>t.selected)),J$=si([Z$],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}),Uw=e=>e.publicationEdit.selected_resources,zw=e=>e.publicationEdit.resources_none_selected,eA=si([Uw,zw],(e,t)=>e.length>0||t),tA=e=>e.publicationEdit.errors,Vw=e=>e.publicationEdit.data_loaded,Bw=e=>e.publicationEdit.publicationId,nA=e=>e.publicationEdit.showEditModal,rA=e=>e.publicationEdit.show_saved,rc=e=>e.publicationEdit.saving,qw=e=>e.publicationEdit.form_valid,oA=e=>e.publicationEdit.grant_number,Hw=e=>!rc(e)&&Vw(e)&&qw(e)&&Ww(e)&&e.publicationEdit.projects.filter(t=>t.selected).length>0&&eA(e),Ww=e=>{const t=Fw(e);return t.length==0?!1:t.filter(n=>n.first_name==""||n.last_name=="").length==0},sA=()=>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(Nd(s?s.publication_type:"Other")),e(V$(o))}else e(Xs(r))},()=>{e(Xs(r))})},iA=()=>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(F$(r)),e(Mw(""))},()=>{e(Xs("Unable to find a project with this grant number."))})},Np=e=>async t=>{t(B$(e)),t(Dw(!0))},Kw=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(L$(r))})},aA=()=>async(e,t)=>{const n=t().publicationEdit,r=n.projects.filter(p=>p.selected),o={...n.publication},s=n.errors,{formValid:i,missingFields:l}=A$(o,["title","publication_year","publication_month"],["first_name","last_name"]);if(!i){s.length>0&&Array.from(s).forEach(m=>{e(Aw(m.id))});const p=M$(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(kg(!0)),e(kd(!1));try{const p=await fetch(d,{method:f,headers:{"Content-Type":"application/json"},body:JSON.stringify(u)});if(!p.ok)throw new Error(`Save failed with status ${p.status}`);o.publication_id||(e(q$()),e(Kw())),e(kd(!0))}catch{e(Xs("There was an error saving this publication."))}finally{e(kg(!1))}},pi=$w.reducer,pn=Ue("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=Ue("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},Gw=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:lA,removeCreatedByUsername:cA,resetFilters:uA,resetPublications:Tg,setUsePagination:Op,updateFilterSelection:Od}=Gw.actions,dA=e=>e.publicationsSearch.filterSelections,fA=e=>e.publicationsSearch.publicationsLoaded,Yw=e=>e.publicationsSearch.publications,pA=e=>e.publicationsSearch.filterOptions,hA=e=>e.publicationsSearch.page,mA=e=>e.publicationsSearch.usePagination,oc=Gw.reducer;function gA({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 vA="_citation_ru41y_1",yA="_tags_ru41y_7",Pg={citation:vA,tags:yA},xA=/10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i,Qw=e=>{const t=(e||"").match(xA);return t?t[0]:null};function Xw({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=Qw(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 bA({allowEdit:e=!0,last:t=!1,publication:n}){const r=me(),{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:Pg.citation,children:[a.jsx(Xw,{publication:n}),e&&n.can_edit&&a.jsx(Io,{onClick:()=>r(Np(n.publication_id)),icon:"pencil",title:"Edit publication"})]}),a.jsxs("ul",{className:Pg.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=me(),{current:r,last:o}=H(hA),s=H(fA),i=H(mA),l=H(Yw);return s&&l.length===0?a.jsx("p",{children:t}):a.jsx(a.Fragment,{children:a.jsx(gA,{isLoading:!s,hasMore:i&&r<o,loadMore:()=>n(pn()),children:l.map((c,u)=>a.jsx(bA,{allowEdit:e,publication:c,last:u===l.length-1},c.publication_id))})})}function wA(){const e=me(),t=H(Q$);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(sA()),children:"Lookup Publication"})]})]})})}const SA=({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"})})})]})},_A=e=>({updateAuthor:t=>e(W$(t)),deleteAuthor:t=>e(U$(t))}),CA=Vj(null,_A)(SA);function jA(){const e=me(),t=H(Fw),n=H(Ww),r=t.length===0;w.useEffect(()=>{r&&e(Ng())},[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(CA,{author:s,authorKey:i},`author_${i}`))})]}),a.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>e(Ng()),children:"Add Author"})]})}function EA(){const e=me(),t=H(Lw),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(H$(s)),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})}function RA(){const e=me(),t=H(oA);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(Mw(n.target.value)),placeholder:"Enter a grant number"}),a.jsx("button",{className:"btn btn-primary",onClick:()=>e(iA()),children:"Find Project"})]})]})})}function NA(){const e=me(),t=H(J$),n=H(Uw),r=H(zw),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(Og(!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(G$(m))},l=u=>{e(Og(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 kA(){const e=me(),t=H(Y$),n=H(X$);H(Hw);const r=H(qw),o=f=>{e(z$(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(K$({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(wA,{}),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(Nd(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(jA,{})})]}),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(EA,{}),a.jsx("hr",{}),a.jsx(RA,{})]})]}),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(NA,{})})]});return a.jsxs(a.Fragment,{children:[l,c,u,d]})}function Zw(){const e=me(),t=H(Vw),n=H(Bw);return w.useEffect(()=>{e(Kw(n))},[n,e]),a.jsx(a.Fragment,{children:t?a.jsx(kA,{}):a.jsx(Ur,{})})}function Pp(){const e=me(),t=H(nA),n=H(Bw),r=H(Hw),o=s=>{s&&e(aA()),e(Dw(!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(Zw,{})}),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 OA({grantNumber:e}){const t=me(),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 TA({grantNumber:e}){const t=w.useRef(Vn({reducer:{publicationEdit:pi,publicationsSearch:oc}}));return a.jsxs(a.Fragment,{children:[a.jsx(Bn,{store:t.current,children:a.jsx(OA,{grantNumber:e})}),a.jsx("div",{children:a.jsx("a",{href:ne.routes.publications_path(),className:"btn btn-primary",children:"Add or Manage Publications"})})]})}function PA({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:kR.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(LN,{activeKey:r.tab,onSelect:s,className:"mt-3 mb-3",children:[a.jsx(ts,{eventKey:"overview",title:"Overview",className:"mb-0",children:a.jsx(CT,{requestId:e,grantNumber:t})}),a.jsx(ts,{eventKey:"resources",title:n.usesCredits?"Credits + Resources":"Resources",disabled:c.includes("resources"),children:a.jsx(E$,{requestId:e})}),a.jsx(ts,{eventKey:"users",title:"Users + Roles",disabled:c.includes("users"),children:a.jsx($$,{grantNumber:t})}),a.jsx(ts,{eventKey:"publications",title:"Publications",children:a.jsx(TA,{grantNumber:t,requestId:e})}),a.jsx(ts,{eventKey:"history",title:"History",children:a.jsx(JO,{requestId:e})})]}),a.jsx(YO,{grantNumber:t,requestId:e}),a.jsx(QO,{grantNumber:t,requestId:e}),a.jsx(XO,{grantNumber:t,requestId:e,actionId:l?l.actionId:null}),a.jsx(N$,{grantNumber:t,requestId:e}),a.jsx(k$,{grantNumber:t,requestId:e})]})}function IA({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 $A({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(IA,{requestId:i.selectedRequestId,grantNumber:t})]}),d?a.jsx(PA,{...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 AA({username:e,openFirst:t=1}){const{error:n,loading:r,projects:o}=jR(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($A,{open:s?s==i.grantNumber:l<t,...i},i.grantNumber))}const Jw={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:[]}},MA=Ue("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(t1(!0))),await n(Td()),await n(Rr()),n(DA())}),DA=Ue("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:n})=>{const o=t().projectsBrowser.typeLists;n(e1({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),Td=Ue("projectsBrowser/getFilters",async(e,{getState:t,dispatch:n})=>{const o=`${t().projectsBrowser.apiUrl}?filters=1`,i=await(await fetch(o)).json();n(e1(i.filters))}),Rr=Ue("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($g(!0))):(n($g(!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:Jw,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:FA,setApiUrl:SD,setShowPagination:Ig,setTypeLists:e1,toggleAllFos:LA,toggleFos:UA,toggleListFiltered:t1,toggleSingleEntry:$g,updateFilter:Pd,updatePageData:Id}=Ip.actions,zA=e=>e.projectsBrowser.filters,VA=e=>e.projectsBrowser.filtersLoaded,BA=e=>e.projectsBrowser.listIsFiltered,qA=e=>e.projectsBrowser.singleEntry,HA=e=>e.projectsBrowser.projectsLoaded,WA=e=>e.projectsBrowser.pageData,KA=e=>e.projectsBrowser.projects,GA=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,YA=e=>e.projectsBrowser.typeLists,QA=Ip.reducer;const XA=()=>{const e=me(),t=H(zA),n=H(YA),r=H(BA),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(Ig(!1)),e(Id({current_page:1})),e(Rr())},f=()=>{l(null),e(Ig(!1)),e(Id({current_page:1})),e(FA()),r&&(window.scrollTo(0,0),e(Rr()),p(!1))},p=y=>{e(t1(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(LA())}}),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(UA(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(Pw,{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 Ag=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),Mg=({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/${Ag(e.doi)}`,target:"_blank",className:"fw-normal",children:Ag(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(qA);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(Vl,{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(Mg,{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(Mg,{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()]})]})},JA=()=>{const e=H(KA);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 Dg=()=>{const e=me(),t=H(WA),[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:">"})})]})})})},eM=({api_url:e})=>{const t=me(),n=H(HA),r=H(VA),o=H(GA),s=a.jsx("div",{className:"loadingDiv",children:"Loading ..."});return w.useEffect(()=>{t(MA())},[]),a.jsx("div",{className:"container-fluid",children:a.jsxs("div",{className:"row",children:[a.jsx("div",{className:"col-sm-3",children:a.jsx(XA,{})}),a.jsxs("div",{className:"col-sm-9",children:[a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Dg,{}):""})}),a.jsx("div",{className:"row",id:"projectListRow",children:a.jsx("div",{className:"col",children:n&&r?a.jsx(JA,{}):s})}),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:o?a.jsx(Dg,{scroll:"projects_browser_app"}):""})})]})]})})};function n1(){const e=me();return a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>e(Np(null)),children:"Add a New Publication"})}function r1(){const e=me(),t=H(tA),n=H(rA);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(kd(!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(Aw(r.id))})]},`err_${r.id}`))]})}function tM(){const e=me();return H(nR)?a.jsx("button",{type:"button",className:"btn btn-primary",onClick:n=>{e(zx()),n.currentTarget.blur()},children:"I HAVE NO NEW PUBLICATIONS"}):null}function nM({showUpdatePublications:e}){const t=me(),n=H(rc);return w.useEffect(()=>{n||(t(Op(!1)),t(pn()),t(kp()))},[t,n]),a.jsxs(a.Fragment,{children:[a.jsx(r1,{}),a.jsxs("div",{className:"d-flex justify-content-between align-items-start",children:[a.jsx("h1",{children:"My Publications"}),a.jsxs("div",{className:"d-flex gap-2",children:[e&&a.jsx(tM,{}),a.jsx(n1,{})]})]}),a.jsx(Tp,{}),a.jsx(Pp,{})]})}const rM=()=>{const e=me(),t=H(pA),n=H(dA),r=()=>{e(Tg()),window.scrollTo(0,0),e(pn())},o=()=>{e(Tg()),e(uA()),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:Qw(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"})]})]})})},oM=()=>{const e=me();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(rM,{})}),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})})})})]})})})},o1={selected:[]},s1=Lr({name:"publicationsSelect",initialState:o1,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:sM,toggleSelected:iM,clearSelected:_D}=s1.actions,aM=e=>e.publicationsSelect.selected,lM=s1.reducer;function cM({allowAdd:e=!0,allowEdit:t=!0,allowSelect:n=!1}){const r=me(),o=H(rc),s=H(aM),i=H(Yw);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(Xw,{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(iM(c))})},formatHeader:()=>a.jsx(Rd,{selectedLength:s.length,totalLength:i.length,onChange:c=>r(sM(c?i.map(u=>u.publication_id):[]))})}),a.jsxs(a.Fragment,{children:[a.jsx(hn,{columns:l,rows:i}),e&&a.jsx(n1,{}),a.jsx(Pp,{})]})}function uM(){const e=me();return w.useEffect(()=>{addEventListener("requestAddRole",t=>e(lA(t.detail.username))),addEventListener("requestRemoveRole",t=>e(cA(t.detail.username)))},[e]),a.jsxs(a.Fragment,{children:[a.jsx(r1,{}),a.jsx(cM,{allowSelect:!0})]})}const dM={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:[]},fM=Ue("resourceCatalog/initApp",async(e,{dispatch:t})=>{t(hl(!1)),t(pM()),t(hl(!0))});Ue("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(vM({data:r,params:e})),t(hl(!0))});const pM=Ue("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(gM({params:e,metadata:i.results,rampsResources:c.results,features:d.results}))});Ue("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(xM(e)),t(a1())});const Fg=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}=hM(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,hM=(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}},mM=e=>e.type.endsWith("rejected"),i1=Lr({name:"resourceCatalog",initialState:dM,reducers:{handleResponse:(e,{payload:t})=>{const n=t.data,r=t.groups;t.rampsResources;const{resources:o,catalogs:s,categories:i}=Fg(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}=Fg(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(mM,(t,n)=>{console.log(n)})}}),{handleRamps:gM,handleResponse:vM,processData:CD,resetFilters:yM,setResourcesLoaded:hl,setSelectedCategory:jD,toggleCatalog:xM,toggleFilter:a1}=i1.actions,bM=e=>e.resourceCatalog.resources,l1=e=>e.resourceCatalog.catalogs,wM=e=>e.resourceCatalog.filters,SM=e=>e.resourceCatalog.hasErrors,_M=e=>e.resourceCatalog.resourcesLoaded,c1=e=>e.resourceCatalog.selectedCategory,$p=e=>e.resourceCatalog.selectedFilters,CM=si([bM,$p,c1],(e,t,n)=>(e.filter(r=>r.resourceCategory==n),t.length==0?e:e.filter(r=>t.some(o=>r.filters.includes(o))))),jM=i1.reducer,EM="_access_1yrq0_2",RM="_resourceName_1yrq0_6",NM="_description_1yrq0_11",kM="_filterBar_1yrq0_15",OM="_cardBg_1yrq0_20",TM="_active_1yrq0_25",PM="_plainButton_1yrq0_30",IM="_btnSecondary_1yrq0_40",$M="_filtersHidden_1yrq0_51",AM="_filtersVisible_1yrq0_57",Cn={access:EM,resourceName:RM,description:NM,filterBar:kM,cardBg:OM,active:TM,plainButton:PM,btnSecondary:IM,filtersHidden:$M,filtersVisible:AM},MM=({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}`))})},DM=({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(MM,{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"})]})})]})})})})},FM=({filter:e,selectedFilters:t})=>{const n=me(),r=()=>{n(a1(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})]})})})},LM=({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(FM,{filter:n,selectedFilters:t},n.featureId))]}),UM=({onReset:e})=>{const t=me(),n=H(l1),r=H(wM),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(LM,{selectedFilters:o,category:s},s.categoryId))}),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(yM()),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"})]})},zM=()=>{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(UM,{onReset:o})})]})})})})})},VM=()=>{const e=H(CM);H(c1);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(DM,{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(zM,{}),t.map(o=>r(o))]})})},BM=({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"}),"."]})]})})]}),qM=({catalogSources:e=[],onRamps:t=!1,baseUrl:n,onRampsApi:r="https://allocations.access-ci.org/resources.json"})=>{const o=me(),s=H(_M),i=H(SM),l=H(l1),c=Object.keys(l).map(d=>l[d]);w.useEffect(()=>{o(fM({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(BM,{baseUrl:n}):"",u(),a.jsx("div",{className:"row",children:a.jsx("div",{className:"col",children:a.jsx(VM,{})})})]}):a.jsx(Ur,{})},HM={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=Ue("resourceCatalog/getResources",async(e,{dispatch:t})=>{const r=await(await fetch(e.apiUrl)).json();t(KM({data:r,params:e}))}),WM=e=>{const t=[],n=e.filter(r=>r.features.filter(o=>o.selected).length>0);return e.forEach(r=>{r.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),n.map(r=>({...r,features:r.features.filter(o=>o.selected)}))},Lg=(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)},u1=Lr({name:"resourceCatalog",initialState:HM,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]&&Lg(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=Lg(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=WM(e.filters);if(s.length>0){const i=[],l=s.map(c=>c.features.map(u=>u.featureId));e.resources.forEach(c=>{let u=0;l.forEach(d=>{let f=!1;c.featureIds.forEach(p=>{d.indexOf(p)>=0&&(f=!0)}),f&&(u+=1)}),u>=l.length&&i.push(c)}),e.filteredResources=i}else e.filteredResources=[...e.resources]}},extraReducers:e=>{e.addCase(xa.pending,t=>{}).addCase(xa.fulfilled,(t,n)=>{}).addCase(xa.rejected,(t,n)=>{t.hasErrors=!0,console.log(n.error)})}}),{handleResponse:KM,processData:ED,resetFilters:GM,toggleFilter:YM}=u1.actions,QM=e=>e.resourceCatalog.hasErrors,XM=e=>e.resourceCatalog.resourcesLoaded,ZM=e=>e.resourceCatalog.filters,JM=e=>e.resourceCatalog.filteredResources,eD=u1.reducer,tD=({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)]})]})},nD=()=>{const e=H(JM);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(tD,{resource:t},t.resourceId))})]})},rD=({filter:e})=>{const t=me(),n=()=>{t(YM(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})]})})})},oD=({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(rD,{filter:t},t.featureId))]})}),sD=()=>{const e=me(),t=H(ZM),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(oD,{category:r},r.categoryId)),a.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(GM()),disabled:n.length==0,children:"Reset Filters"})]})},iD=({apiUrl:e,excludedCategories:t=[],excludedFilters:n=[],excludedResources:r=[],allowedCategories:o=[],allowedFilters:s=[]})=>{const i=me(),l=H(XM),c=H(QM);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(sD,{})}),a.jsx("div",{className:"col-sm-8",children:a.jsx(nD,{})})]})}):a.jsx(Ur,{})};function aD(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 lD({target:e}){bt.createRoot(e).render(a.jsx(xE,{}))}function cD({availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r,target:o}){bt.createRoot(o).render(a.jsx(FE,{availableResources:e,unavailableResources:t,canAdd:n,relativeUrlRoot:r}))}function uD({resourceId:e,target:t,setExternalSubmit:n,relativeUrlRoot:r}){bt.createRoot(t).render(a.jsx(Mx,{resourceId:e,setExternalSubmit:n,relativeUrlRoot:r}))}function dD({target:e,username:t,routes:n}){li(n);const r=Vn({reducer:{api:Bx}});bt.createRoot(e).render(a.jsx(Bn,{store:r,children:a.jsx(AA,{username:t})}))}function fD({target:e,apiUrl:t}){const n=Vn({reducer:{projectsBrowser:QA},preloadedState:{projectsBrowser:{...Jw,apiUrl:t}}});bt.createRoot(e).render(a.jsx(Bn,{store:n,children:a.jsx(eM,{})}))}function pD({target:e,routes:t,authenticityToken:n}){li(t);const r=Vn({reducer:{publicationsSearch:oc,publicationEdit:pi},preloadedState:{publicationEdit:{...Mo,authenticityToken:n}}});bt.createRoot(e).render(a.jsx(Bn,{store:r,children:a.jsx(oM,{})}))}function hD({publicationId:e,target:t,routes:n,authenticityToken:r}){const o=Vn({reducer:{publicationEdit:pi},preloadedState:{publicationEdit:{...Mo,authenticityToken:r}}});li(n),bt.createRoot(t).render(a.jsx(Bn,{store:o,children:a.jsx(Zw,{publicationId:e})}))}function mD({authenticityToken:e,routes:t,selectedPublicationIds:n,target:r,usernames:o}){const s=Vn({reducer:{publicationEdit:pi,publicationsSearch:oc,publicationsSelect:lM},preloadedState:{publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:o}},publicationEdit:{...Mo,authenticityToken:e},publicationsSelect:{...o1,selected:n}}});li(t),bt.createRoot(r).render(a.jsx(Bn,{store:s,children:a.jsx(uM,{})}))}function gD({target:e,catalogSources:t,onRamps:n,baseUrl:r,onRampsApi:o}){const s=Vn({reducer:{resourceCatalog:jM}});bt.createRoot(e).render(a.jsx(Bn,{store:s,children:a.jsx(qM,{catalogSources:t,onRamps:n,baseUrl:r,onRampsApi:o})}))}function vD({authenticityToken:e,routes:t,target:n,username:r,showUpdatePublications:o}){li(t);const s=Vn({reducer:{api:Bx,publicationEdit:pi,publicationsSearch:oc},preloadedState:{api:{showUpdatePublications:o,username:r},publicationsSearch:{...Zs,filterSelections:{...Zs.filterSelections,createdBy:[r]}},publicationEdit:{...Mo,authenticityToken:e},dismissPublicationNotice:{showUpdatePublications:o,status:"idle",error:null,message:null}}});bt.createRoot(n).render(a.jsx(Bn,{store:s,children:a.jsx(nM,{showUpdatePublications:o})}))}function yD({target:e,apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i}){const l=Vn({reducer:{resourceCatalog:eD}});bt.createRoot(e).render(a.jsx(Bn,{store:l,children:a.jsx(iD,{apiUrl:t,excludedCategories:n,excludedFilters:r,excludedResources:o,allowedCategories:s,allowedFilters:i})}))}function xD({allocationTypes:e,target:t}){bt.createRoot(t).render(a.jsx(Keywords,{allocationTypes:e}))}exports.allocationsMap=lD;exports.editResource=uD;exports.keywords=xD;exports.myPublications=vD;exports.onRampsResourceCatalog=gD;exports.projects=dD;exports.projectsBrowser=fD;exports.publicationEdit=hD;exports.publicationsBrowser=pD;exports.publicationsSelect=mD;exports.resourceCatalog=yD;exports.resources=cD;exports.shadowTarget=aD;
|
|
19
|
+
`]))),ET=function(t,r){var i=t.isFocused,o=t.size,l=t.theme,d=l.colors,p=l.spacing.baseUnit;return be({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},r?{}:{color:i?d.neutral60:d.neutral20,padding:p*2})},md=function(t){var r=t.delay,i=t.offset;return we("span",{css:cp({animation:"".concat(CT," 1s ease-in-out ").concat(r,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:i?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},RT=function(t){var r=t.innerProps,i=t.isRtl,o=t.size,l=o===void 0?4:o,d=Dn(t,vT);return we("div",je({},nt(be(be({},d),{},{innerProps:r,isRtl:i,size:l}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),r),we(md,{delay:0,offset:i}),we(md,{delay:160,offset:!0}),we(md,{delay:320,offset:!i}))},NT=function(t,r){var i=t.isDisabled,o=t.isFocused,l=t.theme,d=l.colors,p=l.borderRadius,f=l.spacing;return be({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:f.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},r?{}:{backgroundColor:i?d.neutral5:d.neutral0,borderColor:i?d.neutral10:o?d.primary:d.neutral20,borderRadius:p,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(d.primary):void 0,"&:hover":{borderColor:o?d.primary:d.neutral30}})},kT=function(t){var r=t.children,i=t.isDisabled,o=t.isFocused,l=t.innerRef,d=t.innerProps,p=t.menuIsOpen;return we("div",je({ref:l},nt(t,"control",{control:!0,"control--is-disabled":i,"control--is-focused":o,"control--menu-is-open":p}),d,{"aria-disabled":i||void 0}),r)},OT=kT,TT=["data"],PT=function(t,r){var i=t.theme.spacing;return r?{}:{paddingBottom:i.baseUnit*2,paddingTop:i.baseUnit*2}},IT=function(t){var r=t.children,i=t.cx,o=t.getStyles,l=t.getClassNames,d=t.Heading,p=t.headingProps,f=t.innerProps,h=t.label,g=t.theme,y=t.selectProps;return we("div",je({},nt(t,"group",{group:!0}),f),we(d,je({},p,{selectProps:y,theme:g,getStyles:o,getClassNames:l,cx:i}),h),we("div",null,r))},AT=function(t,r){var i=t.theme,o=i.colors,l=i.spacing;return be({label:"group",cursor:"default",display:"block"},r?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:l.baseUnit*3,paddingRight:l.baseUnit*3,textTransform:"uppercase"})},MT=function(t){var r=Zb(t);r.data;var i=Dn(r,TT);return we("div",je({},nt(t,"groupHeading",{"group-heading":!0}),i))},DT=IT,$T=["innerRef","isDisabled","isHidden","inputClassName"],FT=function(t,r){var i=t.isDisabled,o=t.value,l=t.theme,d=l.spacing,p=l.colors;return be(be({visibility:i?"hidden":"visible",transform:o?"translateZ(0)":""},LT),r?{}:{margin:d.baseUnit/2,paddingBottom:d.baseUnit/2,paddingTop:d.baseUnit/2,color:p.neutral80})},l0={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},LT={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":be({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},l0)},UT=function(t){return be({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},l0)},zT=function(t){var r=t.cx,i=t.value,o=Zb(t),l=o.innerRef,d=o.isDisabled,p=o.isHidden,f=o.inputClassName,h=Dn(o,$T);return we("div",je({},nt(t,"input",{"input-container":!0}),{"data-value":i||""}),we("input",je({className:r({input:!0},f),ref:l,style:UT(p),disabled:d},h)))},VT=zT,BT=function(t,r){var i=t.theme,o=i.spacing,l=i.borderRadius,d=i.colors;return be({label:"multiValue",display:"flex",minWidth:0},r?{}:{backgroundColor:d.neutral10,borderRadius:l/2,margin:o.baseUnit/2})},qT=function(t,r){var i=t.theme,o=i.borderRadius,l=i.colors,d=t.cropWithEllipsis;return be({overflow:"hidden",textOverflow:d||d===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},r?{}:{borderRadius:o/2,color:l.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},HT=function(t,r){var i=t.theme,o=i.spacing,l=i.borderRadius,d=i.colors,p=t.isFocused;return be({alignItems:"center",display:"flex"},r?{}:{borderRadius:l/2,backgroundColor:p?d.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:d.dangerLight,color:d.danger}})},c0=function(t){var r=t.children,i=t.innerProps;return we("div",i,r)},WT=c0,KT=c0;function GT(e){var t=e.children,r=e.innerProps;return we("div",je({role:"button"},r),t||we(pp,{size:14}))}var YT=function(t){var r=t.children,i=t.components,o=t.data,l=t.innerProps,d=t.isDisabled,p=t.removeProps,f=t.selectProps,h=i.Container,g=i.Label,y=i.Remove;return we(h,{data:o,innerProps:be(be({},nt(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":d})),l),selectProps:f},we(g,{data:o,innerProps:be({},nt(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:f},r),we(y,{data:o,innerProps:be(be({},nt(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(r||"option")},p),selectProps:f}))},QT=YT,XT=function(t,r){var i=t.isDisabled,o=t.isFocused,l=t.isSelected,d=t.theme,p=d.spacing,f=d.colors;return be({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},r?{}:{backgroundColor:l?f.primary:o?f.primary25:"transparent",color:i?f.neutral20:l?f.neutral0:"inherit",padding:"".concat(p.baseUnit*2,"px ").concat(p.baseUnit*3,"px"),":active":{backgroundColor:i?void 0:l?f.primary:f.primary50}})},JT=function(t){var r=t.children,i=t.isDisabled,o=t.isFocused,l=t.isSelected,d=t.innerRef,p=t.innerProps;return we("div",je({},nt(t,"option",{option:!0,"option--is-disabled":i,"option--is-focused":o,"option--is-selected":l}),{ref:d,"aria-disabled":i},p),r)},ZT=JT,eP=function(t,r){var i=t.theme,o=i.spacing,l=i.colors;return be({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},r?{}:{color:l.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},tP=function(t){var r=t.children,i=t.innerProps;return we("div",je({},nt(t,"placeholder",{placeholder:!0}),i),r)},nP=tP,rP=function(t,r){var i=t.isDisabled,o=t.theme,l=o.spacing,d=o.colors;return be({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r?{}:{color:i?d.neutral40:d.neutral80,marginLeft:l.baseUnit/2,marginRight:l.baseUnit/2})},sP=function(t){var r=t.children,i=t.isDisabled,o=t.innerProps;return we("div",je({},nt(t,"singleValue",{"single-value":!0,"single-value--is-disabled":i}),o),r)},oP=sP,iP={ClearIndicator:ST,Control:OT,DropdownIndicator:bT,DownChevron:i0,CrossIcon:pp,Group:DT,GroupHeading:MT,IndicatorsContainer:mT,IndicatorSeparator:jT,Input:VT,LoadingIndicator:RT,Menu:tT,MenuList:rT,MenuPortal:cT,LoadingMessage:aT,NoOptionsMessage:iT,MultiValue:QT,MultiValueContainer:WT,MultiValueLabel:KT,MultiValueRemove:GT,Option:ZT,Placeholder:nP,SelectContainer:dT,SingleValue:oP,ValueContainer:pT},aP=function(t){return be(be({},iP),t.components)},ty=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function lP(e,t){return!!(e===t||ty(e)&&ty(t))}function cP(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!lP(e[r],t[r]))return!1;return!0}function uP(e,t){t===void 0&&(t=cP);var r=null;function i(){for(var o=[],l=0;l<arguments.length;l++)o[l]=arguments[l];if(r&&r.lastThis===this&&t(o,r.lastArgs))return r.lastResult;var d=e.apply(this,o);return r={lastResult:d,lastArgs:o,lastThis:this},d}return i.clear=function(){r=null},i}var dP={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"},fP=function(t){return we("span",je({css:dP},t))},ny=fP,pP={guidance:function(t){var r=t.isSearchable,i=t.isMulti,o=t.tabSelectsValue,l=t.context,d=t.isInitialFocus;switch(l){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 d?"".concat(t["aria-label"]||"Select"," is focused ").concat(r?",type to refine list":"",", press Down to open the menu, ").concat(i?" 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 r=t.action,i=t.label,o=i===void 0?"":i,l=t.labels,d=t.isDisabled;switch(r){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(l.length>1?"s":""," ").concat(l.join(","),", selected.");case"select-option":return d?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function(t){var r=t.context,i=t.focused,o=t.options,l=t.label,d=l===void 0?"":l,p=t.selectValue,f=t.isDisabled,h=t.isSelected,g=t.isAppleDevice,y=function(S,b){return S&&S.length?"".concat(S.indexOf(b)+1," of ").concat(S.length):""};if(r==="value"&&p)return"value ".concat(d," focused, ").concat(y(p,i),".");if(r==="menu"&&g){var x=f?" disabled":"",w="".concat(h?" selected":"").concat(x);return"".concat(d).concat(w,", ").concat(y(o,i),".")}return""},onFilter:function(t){var r=t.inputValue,i=t.resultsMessage;return"".concat(i).concat(r?" for search term "+r:"",".")}},hP=function(t){var r=t.ariaSelection,i=t.focusedOption,o=t.focusedValue,l=t.focusableOptions,d=t.isFocused,p=t.selectValue,f=t.selectProps,h=t.id,g=t.isAppleDevice,y=f.ariaLiveMessages,x=f.getOptionLabel,w=f.inputValue,_=f.isMulti,S=f.isOptionDisabled,b=f.isSearchable,C=f.menuIsOpen,R=f.options,N=f.screenReaderStatus,P=f.tabSelectsValue,k=f.isLoading,O=f["aria-label"],T=f["aria-live"],D=j.useMemo(function(){return be(be({},pP),y||{})},[y]),K=j.useMemo(function(){var re="";if(r&&D.onChange){var se=r.option,pe=r.options,q=r.removedValue,ne=r.removedValues,I=r.value,B=function(me){return Array.isArray(me)?null:me},Y=q||se||B(I),ie=Y?x(Y):"",ae=pe||ne||void 0,ue=ae?ae.map(x):[],le=be({isDisabled:Y&&S(Y,p),label:ie,labels:ue},r);re=D.onChange(le)}return re},[r,D,S,p,x]),U=j.useMemo(function(){var re="",se=i||o,pe=!!(i&&p&&p.includes(i));if(se&&D.onFocus){var q={focused:se,label:x(se),isDisabled:S(se,p),isSelected:pe,options:l,context:se===i?"menu":"value",selectValue:p,isAppleDevice:g};re=D.onFocus(q)}return re},[i,o,x,S,D,l,p,g]),W=j.useMemo(function(){var re="";if(C&&R.length&&!k&&D.onFilter){var se=N({count:l.length});re=D.onFilter({inputValue:w,resultsMessage:se})}return re},[l,w,C,D,R,N,k]),H=r?.action==="initial-input-focus",X=j.useMemo(function(){var re="";if(D.guidance){var se=o?"value":C?"menu":"input";re=D.guidance({"aria-label":O,context:se,isDisabled:i&&S(i,p),isMulti:_,isSearchable:b,tabSelectsValue:P,isInitialFocus:H})}return re},[O,i,o,_,S,b,C,D,p,P,H]),oe=we(j.Fragment,null,we("span",{id:"aria-selection"},K),we("span",{id:"aria-focused"},U),we("span",{id:"aria-results"},W),we("span",{id:"aria-guidance"},X));return we(j.Fragment,null,we(ny,{id:h},H&&oe),we(ny,{"aria-live":T,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},d&&!H&&oe))},mP=hP,Jd=[{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źẑżžẓẕƶȥɀⱬꝣ"}],gP=new RegExp("["+Jd.map(function(e){return e.letters}).join("")+"]","g"),u0={};for(var gd=0;gd<Jd.length;gd++)for(var vd=Jd[gd],yd=0;yd<vd.letters.length;yd++)u0[vd.letters[yd]]=vd.base;var d0=function(t){return t.replace(gP,function(r){return u0[r]})},vP=uP(d0),ry=function(t){return t.replace(/^\s+|\s+$/g,"")},yP=function(t){return"".concat(t.label," ").concat(t.value)},xP=function(t){return function(r,i){if(r.data.__isNew__)return!0;var o=be({ignoreCase:!0,ignoreAccents:!0,stringify:yP,trim:!0,matchFrom:"any"},t),l=o.ignoreCase,d=o.ignoreAccents,p=o.stringify,f=o.trim,h=o.matchFrom,g=f?ry(i):i,y=f?ry(p(r)):p(r);return l&&(g=g.toLowerCase(),y=y.toLowerCase()),d&&(g=vP(g),y=d0(y)),h==="start"?y.substr(0,g.length)===g:y.indexOf(g)>-1}},bP=["innerRef"];function wP(e){var t=e.innerRef,r=Dn(e,bP),i=KO(r,"onExited","in","enter","exit","appear");return we("input",je({ref:t},i,{css:cp({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 SP=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function _P(e){var t=e.isEnabled,r=e.onBottomArrive,i=e.onBottomLeave,o=e.onTopArrive,l=e.onTopLeave,d=j.useRef(!1),p=j.useRef(!1),f=j.useRef(0),h=j.useRef(null),g=j.useCallback(function(b,C){if(h.current!==null){var R=h.current,N=R.scrollTop,P=R.scrollHeight,k=R.clientHeight,O=h.current,T=C>0,D=P-k-N,K=!1;D>C&&d.current&&(i&&i(b),d.current=!1),T&&p.current&&(l&&l(b),p.current=!1),T&&C>D?(r&&!d.current&&r(b),O.scrollTop=P,K=!0,d.current=!0):!T&&-C>N&&(o&&!p.current&&o(b),O.scrollTop=0,K=!0,p.current=!0),K&&SP(b)}},[r,i,o,l]),y=j.useCallback(function(b){g(b,b.deltaY)},[g]),x=j.useCallback(function(b){f.current=b.changedTouches[0].clientY},[]),w=j.useCallback(function(b){var C=f.current-b.changedTouches[0].clientY;g(b,C)},[g]),_=j.useCallback(function(b){if(b){var C=qO?{passive:!1}:!1;b.addEventListener("wheel",y,C),b.addEventListener("touchstart",x,C),b.addEventListener("touchmove",w,C)}},[w,x,y]),S=j.useCallback(function(b){b&&(b.removeEventListener("wheel",y,!1),b.removeEventListener("touchstart",x,!1),b.removeEventListener("touchmove",w,!1))},[w,x,y]);return j.useEffect(function(){if(t){var b=h.current;return _(b),function(){S(b)}}},[t,_,S]),function(b){h.current=b}}var sy=["boxSizing","height","overflow","paddingRight","position"],oy={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function iy(e){e.preventDefault()}function ay(e){e.stopPropagation()}function ly(){var e=this.scrollTop,t=this.scrollHeight,r=e+this.offsetHeight;e===0?this.scrollTop=1:r===t&&(this.scrollTop=e-1)}function cy(){return"ontouchstart"in window||navigator.maxTouchPoints}var uy=!!(typeof window<"u"&&window.document&&window.document.createElement),Yo=0,Ms={capture:!1,passive:!1};function jP(e){var t=e.isEnabled,r=e.accountForScrollbars,i=r===void 0?!0:r,o=j.useRef({}),l=j.useRef(null),d=j.useCallback(function(f){if(uy){var h=document.body,g=h&&h.style;if(i&&sy.forEach(function(_){var S=g&&g[_];o.current[_]=S}),i&&Yo<1){var y=parseInt(o.current.paddingRight,10)||0,x=document.body?document.body.clientWidth:0,w=window.innerWidth-x+y||0;Object.keys(oy).forEach(function(_){var S=oy[_];g&&(g[_]=S)}),g&&(g.paddingRight="".concat(w,"px"))}h&&cy()&&(h.addEventListener("touchmove",iy,Ms),f&&(f.addEventListener("touchstart",ly,Ms),f.addEventListener("touchmove",ay,Ms))),Yo+=1}},[i]),p=j.useCallback(function(f){if(uy){var h=document.body,g=h&&h.style;Yo=Math.max(Yo-1,0),i&&Yo<1&&sy.forEach(function(y){var x=o.current[y];g&&(g[y]=x)}),h&&cy()&&(h.removeEventListener("touchmove",iy,Ms),f&&(f.removeEventListener("touchstart",ly,Ms),f.removeEventListener("touchmove",ay,Ms)))}},[i]);return j.useEffect(function(){if(t){var f=l.current;return d(f),function(){p(f)}}},[t,d,p]),function(f){l.current=f}}var CP=function(t){var r=t.target;return r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()},EP={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function RP(e){var t=e.children,r=e.lockEnabled,i=e.captureEnabled,o=i===void 0?!0:i,l=e.onBottomArrive,d=e.onBottomLeave,p=e.onTopArrive,f=e.onTopLeave,h=_P({isEnabled:o,onBottomArrive:l,onBottomLeave:d,onTopArrive:p,onTopLeave:f}),g=jP({isEnabled:r}),y=function(w){h(w),g(w)};return we(j.Fragment,null,r&&we("div",{onClick:CP,css:EP}),t(y))}var NP={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},kP=function(t){var r=t.name,i=t.onFocus;return we("input",{required:!0,name:r,tabIndex:-1,"aria-hidden":"true",onFocus:i,css:NP,value:"",onChange:function(){}})},OP=kP;function hp(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 TP(){return hp(/^iPhone/i)}function f0(){return hp(/^Mac/i)}function PP(){return hp(/^iPad/i)||f0()&&navigator.maxTouchPoints>1}function IP(){return TP()||PP()}function AP(){return f0()||IP()}var MP=function(t){return t.label},DP=function(t){return t.label},$P=function(t){return t.value},FP=function(t){return!!t.isDisabled},LP={clearIndicator:wT,container:uT,control:NT,dropdownIndicator:xT,group:PT,groupHeading:AT,indicatorsContainer:hT,indicatorSeparator:_T,input:FT,loadingIndicator:ET,loadingMessage:oT,menu:JO,menuList:nT,menuPortal:lT,multiValue:BT,multiValueLabel:qT,multiValueRemove:HT,noOptionsMessage:sT,option:XT,placeholder:eP,singleValue:rP,valueContainer:fT},UP={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%)"},zP=4,p0=4,VP=38,BP=p0*2,qP={baseUnit:p0,controlHeight:VP,menuGutter:BP},xd={borderRadius:zP,colors:UP,spacing:qP},HP={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Zv(),captureMenuScroll:!Zv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:xP(),formatGroupLabel:MP,getOptionLabel:DP,getOptionValue:$P,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:FP,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!VO(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var r=t.count;return"".concat(r," result").concat(r!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function dy(e,t,r,i){var o=g0(e,t,r),l=v0(e,t,r),d=m0(e,t),p=Nl(e,t);return{type:"option",data:t,isDisabled:o,isSelected:l,label:d,value:p,index:i}}function sl(e,t){return e.options.map(function(r,i){if("options"in r){var o=r.options.map(function(d,p){return dy(e,d,t,p)}).filter(function(d){return py(e,d)});return o.length>0?{type:"group",data:r,options:o,index:i}:void 0}var l=dy(e,r,t,i);return py(e,l)?l:void 0}).filter(HO)}function h0(e){return e.reduce(function(t,r){return r.type==="group"?t.push.apply(t,sp(r.options.map(function(i){return i.data}))):t.push(r.data),t},[])}function fy(e,t){return e.reduce(function(r,i){return i.type==="group"?r.push.apply(r,sp(i.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(i.index,"-").concat(o.index)}}))):r.push({data:i.data,id:"".concat(t,"-").concat(i.index)}),r},[])}function WP(e,t){return h0(sl(e,t))}function py(e,t){var r=e.inputValue,i=r===void 0?"":r,o=t.data,l=t.isSelected,d=t.label,p=t.value;return(!x0(e)||!l)&&y0(e,{label:d,value:p,data:o},i)}function KP(e,t){var r=e.focusedValue,i=e.selectValue,o=i.indexOf(r);if(o>-1){var l=t.indexOf(r);if(l>-1)return r;if(o<t.length)return t[o]}return null}function GP(e,t){var r=e.focusedOption;return r&&t.indexOf(r)>-1?r:t[0]}var bd=function(t,r){var i,o=(i=t.find(function(l){return l.data===r}))===null||i===void 0?void 0:i.id;return o||null},m0=function(t,r){return t.getOptionLabel(r)},Nl=function(t,r){return t.getOptionValue(r)};function g0(e,t,r){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,r):!1}function v0(e,t,r){if(r.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,r);var i=Nl(e,t);return r.some(function(o){return Nl(e,o)===i})}function y0(e,t,r){return e.filterOption?e.filterOption(t,r):!0}var x0=function(t){var r=t.hideSelectedOptions,i=t.isMulti;return r===void 0?i:r},YP=1,mp=(function(e){gk(r,e);var t=xk(r);function r(i){var o;if(hk(this,r),o=t.call(this,i),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=AP(),o.controlRef=null,o.getControlRef=function(f){o.controlRef=f},o.focusedOptionRef=null,o.getFocusedOptionRef=function(f){o.focusedOptionRef=f},o.menuListRef=null,o.getMenuListRef=function(f){o.menuListRef=f},o.inputRef=null,o.getInputRef=function(f){o.inputRef=f},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(f,h){var g=o.props,y=g.onChange,x=g.name;h.name=x,o.ariaOnChange(f,h),y(f,h)},o.setValue=function(f,h,g){var y=o.props,x=y.closeMenuOnSelect,w=y.isMulti,_=y.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:_}),x&&(o.setState({inputIsHiddenAfterUpdate:!w}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(f,{action:h,option:g})},o.selectOption=function(f){var h=o.props,g=h.blurInputOnSelect,y=h.isMulti,x=h.name,w=o.state.selectValue,_=y&&o.isOptionSelected(f,w),S=o.isOptionDisabled(f,w);if(_){var b=o.getOptionValue(f);o.setValue(w.filter(function(C){return o.getOptionValue(C)!==b}),"deselect-option",f)}else if(!S)y?o.setValue([].concat(sp(w),[f]),"select-option",f):o.setValue(f,"select-option");else{o.ariaOnChange(f,{action:"select-option",option:f,name:x});return}g&&o.blurInput()},o.removeValue=function(f){var h=o.props.isMulti,g=o.state.selectValue,y=o.getOptionValue(f),x=g.filter(function(_){return o.getOptionValue(_)!==y}),w=qa(h,x,x[0]||null);o.onChange(w,{action:"remove-value",removedValue:f}),o.focusInput()},o.clearValue=function(){var f=o.state.selectValue;o.onChange(qa(o.props.isMulti,[],null),{action:"clear",removedValues:f})},o.popValue=function(){var f=o.props.isMulti,h=o.state.selectValue,g=h[h.length-1],y=h.slice(0,h.length-1),x=qa(f,y,y[0]||null);o.onChange(x,{action:"pop-value",removedValue:g})},o.getFocusedOptionId=function(f){return bd(o.state.focusableOptionsWithIds,f)},o.getFocusableOptionsWithIds=function(){return fy(sl(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var f=arguments.length,h=new Array(f),g=0;g<f;g++)h[g]=arguments[g];return DO.apply(void 0,[o.props.classNamePrefix].concat(h))},o.getOptionLabel=function(f){return m0(o.props,f)},o.getOptionValue=function(f){return Nl(o.props,f)},o.getStyles=function(f,h){var g=o.props.unstyled,y=LP[f](h,g);y.boxSizing="border-box";var x=o.props.styles[f];return x?x(y,h):y},o.getClassNames=function(f,h){var g,y;return(g=(y=o.props.classNames)[f])===null||g===void 0?void 0:g.call(y,h)},o.getElementId=function(f){return"".concat(o.state.instancePrefix,"-").concat(f)},o.getComponents=function(){return aP(o.props)},o.buildCategorizedOptions=function(){return sl(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return h0(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(f,h){o.setState({ariaSelection:be({value:f},h)})},o.onMenuMouseDown=function(f){f.button===0&&(f.stopPropagation(),f.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(f){o.blockOptionHover=!1},o.onControlMouseDown=function(f){if(!f.defaultPrevented){var h=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&o.onMenuClose():h&&o.openMenu("first"):(h&&(o.openAfterFocus=!0),o.focusInput()),f.target.tagName!=="INPUT"&&f.target.tagName!=="TEXTAREA"&&f.preventDefault()}},o.onDropdownIndicatorMouseDown=function(f){if(!(f&&f.type==="mousedown"&&f.button!==0)&&!o.props.isDisabled){var h=o.props,g=h.isMulti,y=h.menuIsOpen;o.focusInput(),y?(o.setState({inputIsHiddenAfterUpdate:!g}),o.onMenuClose()):o.openMenu("first"),f.preventDefault()}},o.onClearIndicatorMouseDown=function(f){f&&f.type==="mousedown"&&f.button!==0||(o.clearValue(),f.preventDefault(),o.openAfterFocus=!1,f.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(f){typeof o.props.closeMenuOnScroll=="boolean"?f.target instanceof HTMLElement&&Kl(f.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(f)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(f){var h=f.touches,g=h&&h.item(0);g&&(o.initialTouchX=g.clientX,o.initialTouchY=g.clientY,o.userIsDragging=!1)},o.onTouchMove=function(f){var h=f.touches,g=h&&h.item(0);if(g){var y=Math.abs(g.clientX-o.initialTouchX),x=Math.abs(g.clientY-o.initialTouchY),w=5;o.userIsDragging=y>w||x>w}},o.onTouchEnd=function(f){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(f.target)&&o.menuListRef&&!o.menuListRef.contains(f.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(f){o.userIsDragging||o.onControlMouseDown(f)},o.onClearIndicatorTouchEnd=function(f){o.userIsDragging||o.onClearIndicatorMouseDown(f)},o.onDropdownIndicatorTouchEnd=function(f){o.userIsDragging||o.onDropdownIndicatorMouseDown(f)},o.handleInputChange=function(f){var h=o.props.inputValue,g=f.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(g,{action:"input-change",prevInputValue:h}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(f){o.props.onFocus&&o.props.onFocus(f),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(f){var h=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(f),o.onInputChange("",{action:"input-blur",prevInputValue:h}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(f){if(!(o.blockOptionHover||o.state.focusedOption===f)){var h=o.getFocusableOptions(),g=h.indexOf(f);o.setState({focusedOption:f,focusedOptionId:g>-1?o.getFocusedOptionId(f):null})}},o.shouldHideSelectedOptions=function(){return x0(o.props)},o.onValueInputFocus=function(f){f.preventDefault(),f.stopPropagation(),o.focus()},o.onKeyDown=function(f){var h=o.props,g=h.isMulti,y=h.backspaceRemovesValue,x=h.escapeClearsValue,w=h.inputValue,_=h.isClearable,S=h.isDisabled,b=h.menuIsOpen,C=h.onKeyDown,R=h.tabSelectsValue,N=h.openMenuOnFocus,P=o.state,k=P.focusedOption,O=P.focusedValue,T=P.selectValue;if(!S&&!(typeof C=="function"&&(C(f),f.defaultPrevented))){switch(o.blockOptionHover=!0,f.key){case"ArrowLeft":if(!g||w)return;o.focusValue("previous");break;case"ArrowRight":if(!g||w)return;o.focusValue("next");break;case"Delete":case"Backspace":if(w)return;if(O)o.removeValue(O);else{if(!y)return;g?o.popValue():_&&o.clearValue()}break;case"Tab":if(o.isComposing||f.shiftKey||!b||!R||!k||N&&o.isOptionSelected(k,T))return;o.selectOption(k);break;case"Enter":if(f.keyCode===229)break;if(b){if(!k||o.isComposing)return;o.selectOption(k);break}return;case"Escape":b?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:w}),o.onMenuClose()):_&&x&&o.clearValue();break;case" ":if(w)return;if(!b){o.openMenu("first");break}if(!k)return;o.selectOption(k);break;case"ArrowUp":b?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":b?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!b)return;o.focusOption("pageup");break;case"PageDown":if(!b)return;o.focusOption("pagedown");break;case"Home":if(!b)return;o.focusOption("first");break;case"End":if(!b)return;o.focusOption("last");break;default:return}f.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++YP),o.state.selectValue=Xv(i.value),i.menuIsOpen&&o.state.selectValue.length){var l=o.getFocusableOptionsWithIds(),d=o.buildFocusableOptions(),p=d.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=l,o.state.focusedOption=d[p],o.state.focusedOptionId=bd(l,d[p])}return o}return mk(r,[{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&&Jv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(o){var l=this.props,d=l.isDisabled,p=l.menuIsOpen,f=this.state.isFocused;(f&&!d&&o.isDisabled||f&&p&&!o.menuIsOpen)&&this.focusInput(),f&&d&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!f&&!d&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Jv(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,l){this.props.onInputChange(o,l)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var l=this,d=this.state,p=d.selectValue,f=d.isFocused,h=this.buildFocusableOptions(),g=o==="first"?0:h.length-1;if(!this.props.isMulti){var y=h.indexOf(p[0]);y>-1&&(g=y)}this.scrollToFocusedOptionOnUpdate=!(f&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:h[g],focusedOptionId:this.getFocusedOptionId(h[g])},function(){return l.onMenuOpen()})}},{key:"focusValue",value:function(o){var l=this.state,d=l.selectValue,p=l.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var f=d.indexOf(p);p||(f=-1);var h=d.length-1,g=-1;if(d.length){switch(o){case"previous":f===0?g=0:f===-1?g=h:g=f-1;break;case"next":f>-1&&f<h&&(g=f+1);break}this.setState({inputIsHidden:g!==-1,focusedValue:d[g]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",l=this.props.pageSize,d=this.state.focusedOption,p=this.getFocusableOptions();if(p.length){var f=0,h=p.indexOf(d);d||(h=-1),o==="up"?f=h>0?h-1:p.length-1:o==="down"?f=(h+1)%p.length:o==="pageup"?(f=h-l,f<0&&(f=0)):o==="pagedown"?(f=h+l,f>p.length-1&&(f=p.length-1)):o==="last"&&(f=p.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:p[f],focusedValue:null,focusedOptionId:this.getFocusedOptionId(p[f])})}}},{key:"getTheme",value:(function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(xd):be(be({},xd),this.props.theme):xd})},{key:"getCommonProps",value:function(){var o=this.clearValue,l=this.cx,d=this.getStyles,p=this.getClassNames,f=this.getValue,h=this.selectOption,g=this.setValue,y=this.props,x=y.isMulti,w=y.isRtl,_=y.options,S=this.hasValue();return{clearValue:o,cx:l,getStyles:d,getClassNames:p,getValue:f,hasValue:S,isMulti:x,isRtl:w,options:_,selectOption:h,selectProps:y,setValue:g,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,l=o.isClearable,d=o.isMulti;return l===void 0?d:l}},{key:"isOptionDisabled",value:function(o,l){return g0(this.props,o,l)}},{key:"isOptionSelected",value:function(o,l){return v0(this.props,o,l)}},{key:"filterOption",value:function(o,l){return y0(this.props,o,l)}},{key:"formatOptionLabel",value:function(o,l){if(typeof this.props.formatOptionLabel=="function"){var d=this.props.inputValue,p=this.state.selectValue;return this.props.formatOptionLabel(o,{context:l,inputValue:d,selectValue:p})}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,l=o.isDisabled,d=o.isSearchable,p=o.inputId,f=o.inputValue,h=o.tabIndex,g=o.form,y=o.menuIsOpen,x=o.required,w=this.getComponents(),_=w.Input,S=this.state,b=S.inputIsHidden,C=S.ariaSelection,R=this.commonProps,N=p||this.getElementId("input"),P=be(be(be({"aria-autocomplete":"list","aria-expanded":y,"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":x,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},y&&{"aria-controls":this.getElementId("listbox")}),!d&&{"aria-readonly":!0}),this.hasValue()?C?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return d?j.createElement(_,je({},R,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:N,innerRef:this.getInputRef,isDisabled:l,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:h,form:g,type:"text",value:f},P)):j.createElement(wP,je({id:N,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:El,onFocus:this.onInputFocus,disabled:l,tabIndex:h,inputMode:"none",form:g,value:""},P))})},{key:"renderPlaceholderOrValue",value:function(){var o=this,l=this.getComponents(),d=l.MultiValue,p=l.MultiValueContainer,f=l.MultiValueLabel,h=l.MultiValueRemove,g=l.SingleValue,y=l.Placeholder,x=this.commonProps,w=this.props,_=w.controlShouldRenderValue,S=w.isDisabled,b=w.isMulti,C=w.inputValue,R=w.placeholder,N=this.state,P=N.selectValue,k=N.focusedValue,O=N.isFocused;if(!this.hasValue()||!_)return C?null:j.createElement(y,je({},x,{key:"placeholder",isDisabled:S,isFocused:O,innerProps:{id:this.getElementId("placeholder")}}),R);if(b)return P.map(function(D,K){var U=D===k,W="".concat(o.getOptionLabel(D),"-").concat(o.getOptionValue(D));return j.createElement(d,je({},x,{components:{Container:p,Label:f,Remove:h},isFocused:U,isDisabled:S,key:W,index:K,removeProps:{onClick:function(){return o.removeValue(D)},onTouchEnd:function(){return o.removeValue(D)},onMouseDown:function(X){X.preventDefault()}},data:D}),o.formatOptionLabel(D,"value"))});if(C)return null;var T=P[0];return j.createElement(g,je({},x,{data:T,isDisabled:S}),this.formatOptionLabel(T,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),l=o.ClearIndicator,d=this.commonProps,p=this.props,f=p.isDisabled,h=p.isLoading,g=this.state.isFocused;if(!this.isClearable()||!l||f||!this.hasValue()||h)return null;var y={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return j.createElement(l,je({},d,{innerProps:y,isFocused:g}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),l=o.LoadingIndicator,d=this.commonProps,p=this.props,f=p.isDisabled,h=p.isLoading,g=this.state.isFocused;if(!l||!h)return null;var y={"aria-hidden":"true"};return j.createElement(l,je({},d,{innerProps:y,isDisabled:f,isFocused:g}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),l=o.DropdownIndicator,d=o.IndicatorSeparator;if(!l||!d)return null;var p=this.commonProps,f=this.props.isDisabled,h=this.state.isFocused;return j.createElement(d,je({},p,{isDisabled:f,isFocused:h}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),l=o.DropdownIndicator;if(!l)return null;var d=this.commonProps,p=this.props.isDisabled,f=this.state.isFocused,h={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return j.createElement(l,je({},d,{innerProps:h,isDisabled:p,isFocused:f}))}},{key:"renderMenu",value:function(){var o=this,l=this.getComponents(),d=l.Group,p=l.GroupHeading,f=l.Menu,h=l.MenuList,g=l.MenuPortal,y=l.LoadingMessage,x=l.NoOptionsMessage,w=l.Option,_=this.commonProps,S=this.state.focusedOption,b=this.props,C=b.captureMenuScroll,R=b.inputValue,N=b.isLoading,P=b.loadingMessage,k=b.minMenuHeight,O=b.maxMenuHeight,T=b.menuIsOpen,D=b.menuPlacement,K=b.menuPosition,U=b.menuPortalTarget,W=b.menuShouldBlockScroll,H=b.menuShouldScrollIntoView,X=b.noOptionsMessage,oe=b.onMenuScrollToTop,re=b.onMenuScrollToBottom;if(!T)return null;var se=function(ie,ae){var ue=ie.type,le=ie.data,de=ie.isDisabled,me=ie.isSelected,Ne=ie.label,rt=ie.value,st=S===le,Ae=de?void 0:function(){return o.onOptionHover(le)},He=de?void 0:function(){return o.selectOption(le)},Z="".concat(o.getElementId("option"),"-").concat(ae),te={id:Z,onClick:He,onMouseMove:Ae,onMouseOver:Ae,tabIndex:-1,role:"option","aria-selected":o.isAppleDevice?void 0:me};return j.createElement(w,je({},_,{innerProps:te,data:le,isDisabled:de,isSelected:me,key:Z,label:Ne,type:ue,value:rt,isFocused:st,innerRef:st?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(ie.data,"menu"))},pe;if(this.hasOptions())pe=this.getCategorizedOptions().map(function(Y){if(Y.type==="group"){var ie=Y.data,ae=Y.options,ue=Y.index,le="".concat(o.getElementId("group"),"-").concat(ue),de="".concat(le,"-heading");return j.createElement(d,je({},_,{key:le,data:ie,options:ae,Heading:p,headingProps:{id:de,data:Y.data},label:o.formatGroupLabel(Y.data)}),Y.options.map(function(me){return se(me,"".concat(ue,"-").concat(me.index))}))}else if(Y.type==="option")return se(Y,"".concat(Y.index))});else if(N){var q=P({inputValue:R});if(q===null)return null;pe=j.createElement(y,_,q)}else{var ne=X({inputValue:R});if(ne===null)return null;pe=j.createElement(x,_,ne)}var I={minMenuHeight:k,maxMenuHeight:O,menuPlacement:D,menuPosition:K,menuShouldScrollIntoView:H},B=j.createElement(ZO,je({},_,I),function(Y){var ie=Y.ref,ae=Y.placerProps,ue=ae.placement,le=ae.maxHeight;return j.createElement(f,je({},_,I,{innerRef:ie,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:N,placement:ue}),j.createElement(RP,{captureEnabled:C,onTopArrive:oe,onBottomArrive:re,lockEnabled:W},function(de){return j.createElement(h,je({},_,{innerRef:function(Ne){o.getMenuListRef(Ne),de(Ne)},innerProps:{role:"listbox","aria-multiselectable":_.isMulti,id:o.getElementId("listbox")},isLoading:N,maxHeight:le,focusedOption:S}),pe)}))});return U||K==="fixed"?j.createElement(g,je({},_,{appendTo:U,controlElement:this.controlRef,menuPlacement:D,menuPosition:K}),B):B}},{key:"renderFormField",value:function(){var o=this,l=this.props,d=l.delimiter,p=l.isDisabled,f=l.isMulti,h=l.name,g=l.required,y=this.state.selectValue;if(g&&!this.hasValue()&&!p)return j.createElement(OP,{name:h,onFocus:this.onValueInputFocus});if(!(!h||p))if(f)if(d){var x=y.map(function(S){return o.getOptionValue(S)}).join(d);return j.createElement("input",{name:h,type:"hidden",value:x})}else{var w=y.length>0?y.map(function(S,b){return j.createElement("input",{key:"i-".concat(b),name:h,type:"hidden",value:o.getOptionValue(S)})}):j.createElement("input",{name:h,type:"hidden",value:""});return j.createElement("div",null,w)}else{var _=y[0]?this.getOptionValue(y[0]):"";return j.createElement("input",{name:h,type:"hidden",value:_})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,l=this.state,d=l.ariaSelection,p=l.focusedOption,f=l.focusedValue,h=l.isFocused,g=l.selectValue,y=this.getFocusableOptions();return j.createElement(mP,je({},o,{id:this.getElementId("live-region"),ariaSelection:d,focusedOption:p,focusedValue:f,isFocused:h,selectValue:g,focusableOptions:y,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),l=o.Control,d=o.IndicatorsContainer,p=o.SelectContainer,f=o.ValueContainer,h=this.props,g=h.className,y=h.id,x=h.isDisabled,w=h.menuIsOpen,_=this.state.isFocused,S=this.commonProps=this.getCommonProps();return j.createElement(p,je({},S,{className:g,innerProps:{id:y,onKeyDown:this.onKeyDown},isDisabled:x,isFocused:_}),this.renderLiveRegion(),j.createElement(l,je({},S,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:x,isFocused:_,menuIsOpen:w}),j.createElement(f,je({},S,{isDisabled:x}),this.renderPlaceholderOrValue(),this.renderInput()),j.createElement(d,je({},S,{isDisabled:x}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,l){var d=l.prevProps,p=l.clearFocusValueOnUpdate,f=l.inputIsHiddenAfterUpdate,h=l.ariaSelection,g=l.isFocused,y=l.prevWasFocused,x=l.instancePrefix,w=o.options,_=o.value,S=o.menuIsOpen,b=o.inputValue,C=o.isMulti,R=Xv(_),N={};if(d&&(_!==d.value||w!==d.options||S!==d.menuIsOpen||b!==d.inputValue)){var P=S?WP(o,R):[],k=S?fy(sl(o,R),"".concat(x,"-option")):[],O=p?KP(l,R):null,T=GP(l,P),D=bd(k,T);N={selectValue:R,focusedOption:T,focusedOptionId:D,focusableOptionsWithIds:k,focusedValue:O,clearFocusValueOnUpdate:!1}}var K=f!=null&&o!==d?{inputIsHidden:f,inputIsHiddenAfterUpdate:void 0}:{},U=h,W=g&&y;return g&&!W&&(U={value:qa(C,R,R[0]||null),options:R,action:"initial-input-focus"},W=!y),h?.action==="initial-input-focus"&&(U=null),be(be(be({},N),K),{},{prevProps:o,ariaSelection:U,prevWasFocused:W})}}]),r})(j.Component);mp.defaultProps=HP;var QP=j.forwardRef(function(e,t){var r=Mb(e);return j.createElement(mp,je({ref:t},r))}),b0=QP;function zs({bg:e="dark",children:t,color:r="light",fontWeight:i="bold",icon:o="info-circle-fill",initial:l=!1,maxWidth:d="200px",padding:p="10px",placement:f,target:h,trigger:g="click",visible:y=!0}){const x=typeof l=="string"||l instanceof String,[w,_]=j.useState(x?localStorage.getItem(l)!="true":l),[S,b]=j.useState(!1);j.useEffect(()=>{setTimeout(()=>b(!0),100)},[]);const C=()=>{x&&localStorage.setItem(l,"true")},R=c.jsxs(Bl,{style:{"--bs-tooltip-bg":`var(--bs-${e})`,"--bs-tooltip-color":`var(--bs-${r})`,"--bs-tooltip-max-width":d,"--bs-tooltip-padding-x":p,"--bs-tooltip-padding-y":p,fontWeight:i},children:[c.jsx("button",{"aria-label":"Close",onClick:()=>{C(),_(!1)},style:{background:"transparent",border:"0 none transparent",float:"right"},children:c.jsx("i",{className:"bi bi-x-lg"})}),t]});return h&&h.current?c.jsx(np,{target:h.current,placement:f,show:w&&y&&S,children:R}):c.jsx(rp,{placement:f,onToggle:N=>{C(),_(N)},overlay:R,show:w&&y&&S,trigger:g,children:c.jsx("button",{className:"btn bnt-clear border-0",style:{backgroundColor:"transparent"},children:c.jsx("i",{className:`bi bi-${o}`})})})}const XP="_items_c2dbg_1",JP="_item_c2dbg_1",ZP="_details_c2dbg_14",eI="_text_c2dbg_20",tI="_number_c2dbg_35",nI="_outer_c2dbg_50",rI="_inner_c2dbg_61",Kn={items:XP,item:JP,details:ZP,text:eI,number:tI,outer:nI,inner:rI},Qo=(e,t)=>`${Math.cos(2*Math.PI*e)*t} ${Math.sin(2*Math.PI*e)*t}`;function sI({requestId:e,grantNumber:t,creditColorClass:r="gray-300",colorClasses:i=Od}){const{request:o}=At(e,t);if(!o)return;let l=0,d;const p=[];for(let x of o.resources)x.isBoolean||(x.isCredit?d=x:p.push(x),l+=Td(x));const f=[],h=[];let g=-.25;const y=[...p,d].map((x,w)=>{if(!x)return null;const _=w+1,b=Td(x)/l,C=x.requested-x.used,R=Math.max(0,C),N=x.isCredit?l/x.exchangeRates.base.unitCost:x.requested,P=N==0?0:100*R/N,O=`var(--bs-${x.isCredit?r:i[w%i.length]})`;if(b>0){const T=g,D=g+b/2,K=g+=b,U=b>.5?1:0,W=[`M ${Qo(T,100)}`,`A 100 100 0 ${U} 1 ${Qo(K,100)}`,`L ${Qo(K,50)}`,`A 50 50 0 ${U} 0 ${Qo(T,50)}`].join(" "),[H,X]=Qo(D,75).split(" ").map(oe=>parseFloat(oe));f.push(c.jsx("path",{d:W,style:{fill:O}},x.resourceId)),h.push(c.jsx("circle",{cx:H,cy:X,r:"8",fill:"black"},`${x.resourceId}-circle`),c.jsx("text",{x:H-4,y:X+4,fill:"white",className:Kn.number,children:_},`${x.resourceId}-text`))}return x.isCredit&&h.push(c.jsx("foreignObject",{x:"-50",y:"-50",width:"100",height:"100",children:c.jsx("div",{className:Kn.text,children:c.jsxs("div",{children:[c.jsx("strong",{children:It(R,{abbreviate:!0})}),x.unit," available"]})})},"center-text")),c.jsxs("li",{className:Kn.item,children:[c.jsx("span",{className:Kn.number,children:_}),c.jsx("span",{className:`${Kn.outer} ms-2 me-2`,style:{borderColor:O},children:c.jsx("span",{className:Kn.inner,style:{backgroundColor:O,width:`${P}%`}})}),c.jsxs("strong",{className:Kn.name,children:[c.jsx(Xn,{resource:x,userGuide:!1}),": "]}),c.jsxs("span",{className:Kn.details,children:[It(C,{abbreviate:!0})," ",x.isCredit?null:c.jsxs(c.Fragment,{children:["of ",It(N,{abbreviate:!0})," "]}),x.unit," ",x.isCredit?"available":"remaining"," (",Math.round(P),"%)"]})]},x.resourceId)});return c.jsxs("div",{className:"row",children:[c.jsx("div",{className:"col-lg-3 mb-3 d-flex flex-row align-items-center justify-content-center",children:c.jsxs("svg",{version:"1.1",viewBox:"-100 -100 200 200",width:"200",height:"200",xmlns:"http://www.w3.org/2000/svg",children:[f,h]})}),c.jsx("div",{className:"col-lg-9 mb-3 d-flex flex-column justify-content-center",children:c.jsx("ul",{className:Kn.items,children:y})})]})}const hy=e=>e;function oI({classes:e,clean:t=hy,format:r=hy,label:i,setValue:o,style:l,value:d}){const p=r(d),[f,h]=j.useState(p);return j.useEffect(()=>{h(p)},[p]),c.jsx("input",{type:"text","aria-label":i,className:`form-control ${e}`,value:f,style:l,onChange:g=>h(g.target.value),onBlur:g=>{const y=t(g.target.value);h(r(y)),o(y)},onKeyDown:g=>{g.code=="Enter"&&(g.preventDefault(),g.target.blur())}})}function iI({requestId:e,grantNumber:t}){const{request:r,addResource:i,openUsageDetailModal:o,resetResources:l,setResourceRequest:d,setResourcesReason:p,statuses:f,toggleActionsModal:h,toggleConfirmModal:g,toggleResourcesModal:y}=At(e,t),{project:x}=Zt(t||r&&r.grantNumber),w=j.useRef(null),_=j.useRef(null);if(!r||!x)return;const S="Exchange"in r.allowedActions,b="Renewal"in r.allowedActions,C="Supplement"in r.allowedActions,R=r.exchangeStatus==f.pending,N=r.exchangeStatus==f.success,P=r.exchangeStatus==f.error,k=r.exchangeErrors,O=r.exchangeActionId!==null,T=r.exchangeActionEditable,D=r.resources,K=r.resourcesReason,U={};for(let Z of D)U[Z.resourceId]=Z;const W=()=>{ex(r)>=.75?h():g()},H=[];for(let Z of D){let te=[];if(Z.requested>0){for(let Pe of Z.requires||[]){let Ee=U[Pe];if(Ee){if(Ee.requested>0){te=[];break}te.push(Ee)}}te.length&&H.push(c.jsxs("span",{children:[c.jsx(Xn,{resource:Z,userGuide:!1})," requires"," ",Zy(te.map(Pe=>c.jsx(Xn,{resource:Pe,userGuide:!1},Pe.resourceId)),"or"),"."]},Z.resourceId))}}const X=H.length>0,oe=Z=>Z.requested-Z.used,re=Z=>Z.isNew&&0<Z.requested&&Z.requested<Z.minimumExchange,se=[];for(let Z of D)!Z.isCredit&&re(Z)&&se.push(c.jsxs("span",{children:["The minimum initial request for ",c.jsx(Xn,{resource:Z,userGuide:!1})," is ",Z.minimumExchange," ",Z.unit,". ",c.jsx("br",{})]},Z.resourceId));const pe=se.length>0;let q;N?q=c.jsx(Ye,{color:"info",children:"Your exchange request has been submitted."}):P&&k.length>0&&k[0].includes("PI")&&k[0].includes("person status Unknown")?q=c.jsx(Ye,{color:"danger",children:x.currentUser.role==="pi"?c.jsxs(c.Fragment,{children:["Please"," ",c.jsx("a",{href:Re.routes.profile_path(),children:"update your academic status"})," ","before making an exchange request."]}):c.jsxs(c.Fragment,{children:["The primary investigator for this project has an unknown academic status. Please ask"," ",x.users.filter(Z=>Z.role==="pi").map(Z=>`${Z.firstName} ${Z.lastName}`)," ","to update the academic status in their profile, and then try again."]})}):P?q=c.jsxs(Ye,{color:"danger",children:["Sorry, something went wrong: ",k.join(", "),". For assistance, please"," ",c.jsx("a",{href:"https://support.access-ci.org/open-a-ticket",children:"open a help ticket"})," ","and include this message."]}):O?q=c.jsx(Ye,{color:"warning",children:"You have an exchange request under review. The information below reflects the pending exchange request."}):r.timeStatus=="current"&&!x.isManager?q=c.jsxs(Ye,{color:"warning",children:["You do not have permission to manage resources for this project. Please contact ",yf(x)," to request a change."]}):X?q=c.jsxs(Ye,{color:"warning",children:[H," Please adjust your balance values."]}):pe&&(q=c.jsx(Ye,{color:"warning",children:se}));const ne=K.length>0;let I=!1,B=!1;for(let Z of D)if(Z.isNew&&(I=!0),Z.allocated!=Z.requested&&(B=!0),I&&B)break;const Y=D.map(Z=>Z.resourceId),ie={},ae={},ue=[];if(S&&T){r.allowedActions.Exchange.resources.filter(Z=>!Y.includes(Z.resourceId)).map(Z=>{ie[Z.resourceId]=Z;const te=`${Z.type} Resources (${Z.unit})`;ae[te]=ae[te]||[],ae[te].push(Z)});for(const[Z,te]of Object.entries(ae))ue.push({label:Z,options:te.sort((Pe,Ee)=>Pe.exchangeRates.current.unitCost<Ee.exchangeRates.current.unitCost||Pe.exchangeRates.current.unitCost==Ee.exchangeRates.current.unitCost&&Pe.name<Ee.name?-1:1).map(Pe=>{const Ee=hi(Pe.name),bt=Ee.short?`${Ee.short} (${Ee.full.replace(/ \([^(]+\)/,"")})`:Ee.full;return{value:Pe.resourceId,label:bt}})}),ue.sort((Pe,Ee)=>Pe.label<Ee.label?-1:1)}const le=S?r.allowedActions.Exchange.resources.map(Z=>Z.resourceId):[];let de;const me=[],Ne=[];for(let Z of D)Z.isCredit?de=Z:(me.push(Z),Ne.push(T&&(Z.isNew||Z.allocated!=Z.requested)?Xr.edited:le.includes(Z.resourceId)?"":Xr.disabled));const rt=`Add ${me.length?"another":"a"} resource to your exchange...`,st=(Z,te)=>{const Pe=te.allocated-te.used,Ee=Fs(Number(Z.replace(/[^0-9-.]/g,"")),te.decimalPlaces),bt=Math.min(0,Pe);if(Ee<bt)return bt;let ct=de.requested*de.exchangeRates.base.unitCost;const Fe=(te.allocated-te.requested)*te.exchangeRates.base.unitCost,pt=Math.min(ct,Fe);ct-=pt;let Ct=te.requested-te.used+pt/te.exchangeRates.base.unitCost;return ct>0&&(Ct+=ct/te.exchangeRates.current.unitCost),Ee>Ct?Fs(Ct,te.decimalPlaces,"floor"):Ee},Ae=Z=>Z.isBoolean?c.jsx(c.Fragment,{children:"—"}):c.jsxs(c.Fragment,{children:[er(Re.resourceTypeIcons[de.icon]),c.jsx("span",{className:"ms-2",children:cC(Z.unit,Z.exchangeRates.current.unitCost,de.name)})]}),He=[{key:"name",name:"Resource",format:(Z,te)=>c.jsxs(c.Fragment,{children:[c.jsx(Xn,{resource:te}),(x.currentUser.resourceIds.includes(te.resourceId)||x.currentUser.resourceAccountInactiveIds.includes(te.resourceId))&&c.jsx(Gs,{icon:"table",onClick:()=>o(te.resourceRepositoryKey),target:"_blank",title:`${te.name} Usage Details`})," ",c.jsx(Ys,{status:te.isActive?"Active":te.isNew?"New":"Inactive"})]}),width:Math.min(350,window.innerWidth*.3)},{key:"unit",name:"Unit Cost",width:300,format:(Z,te)=>Ae(te)}];return S&&He.push({key:"requested",name:"Balance",class:"text-end",rowClass:Z=>T&&le.includes(Z.resourceId)?Xr.input:"",format:(Z,te)=>{const Pe=T&&le.includes(te.resourceId);return te.isBoolean?c.jsxs("span",{className:"d-flex",children:[c.jsx("span",{className:"w-100",children:c.jsx("input",{className:"form-check-input",type:"checkbox",checked:Z==1,disabled:!Pe,onChange:Ee=>d(te.resourceId,Ee.target.checked?1:0)})}),c.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:"Requested"})]}):c.jsxs("span",{className:"d-flex",children:[Pe?c.jsx(oI,{classes:"text-end w-100",clean:Ee=>st(Ee,te),format:It,label:`Balance for ${te.name}`,setValue:Ee=>{d(te.resourceId,Ee+te.used)},style:{padding:"0.1rem 0.5rem"},value:oe(te)}):c.jsx("span",{children:It(oe(te))}),c.jsx("span",{className:"text-start ps-2",style:{width:"8rem"},children:te.unit})]})},formatHeader:Z=>c.jsxs(c.Fragment,{children:[Z,T?c.jsx(zs,{bg:"secondary",color:"dark",initial:"myprojects.requestedAllocation",placement:"top-end",visible:x.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:(Z,te)=>{const Ee=-1*(te.requested-te.allocated)*te.exchangeRates.current.unitCost;return Ee!==0?c.jsxs("span",{className:`badge bg-${Ee>0?"primary":"danger"} rounded-pill`,children:[Ee>0?"+":"",It(Ee,de)," ",de.unit]}):c.jsx(c.Fragment,{children:"—"})}}),c.jsxs("div",{className:"resources",children:[D.length?c.jsx(sI,{requestId:e}):null,de&&(S||b||C)?c.jsxs("h2",{className:"mb-1 mt-2 d-flex justify-content-between",children:[c.jsxs("span",{children:[er(Re.resourceTypeIcons.credit)," ",It(de.requested,de)," ",de.unit," available to exchange"]}),b||C?c.jsxs("button",{type:"button",className:"btn btn-sm btn-primary ms-2",onClick:W,children:[er(Re.resourceTypeIcons.credit)," Request More"," ",r.usesCredits?"Credits":"Units"]}):null]}):null,q,me.length?c.jsx(An,{columns:He,rows:me,rowClasses:Ne,classes:ue.length?"mb-0":"",frozenColumns:2,minWidth:"800px"}):c.jsx("div",{className:"card p-2 text-bg-light p-3",children:"This project does not have any resources."}),ue.length?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"p-2",style:{backgroundColor:"var(--teal-200)",border:"1px solid #cccccc",marginTop:"-1px"},ref:w,children:c.jsx(b0,{classNames:{control:()=>"react-select mb-1"},options:ue,onChange:Z=>i(Z.value),placeholder:rt,value:null,"aria-label":rt,formatOptionLabel:({value:Z,label:te})=>{const Pe=ie[Z];return c.jsxs("span",{className:"d-flex justify-content-between",children:[c.jsx("span",{children:c.jsx(Xn,{resource:Pe,userGuide:!1},te)}),c.jsx("span",{children:Ae(Pe)})]})}})}),me.length?null:c.jsx(zs,{bg:"secondary",color:"dark",visible:x.tab=="resources",initial:!0,target:w,children:"Ready to get started? Search for a resource to add it to your project."}),c.jsxs("p",{className:"text-black-50",style:{fontSize:"0.9rem"},children:["Need help choosing a resource? Visit our"," ",c.jsx("a",{href:Re.routes.resources_path(),children:"Resource Catalog"}),"."]})]}):null,S&&T?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"mb-3",children:[c.jsx("label",{htmlFor:"resources-reason",className:"form-label required",children:"Please briefly explain how the requested resources and amounts will contribute to your research."}),c.jsx("textarea",{className:"form-control",id:"resources-reason",rows:"2",value:K,onChange:Z=>p(Z.target.value),style:{minHeight:"3rem"}})]}),c.jsxs("div",{className:"d-flex",children:[c.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:R||!B&&!ne&&!I,onClick:l,children:"Reset Form"}),c.jsx("button",{ref:_,type:"button",className:"btn btn-secondary",disabled:R||!B||!ne||X||pe,onClick:y,children:R?"Submitting...":"Submit for Approval"})]}),B&&!X?c.jsx(zs,{bg:"secondary",color:"dark",initial:"myprojects.submitExchange",maxWidth:"390px",placement:"right",target:_,visible:x.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 aI({question:e,requestId:t,grantNumber:r}){const{request:i,setResourceQuestionValues:o}=At(t,r),l=j.useId();if(!e||!i||i.error)return;const{attributeSetId:d,attributes:p,fieldType:f,label:h,resourceId:g,values:y}=e,x=p[0],w=x.required?"required":"",_=N=>o(g,d,N.target.value?[N.target.value]:[]),S=N=>{o(g,d,Array.from(N.target.options).filter(({selected:P})=>P).map(({value:P})=>parseInt(P,10)))},b=N=>{const P=parseInt(N.target.value,10),k=N.target.checked?[...y,P]:y.filter(O=>O!=P);o(g,d,k)},C=N=>{const P=parseInt(N.target.value);o(g,d,isNaN(P)?[]:[P])};let R;if(["calendar","integer_only","text"].includes(f)){const N={calendar:"date",integer_only:"number",text:"text"}[f];R=c.jsx("input",{className:"form-control",id:l,type:N,placeholder:x.label,required:x.required,value:y[0]||"",onChange:f=="integer_only"?C:_})}else if(f=="textarea")R=c.jsx("textarea",{className:"form-control",id:l,placeholder:x.label,required:x.required,value:y[0]||"",onChange:_});else if(f=="drop_down"||p.length>=10){const N=f=="multi_sel";R=c.jsxs("select",{id:l,className:"form-select",required:x.required,multiple:N,onChange:N?S:C,value:N?y:y[0]||"",children:[N?null:c.jsx("option",{}),p.map(P=>c.jsx("option",{value:P.resourceAttributeId,children:P.label},P.resourceAttributeId))]})}else R=c.jsx("div",{id:l,children:p.map(N=>{const P=`resource-attribute-${N.resourceAttributeId}`;return c.jsxs("div",{className:"form-check",children:[c.jsx("input",{className:"form-check-input",type:f=="single_sel"?"radio":"checkbox",id:P,value:N.resourceAttributeId,checked:y.includes(N.resourceAttributeId),onChange:f=="single_sel"?C:b}),c.jsx("label",{className:"form-check-label",htmlFor:P,children:N.label})]},N.resourceAttributeId)})});return c.jsxs("div",{className:"mb-3",children:[c.jsx("label",{htmlFor:l,className:`form-label ${w}`,children:h}),R]})}function lI({requestId:e,grantNumber:t}){const{request:r,saveResources:i,toggleResourcesModal:o}=At(e,t),{project:l}=Zt(t||r.grantNumber);if(!r||!l||r.error||l.error)return;const d=[],p=r.resources.filter(h=>h.allocated!=h.requested).map(h=>{const g=h.requested-h.allocated;return h.questions&&d.push(...h.questions),c.jsxs("li",{className:"list-group-item d-flex justify-content-between align-items-center mb-0",children:[h.name,c.jsx("span",{className:`badge bg-${g>0?"primary":"danger"} rounded-pill`,children:h.isBoolean?vf(h.requested):c.jsxs(c.Fragment,{children:[g>0?"+":"",It(g,h)," ",h.unit]})})]},h.resourceId)}),f=d.some(({attributes:h,values:g})=>g.length==0&&h[0].required);return c.jsxs(De,{size:"lg",show:r.showResourcesModal,onHide:o,scrollable:!0,children:[c.jsx(De.Header,{closeButton:!0,children:c.jsx(De.Title,{children:"Complete Your Exchange"})}),c.jsxs(De.Body,{children:[c.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."}),c.jsx("ul",{className:"list-group mb-3",children:p}),d.length?c.jsxs(c.Fragment,{children:[c.jsx("h2",{children:"Resource Questions"}),c.jsx("p",{children:"Some of the resources you selected have associated questions. Please answer the questions below."}),d.map(h=>c.jsx(aI,{question:h,requestId:e,grantNumber:t},h.attributeSetId))]}):null]}),c.jsx(De.Footer,{children:c.jsxs("div",{className:"d-flex",children:[c.jsx("button",{type:"button",className:"btn btn-primary me-2",onClick:o,children:"Continue Editing"}),c.jsx("button",{type:"button",className:"btn btn-secondary",onClick:i,disabled:f,children:"Submit"})]})})]})}function w0({user:e}){const t=`${e.lastName}, ${e.firstName}`;let r=t,i=[e.organization,e.email].filter(o=>o).join(", ");return i&&(r+=`: ${i}`),c.jsx("abbr",{title:r,children:t})}function cI({requestId:e,grantNumber:t}){const{project:r}=Zt(t),{request:i,closeUsageDetailModal:o}=At(e,t);if(!i||i.error||!r||r.error||!i.usageDetailStatus)return;let l,d="Usage";if(i.usageDetailStatus==yt.pending)l=c.jsx(is,{});else if(i.usageDetailStatus==yt.error)l=c.jsx(Ye,{color:"danger",children:"An error occurred while loading usage data."});else{const{projectTitle:p,resourceDisplayName:f,resourceRepositoryKey:h,users:g}=i.usageDetail,{full:y,short:x}=hi(f),w=i.resources.find(C=>C.resourceRepositoryKey==h),_=C=>It(C,{decimalPlaces:w?w.decimalPlaces:void 0}),S={};for(let C of r.users)S[C.username]=C;d=c.jsxs(c.Fragment,{children:["Usage: ",x||y," for ",p]});const b=[{key:"name",name:"Name",format:(C,{lastName:R,firstName:N,portalUsername:P})=>{const k=S[P];return k?c.jsx(w0,{user:k}):`${R}, ${N}`}},{key:"portalUsername",name:"Resource Username",format:C=>{const R=S[C],N=R?R.resourceUsernames[w.resourceId]:null;return N||c.jsx(c.Fragment,{children:"—"})}},{key:"role",name:"Role",format:C=>tx[C].name},{key:"lastWeek",name:"Last Week",class:"text-end",format:_},{key:"lastMonth",name:"Last Month",class:"text-end",format:_},{key:"lastQuarter",name:"Last 3 Months",class:"text-end",format:_},{key:"currentRequest",name:"Current Allocation",class:"text-end",format:_},{key:"total",name:"All Time",class:"text-end",format:_}];l=g.length?c.jsx(An,{rows:g,columns:b}):c.jsx(Ye,{color:"info",children:"There is no usage for this resource."})}return c.jsxs(De,{show:!0,size:"lg",onHide:o,scrollable:!0,children:[c.jsx(De.Header,{closeButton:!0,children:c.jsx(De.Title,{children:d})}),c.jsx(De.Body,{children:l})]})}var uI=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"];function dI(e){var t=e.defaultOptions,r=t===void 0?!1:t,i=e.cacheOptions,o=i===void 0?!1:i,l=e.loadOptions;e.options;var d=e.isLoading,p=d===void 0?!1:d,f=e.onInputChange,h=e.filterOption,g=h===void 0?null:h,y=Dn(e,uI),x=y.inputValue,w=j.useRef(void 0),_=j.useRef(!1),S=j.useState(Array.isArray(r)?r:void 0),b=xt(S,2),C=b[0],R=b[1],N=j.useState(typeof x<"u"?x:""),P=xt(N,2),k=P[0],O=P[1],T=j.useState(r===!0),D=xt(T,2),K=D[0],U=D[1],W=j.useState(void 0),H=xt(W,2),X=H[0],oe=H[1],re=j.useState([]),se=xt(re,2),pe=se[0],q=se[1],ne=j.useState(!1),I=xt(ne,2),B=I[0],Y=I[1],ie=j.useState({}),ae=xt(ie,2),ue=ae[0],le=ae[1],de=j.useState(void 0),me=xt(de,2),Ne=me[0],rt=me[1],st=j.useState(void 0),Ae=xt(st,2),He=Ae[0],Z=Ae[1];o!==He&&(le({}),Z(o)),r!==Ne&&(R(Array.isArray(r)?r:void 0),rt(r)),j.useEffect(function(){return _.current=!0,function(){_.current=!1}},[]);var te=j.useCallback(function(bt,ct){if(!l)return ct();var Fe=l(bt,ct);Fe&&typeof Fe.then=="function"&&Fe.then(ct,function(){return ct()})},[l]);j.useEffect(function(){r===!0&&te(k,function(bt){_.current&&(R(bt||[]),U(!!w.current))})},[]);var Pe=j.useCallback(function(bt,ct){var Fe=$O(bt,ct,f);if(!Fe){w.current=void 0,O(""),oe(""),q([]),U(!1),Y(!1);return}if(o&&ue[Fe])O(Fe),oe(Fe),q(ue[Fe]),U(!1),Y(!1);else{var pt=w.current={};O(Fe),U(!0),Y(!X),te(Fe,function(Ct){_&&pt===w.current&&(w.current=void 0,U(!1),oe(Fe),q(Ct||[]),Y(!1),le(Ct?be(be({},ue),{},$s({},Fe,Ct)):ue))})}},[o,te,X,ue,f]),Ee=B?[]:k&&X?pe:C||[];return be(be({},y),{},{options:Ee,isLoading:K||p,onInputChange:Pe,filterOption:g})}var fI=j.forwardRef(function(e,t){var r=dI(e),i=Mb(r);return j.createElement(mp,je({ref:t},i))}),pI=fI;const Zd=({description:e,disabled:t=!1,onChange:r,selectedLength:i,totalLength:o})=>{const l=j.useRef(),d=j.useId();let p=i==o,f=i>0&&!p;return j.useEffect(()=>{l.current&&(l.current.checked=p,l.current.indeterminate=f)},[p,f]),c.jsxs(c.Fragment,{children:[c.jsx("input",{className:"custom-checkbox form-check-input",disabled:t,id:d,onChange:h=>r(h.target.checked),ref:l,type:"checkbox"}),c.jsx("label",{className:"form-check-label",htmlFor:d,"aria-description":`${p?"Deselect":"Select"} ${e}`})]})};function hI({grantNumber:e,requestId:t}){const{project:r,addUser:i,resetUsers:o,saveUsers:l,setTab:d,setUserRole:p,statuses:f,toggleUsersResources:h}=Zt(e),{request:g}=r?At(t||r.currentRequestId,e):{request:null};if(!r||!r.currentRequestId||!g||r.error||g.error)return;const y=r.isManager,x="Exchange"in g.allowedActions,w=r.usersStatus==f.pending,_=r.usersStatus==f.success,S=r.usersStatus==f.error,b=r.users,C=g.resources.filter(Dd),R=C.length==0,N=b.find(U=>U.hasChanges)!==void 0,P=b.find(U=>U.role!="pi")!==void 0;let k;_&&!N?k=c.jsx(Ye,{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."}):S?k=c.jsxs(Ye,{color:"danger",children:["Sorry, some of your changes could not be saved.",r.usersErrors?.length>0&&c.jsx("ul",{className:"mb-0",style:{fontSize:"inherit"},children:r.usersErrors.map((U,W)=>c.jsx("li",{children:U},W))})]}):y?C.length?R&&(k=c.jsx(Ye,{color:"warning",children:"This project does not have any active resources."})):k=c.jsxs(Ye,{color:"warning",children:["This project does not have any resources."," ",x?c.jsx("a",{href:Re.routes.request_action_path(g.requestId,"new?action_type=Exchange"),onClick:U=>{U.preventDefault(),d("resources")},children:"Exchange credits for resources."}):null," ","Additional users can be added after an exchange is approved."]}):k=c.jsxs(Ye,{color:"warning",children:["You do not have permission to manage users for this project. Please contact ",yf(r)," to request a change."]});const O=(U,W)=>{let H,X,oe,re;if(W.key=="all"){H="all resources for all users",X=se=>h(se),oe=0;for(let se of b)oe+=se.resourceIds.length;re=b.length*C.length}else H=`all users for ${W.name}`,X=se=>h(se,null,W.key),oe=b.filter(({resourceIds:se})=>se.includes(W.key)).length,re=b.length;return c.jsxs(c.Fragment,{children:[W.key=="all"?U:c.jsx(Xn,{resource:W,userGuide:!1}),c.jsx("br",{}),c.jsx(Zd,{description:H,disabled:W.disabled,onChange:X,selectedLength:oe,totalLength:re})]})},T=Ml.map(({role:U,name:W})=>c.jsx("option",{value:U,children:W},U)),D=[{key:"name",name:"Name",width:200,format:(U,W)=>c.jsx(w0,{user:W})},{key:"username",name:"ACCESS Username",width:100},{key:"role",name:"Role",width:100,format:(U,W)=>c.jsx("select",{className:"form-select",value:U,onChange:H=>p(W.username,H.target.value),disabled:!y||U=="pi"||U=="co_pi",style:{position:"absolute",left:0,top:0,bottom:0,right:0,borderWidth:0},children:T.filter(H=>H.key==U||!["pi","co_pi"].includes(H.key))})}];C.length&&D.push({key:"all",name:"All Resources",class:`text-center ${Xr.important}`,disabled:!y||R,width:100,format:(U,W)=>c.jsx(Zd,{description:`all users for ${W.name}`,disabled:!y||R,onChange:H=>h(H,W.username),selectedLength:W.resourceIds.length,totalLength:C.length}),formatHeader:O});for(let U of C)D.push({key:U.resourceId,name:U.name,class:"text-center",disabled:!y||!U.isActive,icon:U.icon,format:(W,H)=>c.jsx(c.Fragment,{children:c.jsx("input",{className:"form-check-input",disabled:!y||!U.isActive,onChange:X=>h(X.target.checked,H.username,U.resourceId),type:"checkbox",checked:H.resourceIds.includes(U.resourceId)})}),formatHeader:O});const K=b.map(U=>U.hasChanges?Xr.edited:"");return c.jsxs(c.Fragment,{children:[k,c.jsx(An,{rows:b,columns:D,frozenColumns:C.length?4:3,classes:"mb-0",minWidth:"800px",rowClasses:K,scrollRowIndex:r.usersNewRowIndex}),y&&C.length&&!R?c.jsx("div",{style:{marginTop:"-1px",position:"relative",zIndex:100},children:c.jsx(pI,{classNames:{control:()=>"react-select"},loadOptions:async U=>(await h1(U)).map(H=>({isDisabled:H.eligibility==="no",label:c.jsxs("span",{className:"d-flex justify-content-between",children:[c.jsxs("span",{className:H.eligibility==="no"?"text-decoration-line-through":"",style:{color:H.eligibility==="no"?"#707070":void 0},children:[H.username," (",H.firstName," ",H.lastName,","," ",H.organization,H.email?`, ${H.email}`:""]}),H.eligibility==="no"&&H.eligibilityReason&&c.jsxs("span",{className:"text-danger ms-2",children:[c.jsx("i",{className:"bi bi-exclamation-octagon"})," ",H.eligibilityReason]})]}),value:H})),onChange:U=>i(U.value),placeholder:"Add another user...",value:null,"aria-label":"Add another user"})}):null,y&&(C.length&&!R||P)?c.jsxs("div",{className:"d-flex mt-3",children:[c.jsx("button",{type:"button",className:"btn btn-danger me-2",disabled:w||!N,onClick:o,children:"Reset Form"}),c.jsx("button",{type:"button",className:"btn btn-secondary",disabled:w||!N,onClick:l,children:w?"Saving...":"Save Changes"})]}):null]})}const mI=(e,t,r)=>{let i=!0;const o=[];for(const d of t)e[d]||(i=!1,o.push(d));const l=e.authors||[];for(const d of l)for(const p of r)d[p]||(i=!1,o.includes(p)||o.push(p));return{formValid:i,missingFields:o}},gI=e=>e.length>0?c.jsxs("div",{role:"alert",children:[c.jsx("p",{children:"Please provide the following information before submitting:"}),c.jsx("ul",{children:e.map(t=>c.jsx("li",{children:vI(t)},t))})]}):null;function vI(e){return e.split("_").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}const yI=new Set(["fields","projects","publication_resources","tags"]),Xs={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},S0=os({name:"publicationEdit",initialState:Xs,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 r=e.publication_types.find(i=>i.publication_type==t).fields;r.forEach(i=>{const o=e.publication.fields.find(l=>l.csl_field_name==i.csl_field_name);o&&(i.value=o.value)}),e.publication.publication_type=t,e.publication.fields=r},dataLoaded:(e,{payload:t})=>{e.publication=t.publication,e.form_valid=t.publication.title.trim()!="",e.publication.authors.forEach(r=>{r.affiliation||(r.affiliation="")}),e.publication_types=t.publication_types,e.projects=t.publication.projects||[],e.selected_resources=(t.publication.publication_resources||[]).map(r=>r.acct_resource_id).filter(Boolean).map(r=>Number(r)),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(r=>r.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(r=>{r.field_value=t[r.csl_field_name]??""}),Object.entries(t).forEach(([r,i])=>{if(!yI.has(r)){if(r==="authors"){Array.isArray(i)&&(e.publication.authors=i.map(o=>({...o,affiliation:o.affiliation??""})));return}i!=null&&(e.publication[r]=i)}}),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,r]of Object.entries(Xs))e[t]=r},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:my,addProject:xI,changePublicationType:ef,dataLoaded:bI,deleteAuthor:wI,hideError:_0,setFormValid:SI,setGrantNumber:j0,setPublication:_I,setPublicationId:jI,setShowEditModal:C0,resetState:CI,toggleRequest:EI,updateAuthor:RI,updateErrors:di,updateField:NI,updatePublication:ol,updateSaving:gy,updateSelectedResources:kI,updateShowSaved:tf,setResourcesNoneSelected:vy}=S0.actions,OI=e=>e.publicationEdit.publication,TI=e=>e.publicationEdit.publication.doi,PI=e=>e.publicationEdit.publication_types,E0=e=>e.publicationEdit.publication.authors,R0=e=>e.publicationEdit.projects,II=pi([R0],e=>e.filter(t=>t.selected)),AI=pi([II],e=>{const t=new Set,r=[];return e.forEach(i=>{(i.resources||[]).forEach(o=>{!o?.resource_id||t.has(o.resource_id)||(t.add(o.resource_id),r.push(o))})}),r}),N0=e=>e.publicationEdit.selected_resources,k0=e=>e.publicationEdit.resources_none_selected,MI=pi([N0,k0],(e,t)=>e.length>0||t),DI=e=>e.publicationEdit.errors,O0=e=>e.publicationEdit.data_loaded,T0=e=>e.publicationEdit.publicationId,$I=e=>e.publicationEdit.showEditModal,FI=e=>e.publicationEdit.show_saved,Gl=e=>e.publicationEdit.saving,P0=e=>e.publicationEdit.form_valid,LI=e=>e.publicationEdit.grant_number,I0=e=>!Gl(e)&&O0(e)&&P0(e)&&A0(e)&&e.publicationEdit.projects.filter(t=>t.selected).length>0&&MI(e),A0=e=>{const t=E0(e);return t.length==0?!1:t.filter(r=>r.first_name==""||r.last_name=="").length==0},UI=()=>async(e,t)=>{const r=t().publicationEdit.publication.doi,i="Unable to retrieve publication. Double check your DOI, or continue entering information manually.";fetch(Re.routes.publications_lookup_path({doi:r})).then(o=>o.json()).then(o=>{if(o.title!=""){let l=t().publicationEdit.publication_types.find(d=>d.citation_style_type==o.type);e(ef(l?l.publication_type:"Other")),e(_I(o))}else e(di(i))},()=>{e(di(i))})},zI=()=>async(e,t)=>{const r=t().publicationEdit.grant_number;await fetch(Re.routes.publications_find_project_path({grant_number:r})).then(i=>i.json()).then(i=>{e(xI(i)),e(j0(""))},()=>{e(di("Unable to find a project with this grant number."))})},gp=e=>async t=>{t(jI(e)),t(C0(!0))},M0=e=>async t=>{const r=e?`${Re.routes.edit_publication_path(e)}.json`:Re.routes.publication_path("new.json");await fetch(r,{headers:{accept:"application/json"}}).then(i=>i.json()).then(i=>{t(bI(i))})},VI=()=>async(e,t)=>{const r=t().publicationEdit,i=r.projects.filter(x=>x.selected),o={...r.publication},l=r.errors,{formValid:d,missingFields:p}=mI(o,["title","publication_year","publication_month"],["first_name","last_name"]);if(!d){l.length>0&&Array.from(l).forEach(w=>{e(_0(w.id))});const x=gI(p);e(di(x));return}const h={authenticity_token:r.authenticityToken||document.querySelector("meta[name=csrf-token]").content,publication:{...o,access_staff_publication:r.resources_none_selected},authors:o.authors.map(x=>({...x,order:0})),tags:[],projects:i,resources:r.selected_resources.map(x=>({resource_id:x}))};let g,y;o.publication_id?(g=Re.routes.publication_path(o.publication_id),y="PATCH"):(g=Re.routes.publications_path(),y="POST"),e(gy(!0)),e(tf(!1));try{const x=await fetch(g,{method:y,headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(!x.ok)throw new Error(`Save failed with status ${x.status}`);o.publication_id||(e(CI()),e(M0())),e(tf(!0))}catch{e(di("There was an error saving this publication."))}finally{e(gy(!1))}},wi=S0.reducer,In=ft("publicationsSearch/getPublications",async(e,{getState:t})=>{const r=t().publicationsSearch,i={},{authorName:o,createdBy:l,doi:d,grantNumber:p,journal:f,publicationType:h}=r.filterSelections;return d&&(i.doi=d),o&&(i.author_name=o),f&&r.filterOptions.journals.includes(f)&&(i.journal=f),h&&(i.publication_type=h),l.length&&(i.created_by=l),p&&(i.grant_number=p),r.usePagination?i.page=r.page.current+1:i.per_page=9999,await(await fetch(Re.routes.search_publications_path(i),{headers:{Accept:"application/json"}})).json()}),vp=ft("publicationsSearch/getFilters",async()=>(await(await fetch(Re.routes.search_publications_filters_path())).json()).filters||[]),fi={publications:[],publicationsLoaded:!1,filterSelections:{createdBy:[],doi:"",grantNumber:"",journal:"",authorName:"",publicationType:""},filterOptions:{journals:[],publication_types:[]},page:{current:0,last:1},usePagination:!0},D0=os({name:"publicationsSearch",initialState:fi,reducers:{addCreatedByUsername:(e,{payload:t})=>{e.filterSelections.createdBy.push(t)},removeCreatedByUsername:(e,{payload:t})=>{e.filterSelections.createdBy=e.filterSelections.createdBy.filter(r=>r!==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(In.pending,t=>{t.publicationsLoaded=!1,t.error=null}).addCase(In.fulfilled,(t,r)=>{t.publicationsLoaded=!0,t.usePagination?(t.publications=[...t.publications,...r.payload.publications||[]],t.page.current=r.payload?.pagination?.current_page||0,t.page.last=r.payload?.pagination?.last_page||1):t.publications=r.payload.publications||[]}).addCase(In.rejected,(t,r)=>{t.publicationsLoaded=!0,t.error=r.error.message}).addCase(vp.fulfilled,(t,r)=>{t.filterOptions=r.payload})}}),{addCreatedByUsername:BI,removeCreatedByUsername:qI,resetFilters:HI,resetPublications:yy,setUsePagination:yp,updateFilterSelection:nf}=D0.actions,WI=e=>e.publicationsSearch.filterSelections,KI=e=>e.publicationsSearch.publicationsLoaded,$0=e=>e.publicationsSearch.publications,GI=e=>e.publicationsSearch.filterOptions,YI=e=>e.publicationsSearch.page,QI=e=>e.publicationsSearch.usePagination,Yl=D0.reducer;function XI({children:e,hasMore:t,loadMore:r,isLoading:i}){const o=j.useRef(null),l=j.useRef(i);return j.useEffect(()=>{l.current=i},[i]),j.useEffect(()=>{const d=o.current;if(d&&t){const p=new IntersectionObserver(f=>{!l.current&&f[0].isIntersecting&&r()});return p.observe(o.current),()=>p.unobserve(d)}},[o,r,t]),c.jsxs(c.Fragment,{children:[e,c.jsx("div",{ref:o}),i&&c.jsx(is,{})]})}const JI="_citation_ru41y_1",ZI="_tags_ru41y_7",xy={citation:JI,tags:ZI},e2=/10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i,F0=e=>{const t=(e||"").match(e2);return t?t[0]:null};function L0({publication:e}){const{authors:t,doi:r,fields:i,publication_type:o,publication_year:l,title:d}=e,{"Journal name":p,Pages:f,Publisher:h,"Volume/Issue":g}=i,y=t.map(b=>`${b.last_name}, ${b.first_name.substr(0,1)}.`).join(", "),x=l||"N/A",w=d.endsWith(".")?d:`${d}.`,_=F0(r),S=_?c.jsx("a",{href:`https://doi.org/${_}`,target:"_blank",rel:"noreferrer",children:_}):null;if(["Journal Paper","Other"].includes(o))return c.jsxs(c.Fragment,{children:[y," (",x,"). ",w," ",p&&c.jsxs("em",{children:[p,"."]})," ",g&&c.jsxs(c.Fragment,{children:[g,","]})," ",f&&c.jsxs(c.Fragment,{children:[f,"."]})," ",S]});if(["Conference Paper","Software"].includes(o))return c.jsxs(c.Fragment,{children:[y," (",x,"). ",w," ",p&&c.jsxs("em",{children:[p,"."]})," ",S]});if(["Book","Book Chapter"].includes(o))return c.jsxs(c.Fragment,{children:[y," (",x,"). ",c.jsx("em",{children:w})," ",h&&c.jsxs("em",{children:[h,"."]})," ",S]});if(o==="Dataset")return c.jsxs(c.Fragment,{children:[y," (",x,").",c.jsx("em",{children:w})," [Dataset]. ",h,". ",S]});if(o==="Dissertation")return c.jsxs(c.Fragment,{children:[y," (",x,"). ",c.jsx("em",{children:w}),". [Doctoral dissertation",h&&c.jsxs(c.Fragment,{children:[", ",h]}),"]. ",S]})}function t2({allowEdit:e=!0,last:t=!1,publication:r}){const i=Ve(),{projects:o,publication_type:l,resources:d=[]}=r,p=o.map(f=>f.grant_number);return c.jsx("div",{className:`col-12 mb-2 ${t||"border-bottom"}`,children:c.jsx("div",{className:"card",style:{border:"unset"},children:c.jsxs("div",{className:"card-body pt-2",children:[c.jsxs("div",{className:xy.citation,children:[c.jsx(L0,{publication:r}),e&&r.can_edit&&c.jsx(Gs,{onClick:()=>i(gp(r.publication_id)),icon:"pencil",title:"Edit publication"})]}),c.jsxs("ul",{className:xy.tags,children:[c.jsxs("li",{children:[c.jsx("i",{className:"bi bi-file-earmark"}),l==="Other"?"Publication":l]},"project-type"),p.map((f,h)=>c.jsx("li",{id:`project_${h}`,children:c.jsxs("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${f}`,id:`grant_link${h}`,target:"_blank",rel:"noreferrer",title:`Supported by project ${f}`,children:[c.jsx("i",{className:"bi bi-link-45deg"}),f]})},`grant_${h}`)),d.map(f=>{const{full:h,short:g}=hi(f);return c.jsxs("li",{children:[c.jsx("i",{className:"bi bi-server"})," ",g?c.jsx("abbr",{title:h,children:g}):h]},f)})]})]})})})}function xp({allowEdit:e=!0,emptyMessage:t="No matching publications."}){const r=Ve(),{current:i,last:o}=xe(YI),l=xe(KI),d=xe(QI),p=xe($0);return l&&p.length===0?c.jsx("p",{children:t}):c.jsx(c.Fragment,{children:c.jsx(XI,{isLoading:!l,hasMore:d&&i<o,loadMore:()=>r(In()),children:p.map((f,h)=>c.jsx(t2,{allowEdit:e,publication:f,last:h===p.length-1},f.publication_id))})})}function n2(){const e=Ve(),t=xe(TI);return c.jsx("div",{className:"row mb-3",children:c.jsxs("div",{className:"col",children:[c.jsx("label",{htmlFor:"doi",className:"form-label",children:"DOI"}),c.jsxs("div",{className:"input-group",children:[c.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:r=>e(ol({key:"doi",value:r.target.value}))}),c.jsx("button",{className:"btn btn-primary",type:"button",id:"doi_button",onClick:()=>e(UI()),children:"Lookup Publication"})]})]})})}const r2=({author:e,authorKey:t,updateAuthor:r,deleteAuthor:i})=>{const o=p=>{r({key:p.target.name,value:p.target.value,idx:t})},l=p=>c.jsx("td",{children:c.jsx("input",{type:"text",className:"form-control",name:p,id:p,value:e[p],onChange:f=>o(f)})},`field_${p}`),d=["first_name","last_name","affiliation"];return c.jsxs("tr",{children:[d.map(p=>l(p)),c.jsx("td",{children:t!==0&&c.jsx("button",{className:"btn btn-sm btn-danger",onClick:()=>i(t),children:c.jsx("i",{className:"bi bi-trash"})})})]})},s2=e=>({updateAuthor:t=>e(RI(t)),deleteAuthor:t=>e(wI(t))}),o2=rC(null,s2)(r2);function i2(){const e=Ve(),t=xe(E0),r=xe(A0),i=t.length===0;j.useEffect(()=>{i&&e(my())},[i,e]);const o=()=>r?"":c.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 c.jsxs("div",{children:[o(),c.jsxs("table",{className:"table",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("th",{children:"First Name"}),c.jsx("th",{children:"Last Name"}),c.jsx("th",{children:"Affiliation"}),c.jsx("th",{})]})}),c.jsx("tbody",{children:t.map((l,d)=>c.jsx(o2,{author:l,authorKey:d},`author_${d}`))})]}),c.jsx("button",{className:"btn btn-primary mt-3",onClick:()=>e(my()),children:"Add Author"})]})}function a2(){const e=Ve(),t=xe(R0),r=o=>`list-group-item list-group-item-action clickable ${o.selected?"list-group-item-success":""}`,i=()=>t.filter(o=>o.selected).length>0;return c.jsx("div",{className:"row",children:c.jsxs("div",{className:"col",children:[i()?"":c.jsx("div",{className:"alert alert-danger",children:"You must select at least one project"}),c.jsx("div",{className:"list-group",children:t.map((o,l)=>c.jsxs("div",{className:r(o),onClick:()=>e(EI(l)),children:[o.grant_number,": ",o.title]},`project_${o.grant_number}`))})]})})}function l2(){const e=Ve(),t=xe(LI);return c.jsx("div",{className:"row",children:c.jsxs("div",{className:"col",children:["If your project isn't listed above, you can manually add it by entering the grant number below.",c.jsxs("div",{className:"input-group mt-1",children:[c.jsx("input",{type:"text",className:"form-control",value:t,onChange:r=>e(j0(r.target.value)),placeholder:"Enter a grant number"}),c.jsx("button",{className:"btn btn-primary",onClick:()=>e(zI()),children:"Find Project"})]})]})})}function c2(){const e=Ve(),t=xe(AI),r=xe(N0),i=xe(k0),o=j.useMemo(()=>t.filter(h=>(h.label||h.value||"").toLowerCase()!=="access credits").map(h=>({resource_id:h.resource_id,label:h.label||h.value||h.resource_name||"",value:h.value||h.label||h.resource_name||"",providerAbbrev:h.organization_abbrev,providerName:h.organization_name})).sort((h,g)=>h.label.localeCompare(g.label)),[t]),l=j.useMemo(()=>{const h={};return o.forEach(g=>{const y=g.providerAbbrev||"Other";h[y]||(h[y]={providerAbbrev:g.providerAbbrev,providerName:g.providerName,resources:[]}),h[y].resources.push(g)}),Object.keys(h).sort().reduce((g,y)=>(g[y]=h[y],g),{})},[o]),d=(h,g)=>{i&&e(vy(!1));const y=r||[],x=Number(h);let w;g?w=y.includes(x)?y:[...y,x]:w=y.filter(_=>Number(_)!==x),e(kI(w))},p=h=>{e(vy(h))},f=(h,g)=>c.jsxs("div",{className:"form-check",children:[c.jsx("input",{className:"form-check-input",type:"checkbox",id:`resource_used_${h.resource_id}_${g}`,checked:r.includes(Number(h.resource_id)),disabled:i,onChange:y=>d(Number(h.resource_id),y.target.checked)}),c.jsx("label",{className:"form-check-label",htmlFor:`resource_used_${h.resource_id}_${g}`,children:h.label})]},`resource_${h.resource_id}`);return c.jsxs("div",{className:"mb-4",children:[c.jsxs("div",{className:"fw-bold mb-2",children:["Resources",c.jsx("i",{className:"bi bi-asterisk text-danger"})]}),c.jsx("div",{className:"text-muted small mb-2",children:"Select a project above to see available resources."}),!i&&r.length===0&&c.jsx("div",{className:"alert alert-danger",children:'Select at least one resource or choose "This is an ACCESS staff publication".'}),o.length>0&&c.jsx(c.Fragment,{children:Object.entries(l).map(([h,g])=>c.jsxs("div",{className:"mb-3",children:[c.jsx("div",{className:"fw-semibold text-muted mb-2",style:{fontSize:"0.95em"},children:g.providerName||h}),c.jsx("div",{className:"ms-3",children:g.resources.map((y,x)=>f(y,x))})]},`provider_${h}`))}),c.jsxs("div",{className:"form-check mt-2",children:[c.jsx("input",{className:"form-check-input",type:"checkbox",id:"resources_none",checked:i,onChange:h=>p(h.target.checked)}),c.jsx("label",{className:"form-check-label",htmlFor:"resources_none",children:"This is an ACCESS staff publication"})]})]})}const by=1980,U0=["January","February","March","April","May","June","July","August","September","October","November","December"],u2=e=>e==null?"":`${e}`,d2=e=>{if(e==null||e==="")return"";const t=Number(e);if(Number.isInteger(t)&&t>=1&&t<=12)return`${t}`;const r=`${e}`.trim().toLowerCase(),i=U0.findIndex(o=>o.toLowerCase()===r);return i>=0?`${i+1}`:""};function f2(){const e=Ve(),t=xe(OI),r=xe(PI);xe(I0);const i=xe(P0),o=y=>{e(SI(y.target.value.trim()!=="")),e(ol({key:"title",value:y.target.value}))},l=()=>t.fields.map((y,x)=>c.jsx("div",{className:"row mb-3",children:c.jsxs("div",{className:"col",children:[c.jsx("label",{htmlFor:`field_${y.csl_field_name}`,className:"form-label",children:y.name}),c.jsx("input",{type:"text",className:"form-control",name:`field_${y.csl_field_name}`,id:`field_${y.csl_field_name}`,value:y.field_value||"",onChange:w=>e(NI({index:x,value:w.target.value}))})]})},`field_${y.csl_field_name}`)),d=()=>{const y=new Date().getFullYear()+2,x=Array.from({length:y-by+1},(b,C)=>by+C),w=u2(t.publication_year),_=d2(t.publication_month),S=c.jsx("i",{className:"bi bi-asterisk text-danger"});return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row mb-3",children:c.jsxs("div",{className:"col",children:[c.jsxs("label",{className:"form-label",htmlFor:"publication_title",children:["Title ",S]}),c.jsx("input",{name:"publication_title",id:"publication_title",type:"text",className:`form-control ${i?"":"is-invalid"}`,value:t.title||"",onChange:o})]})}),c.jsx("div",{className:"row mb-3",children:c.jsxs("div",{className:"col",children:[c.jsx("label",{className:"form-label",htmlFor:"publication_year",children:"Year Published"}),c.jsxs("select",{name:"publication_year",id:"publication_year",className:"form-control",value:w,onChange:b=>{e(ol({key:"publication_year",value:b.target.value}))},children:[c.jsx("option",{value:"",children:"Select a year"}),x.map(b=>c.jsx("option",{value:`${b}`,children:b},`year_${b}`))]})]})}),c.jsx("div",{className:"row mb-3",children:c.jsxs("div",{className:"col",children:[c.jsx("label",{className:"form-label",htmlFor:"publication_month",children:"Month Published"}),c.jsxs("select",{name:"publication_month",id:"publication_month",className:"form-control",value:_,onChange:b=>{e(ol({key:"publication_month",value:b.target.value}))},children:[c.jsx("option",{value:"",children:"Select a month"}),U0.map((b,C)=>c.jsx("option",{value:`${C+1}`,children:b},`month_${C}`))]})]})})]})},p=c.jsxs("div",{className:"card",children:[c.jsx("div",{className:"card-header",children:c.jsx("h2",{children:"Publication Information"})}),c.jsxs("div",{className:"card-body",children:[c.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.'}),c.jsx(n2,{}),c.jsx("div",{className:"row mb-3",children:c.jsxs("div",{className:"col",children:[c.jsx("label",{htmlFor:"publication_type",className:"form-label",children:"Publication Type"}),c.jsx("select",{name:"publication[publication_type]",id:"publication_type",className:"form-control",value:t.publication_type||"",onChange:y=>e(ef(y.target.value)),children:r.map(y=>c.jsx("option",{value:y.publication_type,children:y.publication_type},`pub_type_${y.type_id}`))})]})}),d(),l()]})]}),f=c.jsxs("div",{className:"card mt-3",children:[c.jsxs("div",{className:"card-header d-flex",children:[c.jsx("h2",{children:"Authors"}),c.jsxs(zs,{children:[`Add authors by clicking the "Add Authors" button below and entering the author's details. You may also remove authors by clicking the `,c.jsx("i",{className:"bi bi-trash fw-bold text-danger"})," ","button"]})]}),c.jsx("div",{className:"card-body",children:c.jsx(i2,{})})]}),h=c.jsxs("div",{className:"card mt-3",children:[c.jsxs("div",{className:"card-header d-flex",children:[c.jsx("h2",{children:"Associated Projects"}),c.jsx(zs,{children:"Click/Tap each project that this publication is related to."})]}),c.jsxs("div",{className:"card-body",children:[c.jsx(a2,{}),c.jsx("hr",{}),c.jsx(l2,{})]})]}),g=c.jsxs("div",{className:"card mt-3",children:[c.jsxs("div",{className:"card-header d-flex",children:[c.jsx("h2",{children:"Resources"}),c.jsx(zs,{children:"Select the resources that were used in this publication. Resources are shown from the projects you selected above."})]}),c.jsx("div",{className:"card-body",children:c.jsx(c2,{})})]});return c.jsxs(c.Fragment,{children:[p,f,h,g]})}function z0(){const e=Ve(),t=xe(O0),r=xe(T0);return j.useEffect(()=>{e(M0(r))},[r,e]),c.jsx(c.Fragment,{children:t?c.jsx(f2,{}):c.jsx(is,{})})}function bp(){const e=Ve(),t=xe($I),r=xe(T0),i=xe(I0),o=l=>{l&&e(VI()),e(C0(!1))};return c.jsx(c.Fragment,{children:c.jsxs(De,{size:"xl",show:t,onHide:()=>o(!1),scrollable:!0,children:[c.jsx(De.Header,{closeButton:!0,children:c.jsxs(De.Title,{children:[r?"Edit":"Add"," Publication"]})}),c.jsx(De.Body,{children:c.jsx(z0,{})}),c.jsx(De.Footer,{children:c.jsxs("div",{className:"d-flex",children:[c.jsx("button",{type:"button",className:"btn btn-danger me-2",onClick:()=>o(!1),children:"Cancel"}),c.jsx("button",{type:"button",className:"btn btn-primary",disabled:!i,onClick:()=>i&&o(!0),children:"Save Publication"})]})})]})})}function p2({grantNumber:e}){const t=Ve(),r=xe(Gl);return j.useEffect(()=>{r||(t(nf({name:"grantNumber",value:e})),t(yp(!1)),t(In()))},[e,r,t]),c.jsxs(c.Fragment,{children:[c.jsx(xp,{grantNumber:e,emptyMessage:"No publications are associated with this project."}),c.jsx(bp,{})]})}function h2({grantNumber:e}){const t=j.useRef(ar({reducer:{publicationEdit:wi,publicationsSearch:Yl}}));return c.jsxs(c.Fragment,{children:[c.jsx(lr,{store:t.current,children:c.jsx(p2,{grantNumber:e})}),c.jsx("div",{children:c.jsx("a",{href:Re.routes.publications_path(),className:"btn btn-primary",children:"Add or Manage Publications"})})]})}function m2({requestId:e,grantNumber:t}){const{request:r}=At(e,t),{project:i,setRequest:o,setTab:l}=Zt(t||r.grantNumber);if(!r)return;if(r.error)return c.jsx(Ye,{color:"danger",children:r.error});const d=r.timeStatus||r.actions[0].status.toLowerCase(),p=r.actions.find(({showDeleteModal:g})=>g),f=[];r.resources.length||f.push("resources"),e!=i.currentRequestId&&f.push("users");const h=(i.users||[]).filter(g=>g.eligibility==="no"&&g.role!=="user");return c.jsxs("div",{className:"request",children:[r.returnedForCorrections?c.jsxs(Ye,{color:"warning",children:[c.jsx("p",{children:"Your request has been returned for corrections. These are the notes from the Allocations Team"}),c.jsx("div",{className:V1.returnedForCorrectionsNotes,children:r.returnedForCorrectionsNotes}),c.jsx("p",{className:"mt-3",children:"Please address these issues by clicking the Edit button to edit your request."})]}):"",r.timeStatus!="current"&&!r.returnedForCorrections?c.jsxs(Ye,{color:"warning",children:["You are viewing ","aeiou".includes(d[0])?"an":"a"," ",d," request."," ",f.length?`You cannot manage ${f.join(" or ")} for this request.`:""," ",i.currentRequestId?c.jsx("a",{href:Re.routes.request_path(i.currentRequestId),onClick:g=>{g.preventDefault(),o(i.currentRequestId)},children:"Go to the current request."}):null]}):null,i.isManager&&h.length>0&&c.jsxs(Ye,{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:",c.jsx("br",{}),c.jsx("ul",{className:"fs-6 mb-0",children:h.map(g=>c.jsxs("li",{children:[c.jsxs("strong",{children:[g.firstName," ",g.lastName," (",g.username,"):"]})," ",g.eligibilityReason]},g.username))})]}),c.jsxs(Dx,{activeKey:i.tab,onSelect:l,className:"mt-3 mb-3",children:[c.jsx(Ho,{eventKey:"overview",title:"Overview",className:"mb-0",children:c.jsx(lk,{requestId:e,grantNumber:t})}),c.jsx(Ho,{eventKey:"resources",title:r.usesCredits?"Credits + Resources":"Resources",disabled:f.includes("resources"),children:c.jsx(iI,{requestId:e})}),c.jsx(Ho,{eventKey:"users",title:"Users + Roles",disabled:f.includes("users"),children:c.jsx(hI,{grantNumber:t})}),c.jsx(Ho,{eventKey:"publications",title:"Publications",children:c.jsx(h2,{grantNumber:t,requestId:e})}),c.jsx(Ho,{eventKey:"history",title:"History",children:c.jsx(qN,{requestId:e})})]}),c.jsx(UN,{grantNumber:t,requestId:e}),c.jsx(zN,{grantNumber:t,requestId:e}),c.jsx(VN,{grantNumber:t,requestId:e,actionId:p?p.actionId:null}),c.jsx(lI,{grantNumber:t,requestId:e}),c.jsx(cI,{grantNumber:t,requestId:e})]})}function g2({requestId:e,grantNumber:t}){const{request:r,toggleActionsModal:i,toggleDeleteModal:o}=At(e,t);if(!r)return;const{actions:l,allowedActions:d}=r,p=[];d&&(("Extension"in d||"Renewal"in d)&&p.push(["Extend End Date",h=>{h.preventDefault(),i()},"calendar-plus"]),"Final Report"in d&&p.push(["Submit Final Report",`${Re.routes.request_action_path(e,"new")}?action_type=Final+Report`,"file-earmark-check"]));const f=l.find(h=>h.isRequest);if(f){const h=f.allowedOperations||[];h.includes("Edit")&&p.push(["Edit",Re.routes.edit_request_path(r.requestId),"pencil"]),h.includes("Delete")&&p.push(["Delete",g=>{g.preventDefault(),o(f.actionId)},"trash","danger"])}return p.map(([h,g,y,x])=>{const w=c.jsxs(c.Fragment,{children:[" ",y&&c.jsx("i",{className:`bi bi-${y} me-1`}),h]});return typeof g=="function"?c.jsx("button",{className:`btn btn-${x||"primary"} ms-2 text-nowrap`,onClick:g,children:w},h):c.jsx("a",{className:`btn btn-${x||"primary"} ms-2 text-nowrap`,href:g,children:w},h)})}function v2({open:e=!1,grantNumber:t,title:r,status:i}){const[o,l]=j.useState(e),{project:d,setRequest:p}=Zt(t,!o&&r&&i&&!0),f=`project-${t}`;let h=null;if(o&&d)if(d.error)h=c.jsx(Ye,{color:"danger",children:d.error});else{let g;const y=d.requestsList.map(x=>(x.requestId==d.selectedRequestId&&(g=x),c.jsx("option",{value:x.requestId,children:gf(x)},x.requestId)));h=c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"d-flex",children:[c.jsx("select",{className:"form-select","aria-label":"Select a request to display",onChange:x=>p(parseInt(x.target.value,10)),value:d.selectedRequestId,disabled:y.length<2,children:y}),c.jsx(g2,{requestId:d.selectedRequestId,grantNumber:t})]}),g?c.jsx(m2,{...g,grantNumber:t}):null]})}return c.jsxs("div",{className:`${ov.project} card mb-3`,children:[c.jsxs("div",{className:`card-header d-flex justify-content-between ${o?"":"border-bottom-0"}`,children:[c.jsx("button",{"aria-expanded":o,"aria-controls":f,className:ov.expand,onClick:()=>l(!o),children:c.jsxs("h2",{className:"mb-1 mt-1 text-start",children:[c.jsx("i",{className:`bi bi-caret-${o?"down":"right"}-fill`})," ",/^[A-Z]/.test(t)?c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"grant-number",children:[t,":"]})," "]}):null,r||d.title]})}),c.jsx(Ys,{status:i||d.status})]}),c.jsx("div",{className:"card-body",id:f,hidden:!o||!d,children:h})]})}function y2({username:e,openFirst:t=1}){const{error:r,loading:i,projects:o}=F1(e);if(i)return c.jsx(is,{});if(r)return c.jsxs(Ye,{color:"danger",children:[r," ",c.jsx("a",{href:"#",onClick:d=>{d.preventDefault(),window.location.reload()},children:"Reload the page"})," ","to try again."]});if(!o.length)return c.jsxs("div",{className:"pt-5 pb-5 text-bg-light border border-light-subtle",children:[c.jsx("p",{className:"fs-2 text-center mb-4",children:"You don't have any projects yet."}),c.jsxs("div",{className:"d-flex gap-2 justify-content-center",children:[c.jsxs("a",{className:"btn btn-primary w-25",href:Re.routes.project_types_path(),children:[c.jsx("i",{className:"bi bi-boxes fs-1 d-block"})," Learn about Project Types"]}),c.jsxs("a",{className:"btn btn-secondary w-25",href:Re.routes.get_your_first_project_path(),children:[c.jsx("i",{className:"bi bi-cpu fs-1 d-block"})," Learn How to Get Your"," ",c.jsx("br",{className:"d-none d-xxl-inline"})," First Project"]}),c.jsxs("a",{className:"btn btn-primary w-25",href:Re.routes.how_to_path(),children:[c.jsx("i",{className:"bi bi-person-plus fs-1 d-block"})," Learn How to Join an Existing Project"]})]})]});const l=new URLSearchParams(window.location.hash.slice(1)).get("grantNumber");return o.map((d,p)=>c.jsx(v2,{open:l?l==d.grantNumber:p<t,...d},d.grantNumber))}const V0={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:[]}},x2=ft("projectsBrowser/initApp",async(e,{getState:t,dispatch:r})=>{const i=window.location.search,o=new URLSearchParams(i);o.has("_requestNumber")&&(r(sf({name:"requestNumber",value:o.get("_requestNumber")})),r(q0(!0))),await r(rf()),await r(Zr()),r(b2())}),b2=ft("projectsBrowser/filterCleanup",async(e,{getState:t,dispatch:r})=>{const o=t().projectsBrowser.typeLists;r(B0({...o,orgs:["-- ALL --"].concat(o.orgs)}))}),rf=ft("projectsBrowser/getFilters",async(e,{getState:t,dispatch:r})=>{const o=`${t().projectsBrowser.apiUrl}?filters=1`,d=await(await fetch(o)).json();r(B0(d.filters))}),Zr=ft("projectsBrowser/getProjects",async(e,{getState:t,dispatch:r})=>{const i=t().projectsBrowser,o=i.filters,l=i.typeLists,d=l.fosTypes.filter(g=>g.checked);let p=`${i.apiUrl}?page=${i.pageData.current_page}`;return o.requestNumber!=""?(p+=`&request_number=${o.requestNumber}`,r(Sy(!0))):(r(Sy(!1)),d.length!=l.fosTypes.length&&(p+=`&fos=${d.map(g=>g.fosTypeId).join(",")}`),o.org!=""&&o.org!="-- ALL --"&&(p+=`&org=${encodeURIComponent(o.org)}`),o.allocationType!=""&&(p+=`&allocation_type=${o.allocationType}`),o.resource!=""&&(p+=`&resources=${o.resource}`)),await(await fetch(p)).json()}),wp=os({name:"projectsBrowser",initialState:V0,reducers:{resetFilters:e=>{e.filters={org:"",allocationType:"",allFosToggled:!1,resource:"",requestNumber:""},e.singleEntry=!1,wp.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(r=>{r.fosTypeId==t.fosTypeId&&(r.checked=!r.checked)}),e.typeLists.fosTypes.filter(r=>r.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(Zr.pending,t=>{t.projectsLoaded=!1}).addCase(Zr.fulfilled,(t,r)=>{const i=r.payload;t.projectsLoaded=!0,t.projects=i.projects,i.pages!=t.pageData.last_page&&(t.pageData.current_page=1),t.showPagination=!0,t.pageData.last_page=i.pages}).addCase(Zr.rejected,(t,r)=>{console.log(r.error)}).addCase(rf.pending,t=>{t.filtersLoaded=!1}).addCase(rf.fulfilled,t=>{t.filtersLoaded=!0})}}),{resetFilters:w2,setApiUrl:nM,setShowPagination:wy,setTypeLists:B0,toggleAllFos:S2,toggleFos:_2,toggleListFiltered:q0,toggleSingleEntry:Sy,updateFilter:sf,updatePageData:of}=wp.actions,j2=e=>e.projectsBrowser.filters,C2=e=>e.projectsBrowser.filtersLoaded,E2=e=>e.projectsBrowser.listIsFiltered,R2=e=>e.projectsBrowser.singleEntry,N2=e=>e.projectsBrowser.projectsLoaded,k2=e=>e.projectsBrowser.pageData,O2=e=>e.projectsBrowser.projects,T2=e=>e.projectsBrowser.filtersLoaded&&e.projectsBrowser.projectsLoaded&&e.projectsBrowser.pageData.last_page>1,P2=e=>e.projectsBrowser.typeLists,I2=wp.reducer,A2=()=>{const e=Ve(),t=xe(j2),r=xe(P2),i=xe(E2),o=r.orgs.map(S=>({label:S,value:S})),l=j.useRef(),[d,p]=j.useState(null),f={height:"200px",overflowX:"auto",padding:"2px"},h=S=>{e(sf({name:S.target.name,value:S.target.value}))},g=()=>{window.scrollTo(0,0),x(!0),e(wy(!1)),e(of({current_page:1})),e(Zr())},y=()=>{p(null),e(wy(!1)),e(of({current_page:1})),e(w2()),i&&(window.scrollTo(0,0),e(Zr()),x(!1))},x=S=>{e(q0(S))},w=S=>{p(S),e(sf({name:"org",value:S.value}))},_=()=>t.org==""&&t.allocationType==""&&t.allFosToggled&&t.resource==""&&t.requestNumber=="";return c.jsx("div",{className:"row sticky-top mb-2",children:c.jsxs("div",{className:"col",children:[c.jsx("h3",{className:"mb-2",children:"Filters"}),c.jsx("h5",{className:"mb-1",children:"Field of Science"}),c.jsxs("div",{className:"border mb-3",style:f,children:[c.jsxs("div",{className:"form-check",children:[c.jsx("input",{className:"form-check-input",type:"checkbox",value:"",id:"toggle_all",checked:t.allFosToggled,onChange:()=>{e(S2())}}),c.jsx("label",{className:"form-check-label",htmlFor:"toggle_all",children:"(Toggle All)"})]}),r.fosTypes.map(S=>c.jsxs("div",{className:"form-check",children:[c.jsx("input",{className:"form-check-input",type:"checkbox",value:S.fosTypeId,id:`fos_${S.fosTypeId}`,checked:S.checked,onChange:()=>e(_2(S))}),c.jsx("label",{className:"form-check-label",htmlFor:`fos_${S.fosTypeId}`,children:S.fosName})]},`fos_${S.fosTypeId}`))]}),c.jsx("h5",{id:"org_select_label",className:"mb-1",children:"Organization"}),c.jsx("div",{className:"mb-3",children:c.jsx(b0,{options:o,openMenuOnClick:!0,name:"org",inputId:"orgs_filter",ref:l,closeMenuOnSelect:!0,onChange:w,value:d,"aria-labelledby":"org_select_label"},"org_select")}),c.jsx("h5",{id:"project_type_label",className:"mb-1",children:c.jsx("abbr",{title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),c.jsx("div",{className:"mb-3",children:c.jsxs("select",{name:"allocationType",id:"project_type_select",value:t.allocationType,className:"form-control","aria-labelledby":"project_type_label",onChange:S=>h(S),children:[c.jsx("option",{value:"",children:"-- All --"}),r.allocationTypes.map((S,b)=>c.jsx("option",{value:S,children:S},`allocation_type_${b}`))]})}),c.jsx("h5",{id:"resource_filter_label",className:"mb-1",children:"Resource"}),c.jsx("div",{className:"mb-3",children:c.jsxs("select",{name:"resource",id:"resource_select",value:t.resource,className:"form-control","aria-labelledby":"resource_filter_label",onChange:S=>h(S),children:[c.jsx("option",{value:"",children:"-- All --"}),r.resources.map((S,b)=>c.jsx("option",{value:S.resourceId,children:S.resourceName},`resource_${b}`))]})}),c.jsx("h5",{id:"request_number_label",className:"mb-1",children:"Request Number"}),c.jsx("div",{className:"mb-3",children:c.jsx("input",{type:"text",className:"form-control",value:t.requestNumber,name:"requestNumber",id:"requestNumber","aria-labelledby":"request_number_label",onChange:S=>h(S)})}),c.jsxs("div",{className:"mt-2",children:[c.jsx("button",{className:"btn btn-primary me-2",onClick:g,children:"Submit"}),c.jsx("button",{className:"btn btn-secondary",disabled:_(),onClick:y,children:"Reset"})]})]})})},_y=e=>(e=e.startsWith("https")?e.split("https://doi.org/").join(""):e,e),jy=({publication:e,index:t,fontSize:r="18px"})=>{const i=e.authors.map(x=>`${x.last_name}, ${x.first_name.substring(0,1)}.`).join(", "),o=e.projects.map(x=>x.grant_number),l=e.publication_type==="Other"?"Publication":e.publication_type,d=e.projects,p=t%2==0?"bg-light":"",f={textIndent:"-50px",marginLeft:"50px",fontSize:r},h=e.publication_datas??[],g=x=>{switch(x){case"Publication Type":return e.publication_type;case"Publication Year":return e.publication_year?e.publication_year:"N/A";case"DOI":return e.doi?c.jsx("a",{href:`https://doi.org/${_y(e.doi)}`,target:"_blank",className:"fw-normal",children:_y(e.doi)}):!1;case"Journal":return e.journal.title?e.journal.title:!1;case"Volume/Issue":return h["Volume/Issue"]?h["Volume/Issue"]:!1;case"Pages":return h.Pages?h.Pages:!1;case"Publisher":return h.Publisher?h.Publisher:!1}},y=()=>{const x=g("Publication Year");let w=e.title;const _=g("Journal"),S=g("DOI"),b=g("Volume/Issue"),C=g("Pages"),R=g("Publisher");return w[w.length-1]!="."&&(w+="."),e.publication_type==="Journal Paper"||e.publication_type==="Other"?c.jsxs(c.Fragment,{children:[i," (",x,"). ",w,_?c.jsxs("em",{className:"ms-1",children:[_,"."]}):"",b?c.jsxs("span",{className:"ms-1",children:[b,","]}):"",C?c.jsxs("span",{className:"ms-1",children:[C,"."]}):"",S?c.jsx("span",{className:"ms-1",children:S}):""]}):e.publication_type==="Conference Paper"||e.publication_type==="Software"?c.jsxs(c.Fragment,{children:[i," (",x,"). ",w,_?c.jsxs("em",{className:"ms-1",children:[_,"."]}):"",S?c.jsx("span",{className:"ms-1",children:S}):""]}):e.publication_type==="Book"||e.publication_type==="Book Chapter"?c.jsxs(c.Fragment,{children:[i," (",x,").",c.jsx("em",{className:"ms-1",children:w}),R?c.jsxs("em",{className:"ms-1",children:[R,"."]}):"",S?c.jsx("span",{className:"ms-1",children:S}):""]}):e.publication_type==="Dataset"?c.jsxs(c.Fragment,{children:[i," (",x,").",c.jsx("em",{className:"ms-1",children:w})," [Dataset]. ",R||"",".",S?c.jsx("span",{className:"ms-1",children:S}):""]}):e.publication_type==="Dissertation"?c.jsxs(c.Fragment,{children:[i," (",x,").",c.jsx("em",{className:"ms-1",children:w}),". [Doctoral dissertation",R?", "+R:"","].",S?c.jsx("span",{className:"ms-1",children:S}):""]}):""};return c.jsx("div",{className:"col-12 mb-2 border-bottom",children:c.jsx("div",{className:"card",style:{border:"unset"},children:c.jsxs("div",{className:`card-body pt-2 mb-2 ${p}`,children:[c.jsx("p",{style:f,children:y()}),d.length>0&&c.jsxs(c.Fragment,{children:[c.jsxs("p",{className:"text-decoration-underline mb-2",children:["Projects Supporting this ",l]}),c.jsx("ul",{style:{...f,listStyleType:"none"},children:o.map((x,w)=>c.jsx("li",{id:`project_${w}`,children:c.jsx("a",{href:`https://allocations.access-ci.org/current-projects?_requestNumber=${x}`,id:`grant_link${w}`,target:"_blank",style:{fontWeight:"600"},children:x})},`grant_${w}`))})]})]})})})},M2=({project:e})=>{const t=e.resources,[r,i]=j.useState(!1),[o,l]=j.useState(!1),[d,p]=j.useState(!1);xe(R2);const f=e.abstract.length>=300,h=f?`${e.abstract.substring(0,300)}...`:e.abstract,g=T=>{let D=T.units?T.units:T.resourceUnits;const K=T.allocation?T.allocation:T.amount;if(D=="[Yes = 1, No = 0]"||D=="Yes / No")return K=="1.0"?"Yes":"No";{let U="0";return parseInt(K)&&(U=parseInt(K).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")),D=="ACCESS Credits"&&(D=c.jsx("span",{className:"tooltip-underline",title:"universal currency that can be exchanged for resource units",children:"ACCESS Credits"})),D=="Dollars"?`$${U}`:c.jsxs(c.Fragment,{children:[U," ",D]})}},y=()=>{const{origin:T,pathname:D}=window.location,K=`${T}${D}?_requestNumber=${e.requestNumber}`;navigator.clipboard.writeText(K),setTimeout(()=>i(!1),2e3)},x=()=>e.requestNumber&&e.requestNumber!=""?`(${e.requestNumber})`:"",w=c.jsx(Bl,{id:"link-tooltip",children:"Link Copied!"}),_=()=>{if(x()){const T={background:"none",border:"none",color:"#fff",fontSize:"24px"};return c.jsx(rp,{placement:"left",trigger:"click",defaultShow:r,show:r,onToggle:()=>i(!r),overlay:w,children:c.jsx("button",{onClick:y,style:T,children:c.jsx("i",{className:"bi bi-link-45deg",children:c.jsx("div",{className:"d-none",children:"Direct link to project"})})})})}return c.jsx(c.Fragment,{})},S=()=>{const T=e.pi.split(",");return`${T[1]} ${T[0]}`},b=()=>!e.coPis||e.coPis.length<=0?"":c.jsxs(c.Fragment,{children:[c.jsx("br",{}),c.jsxs("small",{className:"fst-italic",children:["CoPI(s): ",e.coPis.map(T=>`${T.name} (${T.organization})`).join(";")]})]}),C=()=>!e.beginDate||!e.endDate?"-":c.jsxs(c.Fragment,{children:[e.beginDate," to ",e.endDate]}),R=()=>e.allocationType==="NAIRR Start-Up"?c.jsxs("span",{className:"fw-bold",children:[x()," Start-Up: ",S(),", ",c.jsxs("em",{children:[" ",e.piInstitution," "]})," "]}):c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"fw-bold",children:[x()," ",e.requestTitle]})," ",c.jsx("br",{}),c.jsxs("span",{className:"fst-italic",children:[e.pi," ",c.jsxs("small",{children:[" (",e.piInstitution,") "]})]}),b()]}),N=c.jsxs("table",{className:"table table-striped table-bordered mt-2 mb-0",children:[c.jsx("thead",{children:c.jsxs("tr",{children:[c.jsx("td",{children:c.jsx("span",{className:"m-0 p-0",children:"Resource"})}),c.jsx("td",{children:c.jsx("span",{className:"m-0 p-0 d-inline",children:"Allocation"})})]})}),c.jsx("tbody",{children:t.map((T,D)=>c.jsxs("tr",{children:[c.jsx("td",{children:T.resourceName}),c.jsx("td",{style:{whiteSpace:"nowrap"},children:g(T)})]},`resource_${e.requestId}_${D}`))})]}),P=c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row mt-2 fw-bold",children:c.jsx("div",{className:"col-3 border-bottom",children:"Resources"})}),c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:N})})]}),k=c.jsxs(De,{show:o,onHide:()=>l(!1),id:`publicationsModal_${e.projectId}`,children:[c.jsx(De.Header,{closeButton:!0,children:c.jsx(De.Title,{children:e.requestTitle})}),c.jsx(De.Body,{children:e?.publications?.map((T,D)=>c.jsx("div",{children:c.jsx(jy,{publication:{...T,projects:[]},index:D})},`publication_${D}`))}),c.jsx(De.Footer,{children:c.jsx("button",{type:"button",className:"btn btn-secondary","data-bs-dismiss":"modal",onClick:()=>l(!1),children:"Close"})})]}),O=()=>e.allocationType==="NAIRR Start-Up"?P:c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row fw-bold mt-2 border-bottom",children:c.jsx("span",{className:"col mb-1 pb-0",children:"Abstract"})}),c.jsx("div",{style:{whiteSpace:"pre-wrap",display:"inline"},children:d?e.abstract:h}),f&&c.jsx("button",{onClick:()=>p(!d),style:{display:"inline",border:"none",background:"none",cursor:"pointer",fontWeight:"bold"},children:d?"Show Less":"Read More"}),c.jsxs("div",{className:"row mt-2",children:[c.jsxs("div",{className:"col-lg-6 left-panel flex-fill",children:[c.jsx("div",{className:"row fw-bold border-bottom",children:c.jsx("div",{className:"col",children:c.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Resources"})})}),c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:N})})]}),e?.publications?.length>0&&c.jsxs("div",{className:"col-lg-6 right-panel",children:[c.jsx("div",{className:"row fw-bold border-bottom",children:c.jsx("div",{className:"col",children:c.jsx("span",{className:"mb-1 pb-0 fw-bold",children:"Publications"})})}),c.jsx("div",{className:"mt-2 pb-0",children:c.jsx(jy,{publication:{...e.publications[0],projects:[]},index:0,fontSize:"16px"})},`publication_${e.projectId}_0`),e?.publications?.length>1&&c.jsxs("button",{className:"btn btn-primary",onClick:()=>l(!0),children:["View More (",e.publications.length,")"]}),k]})]})]});return c.jsxs("div",{className:"card mb-4",children:[c.jsx("div",{className:"card-header bg-primary text-white",children:c.jsxs("div",{className:"d-flex justify-content-between",children:[c.jsx("div",{children:R()}),c.jsx("div",{children:_()})]})}),c.jsxs("div",{className:"card-body",children:[c.jsxs("div",{className:"row fw-bold border-bottom",children:[c.jsx("div",{className:"col",children:c.jsx("span",{className:"mb-1 pb-0",children:"Field of Science"})}),c.jsx("div",{className:"col",children:c.jsx("span",{className:"mb-1 pb-0 tooltip-underline",title:'A specific level of allocation; also referred to as "Opportunity"',children:"Project Type"})}),c.jsx("div",{className:"col",children:c.jsx("span",{className:"mb-1 pb-0",children:"Dates"})})]}),c.jsxs("div",{className:"row",children:[c.jsx("div",{className:"col",children:e.fos}),c.jsx("div",{className:"col",children:e.allocationType}),c.jsx("div",{className:"col",children:C()})]}),O()]})]})},D2=()=>{const e=xe(O2);return e.length==0?c.jsx("div",{children:"No Projects Found"}):c.jsx("div",{children:e.map((t,r)=>c.jsx(M2,{project:t},`project_${r}`))})},Cy=()=>{const e=Ve(),t=xe(k2),[r,i]=j.useState([]),[o,l]=j.useState("0"),d=Array.from({length:t.last_page},(b,C)=>C),p=10,f={width:"50px",textAlign:"center"};j.useEffect(()=>{w()},[t]);const h=b=>{const C=parseInt(b);e(of({current_page:b})),e(Zr(C))},g=b=>(event.preventDefault(),l("0"),h(b),!1),y=()=>{h(parseInt(t.current_page)+1)},x=()=>{h(parseInt(t.current_page)-1)},w=()=>{const b=[];if(t.last_page>p)if(t.current_page>4){b.push(1),b.push("spacer");for(var C=1;C>0;C--)t.current_page-C>1&&b.push(t.current_page-C);b.push(["current",t.current_page]);for(var C=1;C<2;C++)t.current_page+C<=t.last_page&&b.push(t.current_page+C);t.last_page-t.current_page>1&&(b.push("spacer"),b.push(t.last_page))}else[1,2,3,4,5].forEach(R=>{R==t.current_page?b.push(["current",R]):b.push(R)}),b.push("spacer"),b.push(t.last_page);else for(var C=1;C<=t.last_page;C++)C==t.current_page?b.push(["current",C]):b.push(C);i(b)},_=b=>{let C="";return typeof b=="object"?[b,C]=b:C=b,b=="spacer"?c.jsx("li",{className:"page-item disabled",children:c.jsx("span",{className:"page-link",style:f,children:". . ."})}):b=="current"?c.jsx("li",{className:"page-item active","aria-current":"page",children:c.jsx("span",{className:"page-link",style:f,children:C})}):c.jsx("li",{className:"page-item",children:c.jsx("button",{className:"page-link",style:f,onClick:()=>h(b),children:C})})},S=()=>c.jsx("li",{className:"page-item",children:c.jsxs("select",{className:"page-link",style:{...f,height:"100%"},value:o,onChange:b=>g(b.target.value),children:[c.jsx("option",{value:"0",children:"Go To"}),d.map(b=>c.jsx("option",{value:b+1,children:b+1},`page_option_${b}`))]})});return c.jsx("div",{children:c.jsx("nav",{"aria-label":"Pages for the table",children:c.jsxs("ul",{className:"pagination",children:[c.jsx("li",{className:`page-item ${t.current_page==1?"disabled":""}`,children:c.jsx("button",{className:"page-link",style:{width:"50px",textAlign:"center"},onClick:x,disabled:t.current_page==1,"aria-label":"Previous Page Button",children:"<"})}),r.map((b,C)=>c.jsx(Xe.Fragment,{children:_(b)},`page_${C}`)),t.last_page>p?S():"",c.jsx("li",{className:`page-item ${t.current_page==t.last_page?"disabled":""}`,children:c.jsx("button",{className:"page-link",style:f,onClick:y,disabled:t.current_page==t.last_page,"aria-label":"Next Page Button",children:">"})})]})})})},$2=({api_url:e})=>{const t=Ve(),r=xe(N2),i=xe(C2),o=xe(T2),l=c.jsx("div",{className:"loadingDiv",children:"Loading ..."});return j.useEffect(()=>{t(x2())},[]),c.jsx("div",{className:"container-fluid",children:c.jsxs("div",{className:"row",children:[c.jsx("div",{className:"col-sm-3",children:c.jsx(A2,{})}),c.jsxs("div",{className:"col-sm-9",children:[c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:o?c.jsx(Cy,{}):""})}),c.jsx("div",{className:"row",id:"projectListRow",children:c.jsx("div",{className:"col",children:r&&i?c.jsx(D2,{}):l})}),c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:o?c.jsx(Cy,{scroll:"projects_browser_app"}):""})})]})]})})};function H0(){const e=Ve();return c.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>e(gp(null)),children:"Add a New Publication"})}function W0(){const e=Ve(),t=xe(DI),r=xe(FI);return c.jsxs(c.Fragment,{children:[r&&c.jsxs("div",{className:"alert alert-success alert-dismissible sticky-top",children:["Publication Saved Successfully!",c.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>e(tf(!1))})]}),t.map(i=>c.jsxs("div",{className:"alert alert-danger alert-dismissible sticky-top",children:[i.message,c.jsx("button",{type:"button",className:"btn-close","aria-label":"Close",onClick:()=>e(_0(i.id))})]},`err_${i.id}`))]})}function F2(){const e=Ve();return xe(m1)?c.jsx("button",{type:"button",className:"btn btn-primary",onClick:r=>{e(fx()),r.currentTarget.blur()},children:"I HAVE NO NEW PUBLICATIONS"}):null}function L2({showUpdatePublications:e}){const t=Ve(),r=xe(Gl);return j.useEffect(()=>{r||(t(yp(!1)),t(In()),t(vp()))},[t,r]),c.jsxs(c.Fragment,{children:[c.jsx(W0,{}),c.jsxs("div",{className:"d-flex justify-content-between align-items-start",children:[c.jsx("h1",{children:"My Publications"}),c.jsxs("div",{className:"d-flex gap-2",children:[e&&c.jsx(F2,{}),c.jsx(H0,{})]})]}),c.jsx(xp,{}),c.jsx(bp,{})]})}const U2=()=>{const e=Ve(),t=xe(GI),r=xe(WI),i=()=>{e(yy()),window.scrollTo(0,0),e(In())},o=()=>{e(yy()),e(HI()),window.scrollTo(0,0),e(In())};if(!t.journals)return c.jsx("p",{children:"Loading filters..."});const l=p=>{e(nf({name:p.target.name,value:p.target.value}))},d=p=>{e(nf({name:p.target.name,value:p.target.value}))};return c.jsx("div",{className:"row sticky-top mb-2",children:c.jsxs("div",{className:"col",children:[c.jsx("h3",{className:"mb-2",children:"Filters"}),c.jsx("h5",{id:"journals_filter_label",className:"mb-1",children:"Journals"}),c.jsxs("div",{className:"mb-3",children:[c.jsx("input",{placeholder:"Type to search...",list:"journal_list",name:"journal",id:"journal_select",value:r.journal,className:"form-control","aria-labelledby":"journal_filter_label",onChange:p=>l(p),onInput:p=>d(p)}),c.jsx("datalist",{id:"journal_list",children:t.journals.map((p,f)=>c.jsx("option",{value:p,children:p},`journal_${f}`))})]}),c.jsx("h5",{id:"author_name_label",className:"mb-1",children:"Author Name"}),c.jsx("div",{className:"mb-3",children:c.jsx("input",{placeholder:"Last Name, First Initial",type:"text",className:"form-control",value:r.authorName,name:"authorName",id:"authorName","aria-labelledby":"author_name",onChange:l})}),c.jsx("h5",{id:"doi_number_label",className:"mb-1",children:"DOI"}),c.jsx("div",{className:"mb-3",children:c.jsx("input",{type:"text",className:"form-control",value:F0(r.doi)||"",name:"doi",id:"doiNumber","aria-labelledby":"doi_number_label",onChange:l})}),c.jsx("h5",{id:"publication_type_label",className:"mb-1",children:"Publication Type"}),c.jsx("div",{className:"mb-3",children:c.jsxs("select",{name:"publicationType",id:"publication_type_select",value:r.publicationType,className:"form-control","aria-labelledby":"publication_type_label",onChange:p=>l(p),children:[c.jsx("option",{value:"",children:"-- All --"}),t.publication_types.map((p,f)=>c.jsx("option",{value:p,children:p},`publication_type_${f}`))]})}),c.jsxs("div",{className:"mt-2",children:[c.jsx("button",{className:"btn btn-primary me-2",onClick:i,children:"Submit"}),c.jsx("button",{className:"btn btn-secondary",onClick:o,children:"Reset"})]})]})})},z2=()=>{const e=Ve();return j.useEffect(()=>{e(In()),e(vp())},[e]),c.jsx(c.Fragment,{children:c.jsx("div",{className:"container-fluid",children:c.jsxs("div",{className:"row",children:[c.jsx("div",{className:"col-sm-3",children:c.jsx(U2,{})}),c.jsx("div",{className:"col-sm-9",children:c.jsx("div",{className:"row",id:"publicationListRow",children:c.jsx("div",{className:"col",children:c.jsx(xp,{allowEdit:!1})})})})]})})})},K0={selected:[]},G0=os({name:"publicationsSelect",initialState:K0,reducers:{setSelected:(e,{payload:t})=>{e.selected=t},toggleSelected:(e,{payload:t})=>{e.selected.includes(t)?e.selected=e.selected.filter(i=>i!==t):e.selected.push(t)},clearSelected:e=>{e.selected=[]}}}),{setSelected:V2,toggleSelected:B2,clearSelected:rM}=G0.actions,q2=e=>e.publicationsSelect.selected,H2=G0.reducer;function W2({allowAdd:e=!0,allowEdit:t=!0,allowSelect:r=!1}){const i=Ve(),o=xe(Gl),l=xe(q2),d=xe($0);j.useEffect(()=>{o||(i(yp(!1)),i(In()))},[o,i]);const p=[{key:"publication",name:"Publication",format:(f,h)=>c.jsxs(c.Fragment,{children:[c.jsx(L0,{publication:h}),t&&h.can_edit&&c.jsx(Gs,{onClick:()=>i(gp(h.publication_id)),icon:"pencil",title:"Edit publication"},"edit")]})},{key:"created_by",name:"Entered By",headerClass:"text-nowrap"}];return r&&p.splice(0,0,{key:"publication_id",format:f=>{const h=l.includes(f);return c.jsx("input",{type:"checkbox",name:"publication_ids[]",value:f,checked:h,onChange:()=>i(B2(f))})},formatHeader:()=>c.jsx(Zd,{selectedLength:l.length,totalLength:d.length,onChange:f=>i(V2(f?d.map(h=>h.publication_id):[]))})}),c.jsxs(c.Fragment,{children:[c.jsx(An,{columns:p,rows:d}),e&&c.jsx(H0,{}),c.jsx(bp,{})]})}function K2(){const e=Ve();return j.useEffect(()=>{addEventListener("requestAddRole",t=>e(BI(t.detail.username))),addEventListener("requestRemoveRole",t=>e(qI(t.detail.username)))},[e]),c.jsxs(c.Fragment,{children:[c.jsx(W0,{}),c.jsx(W2,{allowSelect:!0})]})}const G2={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:[]},Y2=ft("resourceCatalog/initApp",async(e,{dispatch:t})=>{t(kl(!1)),t(Q2()),t(kl(!0))});ft("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(kl(!1));let r=[];e.catalogSources?r=e.catalogSources:r.push({...e,catalogLabel:"Default"}),e.onRamps&&r.push({apiUrl:"https://allocations.access-ci.org/resources.json",catalogLabel:"ACCESS",allowedCategories:[],allowedFilters:[],allowedResources:[],excludedCategories:["Resource Category"],excludedFilters:[],excludedResources:["ACCESS Credits"]});const i=await Promise.all(r.map(async o=>{const d=await(await fetch(o.apiUrl)).json();return{...o,data:d}}));t(eA({data:i,params:e})),t(kl(!0))});const Q2=ft("resourceCatalog/getRampsResources",async(e,{dispatch:t})=>{const r="https://operations-api.access-ci.org/wh2/cider/v1/access-active-groups/type/resource-catalog.access-ci.org/",i="https://operations-api.access-ci.org/wh2/cider/v1/access-allocated/",o="https://operations-api.access-ci.org/wh2/cider/v1/features/",d=await(await fetch(r)).json(),f=await(await fetch(i)).json(),g=await(await fetch(o)).json();t(Z2({params:e,metadata:d.results,rampsResources:f.results,features:g.results}))});ft("resourceCatalog/getResources",async(e,{dispatch:t})=>{t(nA(e)),t(Q0())});const Ey=e=>{const t={},r={};let i={};return e.forEach(l=>{t[l.catalogLabel]={...l,resourceIds:[],selected:!1,catalogId:l.catalogLabel.replace(/[^(A-z)]/,"")},delete t[l.catalogLabel].data,l.data.forEach(d=>{if(af(l.allowedResources,l.excludedResources,d.resourceName)){const{categories:p,formattedResource:f}=X2(l,d,i);r[d.resourceId]=f,t[l.catalogLabel].resourceIds.push(d.resourceId),i=p}})}),{resources:Object.keys(r).map(l=>r[l]),catalogs:t,categories:i}},af=(e,t,r)=>!e&&!t||e&&e.length==0&&t&&t.length==0?!0:e&&e.length>0?e.find(i=>i==r):t&&t.length>0?!t.includes(r):!0,X2=(e,t,r)=>{const i=[];let o="";t.featureCategories.filter(p=>p.categoryIsFilter).forEach(p=>{const f=p.categoryId;p.categoryName=="ACCESS Resource Grouping"?o=p.features[0].name:(!r[f]&&af(e.allowedCategories,e.excludedCategories,p.categoryName)&&(r[f]={categoryId:f,categoryName:p.categoryName,categoryDescription:p.categoryDescription,features:{}}),p.features.forEach(h=>{const g={featureId:h.featureId,name:h.name,description:h.description,categoryId:f,selected:!1},y=af(e.allowedFilters,e.excludedFilters,g.name);y&&i.push(g),r[f]&&y&&!r[f].features[h.featureId]&&(r[f].features[h.featureId]=g)}))});const l=i.map(p=>p.name).sort((p,f)=>p>f);return{formattedResource:{...t,resourceName:t.resourceName.trim(),features:l,featureIds:i.map(p=>p.featureId),sortCategory:o},categories:r}},J2=e=>e.type.endsWith("rejected"),Y0=os({name:"resourceCatalog",initialState:G2,reducers:{handleResponse:(e,{payload:t})=>{const r=t.data,i=t.groups;t.rampsResources;const{resources:o,catalogs:l,categories:d}=Ey(r);e.catalogs=l,e.onRamps=t.params.onRamps;for(const p in d){const f=d[p],h=[];for(const g in f.features)h.push(f.features[g]);e.filters.push({...f,features:h.sort((g,y)=>g.name>y.name)})}e.filters=e.filters.sort((p,f)=>p.categoryName.localeCompare(f.categoryName)),e.resources=o.map(p=>{if(!i)return p;const f=i.organizations.find(h=>h.organization_name==p.organization);if(p.logo=f?.organization_favicon_url||null,f){const h=i.active_groups.find(g=>g.rollup_organization_ids.includes(f.organization_id));i.resources.filter(g=>h.rollup_info_resourceids.includes(g.info_resourceid))}return p}).sort((p,f)=>p.resourceName.localeCompare(f.resourceName)).sort((p,f)=>e.resourceSorting[p.sortCategory]>e.resourceSorting[f.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},handleRamps:(e,{payload:t})=>{const{features:r,metadata:i,rampsResources:o}=t,l={},d={},p=i.active_groups,f={"Innovative / Novel Compute":"Innovative","CPU Compute":"CPU","GPU Compute":"GPU","Commercial Cloud":"Cloud",Cloud:"Cloud",Storage:"Storage"};r.filter(w=>!["Resource Category","**DELETED** ACCESS Integration Roadmap","Resource Status","Allocations"].includes(w.feature_category_name)).forEach(w=>{l[w.feature_category_id]={categoryId:w.feature_category_id,categoryName:w.feature_category_name,categoryDescription:w.feature_category_description,features:w.features.map(_=>_.id),categoryIsFilter:w?.other_attributes?.is_allocations_filter||!1},w.features.forEach(_=>{d[_.id]={featureId:_.id,name:_.name,categoryId:_.feature_category_id,isFilter:_.is_allocations_filter}})});const h=o.map(w=>{const _=i.organizations.find(O=>O.organization_name==w.organization_name),S=w.features.find(O=>O.feature_category=="Resource Type"),b=f[S?.name]||"other",C={},R=p.find(O=>O.rollup_info_resourceids.includes(w.info_resourceid));let N=[];R&&(N=R.rollup_info_resourceids.filter(O=>O!=w.info_resourceid).map(O=>o.find(T=>T.info_resourceid==O)).map(O=>({info_resourceid:O.info_resourceid,cider_resource_id:O.cider_resource_id,resourceName:O.short_name,displayResourceName:O.resource_descriptive_name})));const P=[];return w.features.forEach(O=>{P.push(O.id);const T=d[O.id];if(T){const D=l[T.categoryId];C[T.categoryId]||(C[T.categoryId]={...D,features:[]}),C[T.categoryId].features.push(T)}}),{cider_resource_id:w.cider_resource_id,info_resourceid:w.info_resourceid,resourceId:w.cider_resource_id,resourceName:w.short_name,displayResourceName:w.resource_descriptive_name,resourceDescription:w.resource_description,recommendedUse:w.recommended_use,icon:_?.organization_favicon_url||null,resourceType:S?.name,resourceCategory:b,organization:w.organization_name,featureCategories:Object.values(C),relatedResources:N,groupId:R?.info_groupid,filters:P}}),g=[{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:h}],{resources:y,categories:x}=Ey(g);for(const w in x){const _=x[w],S=[];for(const b in _.features)S.push(_.features[b]);e.filters.push({..._,features:S.sort((b,C)=>b.name>C.name)})}e.filters=e.filters.sort((w,_)=>w.categoryName.localeCompare(_.categoryName)),e.resources=y.sort((w,_)=>w.resourceName.localeCompare(_.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:r,selected:i}=t;e.catalogs[r.catalogLabel].selected=i},toggleFilter:(e,{payload:t})=>{e.selectedFilters.includes(t)?e.selectedFilters=e.selectedFilters.filter(r=>r!=t):e.selectedFilters.push(t)}},extraReducers:e=>{e.addMatcher(J2,(t,r)=>{console.log(r)})}}),{handleRamps:Z2,handleResponse:eA,processData:sM,resetFilters:tA,setResourcesLoaded:kl,setSelectedCategory:oM,toggleCatalog:nA,toggleFilter:Q0}=Y0.actions,rA=e=>e.resourceCatalog.resources,X0=e=>e.resourceCatalog.catalogs,sA=e=>e.resourceCatalog.filters,oA=e=>e.resourceCatalog.hasErrors,iA=e=>e.resourceCatalog.resourcesLoaded,J0=e=>e.resourceCatalog.selectedCategory,Sp=e=>e.resourceCatalog.selectedFilters,aA=pi([rA,Sp,J0],(e,t,r)=>(e.filter(i=>i.resourceCategory==r),t.length==0?e:e.filter(i=>t.some(o=>i.filters.includes(o))))),lA=Y0.reducer,cA="_access_1yrq0_2",uA="_description_1yrq0_11",dA="_filterBar_1yrq0_15",fA="_btnSecondary_1yrq0_40",pA="_filtersHidden_1yrq0_51",hA="_filtersVisible_1yrq0_57",Qn={access:cA,description:uA,filterBar:dA,btnSecondary:fA,filtersHidden:pA,filtersVisible:hA},mA=({features:e,id:t})=>{const r={"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"},i={fontFamily:"Archivo, sans-serif",color:"rgb(35, 35, 35)",backgroundColor:"rgb(206, 232, 233)",border:"1px solid #48c0b9",margin:"2px"},o=l=>{const d=r[l];return d?d.startsWith("http")?c.jsx("img",{className:"me-2",style:{width:"12px"},alt:`${l}-icon`,src:d}):c.jsx("i",{className:`bi bi-${r[l]} me-2`}):c.jsx(c.Fragment,{})};return c.jsx(c.Fragment,{children:e.map((l,d)=>c.jsxs("span",{className:"badge me-2",style:i,children:[o(l),l]},`feature_${t}_${d}`))})},gA=({resource:e})=>{const[t,r]=j.useState(!0),i=()=>c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row",children:c.jsx("div",{className:"col fw-bold",children:"Features"})}),c.jsx("div",{className:"row mb-2",children:c.jsx("div",{className:"col",children:c.jsx(mA,{features:e.features,id:e.resourceId})})})]}),o=()=>e.recommendedUse&&e.recommendedUse!=""?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row",children:c.jsx("div",{className:"col fw-bold",children:"Recommended Use"})}),c.jsx("div",{className:"row mb-3",children:c.jsx("div",{className:"col",children:c.jsx("div",{className:Qn.description,dangerouslySetInnerHTML:{__html:e.recommendedUse}})})})]}):"",l=()=>{const f={background:"linear-gradient(90deg,rgba(255, 255, 255, 1) 0%, rgba(26, 91, 110, 1) 50%)",display:"flex",justifyContent:"space-between"};return c.jsx("div",{className:"card-header",style:f,children:c.jsxs("span",{style:{fontWeight:"bold"},children:[p(),e.resourceName]})})},d=()=>e.relatedResources.length==0?"":c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row",children:c.jsx("div",{className:"col fw-bold",children:"Related Resources"})}),c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:c.jsx("ul",{className:"list-group",children:e.relatedResources.map(f=>c.jsx("a",{className:"list-group-item list-group-item-action",href:`https://allocations.access-ci.org/resources/${e.groupId}`,target:"_blank",children:f.displayResourceName},`rr_${e.resourceId}_${f.cider_resource_id}`))})})})]}),p=()=>{if(e.icon)return c.jsx("img",{style:{width:"20px",marginRight:"5px"},src:`${e.icon}`})};return c.jsx(c.Fragment,{children:c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:c.jsxs("div",{className:"card mb-3",children:[l(),c.jsx("div",{className:"card-body",children:c.jsxs("div",{className:"row",children:[c.jsxs("div",{className:"col-12 col-md-8",children:[o(),i()]}),c.jsx("div",{className:"col-12 col-md-4",children:d()})]})}),c.jsx("div",{className:"card-footer",children:c.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,c.jsx("i",{className:"bi bi-box-arrow-up-right ms-2"})]})})]})})})})},vA=({filter:e,selectedFilters:t})=>{const r=Ve(),i=()=>{r(Q0(e.featureId))},o=t.includes(e.featureId);return c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:c.jsxs("div",{className:"form-check",children:[c.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),c.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:o,onChange:i})]})})})},yA=({category:e,selectedFilters:t})=>c.jsxs("div",{className:"col-12 col-sm-6",children:[c.jsx("div",{className:"fw-bold mb-1 mt-1",children:c.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(r=>c.jsx(vA,{filter:r,selectedFilters:t},r.featureId))]}),xA=({onReset:e})=>{const t=Ve(),r=xe(X0),i=xe(sA),o=xe(Sp);return Object.keys(r).map(l=>r[l]),c.jsxs("div",{style:{textAlign:"left",backgroundColor:"#fff"},children:[c.jsx("div",{className:"row",children:i.map(l=>c.jsx(yA,{selectedFilters:o,category:l},l.categoryId))}),c.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>t(tA()),disabled:o.length==0,children:"Reset Filters"}),c.jsx("button",{className:"btn btn-outline-primary ms-3 mt-2 mb-2",onClick:e,children:"Close Menu"})]})},bA=()=>{const[e,t]=j.useState(!1),r=j.useRef(null),i=xe(Sp),o=()=>{const d=r.current;e?(d.style.height="0px",d.classList.remove(Qn.filtersVisible),d.classList.add(Qn.filtersHidden)):(d.style.height=d.scrollHeight+"px",d.classList.remove(Qn.filtersHidden),d.classList.add(Qn.filtersVisible)),t(!e)},l={color:"#fff",backgroundColor:"rgb(26, 91, 110)",marginLeft:"4px"};return c.jsx("div",{className:Qn.filterBar,style:{position:"sticky",top:"0px"},children:c.jsx("div",{className:"row mb-2",children:c.jsx("div",{className:"col pt-2 pb-2",children:c.jsx("div",{className:"p-1 pb-0 bg-white",children:c.jsxs("div",{children:[c.jsxs("button",{className:"btn mb-1 mt-1",style:{border:"1px solid #48c0b9"},type:"button",onClick:o,children:[c.jsx("i",{className:"bi bi-filter"})," Filters",i.length>0&&c.jsx("span",{className:"badge rounded-pill",style:l,children:i.length})]}),c.jsx("div",{className:`${Qn.filtersHidden} pe-2 ps-2`,id:"filtersList",ref:r,children:c.jsx(xA,{onReset:o})})]})})})})})},wA=()=>{const e=xe(aA);xe(J0);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 c.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"});const r=o=>o.map(l=>c.jsx(gA,{resource:l},l.resourceId)),i=o=>{const l=e.filter(d=>d.resourceCategory==o.key);return l.length==0?"":c.jsxs(Xe.Fragment,{children:[c.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:[c.jsx("i",{className:`bi bi-${o.icon}`})," ",o.label]}),r(l)]},`category_${o.key}`)};return c.jsx("div",{className:"card shadow",children:c.jsxs("div",{className:"card-body",children:[c.jsx(bA,{}),t.map(o=>i(o))]})})},SA=({baseUrl:e})=>c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row",children:c.jsx("div",{className:"col d-flex",children:c.jsx("img",{alt:"Access Logo",style:{height:"75px"},src:`${e}/access_logo.png`})})}),c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:c.jsx("h3",{className:"border-bottom",children:"NSF ACCESS Resources"})})}),c.jsx("div",{className:"row",children:c.jsxs("div",{className:"col",children:[c.jsx("h4",{children:"Discover the nationwide NSF cyberinfrastructure"}),c.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."}),c.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."}),c.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."}),c.jsx("p",{children:'Ready to begin? Click the "Get Your First Project" button and join the ACCESS community!'}),c.jsx("p",{children:c.jsxs("a",{href:"https://allocations.access-ci.org/get-your-first-project",target:"_blank",className:`btn btn-secondary fw-bold ${Qn.btnSecondary}`,children:["Get Your First Project ",c.jsx("i",{className:"bi bi-box-arrow-up-right"})]})}),c.jsxs("p",{children:["If you have feedback for ACCESS, please complete our",c.jsx("a",{target:"_blank",href:"https://docs.google.com/forms/d/e/1FAIpQLSdn-SXokNB_5s0r2SA_S9ZIZWZFlVPRD2OHepTH5HY2YND_zw/viewform",children:" Feedback Form"}),".",c.jsx("br",{}),"If you have questions, please",c.jsx("a",{target:"_blank",href:"https://support.access-ci.org/user/login?destination=/open-a-ticket",children:" open a help ticket"}),"."]})]})})]}),_A=({catalogSources:e=[],onRamps:t=!1,baseUrl:r,onRampsApi:i="https://allocations.access-ci.org/resources.json"})=>{const o=Ve(),l=xe(iA),d=xe(oA),p=xe(X0),f=Object.keys(p).map(g=>p[g]);j.useEffect(()=>{o(Y2({catalogSources:e,onRamps:t,onRampsApi:i}))},[]);const h=()=>t&&f.length>1?c.jsx(c.Fragment,{children:f.filter(g=>g.catalogLabel!="ACCESS").map((g,y)=>c.jsx("div",{className:"row mb-3",children:c.jsxs("div",{className:"col",children:[c.jsxs("h4",{className:"border-bottom",children:["About ",g.catalogLabel]}),c.jsx("div",{dangerouslySetInnerHTML:{__html:g.description}})]})},`catalog_${y}`))}):"";return d?c.jsx("div",{className:"row",children:c.jsx("div",{className:"col text-center mt-2",children:c.jsx("h4",{children:"Unable to Load Resources"})})}):l?c.jsxs("div",{className:`container mt-3 ${Qn.access}`,children:[t?c.jsx(SA,{baseUrl:r}):"",h(),c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:c.jsx(wA,{})})})]}):c.jsx(is,{})},jA={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}},il=ft("resourceCatalog/getResources",async(e,{dispatch:t})=>{const i=await(await fetch(e.apiUrl)).json();t(EA({data:i,params:e}))}),CA=e=>{const t=[],r=e.filter(i=>i.features.filter(o=>o.selected).length>0);return e.forEach(i=>{i.features.forEach(o=>{o.selected&&t.push(o.featureId)})}),r.map(i=>({...i,features:i.features.filter(o=>o.selected)}))},Ry=(e,t,r)=>{if(e.length==0&&t.length==0)return!0;if(e.length>0)return e.find(i=>i==r);if(t.length>0)return!t.find(i=>i==r)},Z0=os({name:"resourceCatalog",initialState:jA,reducers:{handleResponse:(e,{payload:t})=>{const r=t.data,i=t.params.excludedCategories,o=t.params.excludedFilters,l=t.params.excludedResources,d=t.params.allowedCategories,p=t.params.allowedFilters,f=[],h={};r.filter(g=>!l.includes(g.resourceName)).forEach(g=>{const y=[];let x="";g.featureCategories.filter(_=>_.categoryIsFilter).forEach(_=>{const S=_.categoryId;_.categoryName=="ACCESS Resource Grouping"?x=_.features[0].name:(!h[S]&&Ry(d,i,_.categoryName)&&(h[S]={categoryId:S,categoryName:_.categoryName,categoryDescription:_.categoryDescription,features:{}}),_.features.forEach(b=>{const C={featureId:b.featureId,name:b.name,description:b.description,categoryId:S,selected:!1},R=Ry(p,o,C.name);R&&y.push(C),h[S]&&R&&!h[S].features[b.featureId]&&(h[S].features[b.featureId]=C)}))});const w={resourceName:g.resourceName,resourceId:g.resourceId,resourceType:g.resourceType,organization:g.organization,units:g.units,userGuideUrl:g.userGuideUrl,resourceDescription:g.resourceDescription,description:g.description,recommendedUse:g.recommendedUse,features:y.map(_=>_.name).sort((_,S)=>_>S),featureIds:y.map(_=>_.featureId),sortCategory:x};f.push(w)});for(const g in h){const y=h[g],x=[];for(const w in y.features)x.push(y.features[w]);e.filters.push({...y,features:x.sort((w,_)=>w.name>_.name)})}d.length>0?e.filters=e.filters.sort((g,y)=>d.indexOf(g.categoryName)>d.indexOf(y.categoryName)):e.filters=e.filters.sort((g,y)=>g.categoryName.localeCompare(y.categoryName)),e.resources=f.sort((g,y)=>g.resourceName.localeCompare(y.resourceName)).sort((g,y)=>e.resourceSorting[g.sortCategory]>e.resourceSorting[y.sortCategory]),e.filteredResources=[...e.resources],e.resourcesLoaded=!0},resetFilters:e=>{e.filters.forEach(t=>{t.features.forEach(r=>r.selected=!1)}),e.filteredResources=[...e.resources]},toggleFilter:(e,{payload:t})=>{const r=t,o=e.filters.find(d=>d.categoryId==r.categoryId).features.find(d=>d.featureId==r.featureId);o.selected=!o.selected;const l=CA(e.filters);if(l.length>0){const d=[],p=l.map(f=>f.features.map(h=>h.featureId));e.resources.forEach(f=>{let h=0;p.forEach(g=>{let y=!1;f.featureIds.forEach(x=>{g.indexOf(x)>=0&&(y=!0)}),y&&(h+=1)}),h>=p.length&&d.push(f)}),e.filteredResources=d}else e.filteredResources=[...e.resources]}},extraReducers:e=>{e.addCase(il.pending,t=>{}).addCase(il.fulfilled,(t,r)=>{}).addCase(il.rejected,(t,r)=>{t.hasErrors=!0,console.log(r.error)})}}),{handleResponse:EA,processData:iM,resetFilters:RA,toggleFilter:NA}=Z0.actions,kA=e=>e.resourceCatalog.hasErrors,OA=e=>e.resourceCatalog.resourcesLoaded,TA=e=>e.resourceCatalog.filters,PA=e=>e.resourceCatalog.filteredResources,IA=Z0.reducer,AA=({resource:e})=>{const t=i=>i.length==0?"":c.jsx("ul",{children:i.map((o,l)=>c.jsx("li",{children:o},`feature_${e.resourceId}_${l}`))}),r=(i,o)=>o&&o!=""?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"row",children:c.jsx("div",{className:"col fw-bold",children:i})}),c.jsx("div",{className:"row mb-3",children:c.jsx("div",{className:"col",dangerouslySetInnerHTML:{__html:o}})})]}):"";return c.jsxs(el.Item,{eventKey:e.resourceId,children:[c.jsx(el.Header,{children:e.resourceName}),c.jsxs(el.Body,{children:[c.jsx("table",{className:"table",children:c.jsxs("tbody",{children:[c.jsxs("tr",{children:[c.jsx("td",{className:"fw-bold",children:"Resource Type:"}),c.jsx("td",{children:e.resourceType})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"fw-bold",children:"Organization:"}),c.jsx("td",{children:e.organization})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"fw-bold",children:"Units:"}),c.jsx("td",{children:e.units})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"fw-bold",children:"User Guide:"}),c.jsx("td",{children:e.userGuideUrl==""?"":c.jsx("a",{href:e.userGuideUrl,target:"_blank",rel:"noreferrer",children:"Link to User Guide"})})]}),c.jsxs("tr",{children:[c.jsx("td",{className:"fw-bold",children:"Features Available:"}),c.jsx("td",{children:t(e.features)})]})]})}),r("Resource Description",e.resourceDescription),r("Allocations Description",e.description),r("Recommended Use",e.recommendedUse)]})]})},MA=()=>{const e=xe(PA);return e.length==0?c.jsx("div",{className:"fw-bold",children:"No Resources Match Your Filters"}):c.jsxs("div",{children:[c.jsx("h4",{className:"mb-0",children:"Resources"}),c.jsx(el,{children:e.map(t=>c.jsx(AA,{resource:t},t.resourceId))})]})},DA=({filter:e})=>{const t=Ve(),r=()=>{t(NA(e))};return c.jsx("div",{className:"row",children:c.jsx("div",{className:"col",children:c.jsxs("div",{className:"form-check",children:[c.jsx("label",{className:"form-check-label",htmlFor:`filter_${e.featureId}`,children:e.name}),c.jsx("input",{className:"form-check-input",type:"checkbox",value:e.featureId,id:`filter_${e.featureId}`,checked:e.selected,onChange:r})]})})})},$A=({category:e})=>c.jsx("div",{className:"row",children:c.jsxs("div",{className:"col",children:[c.jsx("div",{className:"fw-bold mb-1 mt-1",children:c.jsx("abbr",{title:e.categoryDescription,children:e.categoryName})}),e.features.map(t=>c.jsx(DA,{filter:t},t.featureId))]})}),FA=()=>{const e=Ve(),t=xe(TA),r=t.filter(i=>i.features.filter(o=>o.selected).length>0);return c.jsxs("div",{children:[c.jsx("h4",{className:"mb-0",children:"Filters"}),t.map(i=>c.jsx($A,{category:i},i.categoryId)),c.jsx("button",{className:"btn btn-warning mt-2 mb-2",onClick:()=>e(RA()),disabled:r.length==0,children:"Reset Filters"})]})},LA=({apiUrl:e,excludedCategories:t=[],excludedFilters:r=[],excludedResources:i=[],allowedCategories:o=[],allowedFilters:l=[]})=>{const d=Ve(),p=xe(OA),f=xe(kA);return j.useEffect(()=>{d(il({apiUrl:e,excludedCategories:t,excludedFilters:r,excludedResources:i,allowedCategories:o,allowedFilters:l}))},[]),f?c.jsx("div",{className:"row",children:c.jsx("div",{className:"col text-center mt-2",children:c.jsx("h4",{children:"Unable to Load Resources"})})}):p?c.jsx(c.Fragment,{children:c.jsxs("div",{className:"row mt-3",children:[c.jsx("div",{className:"col-sm-4",children:c.jsx(FA,{})}),c.jsx("div",{className:"col-sm-8",children:c.jsx(MA,{})})]})}):c.jsx(is,{})};function UA(e,{bootstrapFonts:t=!0,bootstrapVariables:r=!0,baseUrl:i=null}={}){const o=e.attachShadow({mode:"open"}),l=document.createElement("div"),d=document.createElement("div"),p=document.createElement("div"),f=document.createElement("div"),h=document.createElement("link"),g=document.createElement("link"),y=document.createElement("link");return i=i??(typeof document>"u"?require("url").pathToFileURL(__filename).href:Fu&&Fu.tagName.toUpperCase()==="SCRIPT"&&Fu.src||new URL("xras-ui.cjs",document.baseURI).href).replace(/\/[^/]+$/,""),h.rel="stylesheet",h.href=`${i}/bootstrap.css`,g.rel="stylesheet",g.href=`${i}/xras-ui.css`,y.rel="stylesheet",y.href=`${i}/access.css`,p.appendChild(f),d.appendChild(p),l.appendChild(d),o.appendChild(h),o.appendChild(g),o.appendChild(y),o.appendChild(l),l.classList.add("bootstrap"),r&&d.classList.add("bootstrap-variables"),t&&(p.classList.add("bootstrap-fonts"),p.setAttribute("data-bs-theme","light")),f}function zA({target:e}){un.createRoot(e).render(c.jsx(AC,{}))}function VA({availableResources:e,unavailableResources:t,canAdd:r,relativeUrlRoot:i,target:o}){un.createRoot(o).render(c.jsx(XC,{availableResources:e,unavailableResources:t,canAdd:r,relativeUrlRoot:i}))}function BA({resourceId:e,target:t,setExternalSubmit:r,relativeUrlRoot:i}){un.createRoot(t).render(c.jsx(ax,{resourceId:e,setExternalSubmit:r,relativeUrlRoot:i}))}function qA({target:e,username:t,routes:r}){mi(r);const i=ar({reducer:{api:hx}});un.createRoot(e).render(c.jsx(lr,{store:i,children:c.jsx(y2,{username:t})}))}function HA({target:e,apiUrl:t}){const r=ar({reducer:{projectsBrowser:I2},preloadedState:{projectsBrowser:{...V0,apiUrl:t}}});un.createRoot(e).render(c.jsx(lr,{store:r,children:c.jsx($2,{})}))}function WA({target:e,routes:t,authenticityToken:r}){mi(t);const i=ar({reducer:{publicationsSearch:Yl,publicationEdit:wi},preloadedState:{publicationEdit:{...Xs,authenticityToken:r}}});un.createRoot(e).render(c.jsx(lr,{store:i,children:c.jsx(z2,{})}))}function KA({publicationId:e,target:t,routes:r,authenticityToken:i}){const o=ar({reducer:{publicationEdit:wi},preloadedState:{publicationEdit:{...Xs,authenticityToken:i}}});mi(r),un.createRoot(t).render(c.jsx(lr,{store:o,children:c.jsx(z0,{publicationId:e})}))}function GA({authenticityToken:e,routes:t,selectedPublicationIds:r,target:i,usernames:o}){const l=ar({reducer:{publicationEdit:wi,publicationsSearch:Yl,publicationsSelect:H2},preloadedState:{publicationsSearch:{...fi,filterSelections:{...fi.filterSelections,createdBy:o}},publicationEdit:{...Xs,authenticityToken:e},publicationsSelect:{...K0,selected:r}}});mi(t),un.createRoot(i).render(c.jsx(lr,{store:l,children:c.jsx(K2,{})}))}function YA({target:e,catalogSources:t,onRamps:r,baseUrl:i,onRampsApi:o}){const l=ar({reducer:{resourceCatalog:lA}});un.createRoot(e).render(c.jsx(lr,{store:l,children:c.jsx(_A,{catalogSources:t,onRamps:r,baseUrl:i,onRampsApi:o})}))}function QA({authenticityToken:e,routes:t,target:r,username:i,showUpdatePublications:o}){mi(t);const l=ar({reducer:{api:hx,publicationEdit:wi,publicationsSearch:Yl},preloadedState:{api:{showUpdatePublications:o,username:i},publicationsSearch:{...fi,filterSelections:{...fi.filterSelections,createdBy:[i]}},publicationEdit:{...Xs,authenticityToken:e},dismissPublicationNotice:{showUpdatePublications:o,status:"idle",error:null,message:null}}});un.createRoot(r).render(c.jsx(lr,{store:l,children:c.jsx(L2,{showUpdatePublications:o})}))}function XA({target:e,apiUrl:t,excludedCategories:r,excludedFilters:i,excludedResources:o,allowedCategories:l,allowedFilters:d}){const p=ar({reducer:{resourceCatalog:IA}});un.createRoot(e).render(c.jsx(lr,{store:p,children:c.jsx(LA,{apiUrl:t,excludedCategories:r,excludedFilters:i,excludedResources:o,allowedCategories:l,allowedFilters:d})}))}function JA({allocationTypes:e,target:t}){un.createRoot(t).render(c.jsx(Keywords,{allocationTypes:e}))}exports.allocationsMap=zA;exports.editResource=BA;exports.keywords=JA;exports.myPublications=QA;exports.onRampsResourceCatalog=YA;exports.projects=qA;exports.projectsBrowser=HA;exports.publicationEdit=KA;exports.publicationsBrowser=WA;exports.publicationsSelect=GA;exports.resourceCatalog=XA;exports.resources=VA;exports.shadowTarget=UA;
|