react-luminus-components 1.5.25 → 1.5.27
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/.vite/manifest.json +26 -26
- package/dist/{FormDisabledProvider-ByVMNZfj.cjs → FormDisabledProvider-CnseYc1t.cjs} +1 -1
- package/dist/{FormDisabledProvider-DaXGRefv.js → FormDisabledProvider-DruCyt_C.js} +1 -1
- package/dist/{ShortcutLinksContext-GuMlmySg.js → ShortcutLinksContext-DF8__Rbl.js} +157 -160
- package/dist/{ShortcutLinksContext-Ch5JVOFI.cjs → ShortcutLinksContext-Dm_GlAxE.cjs} +38 -38
- package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/DynamicFormCreateTableRow/DynamicFormCreateTableRow.d.ts +1 -1
- package/dist/components/common/DynamicForm/comps/DynamicFormTable/comps/comps/DynamicFormInput/DynamicFormInput.d.ts +2 -1
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +5 -5
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout/SideMenu/SideMenu.d.ts +3 -1
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +125 -115
- package/dist/main.cjs.js +32 -32
- package/dist/main.es.js +2289 -2288
- package/dist/models/types/dynamicForms/formPickerTypes/SettingsFormItem.d.ts +7 -1
- package/dist/models/types/dynamicForms/types/DynamicFormIndexModel.d.ts +2 -1
- package/dist/models/types/dynamicForms/types/DynamicFormSchemaModel.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/{useLocalStorageState-DWtbAM7j.cjs → useLocalStorageState--zK59AHw.cjs} +1 -1
- package/dist/{useLocalStorageState-BbAq2qRc.js → useLocalStorageState-bgBQaJ6D.js} +1 -1
- package/dist/utils.cjs.js +1 -1
- package/dist/utils.es.js +2 -2
- package/package.json +1 -1
|
@@ -50,7 +50,7 @@ object-assign
|
|
|
50
50
|
(c) Sindre Sorhus
|
|
51
51
|
@license MIT
|
|
52
52
|
*/var Kd,g0;function z6(){if(g0)return Kd;g0=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Kd=i()?Object.assign:function(a,o){for(var s,c=r(a),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(c[d]=s[d]);if(e){l=e(s);for(var f=0;f<l.length;f++)n.call(s,l[f])&&(c[l[f]]=s[l[f]])}}return c},Kd}var Xd,v0;function Sp(){if(v0)return Xd;v0=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Xd=e,Xd}var Qd,y0;function Tb(){return y0||(y0=1,Qd=Function.call.bind(Object.prototype.hasOwnProperty)),Qd}var Jd,b0;function H6(){if(b0)return Jd;b0=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Sp(),n={},r=Tb();e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in a)if(r(a,u)){var d;try{if(typeof a[u]!="function"){var f=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=a[u](o,u,c,s,null,t)}catch(g){d=g}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=l?l():"";e("Failed "+s+" type: "+d.message+(h??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Jd=i,Jd}var ef,x0;function V6(){if(x0)return ef;x0=1;var e=Tp(),t=z6(),n=Sp(),r=Tb(),i=H6(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function o(){return null}return ef=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(U){var G=U&&(l&&U[l]||U[u]);if(typeof G=="function")return G}var f="<<anonymous>>",h={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:_(),arrayOf:x,element:S(),elementType:b(),instanceOf:T,node:E(),objectOf:M,oneOf:j,oneOfType:k,shape:O,exact:$};function g(U,G){return U===G?U!==0||1/U===1/G:U!==U&&G!==G}function p(U,G){this.message=U,this.data=G&&typeof G=="object"?G:{},this.stack=""}p.prototype=Error.prototype;function v(U){if(process.env.NODE_ENV!=="production")var G={},ne=0;function te(J,Q,re,F,I,L,H){if(F=F||f,L=L||re,H!==n){if(c){var R=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 R.name="Invariant Violation",R}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var K=F+":"+re;!G[K]&&ne<3&&(a("You are manually calling a React.PropTypes validation function for the `"+L+"` prop on `"+F+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),G[K]=!0,ne++)}}return Q[re]==null?J?Q[re]===null?new p("The "+I+" `"+L+"` is marked as required "+("in `"+F+"`, but its value is `null`.")):new p("The "+I+" `"+L+"` is marked as required in "+("`"+F+"`, but its value is `undefined`.")):null:U(Q,re,F,I,L)}var X=te.bind(null,!1);return X.isRequired=te.bind(null,!0),X}function w(U){function G(ne,te,X,J,Q,re){var F=ne[te],I=D(F);if(I!==U){var L=N(F);return new p("Invalid "+J+" `"+Q+"` of type "+("`"+L+"` supplied to `"+X+"`, expected ")+("`"+U+"`."),{expectedType:U})}return null}return v(G)}function _(){return v(o)}function x(U){function G(ne,te,X,J,Q){if(typeof U!="function")return new p("Property `"+Q+"` of component `"+X+"` has invalid PropType notation inside arrayOf.");var re=ne[te];if(!Array.isArray(re)){var F=D(re);return new p("Invalid "+J+" `"+Q+"` of type "+("`"+F+"` supplied to `"+X+"`, expected an array."))}for(var I=0;I<re.length;I++){var L=U(re,I,X,J,Q+"["+I+"]",n);if(L instanceof Error)return L}return null}return v(G)}function S(){function U(G,ne,te,X,J){var Q=G[ne];if(!s(Q)){var re=D(Q);return new p("Invalid "+X+" `"+J+"` of type "+("`"+re+"` supplied to `"+te+"`, expected a single ReactElement."))}return null}return v(U)}function b(){function U(G,ne,te,X,J){var Q=G[ne];if(!e.isValidElementType(Q)){var re=D(Q);return new p("Invalid "+X+" `"+J+"` of type "+("`"+re+"` supplied to `"+te+"`, expected a single ReactElement type."))}return null}return v(U)}function T(U){function G(ne,te,X,J,Q){if(!(ne[te]instanceof U)){var re=U.name||f,F=z(ne[te]);return new p("Invalid "+J+" `"+Q+"` of type "+("`"+F+"` supplied to `"+X+"`, expected ")+("instance of `"+re+"`."))}return null}return v(G)}function j(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function G(ne,te,X,J,Q){for(var re=ne[te],F=0;F<U.length;F++)if(g(re,U[F]))return null;var I=JSON.stringify(U,function(H,R){var K=N(R);return K==="symbol"?String(R):R});return new p("Invalid "+J+" `"+Q+"` of value `"+String(re)+"` "+("supplied to `"+X+"`, expected one of "+I+"."))}return v(G)}function M(U){function G(ne,te,X,J,Q){if(typeof U!="function")return new p("Property `"+Q+"` of component `"+X+"` has invalid PropType notation inside objectOf.");var re=ne[te],F=D(re);if(F!=="object")return new p("Invalid "+J+" `"+Q+"` of type "+("`"+F+"` supplied to `"+X+"`, expected an object."));for(var I in re)if(r(re,I)){var L=U(re,I,X,J,Q+"."+I,n);if(L instanceof Error)return L}return null}return v(G)}function k(U){if(!Array.isArray(U))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var G=0;G<U.length;G++){var ne=U[G];if(typeof ne!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(ne)+" at index "+G+"."),o}function te(X,J,Q,re,F){for(var I=[],L=0;L<U.length;L++){var H=U[L],R=H(X,J,Q,re,F,n);if(R==null)return null;R.data&&r(R.data,"expectedType")&&I.push(R.data.expectedType)}var K=I.length>0?", expected one of type ["+I.join(", ")+"]":"";return new p("Invalid "+re+" `"+F+"` supplied to "+("`"+Q+"`"+K+"."))}return v(te)}function E(){function U(G,ne,te,X,J){return A(G[ne])?null:new p("Invalid "+X+" `"+J+"` supplied to "+("`"+te+"`, expected a ReactNode."))}return v(U)}function C(U,G,ne,te,X){return new p((U||"React class")+": "+G+" type `"+ne+"."+te+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+X+"`.")}function O(U){function G(ne,te,X,J,Q){var re=ne[te],F=D(re);if(F!=="object")return new p("Invalid "+J+" `"+Q+"` of type `"+F+"` "+("supplied to `"+X+"`, expected `object`."));for(var I in U){var L=U[I];if(typeof L!="function")return C(X,J,Q,I,N(L));var H=L(re,I,X,J,Q+"."+I,n);if(H)return H}return null}return v(G)}function $(U){function G(ne,te,X,J,Q){var re=ne[te],F=D(re);if(F!=="object")return new p("Invalid "+J+" `"+Q+"` of type `"+F+"` "+("supplied to `"+X+"`, expected `object`."));var I=t({},ne[te],U);for(var L in I){var H=U[L];if(r(U,L)&&typeof H!="function")return C(X,J,Q,L,N(H));if(!H)return new p("Invalid "+J+" `"+Q+"` key `"+L+"` supplied to `"+X+"`.\nBad object: "+JSON.stringify(ne[te],null," ")+`
|
|
53
|
-
Valid keys: `+JSON.stringify(Object.keys(U),null," "));var R=H(re,L,X,J,Q+"."+L,n);if(R)return R}return null}return v(G)}function A(U){switch(typeof U){case"number":case"string":case"undefined":return!0;case"boolean":return!U;case"object":if(Array.isArray(U))return U.every(A);if(U===null||s(U))return!0;var G=d(U);if(G){var ne=G.call(U),te;if(G!==U.entries){for(;!(te=ne.next()).done;)if(!A(te.value))return!1}else for(;!(te=ne.next()).done;){var X=te.value;if(X&&!A(X[1]))return!1}}else return!1;return!0;default:return!1}}function P(U,G){return U==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function D(U){var G=typeof U;return Array.isArray(U)?"array":U instanceof RegExp?"object":P(G,U)?"symbol":G}function N(U){if(typeof U>"u"||U===null)return""+U;var G=D(U);if(G==="object"){if(U instanceof Date)return"date";if(U instanceof RegExp)return"regexp"}return G}function q(U){var G=N(U);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function z(U){return!U.constructor||!U.constructor.name?f:U.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},ef}var tf,_0;function q6(){if(_0)return tf;_0=1;var e=Sp();function t(){}function n(){}return n.resetWarningCache=t,tf=function(){function r(o,s,c,l,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},tf}if(process.env.NODE_ENV!=="production"){var Y6=Tp(),G6=!0;Jf.exports=V6()(Y6.isElement,G6)}else Jf.exports=q6()();var Z6=Jf.exports;const V=Ht(Z6),w0={disabled:!1};var K6=process.env.NODE_ENV!=="production"?V.oneOfType([V.number,V.shape({enter:V.number,exit:V.number,appear:V.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&V.oneOfType([V.string,V.shape({enter:V.string,exit:V.string,active:V.string}),V.shape({enter:V.string,enterDone:V.string,enterActive:V.string,exit:V.string,exitDone:V.string,exitActive:V.string})]);const Sb=m.createContext(null);var X6=function(t){return t.scrollTop},Go="unmounted",ni="exited",Ir="entering",ri="entered",ul="exiting",Yr=function(e){_b(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var o=i,s=o&&!o.isMounting?r.enter:r.appear,c;return a.appearStatus=null,r.in?s?(c=ni,a.appearStatus=Ir):c=ri:r.unmountOnExit||r.mountOnEnter?c=Go:c=ni,a.state={status:c},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===Go?{status:ni}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Ir&&o!==ri&&(a=Ir):(o===Ir||o===ri)&&(a=ul)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Ir){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:oi.findDOMNode(this);o&&X6(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ni&&this.setState({status:Go})},n.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,c=this.props.nodeRef?[s]:[oi.findDOMNode(this),s],l=c[0],u=c[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!o||w0.disabled){this.safeSetState({status:ri},function(){a.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:Ir},function(){a.props.onEntering(l,u),a.onTransitionEnd(f,function(){a.safeSetState({status:ri},function(){a.props.onEntered(l,u)})})})},n.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:oi.findDOMNode(this);if(!a||w0.disabled){this.safeSetState({status:ni},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:ul},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:ni},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,a.nextCallback=null,i(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:oi.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Go)return null;var a=this.props,o=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var s=wp(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return m.createElement(Sb.Provider,{value:null},typeof o=="function"?o(i,s):m.cloneElement(m.Children.only(o),s))},t}(m.Component);Yr.contextType=Sb;Yr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:V.shape({current:typeof Element>"u"?V.any:function(e,t,n,r,i,a){var o=e[t];return V.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:V.oneOfType([V.func.isRequired,V.element.isRequired]).isRequired,in:V.bool,mountOnEnter:V.bool,unmountOnExit:V.bool,appear:V.bool,enter:V.bool,exit:V.bool,timeout:function(t){var n=K6;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return n.apply(void 0,[t].concat(i))},addEndListener:V.func,onEnter:V.func,onEntering:V.func,onEntered:V.func,onExit:V.func,onExiting:V.func,onExited:V.func}:{};function ya(){}Yr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ya,onEntering:ya,onEntered:ya,onExit:ya,onExiting:ya,onExited:ya};Yr.UNMOUNTED=Go;Yr.EXITED=ni;Yr.ENTERING=Ir;Yr.ENTERED=ri;Yr.EXITING=ul;const io=!!(typeof window<"u"&&window.document&&window.document.createElement);var eh=!1,th=!1;try{var nf={get passive(){return eh=!0},get once(){return th=eh=!0}};io&&(window.addEventListener("test",nf,nf),window.removeEventListener("test",nf,!0))}catch{}function kp(e,t,n,r){if(r&&typeof r!="boolean"&&!th){var i=r.once,a=r.capture,o=n;!th&&i&&(o=n.__once||function s(c){this.removeEventListener(t,s,a),n.call(this,c)},n.__once=o),e.addEventListener(t,o,eh?r:a)}e.addEventListener(t,n,r)}function nh(e,t,n,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}function Nr(e,t,n,r){return kp(e,t,n,r),function(){nh(e,t,n,r)}}function Q6(e,t,n,r){if(r===void 0&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}function J6(e){var t=li(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function e5(e,t,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||Q6(e,"transitionend",!0)},t+n),a=Nr(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),a()}}function kb(e,t,n,r){n==null&&(n=J6(e)||0);var i=e5(e,n,r),a=Nr(e,"transitionend",t);return function(){i(),a()}}function C0(e,t){const n=li(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Eb(e,t){const n=C0(e,"transitionDuration"),r=C0(e,"transitionDelay"),i=kb(e,a=>{a.target===e&&(i(),t(a))},n+r)}function Ob(e){e.offsetHeight}const T0=e=>!e||typeof e=="function"?e:t=>{e.current=t};function t5(e,t){const n=T0(e),r=T0(t);return i=>{n&&n(i),r&&r(i)}}function Xn(e,t){return m.useMemo(()=>t5(e,t),[e,t])}function dl(e){return e&&"setState"in e?oi.findDOMNode(e):e??null}const Mb=m.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:a,addEndListener:o,children:s,childRef:c,...l},u)=>{const d=m.useRef(null),f=Xn(d,c),h=T=>{f(dl(T))},g=T=>j=>{T&&d.current&&T(d.current,j)},p=m.useCallback(g(e),[e]),v=m.useCallback(g(t),[t]),w=m.useCallback(g(n),[n]),_=m.useCallback(g(r),[r]),x=m.useCallback(g(i),[i]),S=m.useCallback(g(a),[a]),b=m.useCallback(g(o),[o]);return y.jsx(Yr,{ref:u,...l,onEnter:p,onEntered:w,onEntering:v,onExit:_,onExited:S,onExiting:x,addEndListener:b,nodeRef:d,children:typeof s=="function"?(T,j)=>s(T,{...j,ref:h}):m.cloneElement(s,{ref:h})})});function n5(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e},[e]),t}function Bt(e){const t=n5(e);return m.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const Ep=e=>ue.forwardRef((t,n)=>y.jsx("div",{...t,ref:n,className:oe(t.className,e)})),$b=Ep("h4");$b.displayName="DivStyledAsH4";const Ab=ue.forwardRef(({className:e,bsPrefix:t,as:n=$b,...r},i)=>(t=nt(t,"alert-heading"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Ab.displayName="AlertHeading";function fl(){return m.useState(null)}function r5(e,t,n,r=!1){const i=Bt(n);m.useEffect(()=>{const a=typeof e=="function"?e():e;return a.addEventListener(t,i,r),()=>a.removeEventListener(t,i,r)},[e])}function Op(){const e=m.useRef(!0),t=m.useRef(()=>e.current);return m.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function Rb(e){const t=m.useRef(null);return m.useEffect(()=>{t.current=e}),t.current}const i5=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",a5=typeof document<"u",ss=a5||i5?m.useLayoutEffect:m.useEffect,o5=["as","disabled"];function s5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function c5(e){return!e||e.trim()==="#"}function Mp({tagName:e,disabled:t,href:n,target:r,rel:i,role:a,onClick:o,tabIndex:s=0,type:c}){e||(n!=null||r!=null||i!=null?e="a":e="button");const l={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},l];const u=f=>{if((t||e==="a"&&c5(n))&&f.preventDefault(),t){f.stopPropagation();return}o==null||o(f)},d=f=>{f.key===" "&&(f.preventDefault(),u(f))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:a??"button",disabled:void 0,tabIndex:t?void 0:s,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:u,onKeyDown:d},l]}const $p=ue.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=s5(e,o5);const[a,{tagName:o}]=Mp(Object.assign({tagName:n,disabled:r},i));return y.jsx(o,Object.assign({},i,a,{ref:t}))});$p.displayName="Button";const l5=["onKeyDown"];function u5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function d5(e){return!e||e.trim()==="#"}const Ap=ue.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=u5(e,l5);const[i]=Mp(Object.assign({tagName:"a"},r)),a=Bt(o=>{i.onKeyDown(o),n==null||n(o)});return d5(r.href)||r.role==="button"?y.jsx("a",Object.assign({ref:t},r,i,{onKeyDown:a})):y.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Ap.displayName="Anchor";const jb=ue.forwardRef(({className:e,bsPrefix:t,as:n=Ap,...r},i)=>(t=nt(t,"alert-link"),y.jsx(n,{ref:i,className:oe(e,t),...r})));jb.displayName="AlertLink";function Pb(e){return e.code==="Escape"||e.keyCode===27}function Ib(){const e=ue.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}const f5={[Ir]:"show",[ri]:"show"},di=ue.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...i},a)=>{const o={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},s=m.useCallback((u,d)=>{Ob(u),r==null||r(u,d)},[r]),{major:c}=Ib(),l=c>=19?t.props.ref:t.ref;return y.jsx(Mb,{ref:a,addEndListener:Eb,...o,onEnter:s,childRef:l,children:(u,d)=>ue.cloneElement(t,{...d,className:oe("fade",e,t.props.className,f5[u],n[u])})})});di.displayName="Fade";const h5={"aria-label":V.string,onClick:V.func,variant:V.oneOf(["white"])},cu=ue.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},i)=>y.jsx("button",{ref:i,type:"button",className:oe("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));cu.displayName="CloseButton";cu.propTypes=h5;const Db=ue.forwardRef((e,t)=>{const{bsPrefix:n,show:r=!0,closeLabel:i="Close alert",closeVariant:a,className:o,children:s,variant:c="primary",onClose:l,dismissible:u,transition:d=di,...f}=Cp(e,{show:"onClose"}),h=nt(n,"alert"),g=Bt(w=>{l&&l(!1,w)}),p=d===!0?di:d,v=y.jsxs("div",{role:"alert",...p?void 0:f,ref:t,className:oe(o,h,c&&`${h}-${c}`,u&&`${h}-dismissible`),children:[u&&y.jsx(cu,{onClick:g,"aria-label":i,variant:a}),s]});return p?y.jsx(p,{unmountOnExit:!0,...f,ref:void 0,in:r,children:v}):r?v:null});Db.displayName="Alert";const p5=Object.assign(Db,{Link:jb,Heading:Ab}),Rp=ue.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:i=!1,disabled:a=!1,className:o,...s},c)=>{const l=nt(t,"btn"),[u,{tagName:d}]=Mp({tagName:e,disabled:a,...s}),f=d;return y.jsx(f,{...u,...s,ref:c,disabled:a,className:oe(o,l,i&&"active",n&&`${l}-${n}`,r&&`${l}-${r}`,s.href&&a&&"disabled")})});Rp.displayName="Button";function m5(e){const t=m.useRef(e);return t.current=e,t}function jp(e){const t=m5(e);m.useEffect(()=>()=>t.current(),[])}const rh=2**31-1;function Nb(e,t,n){const r=n-Date.now();e.current=r<=rh?setTimeout(t,r):setTimeout(()=>Nb(e,t,n),rh)}function g5(){const e=Op(),t=m.useRef();return jp(()=>clearTimeout(t.current)),m.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(i,a=0){e()&&(n(),a<=rh?t.current=setTimeout(i,a):Nb(t,i,Date.now()+a))}return{set:r,clear:n,handleRef:t}},[])}function v5(e,t){return ue.Children.toArray(e).some(n=>ue.isValidElement(n)&&n.type===t)}function Lb({as:e,bsPrefix:t,className:n,...r}){t=nt(t,"col");const i=wb(),a=Cb(),o=[],s=[];return i.forEach(c=>{const l=r[c];delete r[c];let u,d,f;typeof l=="object"&&l!=null?{span:u,offset:d,order:f}=l:u=l;const h=c!==a?`-${c}`:"";u&&o.push(u===!0?`${t}${h}`:`${t}${h}-${u}`),f!=null&&s.push(`order${h}-${f}`),d!=null&&s.push(`offset${h}-${d}`)}),[{...r,className:oe(n,...o,...s)},{as:e,bsPrefix:t,spans:o}]}const Pp=ue.forwardRef((e,t)=>{const[{className:n,...r},{as:i="div",bsPrefix:a,spans:o}]=Lb(e);return y.jsx(i,{...r,ref:t,className:oe(n,!o.length&&a)})});Pp.displayName="Col";var y5=Function.prototype.bind.call(Function.prototype.call,[].slice);function Dr(e,t){return y5(e.querySelectorAll(t))}function b5(e,t,n){const r=m.useRef(e!==void 0),[i,a]=m.useState(t),o=e!==void 0,s=r.current;return r.current=o,!o&&s&&i!==t&&a(t),[o?e:i,m.useCallback((...c)=>{const[l,...u]=c;let d=n==null?void 0:n(l,...u);return a(l),d},[n])]}function Fb(){const[,e]=m.useReducer(t=>!t,!1);return e}const lu=ue.createContext(null);var S0=Object.prototype.hasOwnProperty;function k0(e,t,n){for(n of e.keys())if(Jo(n,t))return n}function Jo(e,t){var n,r,i;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--&&Jo(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=k0(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=k0(t,i),!i)||!Jo(r[1],t.get(i)))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(S0.call(e,n)&&++r&&!S0.call(t,n)||!(n in t)||!Jo(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function x5(e){const t=Op();return[e[0],m.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var $n="top",Zn="bottom",Kn="right",An="left",Ip="auto",Gs=[$n,Zn,Kn,An],Fa="start",cs="end",_5="clippingParents",Bb="viewport",Ro="popper",w5="reference",E0=Gs.reduce(function(e,t){return e.concat([t+"-"+Fa,t+"-"+cs])},[]),Ub=[].concat(Gs,[Ip]).reduce(function(e,t){return e.concat([t,t+"-"+Fa,t+"-"+cs])},[]),C5="beforeRead",T5="read",S5="afterRead",k5="beforeMain",E5="main",O5="afterMain",M5="beforeWrite",$5="write",A5="afterWrite",R5=[C5,T5,S5,k5,E5,O5,M5,$5,A5];function hr(e){return e.split("-")[0]}function Fn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zi(e){var t=Fn(e).Element;return e instanceof t||e instanceof Element}function pr(e){var t=Fn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Dp(e){if(typeof ShadowRoot>"u")return!1;var t=Fn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Wi=Math.max,hl=Math.min,Ba=Math.round;function ih(){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 Wb(){return!/^((?!chrome|android).)*safari/i.test(ih())}function Ua(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&pr(e)&&(i=e.offsetWidth>0&&Ba(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Ba(r.height)/e.offsetHeight||1);var o=Zi(e)?Fn(e):window,s=o.visualViewport,c=!Wb()&&n,l=(r.left+(c&&s?s.offsetLeft:0))/i,u=(r.top+(c&&s?s.offsetTop:0))/a,d=r.width/i,f=r.height/a;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l,x:l,y:u}}function Np(e){var t=Ua(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 zb(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Dp(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fi(e){return e?(e.nodeName||"").toLowerCase():null}function Wr(e){return Fn(e).getComputedStyle(e)}function j5(e){return["table","td","th"].indexOf(fi(e))>=0}function wi(e){return((Zi(e)?e.ownerDocument:e.document)||window.document).documentElement}function uu(e){return fi(e)==="html"?e:e.assignedSlot||e.parentNode||(Dp(e)?e.host:null)||wi(e)}function O0(e){return!pr(e)||Wr(e).position==="fixed"?null:e.offsetParent}function P5(e){var t=/firefox/i.test(ih()),n=/Trident/i.test(ih());if(n&&pr(e)){var r=Wr(e);if(r.position==="fixed")return null}var i=uu(e);for(Dp(i)&&(i=i.host);pr(i)&&["html","body"].indexOf(fi(i))<0;){var a=Wr(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Zs(e){for(var t=Fn(e),n=O0(e);n&&j5(n)&&Wr(n).position==="static";)n=O0(n);return n&&(fi(n)==="html"||fi(n)==="body"&&Wr(n).position==="static")?t:n||P5(e)||t}function Lp(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function es(e,t,n){return Wi(e,hl(t,n))}function I5(e,t,n){var r=es(e,t,n);return r>n?n:r}function Hb(){return{top:0,right:0,bottom:0,left:0}}function Vb(e){return Object.assign({},Hb(),e)}function qb(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var D5=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Vb(typeof t!="number"?t:qb(t,Gs))};function N5(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=hr(n.placement),c=Lp(s),l=[An,Kn].indexOf(s)>=0,u=l?"height":"width";if(!(!a||!o)){var d=D5(i.padding,n),f=Np(a),h=c==="y"?$n:An,g=c==="y"?Zn:Kn,p=n.rects.reference[u]+n.rects.reference[c]-o[c]-n.rects.popper[u],v=o[c]-n.rects.reference[c],w=Zs(a),_=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,x=p/2-v/2,S=d[h],b=_-f[u]-d[g],T=_/2-f[u]/2+x,j=es(S,T,b),M=c;n.modifiersData[r]=(t={},t[M]=j,t.centerOffset=j-T,t)}}function L5(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||zb(t.elements.popper,i)&&(t.elements.arrow=i))}const F5={name:"arrow",enabled:!0,phase:"main",fn:N5,effect:L5,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wa(e){return e.split("-")[1]}var B5={top:"auto",right:"auto",bottom:"auto",left:"auto"};function U5(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Ba(n*i)/i||0,y:Ba(r*i)/i||0}}function M0(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,h=f===void 0?0:f,g=o.y,p=g===void 0?0:g,v=typeof u=="function"?u({x:h,y:p}):{x:h,y:p};h=v.x,p=v.y;var w=o.hasOwnProperty("x"),_=o.hasOwnProperty("y"),x=An,S=$n,b=window;if(l){var T=Zs(n),j="clientHeight",M="clientWidth";if(T===Fn(n)&&(T=wi(n),Wr(T).position!=="static"&&s==="absolute"&&(j="scrollHeight",M="scrollWidth")),T=T,i===$n||(i===An||i===Kn)&&a===cs){S=Zn;var k=d&&T===b&&b.visualViewport?b.visualViewport.height:T[j];p-=k-r.height,p*=c?1:-1}if(i===An||(i===$n||i===Zn)&&a===cs){x=Kn;var E=d&&T===b&&b.visualViewport?b.visualViewport.width:T[M];h-=E-r.width,h*=c?1:-1}}var C=Object.assign({position:s},l&&B5),O=u===!0?U5({x:h,y:p},Fn(n)):{x:h,y:p};if(h=O.x,p=O.y,c){var $;return Object.assign({},C,($={},$[S]=_?"0":"",$[x]=w?"0":"",$.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+p+"px)":"translate3d("+h+"px, "+p+"px, 0)",$))}return Object.assign({},C,(t={},t[S]=_?p+"px":"",t[x]=w?h+"px":"",t.transform="",t))}function W5(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:hr(t.placement),variation:Wa(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,M0(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,M0(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const z5={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:W5,data:{}};var Oc={passive:!0};function H5(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=Fn(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(u){u.addEventListener("scroll",n.update,Oc)}),s&&c.addEventListener("resize",n.update,Oc),function(){a&&l.forEach(function(u){u.removeEventListener("scroll",n.update,Oc)}),s&&c.removeEventListener("resize",n.update,Oc)}}const V5={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:H5,data:{}};var q5={left:"right",right:"left",bottom:"top",top:"bottom"};function Gc(e){return e.replace(/left|right|bottom|top/g,function(t){return q5[t]})}var Y5={start:"end",end:"start"};function $0(e){return e.replace(/start|end/g,function(t){return Y5[t]})}function Fp(e){var t=Fn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Bp(e){return Ua(wi(e)).left+Fp(e).scrollLeft}function G5(e,t){var n=Fn(e),r=wi(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=Wb();(l||!l&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Bp(e),y:c}}function Z5(e){var t,n=wi(e),r=Fp(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Wi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Wi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Bp(e),c=-r.scrollTop;return Wr(i||n).direction==="rtl"&&(s+=Wi(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}function Up(e){var t=Wr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Yb(e){return["html","body","#document"].indexOf(fi(e))>=0?e.ownerDocument.body:pr(e)&&Up(e)?e:Yb(uu(e))}function ts(e,t){var n;t===void 0&&(t=[]);var r=Yb(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=Fn(r),o=i?[a].concat(a.visualViewport||[],Up(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(ts(uu(o)))}function ah(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function K5(e,t){var n=Ua(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 A0(e,t,n){return t===Bb?ah(G5(e,n)):Zi(t)?K5(t,n):ah(Z5(wi(e)))}function X5(e){var t=ts(uu(e)),n=["absolute","fixed"].indexOf(Wr(e).position)>=0,r=n&&pr(e)?Zs(e):e;return Zi(r)?t.filter(function(i){return Zi(i)&&zb(i,r)&&fi(i)!=="body"}):[]}function Q5(e,t,n,r){var i=t==="clippingParents"?X5(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(c,l){var u=A0(e,l,r);return c.top=Wi(u.top,c.top),c.right=hl(u.right,c.right),c.bottom=hl(u.bottom,c.bottom),c.left=Wi(u.left,c.left),c},A0(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Gb(e){var t=e.reference,n=e.element,r=e.placement,i=r?hr(r):null,a=r?Wa(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case $n:c={x:o,y:t.y-n.height};break;case Zn:c={x:o,y:t.y+t.height};break;case Kn:c={x:t.x+t.width,y:s};break;case An:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?Lp(i):null;if(l!=null){var u=l==="y"?"height":"width";switch(a){case Fa:c[l]=c[l]-(t[u]/2-n[u]/2);break;case cs:c[l]=c[l]+(t[u]/2-n[u]/2);break}}return c}function ls(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?_5:s,l=n.rootBoundary,u=l===void 0?Bb:l,d=n.elementContext,f=d===void 0?Ro:d,h=n.altBoundary,g=h===void 0?!1:h,p=n.padding,v=p===void 0?0:p,w=Vb(typeof v!="number"?v:qb(v,Gs)),_=f===Ro?w5:Ro,x=e.rects.popper,S=e.elements[g?_:f],b=Q5(Zi(S)?S:S.contextElement||wi(e.elements.popper),c,u,o),T=Ua(e.elements.reference),j=Gb({reference:T,element:x,strategy:"absolute",placement:i}),M=ah(Object.assign({},x,j)),k=f===Ro?M:T,E={top:b.top-k.top+w.top,bottom:k.bottom-b.bottom+w.bottom,left:b.left-k.left+w.left,right:k.right-b.right+w.right},C=e.modifiersData.offset;if(f===Ro&&C){var O=C[i];Object.keys(E).forEach(function($){var A=[Kn,Zn].indexOf($)>=0?1:-1,P=[$n,Zn].indexOf($)>=0?"y":"x";E[$]+=O[P]*A})}return E}function J5(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Ub:c,u=Wa(r),d=u?s?E0:E0.filter(function(g){return Wa(g)===u}):Gs,f=d.filter(function(g){return l.indexOf(g)>=0});f.length===0&&(f=d);var h=f.reduce(function(g,p){return g[p]=ls(e,{placement:p,boundary:i,rootBoundary:a,padding:o})[hr(p)],g},{});return Object.keys(h).sort(function(g,p){return h[g]-h[p]})}function eS(e){if(hr(e)===Ip)return[];var t=Gc(e);return[$0(e),t,$0(t)]}function tS(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,g=h===void 0?!0:h,p=n.allowedAutoPlacements,v=t.options.placement,w=hr(v),_=w===v,x=c||(_||!g?[Gc(v)]:eS(v)),S=[v].concat(x).reduce(function(X,J){return X.concat(hr(J)===Ip?J5(t,{placement:J,boundary:u,rootBoundary:d,padding:l,flipVariations:g,allowedAutoPlacements:p}):J)},[]),b=t.rects.reference,T=t.rects.popper,j=new Map,M=!0,k=S[0],E=0;E<S.length;E++){var C=S[E],O=hr(C),$=Wa(C)===Fa,A=[$n,Zn].indexOf(O)>=0,P=A?"width":"height",D=ls(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),N=A?$?Kn:An:$?Zn:$n;b[P]>T[P]&&(N=Gc(N));var q=Gc(N),z=[];if(a&&z.push(D[O]<=0),s&&z.push(D[N]<=0,D[q]<=0),z.every(function(X){return X})){k=C,M=!1;break}j.set(C,z)}if(M)for(var U=g?3:1,G=function(J){var Q=S.find(function(re){var F=j.get(re);if(F)return F.slice(0,J).every(function(I){return I})});if(Q)return k=Q,"break"},ne=U;ne>0;ne--){var te=G(ne);if(te==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}const nS={name:"flip",enabled:!0,phase:"main",fn:tS,requiresIfExists:["offset"],data:{_skip:!1}};function R0(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 j0(e){return[$n,Kn,Zn,An].some(function(t){return e[t]>=0})}function rS(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=ls(t,{elementContext:"reference"}),s=ls(t,{altBoundary:!0}),c=R0(o,r),l=R0(s,i,a),u=j0(c),d=j0(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const iS={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rS};function aS(e,t,n){var r=hr(e),i=[An,$n].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[An,Kn].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function oS(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Ub.reduce(function(u,d){return u[d]=aS(d,t.rects,a),u},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}const sS={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:oS};function cS(e){var t=e.state,n=e.name;t.modifiersData[n]=Gb({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const lS={name:"popperOffsets",enabled:!0,phase:"read",fn:cS,data:{}};function uS(e){return e==="x"?"y":"x"}function dS(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,g=n.tetherOffset,p=g===void 0?0:g,v=ls(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),w=hr(t.placement),_=Wa(t.placement),x=!_,S=Lp(w),b=uS(S),T=t.modifiersData.popperOffsets,j=t.rects.reference,M=t.rects.popper,k=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,E=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(T){if(a){var $,A=S==="y"?$n:An,P=S==="y"?Zn:Kn,D=S==="y"?"height":"width",N=T[S],q=N+v[A],z=N-v[P],U=h?-M[D]/2:0,G=_===Fa?j[D]:M[D],ne=_===Fa?-M[D]:-j[D],te=t.elements.arrow,X=h&&te?Np(te):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Hb(),Q=J[A],re=J[P],F=es(0,j[D],X[D]),I=x?j[D]/2-U-F-Q-E.mainAxis:G-F-Q-E.mainAxis,L=x?-j[D]/2+U+F+re+E.mainAxis:ne+F+re+E.mainAxis,H=t.elements.arrow&&Zs(t.elements.arrow),R=H?S==="y"?H.clientTop||0:H.clientLeft||0:0,K=($=C==null?void 0:C[S])!=null?$:0,Z=N+I-K-R,ee=N+L-K,pe=es(h?hl(q,Z):q,N,h?Wi(z,ee):z);T[S]=pe,O[S]=pe-N}if(s){var we,ve=S==="x"?$n:An,Le=S==="x"?Zn:Kn,Re=T[b],Ve=b==="y"?"height":"width",ze=Re+v[ve],ut=Re-v[Le],at=[$n,An].indexOf(w)!==-1,de=(we=C==null?void 0:C[b])!=null?we:0,me=at?ze:Re-j[Ve]-M[Ve]-de+E.altAxis,ke=at?Re+j[Ve]+M[Ve]-de-E.altAxis:ut,tt=h&&at?I5(me,Re,ke):es(h?me:ze,Re,h?ke:ut);T[b]=tt,O[b]=tt-Re}t.modifiersData[r]=O}}const fS={name:"preventOverflow",enabled:!0,phase:"main",fn:dS,requiresIfExists:["offset"]};function hS(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function pS(e){return e===Fn(e)||!pr(e)?Fp(e):hS(e)}function mS(e){var t=e.getBoundingClientRect(),n=Ba(t.width)/e.offsetWidth||1,r=Ba(t.height)/e.offsetHeight||1;return n!==1||r!==1}function gS(e,t,n){n===void 0&&(n=!1);var r=pr(t),i=pr(t)&&mS(t),a=wi(t),o=Ua(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((fi(t)!=="body"||Up(a))&&(s=pS(t)),pr(t)?(c=Ua(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Bp(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function vS(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var c=t.get(s);c&&i(c)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function yS(e){var t=vS(e);return R5.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function bS(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function xS(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var P0={placement:"bottom",modifiers:[],strategy:"absolute"};function I0(){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 _S(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?P0:i;return function(s,c,l){l===void 0&&(l=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},P0,a),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},d=[],f=!1,h={state:u,setOptions:function(w){var _=typeof w=="function"?w(u.options):w;p(),u.options=Object.assign({},a,u.options,_),u.scrollParents={reference:Zi(s)?ts(s):s.contextElement?ts(s.contextElement):[],popper:ts(c)};var x=yS(xS([].concat(r,u.options.modifiers)));return u.orderedModifiers=x.filter(function(S){return S.enabled}),g(),h.update()},forceUpdate:function(){if(!f){var w=u.elements,_=w.reference,x=w.popper;if(I0(_,x)){u.rects={reference:gS(_,Zs(x),u.options.strategy==="fixed"),popper:Np(x)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(E){return u.modifiersData[E.name]=Object.assign({},E.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var b=u.orderedModifiers[S],T=b.fn,j=b.options,M=j===void 0?{}:j,k=b.name;typeof T=="function"&&(u=T({state:u,options:M,name:k,instance:h})||u)}}}},update:bS(function(){return new Promise(function(v){h.forceUpdate(),v(u)})}),destroy:function(){p(),f=!0}};if(!I0(s,c))return h;h.setOptions(l).then(function(v){!f&&l.onFirstUpdate&&l.onFirstUpdate(v)});function g(){u.orderedModifiers.forEach(function(v){var w=v.name,_=v.options,x=_===void 0?{}:_,S=v.effect;if(typeof S=="function"){var b=S({state:u,name:w,instance:h,options:x}),T=function(){};d.push(b||T)}})}function p(){d.forEach(function(v){return v()}),d=[]}return h}}const wS=_S({defaultModifiers:[iS,lS,z5,V5,sS,nS,fS,F5]}),CS=["enabled","placement","strategy","modifiers"];function TS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const SS={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},kS={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(i=>i.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,i=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&i==="tooltip"&&"setAttribute"in r){const a=r.getAttribute("aria-describedby");if(a&&a.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",a?`${a},${n.id}`:n.id)}}},ES=[];function Zb(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:a="absolute",modifiers:o=ES}=n,s=TS(n,CS);const c=m.useRef(o),l=m.useRef(),u=m.useCallback(()=>{var v;(v=l.current)==null||v.update()},[]),d=m.useCallback(()=>{var v;(v=l.current)==null||v.forceUpdate()},[]),[f,h]=x5(m.useState({placement:i,update:u,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),g=m.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:v})=>{const w={},_={};Object.keys(v.elements).forEach(x=>{w[x]=v.styles[x],_[x]=v.attributes[x]}),h({state:v,styles:w,attributes:_,update:u,forceUpdate:d,placement:v.placement})}}),[u,d,h]),p=m.useMemo(()=>(Jo(c.current,o)||(c.current=o),c.current),[o]);return m.useEffect(()=>{!l.current||!r||l.current.setOptions({placement:i,strategy:a,modifiers:[...p,g,SS]})},[a,i,g,r,p]),m.useEffect(()=>{if(!(!r||e==null||t==null))return l.current=wS(e,t,Object.assign({},s,{placement:i,strategy:a,modifiers:[...p,kS,g]})),()=>{l.current!=null&&(l.current.destroy(),l.current=void 0,h(v=>Object.assign({},v,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),f}function us(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var OS=process.env.NODE_ENV!=="production",Kb=function(){};if(OS){var MS=function(t,n){var r=arguments.length;n=new Array(r>1?r-1:0);for(var i=1;i<r;i++)n[i-1]=arguments[i];var a=0,o="Warning: "+t.replace(/%s/g,function(){return n[a++]});typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}};Kb=function(e,t,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var i=2;i<r;i++)n[i-2]=arguments[i];if(t===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||MS.apply(null,[t].concat(n))}}var $S=Kb;const oa=Ht($S),D0=()=>{};function AS(e){return e.button===0}function RS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Zc=e=>e&&("current"in e?e.current:e),N0={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Xb(e,t=D0,{disabled:n,clickTrigger:r="click"}={}){const i=m.useRef(!1),a=m.useRef(!1),o=m.useCallback(l=>{const u=Zc(e);oa(!!u,"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"),i.current=!u||RS(l)||!AS(l)||!!us(u,l.target)||a.current,a.current=!1},[e]),s=Bt(l=>{const u=Zc(e);u&&us(u,l.target)&&(a.current=!0)}),c=Bt(l=>{i.current||t(l)});m.useEffect(()=>{var l,u;if(n||e==null)return;const d=ro(Zc(e)),f=d.defaultView||window;let h=(l=f.event)!=null?l:(u=f.parent)==null?void 0:u.event,g=null;N0[r]&&(g=Nr(d,N0[r],s,!0));const p=Nr(d,r,o,!0),v=Nr(d,r,_=>{if(_===h){h=void 0;return}c(_)});let w=[];return"ontouchstart"in d.documentElement&&(w=[].slice.call(d.body.children).map(_=>Nr(_,"mousemove",D0))),()=>{g==null||g(),p(),v(),w.forEach(_=>_())}},[e,n,r,o,s,c])}function jS(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function PS(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Qb({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:a,containerPadding:o,arrowElement:s,popperConfig:c={}}){var l,u,d,f,h;const g=jS(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:a?"fixed":c.strategy,modifiers:PS(Object.assign({},g,{eventListeners:{enabled:t,options:(l=g.eventListeners)==null?void 0:l.options},preventOverflow:Object.assign({},g.preventOverflow,{options:o?Object.assign({padding:o},(u=g.preventOverflow)==null?void 0:u.options):(d=g.preventOverflow)==null?void 0:d.options}),offset:{options:Object.assign({offset:i},(f=g.offset)==null?void 0:f.options)},arrow:Object.assign({},g.arrow,{enabled:!!s,options:Object.assign({},(h=g.arrow)==null?void 0:h.options,{element:s})}),flip:Object.assign({enabled:!!r},g.flip)}))})}const IS=["children","usePopper"];function DS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const NS=()=>{};function Jb(e={}){const t=m.useContext(lu),[n,r]=fl(),i=m.useRef(!1),{flip:a,offset:o,rootCloseEvent:s,fixed:c=!1,placement:l,popperConfig:u={},enableEventListeners:d=!0,usePopper:f=!!t}=e,h=(t==null?void 0:t.show)==null?!!e.show:t.show;h&&!i.current&&(i.current=!0);const g=T=>{t==null||t.toggle(!1,T)},{placement:p,setMenu:v,menuElement:w,toggleElement:_}=t||{},x=Zb(_,w,Qb({placement:l||p||"bottom-start",enabled:f,enableEvents:d??h,offset:o,flip:a,fixed:c,arrowElement:n,popperConfig:u})),S=Object.assign({ref:v||NS,"aria-labelledby":_==null?void 0:_.id},x.attributes.popper,{style:x.styles.popper}),b={show:h,placement:p,hasShown:i.current,toggle:t==null?void 0:t.toggle,popper:f?x:null,arrowProps:f?Object.assign({ref:r},x.attributes.arrow,{style:x.styles.arrow}):{}};return Xb(w,g,{clickTrigger:s,disabled:!h}),[S,b]}function ex(e){let{children:t,usePopper:n=!0}=e,r=DS(e,IS);const[i,a]=Jb(Object.assign({},r,{usePopper:n}));return y.jsx(y.Fragment,{children:t(i,a)})}ex.displayName="DropdownMenu";const pl={prefix:String(Math.round(Math.random()*1e10)),current:0},tx=m.createContext(pl),LS=m.createContext(!1);let FS=!!(typeof window<"u"&&window.document&&window.document.createElement),rf=new WeakMap;function BS(e=!1){let t=m.useContext(tx),n=m.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let o=rf.get(a);o==null?rf.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==o.state&&(t.current=o.id,rf.delete(a))}n.current=++t.current}return n.current}function US(e){let t=m.useContext(tx);t===pl&&!FS&&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=BS(!!e),r=t===pl&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function WS(e){let t=m.useId(),[n]=m.useState(YS()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${pl.prefix}`;return e||`${r}-${t}`}const zS=typeof m.useId=="function"?WS:US;function HS(){return!1}function VS(){return!0}function qS(e){return()=>{}}function YS(){return typeof m.useSyncExternalStore=="function"?m.useSyncExternalStore(qS,HS,VS):m.useContext(LS)}const nx=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},L0=()=>{};function rx(){const e=zS(),{show:t=!1,toggle:n=L0,setToggle:r,menuElement:i}=m.useContext(lu)||{},a=m.useCallback(s=>{n(!t,s)},[t,n]),o={id:e,ref:r||L0,onClick:a,"aria-expanded":!!t};return i&&nx(i)&&(o["aria-haspopup"]=!0),[o,{show:t,toggle:n}]}function ix({children:e}){const[t,n]=rx();return y.jsx(y.Fragment,{children:e(t,n)})}ix.displayName="DropdownToggle";const za=ue.createContext(null),ds=(e,t=null)=>e!=null?String(e):t||null,du=ue.createContext(null);du.displayName="NavContext";const GS="data-rr-ui-",ZS="rrUi";function ao(e){return`${GS}${e}`}function KS(e){return`${ZS}${e}`}const XS=["eventKey","disabled","onClick","active","as"];function QS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ax({key:e,href:t,active:n,disabled:r,onClick:i}){const a=m.useContext(za),o=m.useContext(du),{activeKey:s}=o||{},c=ds(e,t),l=n==null&&e!=null?ds(s)===c:n;return[{onClick:Bt(d=>{r||(i==null||i(d),a&&!d.isPropagationStopped()&&a(c,d))}),"aria-disabled":r||void 0,"aria-selected":l,[ao("dropdown-item")]:""},{isActive:l}]}const ox=ue.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:a,as:o=$p}=e,s=QS(e,XS);const[c]=ax({key:n,href:s.href,disabled:r,onClick:i,active:a});return y.jsx(o,Object.assign({},s,{ref:t},c))});ox.displayName="DropdownItem";const sx=m.createContext(io?window:void 0);sx.Provider;function fu(){return m.useContext(sx)}function F0(){const e=Fb(),t=m.useRef(null),n=m.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function Ks({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${ao("dropdown-item")}]`,focusFirstItemOnShow:a,placement:o="bottom-start",children:s}){const c=fu(),[l,u]=b5(t,e,r),[d,f]=F0(),h=d.current,[g,p]=F0(),v=g.current,w=Rb(l),_=m.useRef(null),x=m.useRef(!1),S=m.useContext(za),b=m.useCallback((C,O,$=O==null?void 0:O.type)=>{u(C,{originalEvent:O,source:$})},[u]),T=Bt((C,O)=>{n==null||n(C,O),b(!1,O,"select"),O.isPropagationStopped()||S==null||S(C,O)}),j=m.useMemo(()=>({toggle:b,placement:o,show:l,menuElement:h,toggleElement:v,setMenu:f,setToggle:p}),[b,o,l,h,v,f,p]);h&&w&&!l&&(x.current=h.contains(h.ownerDocument.activeElement));const M=Bt(()=>{v&&v.focus&&v.focus()}),k=Bt(()=>{const C=_.current;let O=a;if(O==null&&(O=d.current&&nx(d.current)?"keyboard":!1),O===!1||O==="keyboard"&&!/^key.+$/.test(C))return;const $=Dr(d.current,i)[0];$&&$.focus&&$.focus()});m.useEffect(()=>{l?k():x.current&&(x.current=!1,M())},[l,x,M,k]),m.useEffect(()=>{_.current=null});const E=(C,O)=>{if(!d.current)return null;const $=Dr(d.current,i);let A=$.indexOf(C)+O;return A=Math.max(0,Math.min(A,$.length)),$[A]};return r5(m.useCallback(()=>c.document,[c]),"keydown",C=>{var O,$;const{key:A}=C,P=C.target,D=(O=d.current)==null?void 0:O.contains(P),N=($=g.current)==null?void 0:$.contains(P);if(/input|textarea/i.test(P.tagName)&&(A===" "||A!=="Escape"&&D||A==="Escape"&&P.type==="search")||!D&&!N||A==="Tab"&&(!d.current||!l))return;_.current=C.type;const z={originalEvent:C,source:C.type};switch(A){case"ArrowUp":{const U=E(P,-1);U&&U.focus&&U.focus(),C.preventDefault();return}case"ArrowDown":if(C.preventDefault(),!l)u(!0,z);else{const U=E(P,1);U&&U.focus&&U.focus()}return;case"Tab":kp(P.ownerDocument,"keyup",U=>{var G;(U.key==="Tab"&&!U.target||!((G=d.current)!=null&&G.contains(U.target)))&&u(!1,z)},{once:!0});break;case"Escape":A==="Escape"&&(C.preventDefault(),C.stopPropagation()),u(!1,z);break}}),y.jsx(za.Provider,{value:T,children:y.jsx(lu.Provider,{value:j,children:s})})}Ks.displayName="Dropdown";Ks.Menu=ex;Ks.Toggle=ix;Ks.Item=ox;const Wp=ue.createContext({});Wp.displayName="DropdownContext";const cx=ue.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...i},a)=>(t=nt(t,"dropdown-divider"),y.jsx(n,{ref:a,className:oe(e,t),role:r,...i})));cx.displayName="DropdownDivider";const lx=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...i},a)=>(t=nt(t,"dropdown-header"),y.jsx(n,{ref:a,className:oe(e,t),role:r,...i})));lx.displayName="DropdownHeader";const ux=ue.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:i,active:a,as:o=Ap,...s},c)=>{const l=nt(e,"dropdown-item"),[u,d]=ax({key:n,href:s.href,disabled:r,onClick:i,active:a});return y.jsx(o,{...s,...u,ref:c,className:oe(t,l,d.isActive&&"active",r&&"disabled")})});ux.displayName="DropdownItem";const dx=ue.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},i)=>(t=nt(t,"dropdown-item-text"),y.jsx(n,{ref:i,className:oe(e,t),...r})));dx.displayName="DropdownItemText";const hu=ue.createContext(null);hu.displayName="InputGroupContext";const fx=ue.createContext(null);fx.displayName="NavbarContext";function hx(e,t){if(process.env.NODE_ENV==="production")return e;const n=m.useCallback(r=>{r==null||!r.isReactComponent||(process.env.NODE_ENV!=="production"?Xf(!1,`${t} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`):Xf(!1))},[t]);return Xn(n,e)}function px(e,t,n){const r=n?"top-end":"top-start",i=n?"top-start":"top-end",a=n?"bottom-end":"bottom-start",o=n?"bottom-start":"bottom-end",s=n?"right-start":"left-start",c=n?"right-end":"left-end",l=n?"left-start":"right-start",u=n?"left-end":"right-end";let d=e?o:a;return t==="up"?d=e?i:r:t==="end"?d=e?u:l:t==="start"?d=e?c:s:t==="down-centered"?d="bottom":t==="up-centered"&&(d="top"),d}const mx=ue.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:i=!0,show:a,renderOnMount:o,as:s="div",popperConfig:c,variant:l,...u},d)=>{let f=!1;const h=m.useContext(fx),g=nt(e,"dropdown-menu"),{align:p,drop:v,isRTL:w}=m.useContext(Wp);n=n||p;const _=m.useContext(hu),x=[];if(n)if(typeof n=="object"){const C=Object.keys(n);if(process.env.NODE_ENV!=="production"&&oa(C.length===1,"There should only be 1 breakpoint when passing an object to `align`"),C.length){const O=C[0],$=n[O];f=$==="start",x.push(`${g}-${O}-${$}`)}}else n==="end"&&(f=!0);const S=px(f,v,w),[b,{hasShown:T,popper:j,show:M,toggle:k}]=Jb({flip:i,rootCloseEvent:r,show:a,usePopper:!h&&x.length===0,offset:[0,2],popperConfig:c,placement:S});if(b.ref=Xn(hx(d,"DropdownMenu"),b.ref),ss(()=>{M&&(j==null||j.update())},[M]),!T&&!o&&!_)return null;typeof s!="string"&&(b.show=M,b.close=()=>k==null?void 0:k(!1),b.align=n);let E=u.style;return j!=null&&j.placement&&(E={...u.style,...b.style},u["x-placement"]=j.placement),y.jsx(s,{...u,...b,style:E,...(x.length||h)&&{"data-bs-popper":"static"},className:oe(t,g,M&&"show",f&&`${g}-end`,l&&`${g}-${l}`,...x)})});mx.displayName="DropdownMenu";const gx=ue.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:i=Rp,...a},o)=>{const s=nt(e,"dropdown-toggle"),c=m.useContext(lu);r!==void 0&&(a.bsPrefix=r);const[l]=rx();return l.ref=Xn(l.ref,hx(o,"DropdownToggle")),y.jsx(i,{className:oe(n,s,t&&`${s}-split`,(c==null?void 0:c.show)&&"show"),...l,...a})});gx.displayName="DropdownToggle";const vx=ue.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:i,className:a,align:o="start",onSelect:s,onToggle:c,focusFirstItemOnShow:l,as:u="div",navbar:d,autoClose:f=!0,...h}=Cp(e,{show:"onToggle"}),g=m.useContext(hu),p=nt(n,"dropdown"),v=su(),w=j=>f===!1?j==="click":f==="inside"?j!=="rootClose":f==="outside"?j!=="select":!0,_=Bt((j,M)=>{var k;!((k=M.originalEvent)==null||(k=k.target)==null)&&k.classList.contains("dropdown-toggle")&&M.source==="mousedown"||(M.originalEvent.currentTarget===document&&(M.source!=="keydown"||M.originalEvent.key==="Escape")&&(M.source="rootClose"),w(M.source)&&(c==null||c(j,M)))}),S=px(o==="end",r,v),b=m.useMemo(()=>({align:o,drop:r,isRTL:v}),[o,r,v]),T={down:p,"down-centered":`${p}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return y.jsx(Wp.Provider,{value:b,children:y.jsx(Ks,{placement:S,show:i,onSelect:s,onToggle:_,focusFirstItemOnShow:l,itemSelector:`.${p}-item:not(.disabled):not(:disabled)`,children:g?h.children:y.jsx(u,{...h,ref:t,className:oe(a,i&&"show",T[r])})})})});vx.displayName="Dropdown";const Ha=Object.assign(vx,{Toggle:gx,Menu:mx,Item:ux,ItemText:dx,Divider:cx,Header:lx}),JS={type:V.string,tooltip:V.bool,as:V.elementType},pu=ue.forwardRef(({as:e="div",className:t,type:n="valid",tooltip:r=!1,...i},a)=>y.jsx(e,{...i,ref:a,className:oe(t,`${n}-${r?"tooltip":"feedback"}`)}));pu.displayName="Feedback";pu.propTypes=JS;const zr=ue.createContext({}),mu=ue.forwardRef(({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:i=!1,isInvalid:a=!1,as:o="input",...s},c)=>{const{controlId:l}=m.useContext(zr);return t=nt(t,"form-check-input"),y.jsx(o,{...s,ref:c,type:r,id:e||l,className:oe(n,t,i&&"is-valid",a&&"is-invalid")})});mu.displayName="FormCheckInput";const ml=ue.forwardRef(({bsPrefix:e,className:t,htmlFor:n,...r},i)=>{const{controlId:a}=m.useContext(zr);return e=nt(e,"form-check-label"),y.jsx("label",{...r,ref:i,htmlFor:n||a,className:oe(t,e)})});ml.displayName="FormCheckLabel";const yx=ue.forwardRef(({id:e,bsPrefix:t,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:a=!1,isValid:o=!1,isInvalid:s=!1,feedbackTooltip:c=!1,feedback:l,feedbackType:u,className:d,style:f,title:h="",type:g="checkbox",label:p,children:v,as:w="input",..._},x)=>{t=nt(t,"form-check"),n=nt(n,"form-switch");const{controlId:S}=m.useContext(zr),b=m.useMemo(()=>({controlId:e||S}),[S,e]),T=!v&&p!=null&&p!==!1||v5(v,ml),j=y.jsx(mu,{..._,type:g==="switch"?"checkbox":g,ref:x,isValid:o,isInvalid:s,disabled:a,as:w});return y.jsx(zr.Provider,{value:b,children:y.jsx("div",{style:f,className:oe(d,T&&t,r&&`${t}-inline`,i&&`${t}-reverse`,g==="switch"&&n),children:v||y.jsxs(y.Fragment,{children:[j,T&&y.jsx(ml,{title:h,children:p}),l&&y.jsx(pu,{type:u,tooltip:c,children:l})]})})})});yx.displayName="FormCheck";const gl=Object.assign(yx,{Input:mu,Label:ml}),bx=ue.forwardRef(({bsPrefix:e,type:t,size:n,htmlSize:r,id:i,className:a,isValid:o=!1,isInvalid:s=!1,plaintext:c,readOnly:l,as:u="input",...d},f)=>{const{controlId:h}=m.useContext(zr);return e=nt(e,"form-control"),process.env.NODE_ENV!=="production"&&oa(h==null||!i,"`controlId` is ignored on `<FormControl>` when `id` is specified."),y.jsx(u,{...d,type:t,size:r,ref:f,readOnly:l,id:i||h,className:oe(a,c?`${e}-plaintext`:e,n&&`${e}-${n}`,t==="color"&&`${e}-color`,o&&"is-valid",s&&"is-invalid")})});bx.displayName="FormControl";const xx=Object.assign(bx,{Feedback:pu}),_x=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"form-floating"),y.jsx(n,{ref:i,className:oe(e,t),...r})));_x.displayName="FormFloating";const zp=ue.forwardRef(({controlId:e,as:t="div",...n},r)=>{const i=m.useMemo(()=>({controlId:e}),[e]);return y.jsx(zr.Provider,{value:i,children:y.jsx(t,{...n,ref:r})})});zp.displayName="FormGroup";const wx=ue.forwardRef(({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:a,...o},s)=>{const{controlId:c}=m.useContext(zr);t=nt(t,"form-label");let l="col-form-label";typeof n=="string"&&(l=`${l} ${l}-${n}`);const u=oe(i,t,r&&"visually-hidden",n&&l);return process.env.NODE_ENV!=="production"&&oa(c==null||!a,"`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified."),a=a||c,n?y.jsx(Pp,{ref:s,as:"label",className:u,htmlFor:a,...o}):y.jsx(e,{ref:s,className:u,htmlFor:a,...o})});wx.displayName="FormLabel";const Cx=ue.forwardRef(({bsPrefix:e,className:t,id:n,...r},i)=>{const{controlId:a}=m.useContext(zr);return e=nt(e,"form-range"),y.jsx("input",{...r,type:"range",ref:i,className:oe(t,e),id:n||a})});Cx.displayName="FormRange";const Hp=ue.forwardRef(({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:i=!1,isInvalid:a=!1,id:o,...s},c)=>{const{controlId:l}=m.useContext(zr);return e=nt(e,"form-select"),y.jsx("select",{...s,size:n,ref:c,className:oe(r,e,t&&`${e}-${t}`,i&&"is-valid",a&&"is-invalid"),id:o||l})});Hp.displayName="FormSelect";const Tx=ue.forwardRef(({bsPrefix:e,className:t,as:n="small",muted:r,...i},a)=>(e=nt(e,"form-text"),y.jsx(n,{...i,ref:a,className:oe(t,e,r&&"text-muted")})));Tx.displayName="FormText";const Sx=ue.forwardRef((e,t)=>y.jsx(gl,{...e,ref:t,type:"switch"}));Sx.displayName="Switch";const ek=Object.assign(Sx,{Input:gl.Input,Label:gl.Label}),Vp=ue.forwardRef(({bsPrefix:e,className:t,children:n,controlId:r,label:i,...a},o)=>(e=nt(e,"form-floating"),y.jsxs(zp,{ref:o,className:oe(t,e),controlId:r,...a,children:[n,y.jsx("label",{htmlFor:r,children:i})]})));Vp.displayName="FloatingLabel";const tk={_ref:V.any,validated:V.bool,as:V.elementType},qp=ue.forwardRef(({className:e,validated:t,as:n="form",...r},i)=>y.jsx(n,{...r,ref:i,className:oe(e,t&&"was-validated")}));qp.displayName="Form";qp.propTypes=tk;const Tr=Object.assign(qp,{Group:zp,Control:xx,Floating:_x,Check:gl,Switch:ek,Label:wx,Text:Tx,Range:Cx,Select:Hp,FloatingLabel:Vp}),kx=ue.createContext(null),nk=["as","active","eventKey"];function rk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ex({key:e,onClick:t,active:n,id:r,role:i,disabled:a}){const o=m.useContext(za),s=m.useContext(du),c=m.useContext(kx);let l=n;const u={role:i};if(s){!i&&s.role==="tablist"&&(u.role="tab");const d=s.getControllerId(e??null),f=s.getControlledId(e??null);u[ao("event-key")]=e,u.id=d||r,l=n==null&&e!=null?s.activeKey===e:n,(l||!(c!=null&&c.unmountOnExit)&&!(c!=null&&c.mountOnEnter))&&(u["aria-controls"]=f)}return u.role==="tab"&&(u["aria-selected"]=l,l||(u.tabIndex=-1),a&&(u.tabIndex=-1,u["aria-disabled"]=!0)),u.onClick=Bt(d=>{a||(t==null||t(d),e!=null&&o&&!d.isPropagationStopped()&&o(e,d))}),[u,{isActive:l}]}const Ox=ue.forwardRef((e,t)=>{let{as:n=$p,active:r,eventKey:i}=e,a=rk(e,nk);const[o,s]=Ex(Object.assign({key:ds(i,a.href),active:r},a));return o[ao("active")]=s.isActive,y.jsx(n,Object.assign({},a,o,{ref:t}))});Ox.displayName="NavItem";const ik=["as","onSelect","activeKey","role","onKeyDown"];function ak(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const B0=()=>{},U0=ao("event-key"),Mx=ue.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:i,role:a,onKeyDown:o}=e,s=ak(e,ik);const c=Fb(),l=m.useRef(!1),u=m.useContext(za),d=m.useContext(kx);let f,h;d&&(a=a||"tablist",i=d.activeKey,f=d.getControlledId,h=d.getControllerId);const g=m.useRef(null),p=x=>{const S=g.current;if(!S)return null;const b=Dr(S,`[${U0}]:not([aria-disabled=true])`),T=S.querySelector("[aria-selected=true]");if(!T||T!==document.activeElement)return null;const j=b.indexOf(T);if(j===-1)return null;let M=j+x;return M>=b.length&&(M=0),M<0&&(M=b.length-1),b[M]},v=(x,S)=>{x!=null&&(r==null||r(x,S),u==null||u(x,S))},w=x=>{if(o==null||o(x),!d)return;let S;switch(x.key){case"ArrowLeft":case"ArrowUp":S=p(-1);break;case"ArrowRight":case"ArrowDown":S=p(1);break;default:return}S&&(x.preventDefault(),v(S.dataset[KS("EventKey")]||null,x),l.current=!0,c())};m.useEffect(()=>{if(g.current&&l.current){const x=g.current.querySelector(`[${U0}][aria-selected=true]`);x==null||x.focus()}l.current=!1});const _=Xn(t,g);return y.jsx(za.Provider,{value:v,children:y.jsx(du.Provider,{value:{role:a,activeKey:ds(i),getControlledId:f||B0,getControllerId:h||B0},children:y.jsx(n,Object.assign({},s,{onKeyDown:w,ref:_,role:a}))})})});Mx.displayName="Nav";const ok=Object.assign(Mx,{Item:Ox}),gu=ue.forwardRef(({bsPrefix:e,active:t,disabled:n,eventKey:r,className:i,variant:a,action:o,as:s,...c},l)=>{e=nt(e,"list-group-item");const[u,d]=Ex({key:ds(r,c.href),active:t,...c}),f=Bt(g=>{if(n){g.preventDefault(),g.stopPropagation();return}u.onClick(g)});n&&c.tabIndex===void 0&&(c.tabIndex=-1,c["aria-disabled"]=!0);const h=s||(o?c.href?"a":"button":"div");return process.env.NODE_ENV!=="production"&&oa(s||!(!o&&c.href),"`action=false` and `href` should not be used together."),y.jsx(h,{ref:l,...c,...u,onClick:f,className:oe(i,e,d.isActive&&"active",n&&"disabled",a&&`${e}-${a}`,o&&`${e}-action`)})});gu.displayName="ListGroupItem";const $x=ue.forwardRef((e,t)=>{const{className:n,bsPrefix:r,variant:i,horizontal:a,numbered:o,as:s="div",...c}=Cp(e,{activeKey:"onSelect"}),l=nt(r,"list-group");let u;return a&&(u=a===!0?"horizontal":`horizontal-${a}`),process.env.NODE_ENV!=="production"&&oa(!(a&&i==="flush"),'`variant="flush"` and `horizontal` should not be used together.'),y.jsx(ok,{ref:t,...c,as:s,className:oe(n,l,i&&`${l}-${i}`,u&&`${l}-${u}`,o&&`${l}-numbered`)})});$x.displayName="ListGroup";const Ax=Object.assign($x,{Item:gu});var Mc;function W0(e){if((!Mc&&Mc!==0||e)&&io){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),Mc=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Mc}function af(e){e===void 0&&(e=ro());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function sk(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const z0=ao("modal-open");class Yp{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return sk(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();t.style={overflow:i.style.overflow,[r]:i.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(li(i,r)||"0",10)+t.scrollBarWidth}px`),i.setAttribute(z0,""),li(i,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(z0),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 of=(e,t)=>io?e==null?(t||ro()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function oh(e,t){const n=fu(),[r,i]=m.useState(()=>of(e,n==null?void 0:n.document));if(!r){const a=of(e);a&&i(a)}return m.useEffect(()=>{},[t,r]),m.useEffect(()=>{const a=of(e);a!==r&&i(a)},[e,r]),r}function ck({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){const a=m.useRef(null),o=m.useRef(t),s=Bt(n);m.useEffect(()=>{t?o.current=!0:s(a.current)},[t,s]);const c=Xn(a,e.ref),l=m.cloneElement(e,{ref:c});return t?l:i||!o.current&&r?null:l}const lk=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function uk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function dk(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:a,onExited:o,addEndListener:s,children:c}=e,l=uk(e,lk);const{major:u}=Ib(),d=u>=19?c.props.ref:c.ref,f=m.useRef(null),h=Xn(f,typeof c=="function"?null:d),g=T=>j=>{T&&f.current&&T(f.current,j)},p=m.useCallback(g(t),[t]),v=m.useCallback(g(n),[n]),w=m.useCallback(g(r),[r]),_=m.useCallback(g(i),[i]),x=m.useCallback(g(a),[a]),S=m.useCallback(g(o),[o]),b=m.useCallback(g(s),[s]);return Object.assign({},l,{nodeRef:f},t&&{onEnter:p},n&&{onEntering:v},r&&{onEntered:w},i&&{onExit:_},a&&{onExiting:x},o&&{onExited:S},s&&{addEndListener:b},{children:typeof c=="function"?(T,j)=>c(T,Object.assign({},j,{ref:h})):m.cloneElement(c,{ref:h})})}const fk=["component"];function hk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const pk=ue.forwardRef((e,t)=>{let{component:n}=e,r=hk(e,fk);const i=dk(r);return y.jsx(n,Object.assign({ref:t},i))});function mk({in:e,onTransition:t}){const n=m.useRef(null),r=m.useRef(!0),i=Bt(t);return ss(()=>{if(!n.current)return;let a=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>a}),()=>{a=!0}},[e,i]),ss(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function gk({children:e,in:t,onExited:n,onEntered:r,transition:i}){const[a,o]=m.useState(!t);t&&a&&o(!1);const s=mk({in:!!t,onTransition:l=>{const u=()=>{l.isStale()||(l.in?r==null||r(l.element,l.initial):(o(!0),n==null||n(l.element)))};Promise.resolve(i(l)).then(u,d=>{throw l.in||o(!0),d})}}),c=Xn(s,e.ref);return a&&!t?null:m.cloneElement(e,{ref:c})}function sh(e,t,n){return e?y.jsx(pk,Object.assign({},n,{component:e})):t?y.jsx(gk,Object.assign({},n,{transition:t})):y.jsx(ck,Object.assign({},n))}const vk=["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 yk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}let sf;function bk(e){return sf||(sf=new Yp({ownerDocument:e==null?void 0:e.document})),sf}function xk(e){const t=fu(),n=e||bk(t),r=m.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:m.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:m.useCallback(i=>{r.current.backdrop=i},[])})}const Rx=m.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:i,style:a,children:o,backdrop:s=!0,keyboard:c=!0,onBackdropClick:l,onEscapeKeyDown:u,transition:d,runTransition:f,backdropTransition:h,runBackdropTransition:g,autoFocus:p=!0,enforceFocus:v=!0,restoreFocus:w=!0,restoreFocusOptions:_,renderDialog:x,renderBackdrop:S=ee=>y.jsx("div",Object.assign({},ee)),manager:b,container:T,onShow:j,onHide:M=()=>{},onExit:k,onExited:E,onExiting:C,onEnter:O,onEntering:$,onEntered:A}=e,P=yk(e,vk);const D=fu(),N=oh(T),q=xk(b),z=Op(),U=Rb(n),[G,ne]=m.useState(!n),te=m.useRef(null);m.useImperativeHandle(t,()=>q,[q]),io&&!U&&n&&(te.current=af(D==null?void 0:D.document)),n&&G&&ne(!1);const X=Bt(()=>{if(q.add(),L.current=Nr(document,"keydown",F),I.current=Nr(document,"focus",()=>setTimeout(Q),!0),j&&j(),p){var ee,pe;const we=af((ee=(pe=q.dialog)==null?void 0:pe.ownerDocument)!=null?ee:D==null?void 0:D.document);q.dialog&&we&&!us(q.dialog,we)&&(te.current=we,q.dialog.focus())}}),J=Bt(()=>{if(q.remove(),L.current==null||L.current(),I.current==null||I.current(),w){var ee;(ee=te.current)==null||ee.focus==null||ee.focus(_),te.current=null}});m.useEffect(()=>{!n||!N||X()},[n,N,X]),m.useEffect(()=>{G&&J()},[G,J]),jp(()=>{J()});const Q=Bt(()=>{if(!v||!z()||!q.isTopModal())return;const ee=af(D==null?void 0:D.document);q.dialog&&ee&&!us(q.dialog,ee)&&q.dialog.focus()}),re=Bt(ee=>{ee.target===ee.currentTarget&&(l==null||l(ee),s===!0&&M())}),F=Bt(ee=>{c&&Pb(ee)&&q.isTopModal()&&(u==null||u(ee),ee.defaultPrevented||M())}),I=m.useRef(),L=m.useRef(),H=(...ee)=>{ne(!0),E==null||E(...ee)};if(!N)return null;const R=Object.assign({role:r,ref:q.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},P,{style:a,className:i,tabIndex:-1});let K=x?x(R):y.jsx("div",Object.assign({},R,{children:ue.cloneElement(o,{role:"document"})}));K=sh(d,f,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:k,onExiting:C,onExited:H,onEnter:O,onEntering:$,onEntered:A,children:K});let Z=null;return s&&(Z=S({ref:q.setBackdropRef,onClick:re}),Z=sh(h,g,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Z})),y.jsx(y.Fragment,{children:oi.createPortal(y.jsxs(y.Fragment,{children:[Z,K]}),N)})});Rx.displayName="Modal";const jx=Object.assign(Rx,{Manager:Yp});function ch(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function _k(e,t){e.classList?e.classList.add(t):ch(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function H0(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function wk(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=H0(e.className,t):e.setAttribute("class",H0(e.className&&e.className.baseVal||"",t))}const ba={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Px extends Yp{adjustAndStore(t,n,r){const i=n.style[t];n.dataset[t]=i,li(n,{[t]:`${parseFloat(li(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],li(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(_k(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Dr(n,ba.FIXED_CONTENT).forEach(a=>this.adjustAndStore(r,a,t.scrollBarWidth)),Dr(n,ba.STICKY_CONTENT).forEach(a=>this.adjustAndStore(i,a,-t.scrollBarWidth)),Dr(n,ba.NAVBAR_TOGGLER).forEach(a=>this.adjustAndStore(i,a,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();wk(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Dr(n,ba.FIXED_CONTENT).forEach(a=>this.restore(r,a)),Dr(n,ba.STICKY_CONTENT).forEach(a=>this.restore(i,a)),Dr(n,ba.NAVBAR_TOGGLER).forEach(a=>this.restore(i,a))}}let cf;function Ix(e){return cf||(cf=new Px(e)),cf}const Dx=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"modal-body"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Dx.displayName="ModalBody";const Gp=ue.createContext({onHide(){}}),Zp=ue.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:i,fullscreen:a,children:o,scrollable:s,...c},l)=>{e=nt(e,"modal");const u=`${e}-dialog`,d=typeof a=="string"?`${e}-fullscreen-${a}`:`${e}-fullscreen`;return y.jsx("div",{...c,ref:l,className:oe(u,t,i&&`${e}-${i}`,r&&`${u}-centered`,s&&`${u}-scrollable`,a&&d),children:y.jsx("div",{className:oe(`${e}-content`,n),children:o})})});Zp.displayName="ModalDialog";const Nx=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"modal-footer"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Nx.displayName="ModalFooter";const Lx=ue.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:i,...a},o)=>{const s=m.useContext(Gp),c=Bt(()=>{s==null||s.onHide(),r==null||r()});return y.jsxs("div",{ref:o,...a,children:[i,n&&y.jsx(cu,{"aria-label":e,variant:t,onClick:c})]})}),Fx=ue.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...i},a)=>(e=nt(e,"modal-header"),y.jsx(Lx,{ref:a,...i,className:oe(t,e),closeLabel:n,closeButton:r})));Fx.displayName="ModalHeader";const Ck=Ep("h4"),Bx=ue.forwardRef(({className:e,bsPrefix:t,as:n=Ck,...r},i)=>(t=nt(t,"modal-title"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Bx.displayName="ModalTitle";function Tk(e){return y.jsx(di,{...e,timeout:null})}function Sk(e){return y.jsx(di,{...e,timeout:null})}const Ux=ue.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:i,children:a,dialogAs:o=Zp,"data-bs-theme":s,"aria-labelledby":c,"aria-describedby":l,"aria-label":u,show:d=!1,animation:f=!0,backdrop:h=!0,keyboard:g=!0,onEscapeKeyDown:p,onShow:v,onHide:w,container:_,autoFocus:x=!0,enforceFocus:S=!0,restoreFocus:b=!0,restoreFocusOptions:T,onEntered:j,onExit:M,onExiting:k,onEnter:E,onEntering:C,onExited:O,backdropClassName:$,manager:A,...P},D)=>{const[N,q]=m.useState({}),[z,U]=m.useState(!1),G=m.useRef(!1),ne=m.useRef(!1),te=m.useRef(null),[X,J]=fl(),Q=Xn(D,J),re=Bt(w),F=su();e=nt(e,"modal");const I=m.useMemo(()=>({onHide:re}),[re]);function L(){return A||Ix({isRTL:F})}function H(me){if(!io)return;const ke=L().getScrollbarWidth()>0,tt=me.scrollHeight>ro(me).documentElement.clientHeight;q({paddingRight:ke&&!tt?W0():void 0,paddingLeft:!ke&&tt?W0():void 0})}const R=Bt(()=>{X&&H(X.dialog)});jp(()=>{nh(window,"resize",R),te.current==null||te.current()});const K=()=>{G.current=!0},Z=me=>{G.current&&X&&me.target===X.dialog&&(ne.current=!0),G.current=!1},ee=()=>{U(!0),te.current=kb(X.dialog,()=>{U(!1)})},pe=me=>{me.target===me.currentTarget&&ee()},we=me=>{if(h==="static"){pe(me);return}if(ne.current||me.target!==me.currentTarget){ne.current=!1;return}w==null||w()},ve=me=>{g?p==null||p(me):(me.preventDefault(),h==="static"&&ee())},Le=(me,ke)=>{me&&H(me),E==null||E(me,ke)},Re=me=>{te.current==null||te.current(),M==null||M(me)},Ve=(me,ke)=>{C==null||C(me,ke),kp(window,"resize",R)},ze=me=>{me&&(me.style.display=""),O==null||O(me),nh(window,"resize",R)},ut=m.useCallback(me=>y.jsx("div",{...me,className:oe(`${e}-backdrop`,$,!f&&"show")}),[f,$,e]),at={...n,...N};at.display="block";const de=me=>y.jsx("div",{role:"dialog",...me,style:at,className:oe(t,e,z&&`${e}-static`,!f&&"show"),onClick:h?we:void 0,onMouseUp:Z,"data-bs-theme":s,"aria-label":u,"aria-labelledby":c,"aria-describedby":l,children:y.jsx(o,{...P,onMouseDown:K,className:r,contentClassName:i,children:a})});return y.jsx(Gp.Provider,{value:I,children:y.jsx(jx,{show:d,ref:Q,backdrop:h,container:_,keyboard:!0,autoFocus:x,enforceFocus:S,restoreFocus:b,restoreFocusOptions:T,onEscapeKeyDown:ve,onShow:v,onHide:w,onEnter:Le,onEntering:Ve,onEntered:j,onExit:Re,onExiting:k,onExited:ze,manager:L(),transition:f?Tk:void 0,backdropTransition:f?Sk:void 0,renderBackdrop:ut,renderDialog:de})})});Ux.displayName="Modal";const Mn=Object.assign(Ux,{Body:Dx,Header:Fx,Title:Bx,Footer:Nx,Dialog:Zp,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),kk=()=>{};function Ek(e,t,{disabled:n,clickTrigger:r}={}){const i=t||kk;Xb(e,i,{disabled:n,clickTrigger:r});const a=Bt(o=>{Pb(o)&&i(o)});m.useEffect(()=>{if(n||e==null)return;const o=ro(Zc(e));let s=(o.defaultView||window).event;const c=Nr(o,"keyup",l=>{if(l===s){s=void 0;return}a(l)});return()=>{c()}},[e,n,a])}const Wx=ue.forwardRef((e,t)=>{const{flip:n,offset:r,placement:i,containerPadding:a,popperConfig:o={},transition:s,runTransition:c}=e,[l,u]=fl(),[d,f]=fl(),h=Xn(u,t),g=oh(e.container),p=oh(e.target),[v,w]=m.useState(!e.show),_=Zb(p,l,Qb({placement:i,enableEvents:!!e.show,containerPadding:a||5,flip:n,offset:r,arrowElement:d,popperConfig:o}));e.show&&v&&w(!1);const x=(...C)=>{w(!0),e.onExited&&e.onExited(...C)},S=e.show||!v;if(Ek(l,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:b,onExiting:T,onEnter:j,onEntering:M,onEntered:k}=e;let E=e.children(Object.assign({},_.attributes.popper,{style:_.styles.popper,ref:h}),{popper:_,placement:i,show:!!e.show,arrowProps:Object.assign({},_.attributes.arrow,{style:_.styles.arrow,ref:f})});return E=sh(s,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:E,onExit:b,onExiting:T,onExited:x,onEnter:j,onEntering:M,onEntered:k}),g?oi.createPortal(E,g):null});Wx.displayName="Overlay";const zx=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"popover-header"),y.jsx(n,{ref:i,className:oe(e,t),...r})));zx.displayName="PopoverHeader";const Kp=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"popover-body"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Kp.displayName="PopoverBody";function Hx(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function Vx(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const Ok=ue.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:i,body:a,arrowProps:o,hasDoneInitialMeasure:s,popper:c,show:l,...u},d)=>{const f=nt(e,"popover"),h=su(),[g]=(t==null?void 0:t.split("-"))||[],p=Hx(g,h);let v=r;return l&&!s&&(v={...r,...Vx(c==null?void 0:c.strategy)}),y.jsxs("div",{ref:d,role:"tooltip",style:v,"x-placement":g,className:oe(n,f,g&&`bs-popover-${p}`),...u,children:[y.jsx("div",{className:"popover-arrow",...o}),a?y.jsx(Kp,{children:i}):i]})}),Kc=Object.assign(Ok,{Header:zx,Body:Kp,POPPER_OFFSET:[0,8]}),qx=ue.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:i,arrowProps:a,hasDoneInitialMeasure:o,popper:s,show:c,...l},u)=>{e=nt(e,"tooltip");const d=su(),[f]=(t==null?void 0:t.split("-"))||[],h=Hx(f,d);let g=r;return c&&!o&&(g={...r,...Vx(s==null?void 0:s.strategy)}),y.jsxs("div",{ref:u,style:g,role:"tooltip","x-placement":f,className:oe(n,e,`bs-tooltip-${h}`),...l,children:[y.jsx("div",{className:"tooltip-arrow",...a}),y.jsx("div",{className:`${e}-inner`,children:i})]})});qx.displayName="Tooltip";const Yx=Object.assign(qx,{TOOLTIP_OFFSET:[0,6]});function Mk(e){const t=m.useRef(null),n=nt(void 0,"popover"),r=nt(void 0,"tooltip"),i=m.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(ch(t.current,n))return Kc.POPPER_OFFSET;if(ch(t.current,r))return Yx.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[i]]}function $k(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=i=>n(dl(i))),t.ref=r.__wrapped||(r.__wrapped=i=>r(dl(i)))}const Gx=ue.forwardRef(({children:e,transition:t=di,popperConfig:n={},rootClose:r=!1,placement:i="top",show:a=!1,...o},s)=>{const c=m.useRef({}),[l,u]=m.useState(null),[d,f]=Mk(o.offset),h=Xn(s,d),g=t===!0?di:t||void 0,p=Bt(v=>{u(v),n==null||n.onFirstUpdate==null||n.onFirstUpdate(v)});return ss(()=>{l&&o.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[l,o.target]),m.useEffect(()=>{a||u(null)},[a]),y.jsx(Wx,{...o,ref:h,popperConfig:{...n,modifiers:f.concat(n.modifiers||[]),onFirstUpdate:p},transition:g,rootClose:r,placement:i,show:a,children:(v,{arrowProps:w,popper:_,show:x})=>{var S;$k(v,w);const b=_==null?void 0:_.placement,T=Object.assign(c.current,{state:_==null?void 0:_.state,scheduleUpdate:_==null?void 0:_.update,placement:b,outOfBoundaries:(_==null||(S=_.state)==null||(S=S.modifiersData.hide)==null?void 0:S.isReferenceHidden)||!1,strategy:n.strategy}),j=!!l;return typeof e=="function"?e({...v,placement:b,show:x,...!t&&x&&{className:"show"},popper:T,arrowProps:w,hasDoneInitialMeasure:j}):ue.cloneElement(e,{...v,placement:b,arrowProps:w,popper:T,hasDoneInitialMeasure:j,className:oe(e.props.className,!t&&x&&"show"),style:{...e.props.style,...v.style}})}})});Gx.displayName="Overlay";function Ak(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function V0(e,t,n){const[r]=t,i=r.currentTarget,a=r.relatedTarget||r.nativeEvent[n];(!a||a!==i)&&!us(i,a)&&e(...t)}V.oneOf(["click","hover","focus"]);const Zx=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:i,defaultShow:a=!1,onToggle:o,delay:s,placement:c,flip:l=c&&c.indexOf("auto")!==-1,...u})=>{const d=m.useRef(null),f=Xn(d,n.ref),h=g5(),g=m.useRef(""),[p,v]=xb(i,a,o),w=Ak(s),{onFocus:_,onBlur:x,onClick:S}=typeof n!="function"?ue.Children.only(n).props:{},b=P=>{f(dl(P))},T=m.useCallback(()=>{if(h.clear(),g.current="show",!w.show){v(!0);return}h.set(()=>{g.current==="show"&&v(!0)},w.show)},[w.show,v,h]),j=m.useCallback(()=>{if(h.clear(),g.current="hide",!w.hide){v(!1);return}h.set(()=>{g.current==="hide"&&v(!1)},w.hide)},[w.hide,v,h]),M=m.useCallback((...P)=>{T(),_==null||_(...P)},[T,_]),k=m.useCallback((...P)=>{j(),x==null||x(...P)},[j,x]),E=m.useCallback((...P)=>{v(!p),S==null||S(...P)},[S,v,p]),C=m.useCallback((...P)=>{V0(T,P,"fromElement")},[T]),O=m.useCallback((...P)=>{V0(j,P,"toElement")},[j]),$=e==null?[]:[].concat(e),A={ref:b};return $.indexOf("click")!==-1&&(A.onClick=E),$.indexOf("focus")!==-1&&(A.onFocus=M,A.onBlur=k),$.indexOf("hover")!==-1&&(process.env.NODE_ENV!=="production"&&oa($.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),A.onMouseOver=C,A.onMouseOut=O),y.jsxs(y.Fragment,{children:[typeof n=="function"?n(A):m.cloneElement(n,A),y.jsx(Gx,{...u,show:p,onHide:j,flip:l,placement:c,popperConfig:r,target:d.current,children:t})]})},Xp=ue.forwardRef(({bsPrefix:e,variant:t,animation:n="border",size:r,as:i="div",className:a,...o},s)=>{e=nt(e,"spinner");const c=`${e}-${n}`;return y.jsx(i,{ref:s,...o,className:oe(a,c,r&&`${c}-${r}`,t&&`text-${t}`)})});Xp.displayName="Spinner";var Kx={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},q0=m.createContext&&m.createContext(Kx),Rk=["attr","size","title"];function jk(e,t){if(e==null)return{};var n=Pk(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pk(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function vl(){return vl=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},vl.apply(this,arguments)}function Y0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y0(Object(n),!0).forEach(function(r){Ik(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ik(e,t,n){return t=Dk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dk(e){var t=Nk(e,"string");return typeof t=="symbol"?t:t+""}function Nk(e,t){if(typeof e!="object"||!e)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 Xx(e){return e&&e.map((t,n)=>m.createElement(t.tag,yl({key:n},t.attr),Xx(t.child)))}function rt(e){return t=>m.createElement(Lk,vl({attr:yl({},e.attr)},t),Xx(e.child))}function Lk(e){var t=n=>{var{attr:r,size:i,title:a}=e,o=jk(e,Rk),s=i||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),m.createElement("svg",vl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:c,style:yl(yl({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&m.createElement("title",null,a),e.children)};return q0!==void 0?m.createElement(q0.Consumer,null,n=>t(n)):t(Kx)}function Fk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Xs(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}function Bk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 12.4V7l-4-4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.4l8.6-8.6zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zM6 6h9v4H6V6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77l4.99-4.98zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"},child:[]}]})(e)}function Uk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(e)}function Wk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(e)}function zk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function Hk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"},child:[]}]})(e)}function Vk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 8h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-4 4v3c0 .22-.03.47-.07.7l-.1.65-.37.65c-.72 1.24-2.04 2-3.46 2s-2.74-.77-3.46-2l-.37-.64-.1-.65A4.27 4.27 0 0 1 8 15v-4c0-.23.03-.48.07-.7l.1-.65.37-.65c.3-.52.72-.97 1.21-1.31l.57-.39.74-.18a3.787 3.787 0 0 1 1.89 0l.68.16.61.42c.5.34.91.78 1.21 1.31l.38.65.1.65c.04.22.07.47.07.69v1zm-6 2h4v2h-4zm0-4h4v2h-4z"},child:[]}]})(e)}function Qx(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"},child:[]}]})(e)}function qk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M4 20h16v2H4zM4 2h16v2H4zM9.41 13.59 8 15l4 4 4-4-1.41-1.41L13 15.17V8.83l1.59 1.58L16 9l-4-4-4 4 1.41 1.41L11 8.83v6.34z"},child:[]}]})(e)}function Yk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"},child:[]}]})(e)}function Gk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16c1.1 0 2-.9 2-2V6a2 2 0 0 0-2-2zm0 14H4V8h16v10zm-2-1h-6v-2h6v2zM7.5 17l-1.41-1.41L8.67 13l-2.59-2.59L7.5 9l4 4-4 4z"},child:[]}]})(e)}function Zk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},child:[]}]})(e)}function Kk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(e)}function Xk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(e)}function Qk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(e)}function Jx(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z"},child:[]}]})(e)}function Jk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"},child:[]}]})(e)}function eE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"},child:[]}]})(e)}function tE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6z"},child:[]},{tag:"path",attr:{d:"m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6z"},child:[]}]})(e)}function nE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h4.05l1.83-2h4.24l1.83 2H20v12zM12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0 8c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"},child:[]}]})(e)}function rE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"},child:[]}]})(e)}function iE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67 1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"},child:[]}]})(e)}function aE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},child:[]}]})(e)}function oE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"},child:[]}]})(e)}function e2(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"},child:[]}]})(e)}function sE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"},child:[]}]})(e)}function t2(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(e)}function cE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function lE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z",opacity:".87"},child:[]},{tag:"path",attr:{d:"m19 15-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"},child:[]}]})(e)}function uE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{fill:"none"},child:[{tag:"path",attr:{d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M0 0h24v24H0V0z"},child:[]}]},{tag:"path",attr:{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27z"},child:[]}]})(e)}const Kt=m.createContext({cookieDomain:"",axiosOptions:{},language:"",localizationContext:{},texts:{},ProjectIconComponent:{},chartColorPalette:void 0}),n2=m.createContext({show:!1,text:"",textSm:!1,showConfirm:(e,t)=>{},hideConfirm:()=>{}}),r2=m.createContext({isShown:!1,text:"",hidePrompt:()=>{},showPrompt:()=>{},resolveRef:{current:()=>{}},options:{input:"textarea",type:"text"},setOptions:()=>{}}),i2=()=>{const{isShown:e,text:t,showPrompt:n,hidePrompt:r,resolveRef:i,setOptions:a}=m.useContext(r2),o=m.useCallback(c=>{r(),i.current(c)},[r,i]),s=m.useCallback(async(c,l)=>(a(u=>({...u,...l})),n(c),new Promise(u=>{i.current=u})),[i,a,n]);return{isShown:e,text:t,prompt:s,onFinish:o}};let dE={data:""},fE=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||dE,hE=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,pE=/\/\*[^]*?\*\/| +/g,G0=/\n+/g,ii=(e,t)=>{let n="",r="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?n=a+" "+o+";":r+=a[1]=="f"?ii(o,a):a+"{"+ii(o,a[1]=="k"?"":t)+"}":typeof o=="object"?r+=ii(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ii.p?ii.p(a,o):a+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ar={},a2=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+a2(e[n]);return t}return e},mE=(e,t,n,r,i)=>{let a=a2(e),o=Ar[a]||(Ar[a]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(a));if(!Ar[o]){let c=a!==e?e:(l=>{let u,d,f=[{}];for(;u=hE.exec(l.replace(pE,""));)u[4]?f.shift():u[3]?(d=u[3].replace(G0," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(G0," ").trim();return f[0]})(e);Ar[o]=ii(i?{["@keyframes "+o]:c}:c,n?"":"."+o)}let s=n&&Ar.g?Ar.g:null;return n&&(Ar.g=Ar[o]),((c,l,u,d)=>{d?l.data=l.data.replace(d,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Ar[o],t,r,s),o},gE=(e,t,n)=>e.reduce((r,i,a)=>{let o=t[a];if(o&&o.call){let s=o(n),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=c?"."+c:s&&typeof s=="object"?s.props?"":ii(s,""):s===!1?"":s}return r+i+(o??"")},"");function vu(e){let t=this||{},n=e.call?e(t.p):e;return mE(n.unshift?n.raw?gE(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,fE(t.target),t.g,t.o,t.k)}let o2,lh,uh;vu.bind({g:1});let Hr=vu.bind({k:1});function vE(e,t,n,r){ii.p=t,o2=e,lh=n,uh=r}function Ci(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),c=s.className||i.className;n.p=Object.assign({theme:lh&&lh()},s),n.o=/ *go\d+/.test(c),s.className=vu.apply(n,r)+(c?" "+c:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),uh&&l[0]&&uh(s),o2(l,s)}return i}}var yE=e=>typeof e=="function",bl=(e,t)=>yE(e)?e(t):e,bE=(()=>{let e=0;return()=>(++e).toString()})(),s2=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),xE=20,Xc=new Map,_E=1e3,Z0=e=>{if(Xc.has(e))return;let t=setTimeout(()=>{Xc.delete(e),sa({type:4,toastId:e})},_E);Xc.set(e,t)},wE=e=>{let t=Xc.get(e);t&&clearTimeout(t)},dh=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,xE)};case 1:return t.toast.id&&wE(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:n}=t;return e.toasts.find(a=>a.id===n.id)?dh(e,{type:1,toast:n}):dh(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Z0(r):e.toasts.forEach(a=>{Z0(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Qc=[],Jc={toasts:[],pausedAt:void 0},sa=e=>{Jc=dh(Jc,e),Qc.forEach(t=>{t(Jc)})},CE={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},TE=(e={})=>{let[t,n]=m.useState(Jc);m.useEffect(()=>(Qc.push(n),()=>{let i=Qc.indexOf(n);i>-1&&Qc.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var a,o;return{...e,...e[i.type],...i,duration:i.duration||((a=e[i.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||CE[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},SE=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||bE()}),Qs=e=>(t,n)=>{let r=SE(t,e,n);return sa({type:2,toast:r}),r.id},Dn=(e,t)=>Qs("blank")(e,t);Dn.error=Qs("error");Dn.success=Qs("success");Dn.loading=Qs("loading");Dn.custom=Qs("custom");Dn.dismiss=e=>{sa({type:3,toastId:e})};Dn.remove=e=>sa({type:4,toastId:e});Dn.promise=(e,t,n)=>{let r=Dn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Dn.success(bl(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Dn.error(bl(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var kE=(e,t)=>{sa({type:1,toast:{id:e,height:t}})},EE=()=>{sa({type:5,time:Date.now()})},OE=e=>{let{toasts:t,pausedAt:n}=TE(e);m.useEffect(()=>{if(n)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let c=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(c<0){s.visible&&Dn.dismiss(s.id);return}return setTimeout(()=>Dn.dismiss(s.id),c)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=m.useCallback(()=>{n&&sa({type:6,time:Date.now()})},[n]),i=m.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:c=8,defaultPosition:l}=o||{},u=t.filter(h=>(h.position||l)===(a.position||l)&&h.height),d=u.findIndex(h=>h.id===a.id),f=u.filter((h,g)=>g<d&&h.visible).length;return u.filter(h=>h.visible).slice(...s?[f+1]:[0,f]).reduce((h,g)=>h+(g.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:kE,startPause:EE,endPause:r,calculateOffset:i}}},ME=Hr`
|
|
53
|
+
Valid keys: `+JSON.stringify(Object.keys(U),null," "));var R=H(re,L,X,J,Q+"."+L,n);if(R)return R}return null}return v(G)}function A(U){switch(typeof U){case"number":case"string":case"undefined":return!0;case"boolean":return!U;case"object":if(Array.isArray(U))return U.every(A);if(U===null||s(U))return!0;var G=d(U);if(G){var ne=G.call(U),te;if(G!==U.entries){for(;!(te=ne.next()).done;)if(!A(te.value))return!1}else for(;!(te=ne.next()).done;){var X=te.value;if(X&&!A(X[1]))return!1}}else return!1;return!0;default:return!1}}function P(U,G){return U==="symbol"?!0:G?G["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&G instanceof Symbol:!1}function D(U){var G=typeof U;return Array.isArray(U)?"array":U instanceof RegExp?"object":P(G,U)?"symbol":G}function N(U){if(typeof U>"u"||U===null)return""+U;var G=D(U);if(G==="object"){if(U instanceof Date)return"date";if(U instanceof RegExp)return"regexp"}return G}function q(U){var G=N(U);switch(G){case"array":case"object":return"an "+G;case"boolean":case"date":case"regexp":return"a "+G;default:return G}}function z(U){return!U.constructor||!U.constructor.name?f:U.constructor.name}return h.checkPropTypes=i,h.resetWarningCache=i.resetWarningCache,h.PropTypes=h,h},ef}var tf,_0;function q6(){if(_0)return tf;_0=1;var e=Sp();function t(){}function n(){}return n.resetWarningCache=t,tf=function(){function r(o,s,c,l,u,d){if(d!==e){var f=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 f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},tf}if(process.env.NODE_ENV!=="production"){var Y6=Tp(),G6=!0;Jf.exports=V6()(Y6.isElement,G6)}else Jf.exports=q6()();var Z6=Jf.exports;const V=Ht(Z6),w0={disabled:!1};var K6=process.env.NODE_ENV!=="production"?V.oneOfType([V.number,V.shape({enter:V.number,exit:V.number,appear:V.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&V.oneOfType([V.string,V.shape({enter:V.string,exit:V.string,active:V.string}),V.shape({enter:V.string,enterDone:V.string,enterActive:V.string,exit:V.string,exitDone:V.string,exitActive:V.string})]);const Sb=m.createContext(null);var X6=function(t){return t.scrollTop},Go="unmounted",ni="exited",Ir="entering",ri="entered",ul="exiting",Yr=function(e){_b(t,e);function t(r,i){var a;a=e.call(this,r,i)||this;var o=i,s=o&&!o.isMounting?r.enter:r.appear,c;return a.appearStatus=null,r.in?s?(c=ni,a.appearStatus=Ir):c=ri:r.unmountOnExit||r.mountOnEnter?c=Go:c=ni,a.state={status:c},a.nextCallback=null,a}t.getDerivedStateFromProps=function(i,a){var o=i.in;return o&&a.status===Go?{status:ni}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var a=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==Ir&&o!==ri&&(a=Ir):(o===Ir||o===ri)&&(a=ul)}this.updateStatus(!1,a)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,a,o,s;return a=o=s=i,i!=null&&typeof i!="number"&&(a=i.exit,o=i.enter,s=i.appear!==void 0?i.appear:o),{exit:a,enter:o,appear:s}},n.updateStatus=function(i,a){if(i===void 0&&(i=!1),a!==null)if(this.cancelNextCallback(),a===Ir){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:oi.findDOMNode(this);o&&X6(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ni&&this.setState({status:Go})},n.performEnter=function(i){var a=this,o=this.props.enter,s=this.context?this.context.isMounting:i,c=this.props.nodeRef?[s]:[oi.findDOMNode(this),s],l=c[0],u=c[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!o||w0.disabled){this.safeSetState({status:ri},function(){a.props.onEntered(l)});return}this.props.onEnter(l,u),this.safeSetState({status:Ir},function(){a.props.onEntering(l,u),a.onTransitionEnd(f,function(){a.safeSetState({status:ri},function(){a.props.onEntered(l,u)})})})},n.performExit=function(){var i=this,a=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:oi.findDOMNode(this);if(!a||w0.disabled){this.safeSetState({status:ni},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:ul},function(){i.props.onExiting(s),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:ni},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,a){a=this.setNextCallback(a),this.setState(i,a)},n.setNextCallback=function(i){var a=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,a.nextCallback=null,i(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,a){this.setNextCallback(a);var o=this.props.nodeRef?this.props.nodeRef.current:oi.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=c[0],u=c[1];this.props.addEndListener(l,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Go)return null;var a=this.props,o=a.children;a.in,a.mountOnEnter,a.unmountOnExit,a.appear,a.enter,a.exit,a.timeout,a.addEndListener,a.onEnter,a.onEntering,a.onEntered,a.onExit,a.onExiting,a.onExited,a.nodeRef;var s=wp(a,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return m.createElement(Sb.Provider,{value:null},typeof o=="function"?o(i,s):m.cloneElement(m.Children.only(o),s))},t}(m.Component);Yr.contextType=Sb;Yr.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:V.shape({current:typeof Element>"u"?V.any:function(e,t,n,r,i,a){var o=e[t];return V.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,a)}}),children:V.oneOfType([V.func.isRequired,V.element.isRequired]).isRequired,in:V.bool,mountOnEnter:V.bool,unmountOnExit:V.bool,appear:V.bool,enter:V.bool,exit:V.bool,timeout:function(t){var n=K6;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return n.apply(void 0,[t].concat(i))},addEndListener:V.func,onEnter:V.func,onEntering:V.func,onEntered:V.func,onExit:V.func,onExiting:V.func,onExited:V.func}:{};function ya(){}Yr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ya,onEntering:ya,onEntered:ya,onExit:ya,onExiting:ya,onExited:ya};Yr.UNMOUNTED=Go;Yr.EXITED=ni;Yr.ENTERING=Ir;Yr.ENTERED=ri;Yr.EXITING=ul;const io=!!(typeof window<"u"&&window.document&&window.document.createElement);var eh=!1,th=!1;try{var nf={get passive(){return eh=!0},get once(){return th=eh=!0}};io&&(window.addEventListener("test",nf,nf),window.removeEventListener("test",nf,!0))}catch{}function kp(e,t,n,r){if(r&&typeof r!="boolean"&&!th){var i=r.once,a=r.capture,o=n;!th&&i&&(o=n.__once||function s(c){this.removeEventListener(t,s,a),n.call(this,c)},n.__once=o),e.addEventListener(t,o,eh?r:a)}e.addEventListener(t,n,r)}function nh(e,t,n,r){var i=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,i),n.__once&&e.removeEventListener(t,n.__once,i)}function Nr(e,t,n,r){return kp(e,t,n,r),function(){nh(e,t,n,r)}}function Q6(e,t,n,r){if(r===void 0&&(r=!0),e){var i=document.createEvent("HTMLEvents");i.initEvent(t,n,r),e.dispatchEvent(i)}}function J6(e){var t=li(e,"transitionDuration")||"",n=t.indexOf("ms")===-1?1e3:1;return parseFloat(t)*n}function e5(e,t,n){n===void 0&&(n=5);var r=!1,i=setTimeout(function(){r||Q6(e,"transitionend",!0)},t+n),a=Nr(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(i),a()}}function kb(e,t,n,r){n==null&&(n=J6(e)||0);var i=e5(e,n,r),a=Nr(e,"transitionend",t);return function(){i(),a()}}function C0(e,t){const n=li(e,t)||"",r=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*r}function Eb(e,t){const n=C0(e,"transitionDuration"),r=C0(e,"transitionDelay"),i=kb(e,a=>{a.target===e&&(i(),t(a))},n+r)}function Ob(e){e.offsetHeight}const T0=e=>!e||typeof e=="function"?e:t=>{e.current=t};function t5(e,t){const n=T0(e),r=T0(t);return i=>{n&&n(i),r&&r(i)}}function Xn(e,t){return m.useMemo(()=>t5(e,t),[e,t])}function dl(e){return e&&"setState"in e?oi.findDOMNode(e):e??null}const Mb=m.forwardRef(({onEnter:e,onEntering:t,onEntered:n,onExit:r,onExiting:i,onExited:a,addEndListener:o,children:s,childRef:c,...l},u)=>{const d=m.useRef(null),f=Xn(d,c),h=T=>{f(dl(T))},g=T=>j=>{T&&d.current&&T(d.current,j)},p=m.useCallback(g(e),[e]),v=m.useCallback(g(t),[t]),w=m.useCallback(g(n),[n]),_=m.useCallback(g(r),[r]),x=m.useCallback(g(i),[i]),S=m.useCallback(g(a),[a]),b=m.useCallback(g(o),[o]);return y.jsx(Yr,{ref:u,...l,onEnter:p,onEntered:w,onEntering:v,onExit:_,onExited:S,onExiting:x,addEndListener:b,nodeRef:d,children:typeof s=="function"?(T,j)=>s(T,{...j,ref:h}):m.cloneElement(s,{ref:h})})});function n5(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e},[e]),t}function Bt(e){const t=n5(e);return m.useCallback(function(...n){return t.current&&t.current(...n)},[t])}const Ep=e=>ue.forwardRef((t,n)=>y.jsx("div",{...t,ref:n,className:oe(t.className,e)})),$b=Ep("h4");$b.displayName="DivStyledAsH4";const Ab=ue.forwardRef(({className:e,bsPrefix:t,as:n=$b,...r},i)=>(t=nt(t,"alert-heading"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Ab.displayName="AlertHeading";function fl(){return m.useState(null)}function r5(e,t,n,r=!1){const i=Bt(n);m.useEffect(()=>{const a=typeof e=="function"?e():e;return a.addEventListener(t,i,r),()=>a.removeEventListener(t,i,r)},[e])}function Op(){const e=m.useRef(!0),t=m.useRef(()=>e.current);return m.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function Rb(e){const t=m.useRef(null);return m.useEffect(()=>{t.current=e}),t.current}const i5=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",a5=typeof document<"u",ss=a5||i5?m.useLayoutEffect:m.useEffect,o5=["as","disabled"];function s5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function c5(e){return!e||e.trim()==="#"}function Mp({tagName:e,disabled:t,href:n,target:r,rel:i,role:a,onClick:o,tabIndex:s=0,type:c}){e||(n!=null||r!=null||i!=null?e="a":e="button");const l={tagName:e};if(e==="button")return[{type:c||"button",disabled:t},l];const u=f=>{if((t||e==="a"&&c5(n))&&f.preventDefault(),t){f.stopPropagation();return}o==null||o(f)},d=f=>{f.key===" "&&(f.preventDefault(),u(f))};return e==="a"&&(n||(n="#"),t&&(n=void 0)),[{role:a??"button",disabled:void 0,tabIndex:t?void 0:s,href:n,target:e==="a"?r:void 0,"aria-disabled":t||void 0,rel:e==="a"?i:void 0,onClick:u,onKeyDown:d},l]}const $p=ue.forwardRef((e,t)=>{let{as:n,disabled:r}=e,i=s5(e,o5);const[a,{tagName:o}]=Mp(Object.assign({tagName:n,disabled:r},i));return y.jsx(o,Object.assign({},i,a,{ref:t}))});$p.displayName="Button";const l5=["onKeyDown"];function u5(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function d5(e){return!e||e.trim()==="#"}const Ap=ue.forwardRef((e,t)=>{let{onKeyDown:n}=e,r=u5(e,l5);const[i]=Mp(Object.assign({tagName:"a"},r)),a=Bt(o=>{i.onKeyDown(o),n==null||n(o)});return d5(r.href)||r.role==="button"?y.jsx("a",Object.assign({ref:t},r,i,{onKeyDown:a})):y.jsx("a",Object.assign({ref:t},r,{onKeyDown:n}))});Ap.displayName="Anchor";const jb=ue.forwardRef(({className:e,bsPrefix:t,as:n=Ap,...r},i)=>(t=nt(t,"alert-link"),y.jsx(n,{ref:i,className:oe(e,t),...r})));jb.displayName="AlertLink";function Pb(e){return e.code==="Escape"||e.keyCode===27}function Ib(){const e=ue.version.split(".");return{major:+e[0],minor:+e[1],patch:+e[2]}}const f5={[Ir]:"show",[ri]:"show"},di=ue.forwardRef(({className:e,children:t,transitionClasses:n={},onEnter:r,...i},a)=>{const o={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...i},s=m.useCallback((u,d)=>{Ob(u),r==null||r(u,d)},[r]),{major:c}=Ib(),l=c>=19?t.props.ref:t.ref;return y.jsx(Mb,{ref:a,addEndListener:Eb,...o,onEnter:s,childRef:l,children:(u,d)=>ue.cloneElement(t,{...d,className:oe("fade",e,t.props.className,f5[u],n[u])})})});di.displayName="Fade";const h5={"aria-label":V.string,onClick:V.func,variant:V.oneOf(["white"])},cu=ue.forwardRef(({className:e,variant:t,"aria-label":n="Close",...r},i)=>y.jsx("button",{ref:i,type:"button",className:oe("btn-close",t&&`btn-close-${t}`,e),"aria-label":n,...r}));cu.displayName="CloseButton";cu.propTypes=h5;const Db=ue.forwardRef((e,t)=>{const{bsPrefix:n,show:r=!0,closeLabel:i="Close alert",closeVariant:a,className:o,children:s,variant:c="primary",onClose:l,dismissible:u,transition:d=di,...f}=Cp(e,{show:"onClose"}),h=nt(n,"alert"),g=Bt(w=>{l&&l(!1,w)}),p=d===!0?di:d,v=y.jsxs("div",{role:"alert",...p?void 0:f,ref:t,className:oe(o,h,c&&`${h}-${c}`,u&&`${h}-dismissible`),children:[u&&y.jsx(cu,{onClick:g,"aria-label":i,variant:a}),s]});return p?y.jsx(p,{unmountOnExit:!0,...f,ref:void 0,in:r,children:v}):r?v:null});Db.displayName="Alert";const p5=Object.assign(Db,{Link:jb,Heading:Ab}),Rp=ue.forwardRef(({as:e,bsPrefix:t,variant:n="primary",size:r,active:i=!1,disabled:a=!1,className:o,...s},c)=>{const l=nt(t,"btn"),[u,{tagName:d}]=Mp({tagName:e,disabled:a,...s}),f=d;return y.jsx(f,{...u,...s,ref:c,disabled:a,className:oe(o,l,i&&"active",n&&`${l}-${n}`,r&&`${l}-${r}`,s.href&&a&&"disabled")})});Rp.displayName="Button";function m5(e){const t=m.useRef(e);return t.current=e,t}function jp(e){const t=m5(e);m.useEffect(()=>()=>t.current(),[])}const rh=2**31-1;function Nb(e,t,n){const r=n-Date.now();e.current=r<=rh?setTimeout(t,r):setTimeout(()=>Nb(e,t,n),rh)}function g5(){const e=Op(),t=m.useRef();return jp(()=>clearTimeout(t.current)),m.useMemo(()=>{const n=()=>clearTimeout(t.current);function r(i,a=0){e()&&(n(),a<=rh?t.current=setTimeout(i,a):Nb(t,i,Date.now()+a))}return{set:r,clear:n,handleRef:t}},[])}function v5(e,t){return ue.Children.toArray(e).some(n=>ue.isValidElement(n)&&n.type===t)}function Lb({as:e,bsPrefix:t,className:n,...r}){t=nt(t,"col");const i=wb(),a=Cb(),o=[],s=[];return i.forEach(c=>{const l=r[c];delete r[c];let u,d,f;typeof l=="object"&&l!=null?{span:u,offset:d,order:f}=l:u=l;const h=c!==a?`-${c}`:"";u&&o.push(u===!0?`${t}${h}`:`${t}${h}-${u}`),f!=null&&s.push(`order${h}-${f}`),d!=null&&s.push(`offset${h}-${d}`)}),[{...r,className:oe(n,...o,...s)},{as:e,bsPrefix:t,spans:o}]}const Pp=ue.forwardRef((e,t)=>{const[{className:n,...r},{as:i="div",bsPrefix:a,spans:o}]=Lb(e);return y.jsx(i,{...r,ref:t,className:oe(n,!o.length&&a)})});Pp.displayName="Col";var y5=Function.prototype.bind.call(Function.prototype.call,[].slice);function Dr(e,t){return y5(e.querySelectorAll(t))}function b5(e,t,n){const r=m.useRef(e!==void 0),[i,a]=m.useState(t),o=e!==void 0,s=r.current;return r.current=o,!o&&s&&i!==t&&a(t),[o?e:i,m.useCallback((...c)=>{const[l,...u]=c;let d=n==null?void 0:n(l,...u);return a(l),d},[n])]}function Fb(){const[,e]=m.useReducer(t=>!t,!1);return e}const lu=ue.createContext(null);var S0=Object.prototype.hasOwnProperty;function k0(e,t,n){for(n of e.keys())if(Jo(n,t))return n}function Jo(e,t){var n,r,i;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--&&Jo(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i=="object"&&(i=k0(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i=="object"&&(i=k0(t,i),!i)||!Jo(r[1],t.get(i)))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(S0.call(e,n)&&++r&&!S0.call(t,n)||!(n in t)||!Jo(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function x5(e){const t=Op();return[e[0],m.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var $n="top",Zn="bottom",Kn="right",An="left",Ip="auto",Gs=[$n,Zn,Kn,An],Fa="start",cs="end",_5="clippingParents",Bb="viewport",Ro="popper",w5="reference",E0=Gs.reduce(function(e,t){return e.concat([t+"-"+Fa,t+"-"+cs])},[]),Ub=[].concat(Gs,[Ip]).reduce(function(e,t){return e.concat([t,t+"-"+Fa,t+"-"+cs])},[]),C5="beforeRead",T5="read",S5="afterRead",k5="beforeMain",E5="main",O5="afterMain",M5="beforeWrite",$5="write",A5="afterWrite",R5=[C5,T5,S5,k5,E5,O5,M5,$5,A5];function hr(e){return e.split("-")[0]}function Fn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Zi(e){var t=Fn(e).Element;return e instanceof t||e instanceof Element}function pr(e){var t=Fn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Dp(e){if(typeof ShadowRoot>"u")return!1;var t=Fn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var Wi=Math.max,hl=Math.min,Ba=Math.round;function ih(){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 Wb(){return!/^((?!chrome|android).)*safari/i.test(ih())}function Ua(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&pr(e)&&(i=e.offsetWidth>0&&Ba(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Ba(r.height)/e.offsetHeight||1);var o=Zi(e)?Fn(e):window,s=o.visualViewport,c=!Wb()&&n,l=(r.left+(c&&s?s.offsetLeft:0))/i,u=(r.top+(c&&s?s.offsetTop:0))/a,d=r.width/i,f=r.height/a;return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l,x:l,y:u}}function Np(e){var t=Ua(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 zb(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Dp(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function fi(e){return e?(e.nodeName||"").toLowerCase():null}function Wr(e){return Fn(e).getComputedStyle(e)}function j5(e){return["table","td","th"].indexOf(fi(e))>=0}function wi(e){return((Zi(e)?e.ownerDocument:e.document)||window.document).documentElement}function uu(e){return fi(e)==="html"?e:e.assignedSlot||e.parentNode||(Dp(e)?e.host:null)||wi(e)}function O0(e){return!pr(e)||Wr(e).position==="fixed"?null:e.offsetParent}function P5(e){var t=/firefox/i.test(ih()),n=/Trident/i.test(ih());if(n&&pr(e)){var r=Wr(e);if(r.position==="fixed")return null}var i=uu(e);for(Dp(i)&&(i=i.host);pr(i)&&["html","body"].indexOf(fi(i))<0;){var a=Wr(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Zs(e){for(var t=Fn(e),n=O0(e);n&&j5(n)&&Wr(n).position==="static";)n=O0(n);return n&&(fi(n)==="html"||fi(n)==="body"&&Wr(n).position==="static")?t:n||P5(e)||t}function Lp(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function es(e,t,n){return Wi(e,hl(t,n))}function I5(e,t,n){var r=es(e,t,n);return r>n?n:r}function Hb(){return{top:0,right:0,bottom:0,left:0}}function Vb(e){return Object.assign({},Hb(),e)}function qb(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var D5=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Vb(typeof t!="number"?t:qb(t,Gs))};function N5(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=hr(n.placement),c=Lp(s),l=[An,Kn].indexOf(s)>=0,u=l?"height":"width";if(!(!a||!o)){var d=D5(i.padding,n),f=Np(a),h=c==="y"?$n:An,g=c==="y"?Zn:Kn,p=n.rects.reference[u]+n.rects.reference[c]-o[c]-n.rects.popper[u],v=o[c]-n.rects.reference[c],w=Zs(a),_=w?c==="y"?w.clientHeight||0:w.clientWidth||0:0,x=p/2-v/2,S=d[h],b=_-f[u]-d[g],T=_/2-f[u]/2+x,j=es(S,T,b),M=c;n.modifiersData[r]=(t={},t[M]=j,t.centerOffset=j-T,t)}}function L5(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||zb(t.elements.popper,i)&&(t.elements.arrow=i))}const F5={name:"arrow",enabled:!0,phase:"main",fn:N5,effect:L5,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wa(e){return e.split("-")[1]}var B5={top:"auto",right:"auto",bottom:"auto",left:"auto"};function U5(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Ba(n*i)/i||0,y:Ba(r*i)/i||0}}function M0(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,h=f===void 0?0:f,g=o.y,p=g===void 0?0:g,v=typeof u=="function"?u({x:h,y:p}):{x:h,y:p};h=v.x,p=v.y;var w=o.hasOwnProperty("x"),_=o.hasOwnProperty("y"),x=An,S=$n,b=window;if(l){var T=Zs(n),j="clientHeight",M="clientWidth";if(T===Fn(n)&&(T=wi(n),Wr(T).position!=="static"&&s==="absolute"&&(j="scrollHeight",M="scrollWidth")),T=T,i===$n||(i===An||i===Kn)&&a===cs){S=Zn;var k=d&&T===b&&b.visualViewport?b.visualViewport.height:T[j];p-=k-r.height,p*=c?1:-1}if(i===An||(i===$n||i===Zn)&&a===cs){x=Kn;var E=d&&T===b&&b.visualViewport?b.visualViewport.width:T[M];h-=E-r.width,h*=c?1:-1}}var C=Object.assign({position:s},l&&B5),O=u===!0?U5({x:h,y:p},Fn(n)):{x:h,y:p};if(h=O.x,p=O.y,c){var $;return Object.assign({},C,($={},$[S]=_?"0":"",$[x]=w?"0":"",$.transform=(b.devicePixelRatio||1)<=1?"translate("+h+"px, "+p+"px)":"translate3d("+h+"px, "+p+"px, 0)",$))}return Object.assign({},C,(t={},t[S]=_?p+"px":"",t[x]=w?h+"px":"",t.transform="",t))}function W5(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:hr(t.placement),variation:Wa(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,M0(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,M0(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const z5={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:W5,data:{}};var Oc={passive:!0};function H5(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=Fn(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(u){u.addEventListener("scroll",n.update,Oc)}),s&&c.addEventListener("resize",n.update,Oc),function(){a&&l.forEach(function(u){u.removeEventListener("scroll",n.update,Oc)}),s&&c.removeEventListener("resize",n.update,Oc)}}const V5={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:H5,data:{}};var q5={left:"right",right:"left",bottom:"top",top:"bottom"};function Gc(e){return e.replace(/left|right|bottom|top/g,function(t){return q5[t]})}var Y5={start:"end",end:"start"};function $0(e){return e.replace(/start|end/g,function(t){return Y5[t]})}function Fp(e){var t=Fn(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Bp(e){return Ua(wi(e)).left+Fp(e).scrollLeft}function G5(e,t){var n=Fn(e),r=wi(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=Wb();(l||!l&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Bp(e),y:c}}function Z5(e){var t,n=wi(e),r=Fp(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Wi(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Wi(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+Bp(e),c=-r.scrollTop;return Wr(i||n).direction==="rtl"&&(s+=Wi(n.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}function Up(e){var t=Wr(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Yb(e){return["html","body","#document"].indexOf(fi(e))>=0?e.ownerDocument.body:pr(e)&&Up(e)?e:Yb(uu(e))}function ts(e,t){var n;t===void 0&&(t=[]);var r=Yb(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),a=Fn(r),o=i?[a].concat(a.visualViewport||[],Up(r)?r:[]):r,s=t.concat(o);return i?s:s.concat(ts(uu(o)))}function ah(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function K5(e,t){var n=Ua(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 A0(e,t,n){return t===Bb?ah(G5(e,n)):Zi(t)?K5(t,n):ah(Z5(wi(e)))}function X5(e){var t=ts(uu(e)),n=["absolute","fixed"].indexOf(Wr(e).position)>=0,r=n&&pr(e)?Zs(e):e;return Zi(r)?t.filter(function(i){return Zi(i)&&zb(i,r)&&fi(i)!=="body"}):[]}function Q5(e,t,n,r){var i=t==="clippingParents"?X5(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(c,l){var u=A0(e,l,r);return c.top=Wi(u.top,c.top),c.right=hl(u.right,c.right),c.bottom=hl(u.bottom,c.bottom),c.left=Wi(u.left,c.left),c},A0(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Gb(e){var t=e.reference,n=e.element,r=e.placement,i=r?hr(r):null,a=r?Wa(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case $n:c={x:o,y:t.y-n.height};break;case Zn:c={x:o,y:t.y+t.height};break;case Kn:c={x:t.x+t.width,y:s};break;case An:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?Lp(i):null;if(l!=null){var u=l==="y"?"height":"width";switch(a){case Fa:c[l]=c[l]-(t[u]/2-n[u]/2);break;case cs:c[l]=c[l]+(t[u]/2-n[u]/2);break}}return c}function ls(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?_5:s,l=n.rootBoundary,u=l===void 0?Bb:l,d=n.elementContext,f=d===void 0?Ro:d,h=n.altBoundary,g=h===void 0?!1:h,p=n.padding,v=p===void 0?0:p,w=Vb(typeof v!="number"?v:qb(v,Gs)),_=f===Ro?w5:Ro,x=e.rects.popper,S=e.elements[g?_:f],b=Q5(Zi(S)?S:S.contextElement||wi(e.elements.popper),c,u,o),T=Ua(e.elements.reference),j=Gb({reference:T,element:x,strategy:"absolute",placement:i}),M=ah(Object.assign({},x,j)),k=f===Ro?M:T,E={top:b.top-k.top+w.top,bottom:k.bottom-b.bottom+w.bottom,left:b.left-k.left+w.left,right:k.right-b.right+w.right},C=e.modifiersData.offset;if(f===Ro&&C){var O=C[i];Object.keys(E).forEach(function($){var A=[Kn,Zn].indexOf($)>=0?1:-1,P=[$n,Zn].indexOf($)>=0?"y":"x";E[$]+=O[P]*A})}return E}function J5(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?Ub:c,u=Wa(r),d=u?s?E0:E0.filter(function(g){return Wa(g)===u}):Gs,f=d.filter(function(g){return l.indexOf(g)>=0});f.length===0&&(f=d);var h=f.reduce(function(g,p){return g[p]=ls(e,{placement:p,boundary:i,rootBoundary:a,padding:o})[hr(p)],g},{});return Object.keys(h).sort(function(g,p){return h[g]-h[p]})}function eS(e){if(hr(e)===Ip)return[];var t=Gc(e);return[$0(e),t,$0(t)]}function tS(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!0:o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,g=h===void 0?!0:h,p=n.allowedAutoPlacements,v=t.options.placement,w=hr(v),_=w===v,x=c||(_||!g?[Gc(v)]:eS(v)),S=[v].concat(x).reduce(function(X,J){return X.concat(hr(J)===Ip?J5(t,{placement:J,boundary:u,rootBoundary:d,padding:l,flipVariations:g,allowedAutoPlacements:p}):J)},[]),b=t.rects.reference,T=t.rects.popper,j=new Map,M=!0,k=S[0],E=0;E<S.length;E++){var C=S[E],O=hr(C),$=Wa(C)===Fa,A=[$n,Zn].indexOf(O)>=0,P=A?"width":"height",D=ls(t,{placement:C,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),N=A?$?Kn:An:$?Zn:$n;b[P]>T[P]&&(N=Gc(N));var q=Gc(N),z=[];if(a&&z.push(D[O]<=0),s&&z.push(D[N]<=0,D[q]<=0),z.every(function(X){return X})){k=C,M=!1;break}j.set(C,z)}if(M)for(var U=g?3:1,G=function(J){var Q=S.find(function(re){var F=j.get(re);if(F)return F.slice(0,J).every(function(I){return I})});if(Q)return k=Q,"break"},ne=U;ne>0;ne--){var te=G(ne);if(te==="break")break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}}const nS={name:"flip",enabled:!0,phase:"main",fn:tS,requiresIfExists:["offset"],data:{_skip:!1}};function R0(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 j0(e){return[$n,Kn,Zn,An].some(function(t){return e[t]>=0})}function rS(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=ls(t,{elementContext:"reference"}),s=ls(t,{altBoundary:!0}),c=R0(o,r),l=R0(s,i,a),u=j0(c),d=j0(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const iS={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:rS};function aS(e,t,n){var r=hr(e),i=[An,$n].indexOf(r)>=0?-1:1,a=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[An,Kn].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function oS(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=Ub.reduce(function(u,d){return u[d]=aS(d,t.rects,a),u},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}const sS={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:oS};function cS(e){var t=e.state,n=e.name;t.modifiersData[n]=Gb({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const lS={name:"popperOffsets",enabled:!0,phase:"read",fn:cS,data:{}};function uS(e){return e==="x"?"y":"x"}function dS(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0?!0:i,o=n.altAxis,s=o===void 0?!1:o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,g=n.tetherOffset,p=g===void 0?0:g,v=ls(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),w=hr(t.placement),_=Wa(t.placement),x=!_,S=Lp(w),b=uS(S),T=t.modifiersData.popperOffsets,j=t.rects.reference,M=t.rects.popper,k=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,E=typeof k=="number"?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(T){if(a){var $,A=S==="y"?$n:An,P=S==="y"?Zn:Kn,D=S==="y"?"height":"width",N=T[S],q=N+v[A],z=N-v[P],U=h?-M[D]/2:0,G=_===Fa?j[D]:M[D],ne=_===Fa?-M[D]:-j[D],te=t.elements.arrow,X=h&&te?Np(te):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Hb(),Q=J[A],re=J[P],F=es(0,j[D],X[D]),I=x?j[D]/2-U-F-Q-E.mainAxis:G-F-Q-E.mainAxis,L=x?-j[D]/2+U+F+re+E.mainAxis:ne+F+re+E.mainAxis,H=t.elements.arrow&&Zs(t.elements.arrow),R=H?S==="y"?H.clientTop||0:H.clientLeft||0:0,K=($=C==null?void 0:C[S])!=null?$:0,Z=N+I-K-R,ee=N+L-K,pe=es(h?hl(q,Z):q,N,h?Wi(z,ee):z);T[S]=pe,O[S]=pe-N}if(s){var we,ve=S==="x"?$n:An,Le=S==="x"?Zn:Kn,Re=T[b],Ve=b==="y"?"height":"width",ze=Re+v[ve],ut=Re-v[Le],at=[$n,An].indexOf(w)!==-1,de=(we=C==null?void 0:C[b])!=null?we:0,me=at?ze:Re-j[Ve]-M[Ve]-de+E.altAxis,ke=at?Re+j[Ve]+M[Ve]-de-E.altAxis:ut,tt=h&&at?I5(me,Re,ke):es(h?me:ze,Re,h?ke:ut);T[b]=tt,O[b]=tt-Re}t.modifiersData[r]=O}}const fS={name:"preventOverflow",enabled:!0,phase:"main",fn:dS,requiresIfExists:["offset"]};function hS(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function pS(e){return e===Fn(e)||!pr(e)?Fp(e):hS(e)}function mS(e){var t=e.getBoundingClientRect(),n=Ba(t.width)/e.offsetWidth||1,r=Ba(t.height)/e.offsetHeight||1;return n!==1||r!==1}function gS(e,t,n){n===void 0&&(n=!1);var r=pr(t),i=pr(t)&&mS(t),a=wi(t),o=Ua(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((fi(t)!=="body"||Up(a))&&(s=pS(t)),pr(t)?(c=Ua(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Bp(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function vS(e){var t=new Map,n=new Set,r=[];e.forEach(function(a){t.set(a.name,a)});function i(a){n.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!n.has(s)){var c=t.get(s);c&&i(c)}}),r.push(a)}return e.forEach(function(a){n.has(a.name)||i(a)}),r}function yS(e){var t=vS(e);return R5.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function bS(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function xS(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var P0={placement:"bottom",modifiers:[],strategy:"absolute"};function I0(){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 _S(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?P0:i;return function(s,c,l){l===void 0&&(l=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},P0,a),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},d=[],f=!1,h={state:u,setOptions:function(w){var _=typeof w=="function"?w(u.options):w;p(),u.options=Object.assign({},a,u.options,_),u.scrollParents={reference:Zi(s)?ts(s):s.contextElement?ts(s.contextElement):[],popper:ts(c)};var x=yS(xS([].concat(r,u.options.modifiers)));return u.orderedModifiers=x.filter(function(S){return S.enabled}),g(),h.update()},forceUpdate:function(){if(!f){var w=u.elements,_=w.reference,x=w.popper;if(I0(_,x)){u.rects={reference:gS(_,Zs(x),u.options.strategy==="fixed"),popper:Np(x)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(E){return u.modifiersData[E.name]=Object.assign({},E.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var b=u.orderedModifiers[S],T=b.fn,j=b.options,M=j===void 0?{}:j,k=b.name;typeof T=="function"&&(u=T({state:u,options:M,name:k,instance:h})||u)}}}},update:bS(function(){return new Promise(function(v){h.forceUpdate(),v(u)})}),destroy:function(){p(),f=!0}};if(!I0(s,c))return h;h.setOptions(l).then(function(v){!f&&l.onFirstUpdate&&l.onFirstUpdate(v)});function g(){u.orderedModifiers.forEach(function(v){var w=v.name,_=v.options,x=_===void 0?{}:_,S=v.effect;if(typeof S=="function"){var b=S({state:u,name:w,instance:h,options:x}),T=function(){};d.push(b||T)}})}function p(){d.forEach(function(v){return v()}),d=[]}return h}}const wS=_S({defaultModifiers:[iS,lS,z5,V5,sS,nS,fS,F5]}),CS=["enabled","placement","strategy","modifiers"];function TS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const SS={name:"applyStyles",enabled:!1,phase:"afterWrite",fn:()=>{}},kS={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(i=>i.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,i=(t=n.getAttribute("role"))==null?void 0:t.toLowerCase();if(n.id&&i==="tooltip"&&"setAttribute"in r){const a=r.getAttribute("aria-describedby");if(a&&a.split(",").indexOf(n.id)!==-1)return;r.setAttribute("aria-describedby",a?`${a},${n.id}`:n.id)}}},ES=[];function Zb(e,t,n={}){let{enabled:r=!0,placement:i="bottom",strategy:a="absolute",modifiers:o=ES}=n,s=TS(n,CS);const c=m.useRef(o),l=m.useRef(),u=m.useCallback(()=>{var v;(v=l.current)==null||v.update()},[]),d=m.useCallback(()=>{var v;(v=l.current)==null||v.forceUpdate()},[]),[f,h]=x5(m.useState({placement:i,update:u,forceUpdate:d,attributes:{},styles:{popper:{},arrow:{}}})),g=m.useMemo(()=>({name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:({state:v})=>{const w={},_={};Object.keys(v.elements).forEach(x=>{w[x]=v.styles[x],_[x]=v.attributes[x]}),h({state:v,styles:w,attributes:_,update:u,forceUpdate:d,placement:v.placement})}}),[u,d,h]),p=m.useMemo(()=>(Jo(c.current,o)||(c.current=o),c.current),[o]);return m.useEffect(()=>{!l.current||!r||l.current.setOptions({placement:i,strategy:a,modifiers:[...p,g,SS]})},[a,i,g,r,p]),m.useEffect(()=>{if(!(!r||e==null||t==null))return l.current=wS(e,t,Object.assign({},s,{placement:i,strategy:a,modifiers:[...p,kS,g]})),()=>{l.current!=null&&(l.current.destroy(),l.current=void 0,h(v=>Object.assign({},v,{attributes:{},styles:{popper:{}}})))}},[r,e,t]),f}function us(e,t){if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return e===t||!!(e.compareDocumentPosition(t)&16)}var OS=process.env.NODE_ENV!=="production",Kb=function(){};if(OS){var MS=function(t,n){var r=arguments.length;n=new Array(r>1?r-1:0);for(var i=1;i<r;i++)n[i-1]=arguments[i];var a=0,o="Warning: "+t.replace(/%s/g,function(){return n[a++]});typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}};Kb=function(e,t,n){var r=arguments.length;n=new Array(r>2?r-2:0);for(var i=2;i<r;i++)n[i-2]=arguments[i];if(t===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");e||MS.apply(null,[t].concat(n))}}var $S=Kb;const oa=Ht($S),D0=()=>{};function AS(e){return e.button===0}function RS(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Zc=e=>e&&("current"in e?e.current:e),N0={click:"mousedown",mouseup:"mousedown",pointerup:"pointerdown"};function Xb(e,t=D0,{disabled:n,clickTrigger:r="click"}={}){const i=m.useRef(!1),a=m.useRef(!1),o=m.useCallback(l=>{const u=Zc(e);oa(!!u,"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"),i.current=!u||RS(l)||!AS(l)||!!us(u,l.target)||a.current,a.current=!1},[e]),s=Bt(l=>{const u=Zc(e);u&&us(u,l.target)&&(a.current=!0)}),c=Bt(l=>{i.current||t(l)});m.useEffect(()=>{var l,u;if(n||e==null)return;const d=ro(Zc(e)),f=d.defaultView||window;let h=(l=f.event)!=null?l:(u=f.parent)==null?void 0:u.event,g=null;N0[r]&&(g=Nr(d,N0[r],s,!0));const p=Nr(d,r,o,!0),v=Nr(d,r,_=>{if(_===h){h=void 0;return}c(_)});let w=[];return"ontouchstart"in d.documentElement&&(w=[].slice.call(d.body.children).map(_=>Nr(_,"mousemove",D0))),()=>{g==null||g(),p(),v(),w.forEach(_=>_())}},[e,n,r,o,s,c])}function jS(e){const t={};return Array.isArray(e)?(e==null||e.forEach(n=>{t[n.name]=n}),t):e||t}function PS(e={}){return Array.isArray(e)?e:Object.keys(e).map(t=>(e[t].name=t,e[t]))}function Qb({enabled:e,enableEvents:t,placement:n,flip:r,offset:i,fixed:a,containerPadding:o,arrowElement:s,popperConfig:c={}}){var l,u,d,f,h;const g=jS(c.modifiers);return Object.assign({},c,{placement:n,enabled:e,strategy:a?"fixed":c.strategy,modifiers:PS(Object.assign({},g,{eventListeners:{enabled:t,options:(l=g.eventListeners)==null?void 0:l.options},preventOverflow:Object.assign({},g.preventOverflow,{options:o?Object.assign({padding:o},(u=g.preventOverflow)==null?void 0:u.options):(d=g.preventOverflow)==null?void 0:d.options}),offset:{options:Object.assign({offset:i},(f=g.offset)==null?void 0:f.options)},arrow:Object.assign({},g.arrow,{enabled:!!s,options:Object.assign({},(h=g.arrow)==null?void 0:h.options,{element:s})}),flip:Object.assign({enabled:!!r},g.flip)}))})}const IS=["children","usePopper"];function DS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const NS=()=>{};function Jb(e={}){const t=m.useContext(lu),[n,r]=fl(),i=m.useRef(!1),{flip:a,offset:o,rootCloseEvent:s,fixed:c=!1,placement:l,popperConfig:u={},enableEventListeners:d=!0,usePopper:f=!!t}=e,h=(t==null?void 0:t.show)==null?!!e.show:t.show;h&&!i.current&&(i.current=!0);const g=T=>{t==null||t.toggle(!1,T)},{placement:p,setMenu:v,menuElement:w,toggleElement:_}=t||{},x=Zb(_,w,Qb({placement:l||p||"bottom-start",enabled:f,enableEvents:d??h,offset:o,flip:a,fixed:c,arrowElement:n,popperConfig:u})),S=Object.assign({ref:v||NS,"aria-labelledby":_==null?void 0:_.id},x.attributes.popper,{style:x.styles.popper}),b={show:h,placement:p,hasShown:i.current,toggle:t==null?void 0:t.toggle,popper:f?x:null,arrowProps:f?Object.assign({ref:r},x.attributes.arrow,{style:x.styles.arrow}):{}};return Xb(w,g,{clickTrigger:s,disabled:!h}),[S,b]}function ex(e){let{children:t,usePopper:n=!0}=e,r=DS(e,IS);const[i,a]=Jb(Object.assign({},r,{usePopper:n}));return y.jsx(y.Fragment,{children:t(i,a)})}ex.displayName="DropdownMenu";const pl={prefix:String(Math.round(Math.random()*1e10)),current:0},tx=m.createContext(pl),LS=m.createContext(!1);let FS=!!(typeof window<"u"&&window.document&&window.document.createElement),rf=new WeakMap;function BS(e=!1){let t=m.useContext(tx),n=m.useRef(null);if(n.current===null&&!e){var r,i;let a=(i=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let o=rf.get(a);o==null?rf.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==o.state&&(t.current=o.id,rf.delete(a))}n.current=++t.current}return n.current}function US(e){let t=m.useContext(tx);t===pl&&!FS&&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=BS(!!e),r=t===pl&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function WS(e){let t=m.useId(),[n]=m.useState(YS()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${pl.prefix}`;return e||`${r}-${t}`}const zS=typeof m.useId=="function"?WS:US;function HS(){return!1}function VS(){return!0}function qS(e){return()=>{}}function YS(){return typeof m.useSyncExternalStore=="function"?m.useSyncExternalStore(qS,HS,VS):m.useContext(LS)}const nx=e=>{var t;return((t=e.getAttribute("role"))==null?void 0:t.toLowerCase())==="menu"},L0=()=>{};function rx(){const e=zS(),{show:t=!1,toggle:n=L0,setToggle:r,menuElement:i}=m.useContext(lu)||{},a=m.useCallback(s=>{n(!t,s)},[t,n]),o={id:e,ref:r||L0,onClick:a,"aria-expanded":!!t};return i&&nx(i)&&(o["aria-haspopup"]=!0),[o,{show:t,toggle:n}]}function ix({children:e}){const[t,n]=rx();return y.jsx(y.Fragment,{children:e(t,n)})}ix.displayName="DropdownToggle";const za=ue.createContext(null),ds=(e,t=null)=>e!=null?String(e):t||null,du=ue.createContext(null);du.displayName="NavContext";const GS="data-rr-ui-",ZS="rrUi";function ao(e){return`${GS}${e}`}function KS(e){return`${ZS}${e}`}const XS=["eventKey","disabled","onClick","active","as"];function QS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ax({key:e,href:t,active:n,disabled:r,onClick:i}){const a=m.useContext(za),o=m.useContext(du),{activeKey:s}=o||{},c=ds(e,t),l=n==null&&e!=null?ds(s)===c:n;return[{onClick:Bt(d=>{r||(i==null||i(d),a&&!d.isPropagationStopped()&&a(c,d))}),"aria-disabled":r||void 0,"aria-selected":l,[ao("dropdown-item")]:""},{isActive:l}]}const ox=ue.forwardRef((e,t)=>{let{eventKey:n,disabled:r,onClick:i,active:a,as:o=$p}=e,s=QS(e,XS);const[c]=ax({key:n,href:s.href,disabled:r,onClick:i,active:a});return y.jsx(o,Object.assign({},s,{ref:t},c))});ox.displayName="DropdownItem";const sx=m.createContext(io?window:void 0);sx.Provider;function fu(){return m.useContext(sx)}function F0(){const e=Fb(),t=m.useRef(null),n=m.useCallback(r=>{t.current=r,e()},[e]);return[t,n]}function Ks({defaultShow:e,show:t,onSelect:n,onToggle:r,itemSelector:i=`* [${ao("dropdown-item")}]`,focusFirstItemOnShow:a,placement:o="bottom-start",children:s}){const c=fu(),[l,u]=b5(t,e,r),[d,f]=F0(),h=d.current,[g,p]=F0(),v=g.current,w=Rb(l),_=m.useRef(null),x=m.useRef(!1),S=m.useContext(za),b=m.useCallback((C,O,$=O==null?void 0:O.type)=>{u(C,{originalEvent:O,source:$})},[u]),T=Bt((C,O)=>{n==null||n(C,O),b(!1,O,"select"),O.isPropagationStopped()||S==null||S(C,O)}),j=m.useMemo(()=>({toggle:b,placement:o,show:l,menuElement:h,toggleElement:v,setMenu:f,setToggle:p}),[b,o,l,h,v,f,p]);h&&w&&!l&&(x.current=h.contains(h.ownerDocument.activeElement));const M=Bt(()=>{v&&v.focus&&v.focus()}),k=Bt(()=>{const C=_.current;let O=a;if(O==null&&(O=d.current&&nx(d.current)?"keyboard":!1),O===!1||O==="keyboard"&&!/^key.+$/.test(C))return;const $=Dr(d.current,i)[0];$&&$.focus&&$.focus()});m.useEffect(()=>{l?k():x.current&&(x.current=!1,M())},[l,x,M,k]),m.useEffect(()=>{_.current=null});const E=(C,O)=>{if(!d.current)return null;const $=Dr(d.current,i);let A=$.indexOf(C)+O;return A=Math.max(0,Math.min(A,$.length)),$[A]};return r5(m.useCallback(()=>c.document,[c]),"keydown",C=>{var O,$;const{key:A}=C,P=C.target,D=(O=d.current)==null?void 0:O.contains(P),N=($=g.current)==null?void 0:$.contains(P);if(/input|textarea/i.test(P.tagName)&&(A===" "||A!=="Escape"&&D||A==="Escape"&&P.type==="search")||!D&&!N||A==="Tab"&&(!d.current||!l))return;_.current=C.type;const z={originalEvent:C,source:C.type};switch(A){case"ArrowUp":{const U=E(P,-1);U&&U.focus&&U.focus(),C.preventDefault();return}case"ArrowDown":if(C.preventDefault(),!l)u(!0,z);else{const U=E(P,1);U&&U.focus&&U.focus()}return;case"Tab":kp(P.ownerDocument,"keyup",U=>{var G;(U.key==="Tab"&&!U.target||!((G=d.current)!=null&&G.contains(U.target)))&&u(!1,z)},{once:!0});break;case"Escape":A==="Escape"&&(C.preventDefault(),C.stopPropagation()),u(!1,z);break}}),y.jsx(za.Provider,{value:T,children:y.jsx(lu.Provider,{value:j,children:s})})}Ks.displayName="Dropdown";Ks.Menu=ex;Ks.Toggle=ix;Ks.Item=ox;const Wp=ue.createContext({});Wp.displayName="DropdownContext";const cx=ue.forwardRef(({className:e,bsPrefix:t,as:n="hr",role:r="separator",...i},a)=>(t=nt(t,"dropdown-divider"),y.jsx(n,{ref:a,className:oe(e,t),role:r,...i})));cx.displayName="DropdownDivider";const lx=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",role:r="heading",...i},a)=>(t=nt(t,"dropdown-header"),y.jsx(n,{ref:a,className:oe(e,t),role:r,...i})));lx.displayName="DropdownHeader";const ux=ue.forwardRef(({bsPrefix:e,className:t,eventKey:n,disabled:r=!1,onClick:i,active:a,as:o=Ap,...s},c)=>{const l=nt(e,"dropdown-item"),[u,d]=ax({key:n,href:s.href,disabled:r,onClick:i,active:a});return y.jsx(o,{...s,...u,ref:c,className:oe(t,l,d.isActive&&"active",r&&"disabled")})});ux.displayName="DropdownItem";const dx=ue.forwardRef(({className:e,bsPrefix:t,as:n="span",...r},i)=>(t=nt(t,"dropdown-item-text"),y.jsx(n,{ref:i,className:oe(e,t),...r})));dx.displayName="DropdownItemText";const hu=ue.createContext(null);hu.displayName="InputGroupContext";const fx=ue.createContext(null);fx.displayName="NavbarContext";function hx(e,t){if(process.env.NODE_ENV==="production")return e;const n=m.useCallback(r=>{r==null||!r.isReactComponent||(process.env.NODE_ENV!=="production"?Xf(!1,`${t} injected a ref to a provided \`as\` component that resolved to a component instance instead of a DOM element. Use \`React.forwardRef\` to provide the injected ref to the class component as a prop in order to pass it directly to a DOM element`):Xf(!1))},[t]);return Xn(n,e)}function px(e,t,n){const r=n?"top-end":"top-start",i=n?"top-start":"top-end",a=n?"bottom-end":"bottom-start",o=n?"bottom-start":"bottom-end",s=n?"right-start":"left-start",c=n?"right-end":"left-end",l=n?"left-start":"right-start",u=n?"left-end":"right-end";let d=e?o:a;return t==="up"?d=e?i:r:t==="end"?d=e?u:l:t==="start"?d=e?c:s:t==="down-centered"?d="bottom":t==="up-centered"&&(d="top"),d}const mx=ue.forwardRef(({bsPrefix:e,className:t,align:n,rootCloseEvent:r,flip:i=!0,show:a,renderOnMount:o,as:s="div",popperConfig:c,variant:l,...u},d)=>{let f=!1;const h=m.useContext(fx),g=nt(e,"dropdown-menu"),{align:p,drop:v,isRTL:w}=m.useContext(Wp);n=n||p;const _=m.useContext(hu),x=[];if(n)if(typeof n=="object"){const C=Object.keys(n);if(process.env.NODE_ENV!=="production"&&oa(C.length===1,"There should only be 1 breakpoint when passing an object to `align`"),C.length){const O=C[0],$=n[O];f=$==="start",x.push(`${g}-${O}-${$}`)}}else n==="end"&&(f=!0);const S=px(f,v,w),[b,{hasShown:T,popper:j,show:M,toggle:k}]=Jb({flip:i,rootCloseEvent:r,show:a,usePopper:!h&&x.length===0,offset:[0,2],popperConfig:c,placement:S});if(b.ref=Xn(hx(d,"DropdownMenu"),b.ref),ss(()=>{M&&(j==null||j.update())},[M]),!T&&!o&&!_)return null;typeof s!="string"&&(b.show=M,b.close=()=>k==null?void 0:k(!1),b.align=n);let E=u.style;return j!=null&&j.placement&&(E={...u.style,...b.style},u["x-placement"]=j.placement),y.jsx(s,{...u,...b,style:E,...(x.length||h)&&{"data-bs-popper":"static"},className:oe(t,g,M&&"show",f&&`${g}-end`,l&&`${g}-${l}`,...x)})});mx.displayName="DropdownMenu";const gx=ue.forwardRef(({bsPrefix:e,split:t,className:n,childBsPrefix:r,as:i=Rp,...a},o)=>{const s=nt(e,"dropdown-toggle"),c=m.useContext(lu);r!==void 0&&(a.bsPrefix=r);const[l]=rx();return l.ref=Xn(l.ref,hx(o,"DropdownToggle")),y.jsx(i,{className:oe(n,s,t&&`${s}-split`,(c==null?void 0:c.show)&&"show"),...l,...a})});gx.displayName="DropdownToggle";const vx=ue.forwardRef((e,t)=>{const{bsPrefix:n,drop:r="down",show:i,className:a,align:o="start",onSelect:s,onToggle:c,focusFirstItemOnShow:l,as:u="div",navbar:d,autoClose:f=!0,...h}=Cp(e,{show:"onToggle"}),g=m.useContext(hu),p=nt(n,"dropdown"),v=su(),w=j=>f===!1?j==="click":f==="inside"?j!=="rootClose":f==="outside"?j!=="select":!0,_=Bt((j,M)=>{var k;!((k=M.originalEvent)==null||(k=k.target)==null)&&k.classList.contains("dropdown-toggle")&&M.source==="mousedown"||(M.originalEvent.currentTarget===document&&(M.source!=="keydown"||M.originalEvent.key==="Escape")&&(M.source="rootClose"),w(M.source)&&(c==null||c(j,M)))}),S=px(o==="end",r,v),b=m.useMemo(()=>({align:o,drop:r,isRTL:v}),[o,r,v]),T={down:p,"down-centered":`${p}-center`,up:"dropup","up-centered":"dropup-center dropup",end:"dropend",start:"dropstart"};return y.jsx(Wp.Provider,{value:b,children:y.jsx(Ks,{placement:S,show:i,onSelect:s,onToggle:_,focusFirstItemOnShow:l,itemSelector:`.${p}-item:not(.disabled):not(:disabled)`,children:g?h.children:y.jsx(u,{...h,ref:t,className:oe(a,i&&"show",T[r])})})})});vx.displayName="Dropdown";const Ha=Object.assign(vx,{Toggle:gx,Menu:mx,Item:ux,ItemText:dx,Divider:cx,Header:lx}),JS={type:V.string,tooltip:V.bool,as:V.elementType},pu=ue.forwardRef(({as:e="div",className:t,type:n="valid",tooltip:r=!1,...i},a)=>y.jsx(e,{...i,ref:a,className:oe(t,`${n}-${r?"tooltip":"feedback"}`)}));pu.displayName="Feedback";pu.propTypes=JS;const zr=ue.createContext({}),mu=ue.forwardRef(({id:e,bsPrefix:t,className:n,type:r="checkbox",isValid:i=!1,isInvalid:a=!1,as:o="input",...s},c)=>{const{controlId:l}=m.useContext(zr);return t=nt(t,"form-check-input"),y.jsx(o,{...s,ref:c,type:r,id:e||l,className:oe(n,t,i&&"is-valid",a&&"is-invalid")})});mu.displayName="FormCheckInput";const ml=ue.forwardRef(({bsPrefix:e,className:t,htmlFor:n,...r},i)=>{const{controlId:a}=m.useContext(zr);return e=nt(e,"form-check-label"),y.jsx("label",{...r,ref:i,htmlFor:n||a,className:oe(t,e)})});ml.displayName="FormCheckLabel";const yx=ue.forwardRef(({id:e,bsPrefix:t,bsSwitchPrefix:n,inline:r=!1,reverse:i=!1,disabled:a=!1,isValid:o=!1,isInvalid:s=!1,feedbackTooltip:c=!1,feedback:l,feedbackType:u,className:d,style:f,title:h="",type:g="checkbox",label:p,children:v,as:w="input",..._},x)=>{t=nt(t,"form-check"),n=nt(n,"form-switch");const{controlId:S}=m.useContext(zr),b=m.useMemo(()=>({controlId:e||S}),[S,e]),T=!v&&p!=null&&p!==!1||v5(v,ml),j=y.jsx(mu,{..._,type:g==="switch"?"checkbox":g,ref:x,isValid:o,isInvalid:s,disabled:a,as:w});return y.jsx(zr.Provider,{value:b,children:y.jsx("div",{style:f,className:oe(d,T&&t,r&&`${t}-inline`,i&&`${t}-reverse`,g==="switch"&&n),children:v||y.jsxs(y.Fragment,{children:[j,T&&y.jsx(ml,{title:h,children:p}),l&&y.jsx(pu,{type:u,tooltip:c,children:l})]})})})});yx.displayName="FormCheck";const gl=Object.assign(yx,{Input:mu,Label:ml}),bx=ue.forwardRef(({bsPrefix:e,type:t,size:n,htmlSize:r,id:i,className:a,isValid:o=!1,isInvalid:s=!1,plaintext:c,readOnly:l,as:u="input",...d},f)=>{const{controlId:h}=m.useContext(zr);return e=nt(e,"form-control"),process.env.NODE_ENV!=="production"&&oa(h==null||!i,"`controlId` is ignored on `<FormControl>` when `id` is specified."),y.jsx(u,{...d,type:t,size:r,ref:f,readOnly:l,id:i||h,className:oe(a,c?`${e}-plaintext`:e,n&&`${e}-${n}`,t==="color"&&`${e}-color`,o&&"is-valid",s&&"is-invalid")})});bx.displayName="FormControl";const xx=Object.assign(bx,{Feedback:pu}),_x=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"form-floating"),y.jsx(n,{ref:i,className:oe(e,t),...r})));_x.displayName="FormFloating";const zp=ue.forwardRef(({controlId:e,as:t="div",...n},r)=>{const i=m.useMemo(()=>({controlId:e}),[e]);return y.jsx(zr.Provider,{value:i,children:y.jsx(t,{...n,ref:r})})});zp.displayName="FormGroup";const wx=ue.forwardRef(({as:e="label",bsPrefix:t,column:n=!1,visuallyHidden:r=!1,className:i,htmlFor:a,...o},s)=>{const{controlId:c}=m.useContext(zr);t=nt(t,"form-label");let l="col-form-label";typeof n=="string"&&(l=`${l} ${l}-${n}`);const u=oe(i,t,r&&"visually-hidden",n&&l);return process.env.NODE_ENV!=="production"&&oa(c==null||!a,"`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified."),a=a||c,n?y.jsx(Pp,{ref:s,as:"label",className:u,htmlFor:a,...o}):y.jsx(e,{ref:s,className:u,htmlFor:a,...o})});wx.displayName="FormLabel";const Cx=ue.forwardRef(({bsPrefix:e,className:t,id:n,...r},i)=>{const{controlId:a}=m.useContext(zr);return e=nt(e,"form-range"),y.jsx("input",{...r,type:"range",ref:i,className:oe(t,e),id:n||a})});Cx.displayName="FormRange";const Hp=ue.forwardRef(({bsPrefix:e,size:t,htmlSize:n,className:r,isValid:i=!1,isInvalid:a=!1,id:o,...s},c)=>{const{controlId:l}=m.useContext(zr);return e=nt(e,"form-select"),y.jsx("select",{...s,size:n,ref:c,className:oe(r,e,t&&`${e}-${t}`,i&&"is-valid",a&&"is-invalid"),id:o||l})});Hp.displayName="FormSelect";const Tx=ue.forwardRef(({bsPrefix:e,className:t,as:n="small",muted:r,...i},a)=>(e=nt(e,"form-text"),y.jsx(n,{...i,ref:a,className:oe(t,e,r&&"text-muted")})));Tx.displayName="FormText";const Sx=ue.forwardRef((e,t)=>y.jsx(gl,{...e,ref:t,type:"switch"}));Sx.displayName="Switch";const ek=Object.assign(Sx,{Input:gl.Input,Label:gl.Label}),Vp=ue.forwardRef(({bsPrefix:e,className:t,children:n,controlId:r,label:i,...a},o)=>(e=nt(e,"form-floating"),y.jsxs(zp,{ref:o,className:oe(t,e),controlId:r,...a,children:[n,y.jsx("label",{htmlFor:r,children:i})]})));Vp.displayName="FloatingLabel";const tk={_ref:V.any,validated:V.bool,as:V.elementType},qp=ue.forwardRef(({className:e,validated:t,as:n="form",...r},i)=>y.jsx(n,{...r,ref:i,className:oe(e,t&&"was-validated")}));qp.displayName="Form";qp.propTypes=tk;const Tr=Object.assign(qp,{Group:zp,Control:xx,Floating:_x,Check:gl,Switch:ek,Label:wx,Text:Tx,Range:Cx,Select:Hp,FloatingLabel:Vp}),kx=ue.createContext(null),nk=["as","active","eventKey"];function rk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ex({key:e,onClick:t,active:n,id:r,role:i,disabled:a}){const o=m.useContext(za),s=m.useContext(du),c=m.useContext(kx);let l=n;const u={role:i};if(s){!i&&s.role==="tablist"&&(u.role="tab");const d=s.getControllerId(e??null),f=s.getControlledId(e??null);u[ao("event-key")]=e,u.id=d||r,l=n==null&&e!=null?s.activeKey===e:n,(l||!(c!=null&&c.unmountOnExit)&&!(c!=null&&c.mountOnEnter))&&(u["aria-controls"]=f)}return u.role==="tab"&&(u["aria-selected"]=l,l||(u.tabIndex=-1),a&&(u.tabIndex=-1,u["aria-disabled"]=!0)),u.onClick=Bt(d=>{a||(t==null||t(d),e!=null&&o&&!d.isPropagationStopped()&&o(e,d))}),[u,{isActive:l}]}const Ox=ue.forwardRef((e,t)=>{let{as:n=$p,active:r,eventKey:i}=e,a=rk(e,nk);const[o,s]=Ex(Object.assign({key:ds(i,a.href),active:r},a));return o[ao("active")]=s.isActive,y.jsx(n,Object.assign({},a,o,{ref:t}))});Ox.displayName="NavItem";const ik=["as","onSelect","activeKey","role","onKeyDown"];function ak(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const B0=()=>{},U0=ao("event-key"),Mx=ue.forwardRef((e,t)=>{let{as:n="div",onSelect:r,activeKey:i,role:a,onKeyDown:o}=e,s=ak(e,ik);const c=Fb(),l=m.useRef(!1),u=m.useContext(za),d=m.useContext(kx);let f,h;d&&(a=a||"tablist",i=d.activeKey,f=d.getControlledId,h=d.getControllerId);const g=m.useRef(null),p=x=>{const S=g.current;if(!S)return null;const b=Dr(S,`[${U0}]:not([aria-disabled=true])`),T=S.querySelector("[aria-selected=true]");if(!T||T!==document.activeElement)return null;const j=b.indexOf(T);if(j===-1)return null;let M=j+x;return M>=b.length&&(M=0),M<0&&(M=b.length-1),b[M]},v=(x,S)=>{x!=null&&(r==null||r(x,S),u==null||u(x,S))},w=x=>{if(o==null||o(x),!d)return;let S;switch(x.key){case"ArrowLeft":case"ArrowUp":S=p(-1);break;case"ArrowRight":case"ArrowDown":S=p(1);break;default:return}S&&(x.preventDefault(),v(S.dataset[KS("EventKey")]||null,x),l.current=!0,c())};m.useEffect(()=>{if(g.current&&l.current){const x=g.current.querySelector(`[${U0}][aria-selected=true]`);x==null||x.focus()}l.current=!1});const _=Xn(t,g);return y.jsx(za.Provider,{value:v,children:y.jsx(du.Provider,{value:{role:a,activeKey:ds(i),getControlledId:f||B0,getControllerId:h||B0},children:y.jsx(n,Object.assign({},s,{onKeyDown:w,ref:_,role:a}))})})});Mx.displayName="Nav";const ok=Object.assign(Mx,{Item:Ox}),gu=ue.forwardRef(({bsPrefix:e,active:t,disabled:n,eventKey:r,className:i,variant:a,action:o,as:s,...c},l)=>{e=nt(e,"list-group-item");const[u,d]=Ex({key:ds(r,c.href),active:t,...c}),f=Bt(g=>{if(n){g.preventDefault(),g.stopPropagation();return}u.onClick(g)});n&&c.tabIndex===void 0&&(c.tabIndex=-1,c["aria-disabled"]=!0);const h=s||(o?c.href?"a":"button":"div");return process.env.NODE_ENV!=="production"&&oa(s||!(!o&&c.href),"`action=false` and `href` should not be used together."),y.jsx(h,{ref:l,...c,...u,onClick:f,className:oe(i,e,d.isActive&&"active",n&&"disabled",a&&`${e}-${a}`,o&&`${e}-action`)})});gu.displayName="ListGroupItem";const $x=ue.forwardRef((e,t)=>{const{className:n,bsPrefix:r,variant:i,horizontal:a,numbered:o,as:s="div",...c}=Cp(e,{activeKey:"onSelect"}),l=nt(r,"list-group");let u;return a&&(u=a===!0?"horizontal":`horizontal-${a}`),process.env.NODE_ENV!=="production"&&oa(!(a&&i==="flush"),'`variant="flush"` and `horizontal` should not be used together.'),y.jsx(ok,{ref:t,...c,as:s,className:oe(n,l,i&&`${l}-${i}`,u&&`${l}-${u}`,o&&`${l}-numbered`)})});$x.displayName="ListGroup";const Ax=Object.assign($x,{Item:gu});var Mc;function W0(e){if((!Mc&&Mc!==0||e)&&io){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),Mc=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Mc}function af(e){e===void 0&&(e=ro());try{var t=e.activeElement;return!t||!t.nodeName?null:t}catch{return e.body}}function sk(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}const z0=ao("modal-open");class Yp{constructor({ownerDocument:t,handleContainerOverflow:n=!0,isRTL:r=!1}={}){this.handleContainerOverflow=n,this.isRTL=r,this.modals=[],this.ownerDocument=t}getScrollbarWidth(){return sk(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(t){}removeModalAttributes(t){}setContainerStyle(t){const n={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();t.style={overflow:i.style.overflow,[r]:i.style[r]},t.scrollBarWidth&&(n[r]=`${parseInt(li(i,r)||"0",10)+t.scrollBarWidth}px`),i.setAttribute(z0,""),li(i,n)}reset(){[...this.modals].forEach(t=>this.remove(t))}removeContainerStyle(t){const n=this.getElement();n.removeAttribute(z0),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 of=(e,t)=>io?e==null?(t||ro()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function oh(e,t){const n=fu(),[r,i]=m.useState(()=>of(e,n==null?void 0:n.document));if(!r){const a=of(e);a&&i(a)}return m.useEffect(()=>{},[t,r]),m.useEffect(()=>{const a=of(e);a!==r&&i(a)},[e,r]),r}function ck({children:e,in:t,onExited:n,mountOnEnter:r,unmountOnExit:i}){const a=m.useRef(null),o=m.useRef(t),s=Bt(n);m.useEffect(()=>{t?o.current=!0:s(a.current)},[t,s]);const c=Xn(a,e.ref),l=m.cloneElement(e,{ref:c});return t?l:i||!o.current&&r?null:l}const lk=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function uk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function dk(e){let{onEnter:t,onEntering:n,onEntered:r,onExit:i,onExiting:a,onExited:o,addEndListener:s,children:c}=e,l=uk(e,lk);const{major:u}=Ib(),d=u>=19?c.props.ref:c.ref,f=m.useRef(null),h=Xn(f,typeof c=="function"?null:d),g=T=>j=>{T&&f.current&&T(f.current,j)},p=m.useCallback(g(t),[t]),v=m.useCallback(g(n),[n]),w=m.useCallback(g(r),[r]),_=m.useCallback(g(i),[i]),x=m.useCallback(g(a),[a]),S=m.useCallback(g(o),[o]),b=m.useCallback(g(s),[s]);return Object.assign({},l,{nodeRef:f},t&&{onEnter:p},n&&{onEntering:v},r&&{onEntered:w},i&&{onExit:_},a&&{onExiting:x},o&&{onExited:S},s&&{addEndListener:b},{children:typeof c=="function"?(T,j)=>c(T,Object.assign({},j,{ref:h})):m.cloneElement(c,{ref:h})})}const fk=["component"];function hk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}const pk=ue.forwardRef((e,t)=>{let{component:n}=e,r=hk(e,fk);const i=dk(r);return y.jsx(n,Object.assign({ref:t},i))});function mk({in:e,onTransition:t}){const n=m.useRef(null),r=m.useRef(!0),i=Bt(t);return ss(()=>{if(!n.current)return;let a=!1;return i({in:e,element:n.current,initial:r.current,isStale:()=>a}),()=>{a=!0}},[e,i]),ss(()=>(r.current=!1,()=>{r.current=!0}),[]),n}function gk({children:e,in:t,onExited:n,onEntered:r,transition:i}){const[a,o]=m.useState(!t);t&&a&&o(!1);const s=mk({in:!!t,onTransition:l=>{const u=()=>{l.isStale()||(l.in?r==null||r(l.element,l.initial):(o(!0),n==null||n(l.element)))};Promise.resolve(i(l)).then(u,d=>{throw l.in||o(!0),d})}}),c=Xn(s,e.ref);return a&&!t?null:m.cloneElement(e,{ref:c})}function sh(e,t,n){return e?y.jsx(pk,Object.assign({},n,{component:e})):t?y.jsx(gk,Object.assign({},n,{transition:t})):y.jsx(ck,Object.assign({},n))}const vk=["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 yk(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}let sf;function bk(e){return sf||(sf=new Yp({ownerDocument:e==null?void 0:e.document})),sf}function xk(e){const t=fu(),n=e||bk(t),r=m.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:m.useCallback(i=>{r.current.dialog=i},[]),setBackdropRef:m.useCallback(i=>{r.current.backdrop=i},[])})}const Rx=m.forwardRef((e,t)=>{let{show:n=!1,role:r="dialog",className:i,style:a,children:o,backdrop:s=!0,keyboard:c=!0,onBackdropClick:l,onEscapeKeyDown:u,transition:d,runTransition:f,backdropTransition:h,runBackdropTransition:g,autoFocus:p=!0,enforceFocus:v=!0,restoreFocus:w=!0,restoreFocusOptions:_,renderDialog:x,renderBackdrop:S=ee=>y.jsx("div",Object.assign({},ee)),manager:b,container:T,onShow:j,onHide:M=()=>{},onExit:k,onExited:E,onExiting:C,onEnter:O,onEntering:$,onEntered:A}=e,P=yk(e,vk);const D=fu(),N=oh(T),q=xk(b),z=Op(),U=Rb(n),[G,ne]=m.useState(!n),te=m.useRef(null);m.useImperativeHandle(t,()=>q,[q]),io&&!U&&n&&(te.current=af(D==null?void 0:D.document)),n&&G&&ne(!1);const X=Bt(()=>{if(q.add(),L.current=Nr(document,"keydown",F),I.current=Nr(document,"focus",()=>setTimeout(Q),!0),j&&j(),p){var ee,pe;const we=af((ee=(pe=q.dialog)==null?void 0:pe.ownerDocument)!=null?ee:D==null?void 0:D.document);q.dialog&&we&&!us(q.dialog,we)&&(te.current=we,q.dialog.focus())}}),J=Bt(()=>{if(q.remove(),L.current==null||L.current(),I.current==null||I.current(),w){var ee;(ee=te.current)==null||ee.focus==null||ee.focus(_),te.current=null}});m.useEffect(()=>{!n||!N||X()},[n,N,X]),m.useEffect(()=>{G&&J()},[G,J]),jp(()=>{J()});const Q=Bt(()=>{if(!v||!z()||!q.isTopModal())return;const ee=af(D==null?void 0:D.document);q.dialog&&ee&&!us(q.dialog,ee)&&q.dialog.focus()}),re=Bt(ee=>{ee.target===ee.currentTarget&&(l==null||l(ee),s===!0&&M())}),F=Bt(ee=>{c&&Pb(ee)&&q.isTopModal()&&(u==null||u(ee),ee.defaultPrevented||M())}),I=m.useRef(),L=m.useRef(),H=(...ee)=>{ne(!0),E==null||E(...ee)};if(!N)return null;const R=Object.assign({role:r,ref:q.setDialogRef,"aria-modal":r==="dialog"?!0:void 0},P,{style:a,className:i,tabIndex:-1});let K=x?x(R):y.jsx("div",Object.assign({},R,{children:ue.cloneElement(o,{role:"document"})}));K=sh(d,f,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!n,onExit:k,onExiting:C,onExited:H,onEnter:O,onEntering:$,onEntered:A,children:K});let Z=null;return s&&(Z=S({ref:q.setBackdropRef,onClick:re}),Z=sh(h,g,{in:!!n,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:Z})),y.jsx(y.Fragment,{children:oi.createPortal(y.jsxs(y.Fragment,{children:[Z,K]}),N)})});Rx.displayName="Modal";const jx=Object.assign(Rx,{Manager:Yp});function ch(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function _k(e,t){e.classList?e.classList.add(t):ch(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function H0(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function wk(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=H0(e.className,t):e.setAttribute("class",H0(e.className&&e.className.baseVal||"",t))}const ba={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class Px extends Yp{adjustAndStore(t,n,r){const i=n.style[t];n.dataset[t]=i,li(n,{[t]:`${parseFloat(li(n,t))+r}px`})}restore(t,n){const r=n.dataset[t];r!==void 0&&(delete n.dataset[t],li(n,{[t]:r}))}setContainerStyle(t){super.setContainerStyle(t);const n=this.getElement();if(_k(n,"modal-open"),!t.scrollBarWidth)return;const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Dr(n,ba.FIXED_CONTENT).forEach(a=>this.adjustAndStore(r,a,t.scrollBarWidth)),Dr(n,ba.STICKY_CONTENT).forEach(a=>this.adjustAndStore(i,a,-t.scrollBarWidth)),Dr(n,ba.NAVBAR_TOGGLER).forEach(a=>this.adjustAndStore(i,a,t.scrollBarWidth))}removeContainerStyle(t){super.removeContainerStyle(t);const n=this.getElement();wk(n,"modal-open");const r=this.isRTL?"paddingLeft":"paddingRight",i=this.isRTL?"marginLeft":"marginRight";Dr(n,ba.FIXED_CONTENT).forEach(a=>this.restore(r,a)),Dr(n,ba.STICKY_CONTENT).forEach(a=>this.restore(i,a)),Dr(n,ba.NAVBAR_TOGGLER).forEach(a=>this.restore(i,a))}}let cf;function Ix(e){return cf||(cf=new Px(e)),cf}const Dx=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"modal-body"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Dx.displayName="ModalBody";const Gp=ue.createContext({onHide(){}}),Zp=ue.forwardRef(({bsPrefix:e,className:t,contentClassName:n,centered:r,size:i,fullscreen:a,children:o,scrollable:s,...c},l)=>{e=nt(e,"modal");const u=`${e}-dialog`,d=typeof a=="string"?`${e}-fullscreen-${a}`:`${e}-fullscreen`;return y.jsx("div",{...c,ref:l,className:oe(u,t,i&&`${e}-${i}`,r&&`${u}-centered`,s&&`${u}-scrollable`,a&&d),children:y.jsx("div",{className:oe(`${e}-content`,n),children:o})})});Zp.displayName="ModalDialog";const Nx=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"modal-footer"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Nx.displayName="ModalFooter";const Lx=ue.forwardRef(({closeLabel:e="Close",closeVariant:t,closeButton:n=!1,onHide:r,children:i,...a},o)=>{const s=m.useContext(Gp),c=Bt(()=>{s==null||s.onHide(),r==null||r()});return y.jsxs("div",{ref:o,...a,children:[i,n&&y.jsx(cu,{"aria-label":e,variant:t,onClick:c})]})}),Fx=ue.forwardRef(({bsPrefix:e,className:t,closeLabel:n="Close",closeButton:r=!1,...i},a)=>(e=nt(e,"modal-header"),y.jsx(Lx,{ref:a,...i,className:oe(t,e),closeLabel:n,closeButton:r})));Fx.displayName="ModalHeader";const Ck=Ep("h4"),Bx=ue.forwardRef(({className:e,bsPrefix:t,as:n=Ck,...r},i)=>(t=nt(t,"modal-title"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Bx.displayName="ModalTitle";function Tk(e){return y.jsx(di,{...e,timeout:null})}function Sk(e){return y.jsx(di,{...e,timeout:null})}const Ux=ue.forwardRef(({bsPrefix:e,className:t,style:n,dialogClassName:r,contentClassName:i,children:a,dialogAs:o=Zp,"data-bs-theme":s,"aria-labelledby":c,"aria-describedby":l,"aria-label":u,show:d=!1,animation:f=!0,backdrop:h=!0,keyboard:g=!0,onEscapeKeyDown:p,onShow:v,onHide:w,container:_,autoFocus:x=!0,enforceFocus:S=!0,restoreFocus:b=!0,restoreFocusOptions:T,onEntered:j,onExit:M,onExiting:k,onEnter:E,onEntering:C,onExited:O,backdropClassName:$,manager:A,...P},D)=>{const[N,q]=m.useState({}),[z,U]=m.useState(!1),G=m.useRef(!1),ne=m.useRef(!1),te=m.useRef(null),[X,J]=fl(),Q=Xn(D,J),re=Bt(w),F=su();e=nt(e,"modal");const I=m.useMemo(()=>({onHide:re}),[re]);function L(){return A||Ix({isRTL:F})}function H(me){if(!io)return;const ke=L().getScrollbarWidth()>0,tt=me.scrollHeight>ro(me).documentElement.clientHeight;q({paddingRight:ke&&!tt?W0():void 0,paddingLeft:!ke&&tt?W0():void 0})}const R=Bt(()=>{X&&H(X.dialog)});jp(()=>{nh(window,"resize",R),te.current==null||te.current()});const K=()=>{G.current=!0},Z=me=>{G.current&&X&&me.target===X.dialog&&(ne.current=!0),G.current=!1},ee=()=>{U(!0),te.current=kb(X.dialog,()=>{U(!1)})},pe=me=>{me.target===me.currentTarget&&ee()},we=me=>{if(h==="static"){pe(me);return}if(ne.current||me.target!==me.currentTarget){ne.current=!1;return}w==null||w()},ve=me=>{g?p==null||p(me):(me.preventDefault(),h==="static"&&ee())},Le=(me,ke)=>{me&&H(me),E==null||E(me,ke)},Re=me=>{te.current==null||te.current(),M==null||M(me)},Ve=(me,ke)=>{C==null||C(me,ke),kp(window,"resize",R)},ze=me=>{me&&(me.style.display=""),O==null||O(me),nh(window,"resize",R)},ut=m.useCallback(me=>y.jsx("div",{...me,className:oe(`${e}-backdrop`,$,!f&&"show")}),[f,$,e]),at={...n,...N};at.display="block";const de=me=>y.jsx("div",{role:"dialog",...me,style:at,className:oe(t,e,z&&`${e}-static`,!f&&"show"),onClick:h?we:void 0,onMouseUp:Z,"data-bs-theme":s,"aria-label":u,"aria-labelledby":c,"aria-describedby":l,children:y.jsx(o,{...P,onMouseDown:K,className:r,contentClassName:i,children:a})});return y.jsx(Gp.Provider,{value:I,children:y.jsx(jx,{show:d,ref:Q,backdrop:h,container:_,keyboard:!0,autoFocus:x,enforceFocus:S,restoreFocus:b,restoreFocusOptions:T,onEscapeKeyDown:ve,onShow:v,onHide:w,onEnter:Le,onEntering:Ve,onEntered:j,onExit:Re,onExiting:k,onExited:ze,manager:L(),transition:f?Tk:void 0,backdropTransition:f?Sk:void 0,renderBackdrop:ut,renderDialog:de})})});Ux.displayName="Modal";const Mn=Object.assign(Ux,{Body:Dx,Header:Fx,Title:Bx,Footer:Nx,Dialog:Zp,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),kk=()=>{};function Ek(e,t,{disabled:n,clickTrigger:r}={}){const i=t||kk;Xb(e,i,{disabled:n,clickTrigger:r});const a=Bt(o=>{Pb(o)&&i(o)});m.useEffect(()=>{if(n||e==null)return;const o=ro(Zc(e));let s=(o.defaultView||window).event;const c=Nr(o,"keyup",l=>{if(l===s){s=void 0;return}a(l)});return()=>{c()}},[e,n,a])}const Wx=ue.forwardRef((e,t)=>{const{flip:n,offset:r,placement:i,containerPadding:a,popperConfig:o={},transition:s,runTransition:c}=e,[l,u]=fl(),[d,f]=fl(),h=Xn(u,t),g=oh(e.container),p=oh(e.target),[v,w]=m.useState(!e.show),_=Zb(p,l,Qb({placement:i,enableEvents:!!e.show,containerPadding:a||5,flip:n,offset:r,arrowElement:d,popperConfig:o}));e.show&&v&&w(!1);const x=(...C)=>{w(!0),e.onExited&&e.onExited(...C)},S=e.show||!v;if(Ek(l,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!S)return null;const{onExit:b,onExiting:T,onEnter:j,onEntering:M,onEntered:k}=e;let E=e.children(Object.assign({},_.attributes.popper,{style:_.styles.popper,ref:h}),{popper:_,placement:i,show:!!e.show,arrowProps:Object.assign({},_.attributes.arrow,{style:_.styles.arrow,ref:f})});return E=sh(s,c,{in:!!e.show,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:E,onExit:b,onExiting:T,onExited:x,onEnter:j,onEntering:M,onEntered:k}),g?oi.createPortal(E,g):null});Wx.displayName="Overlay";const zx=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"popover-header"),y.jsx(n,{ref:i,className:oe(e,t),...r})));zx.displayName="PopoverHeader";const Kp=ue.forwardRef(({className:e,bsPrefix:t,as:n="div",...r},i)=>(t=nt(t,"popover-body"),y.jsx(n,{ref:i,className:oe(e,t),...r})));Kp.displayName="PopoverBody";function Hx(e,t){let n=e;return e==="left"?n=t?"end":"start":e==="right"&&(n=t?"start":"end"),n}function Vx(e="absolute"){return{position:e,top:"0",left:"0",opacity:"0",pointerEvents:"none"}}const Ok=ue.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:i,body:a,arrowProps:o,hasDoneInitialMeasure:s,popper:c,show:l,...u},d)=>{const f=nt(e,"popover"),h=su(),[g]=(t==null?void 0:t.split("-"))||[],p=Hx(g,h);let v=r;return l&&!s&&(v={...r,...Vx(c==null?void 0:c.strategy)}),y.jsxs("div",{ref:d,role:"tooltip",style:v,"x-placement":g,className:oe(n,f,g&&`bs-popover-${p}`),...u,children:[y.jsx("div",{className:"popover-arrow",...o}),a?y.jsx(Kp,{children:i}):i]})}),Kc=Object.assign(Ok,{Header:zx,Body:Kp,POPPER_OFFSET:[0,8]}),qx=ue.forwardRef(({bsPrefix:e,placement:t="right",className:n,style:r,children:i,arrowProps:a,hasDoneInitialMeasure:o,popper:s,show:c,...l},u)=>{e=nt(e,"tooltip");const d=su(),[f]=(t==null?void 0:t.split("-"))||[],h=Hx(f,d);let g=r;return c&&!o&&(g={...r,...Vx(s==null?void 0:s.strategy)}),y.jsxs("div",{ref:u,style:g,role:"tooltip","x-placement":f,className:oe(n,e,`bs-tooltip-${h}`),...l,children:[y.jsx("div",{className:"tooltip-arrow",...a}),y.jsx("div",{className:`${e}-inner`,children:i})]})});qx.displayName="Tooltip";const Yx=Object.assign(qx,{TOOLTIP_OFFSET:[0,6]});function Mk(e){const t=m.useRef(null),n=nt(void 0,"popover"),r=nt(void 0,"tooltip"),i=m.useMemo(()=>({name:"offset",options:{offset:()=>{if(e)return e;if(t.current){if(ch(t.current,n))return Kc.POPPER_OFFSET;if(ch(t.current,r))return Yx.TOOLTIP_OFFSET}return[0,0]}}}),[e,n,r]);return[t,[i]]}function $k(e,t){const{ref:n}=e,{ref:r}=t;e.ref=n.__wrapped||(n.__wrapped=i=>n(dl(i))),t.ref=r.__wrapped||(r.__wrapped=i=>r(dl(i)))}const Gx=ue.forwardRef(({children:e,transition:t=di,popperConfig:n={},rootClose:r=!1,placement:i="top",show:a=!1,...o},s)=>{const c=m.useRef({}),[l,u]=m.useState(null),[d,f]=Mk(o.offset),h=Xn(s,d),g=t===!0?di:t||void 0,p=Bt(v=>{u(v),n==null||n.onFirstUpdate==null||n.onFirstUpdate(v)});return ss(()=>{l&&o.target&&(c.current.scheduleUpdate==null||c.current.scheduleUpdate())},[l,o.target]),m.useEffect(()=>{a||u(null)},[a]),y.jsx(Wx,{...o,ref:h,popperConfig:{...n,modifiers:f.concat(n.modifiers||[]),onFirstUpdate:p},transition:g,rootClose:r,placement:i,show:a,children:(v,{arrowProps:w,popper:_,show:x})=>{var S;$k(v,w);const b=_==null?void 0:_.placement,T=Object.assign(c.current,{state:_==null?void 0:_.state,scheduleUpdate:_==null?void 0:_.update,placement:b,outOfBoundaries:(_==null||(S=_.state)==null||(S=S.modifiersData.hide)==null?void 0:S.isReferenceHidden)||!1,strategy:n.strategy}),j=!!l;return typeof e=="function"?e({...v,placement:b,show:x,...!t&&x&&{className:"show"},popper:T,arrowProps:w,hasDoneInitialMeasure:j}):ue.cloneElement(e,{...v,placement:b,arrowProps:w,popper:T,hasDoneInitialMeasure:j,className:oe(e.props.className,!t&&x&&"show"),style:{...e.props.style,...v.style}})}})});Gx.displayName="Overlay";function Ak(e){return e&&typeof e=="object"?e:{show:e,hide:e}}function V0(e,t,n){const[r]=t,i=r.currentTarget,a=r.relatedTarget||r.nativeEvent[n];(!a||a!==i)&&!us(i,a)&&e(...t)}V.oneOf(["click","hover","focus"]);const Zx=({trigger:e=["hover","focus"],overlay:t,children:n,popperConfig:r={},show:i,defaultShow:a=!1,onToggle:o,delay:s,placement:c,flip:l=c&&c.indexOf("auto")!==-1,...u})=>{const d=m.useRef(null),f=Xn(d,n.ref),h=g5(),g=m.useRef(""),[p,v]=xb(i,a,o),w=Ak(s),{onFocus:_,onBlur:x,onClick:S}=typeof n!="function"?ue.Children.only(n).props:{},b=P=>{f(dl(P))},T=m.useCallback(()=>{if(h.clear(),g.current="show",!w.show){v(!0);return}h.set(()=>{g.current==="show"&&v(!0)},w.show)},[w.show,v,h]),j=m.useCallback(()=>{if(h.clear(),g.current="hide",!w.hide){v(!1);return}h.set(()=>{g.current==="hide"&&v(!1)},w.hide)},[w.hide,v,h]),M=m.useCallback((...P)=>{T(),_==null||_(...P)},[T,_]),k=m.useCallback((...P)=>{j(),x==null||x(...P)},[j,x]),E=m.useCallback((...P)=>{v(!p),S==null||S(...P)},[S,v,p]),C=m.useCallback((...P)=>{V0(T,P,"fromElement")},[T]),O=m.useCallback((...P)=>{V0(j,P,"toElement")},[j]),$=e==null?[]:[].concat(e),A={ref:b};return $.indexOf("click")!==-1&&(A.onClick=E),$.indexOf("focus")!==-1&&(A.onFocus=M,A.onBlur=k),$.indexOf("hover")!==-1&&(process.env.NODE_ENV!=="production"&&oa($.length>1,'[react-bootstrap] Specifying only the `"hover"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `"focus"` trigger so that touch and keyboard only users can see the overlay as well.'),A.onMouseOver=C,A.onMouseOut=O),y.jsxs(y.Fragment,{children:[typeof n=="function"?n(A):m.cloneElement(n,A),y.jsx(Gx,{...u,show:p,onHide:j,flip:l,placement:c,popperConfig:r,target:d.current,children:t})]})},Xp=ue.forwardRef(({bsPrefix:e,variant:t,animation:n="border",size:r,as:i="div",className:a,...o},s)=>{e=nt(e,"spinner");const c=`${e}-${n}`;return y.jsx(i,{ref:s,...o,className:oe(a,c,r&&`${c}-${r}`,t&&`text-${t}`)})});Xp.displayName="Spinner";var Kx={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},q0=m.createContext&&m.createContext(Kx),Rk=["attr","size","title"];function jk(e,t){if(e==null)return{};var n=Pk(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Pk(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function vl(){return vl=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},vl.apply(this,arguments)}function Y0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y0(Object(n),!0).forEach(function(r){Ik(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y0(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ik(e,t,n){return t=Dk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dk(e){var t=Nk(e,"string");return typeof t=="symbol"?t:t+""}function Nk(e,t){if(typeof e!="object"||!e)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 Xx(e){return e&&e.map((t,n)=>m.createElement(t.tag,yl({key:n},t.attr),Xx(t.child)))}function rt(e){return t=>m.createElement(Lk,vl({attr:yl({},e.attr)},t),Xx(e.child))}function Lk(e){var t=n=>{var{attr:r,size:i,title:a}=e,o=jk(e,Rk),s=i||n.size||"1em",c;return n.className&&(c=n.className),e.className&&(c=(c?c+" ":"")+e.className),m.createElement("svg",vl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:c,style:yl(yl({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&m.createElement("title",null,a),e.children)};return q0!==void 0?m.createElement(q0.Consumer,null,n=>t(n)):t(Kx)}function Fk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function Xs(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}function Bk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M21 12.4V7l-4-4H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.4l8.6-8.6zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zM6 6h9v4H6V6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77l4.99-4.98zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71z"},child:[]}]})(e)}function Uk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"},child:[]}]})(e)}function Wk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"},child:[]}]})(e)}function zk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function Hk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 6v2h8.59L5 17.59 6.41 19 16 9.41V18h2V6z"},child:[]}]})(e)}function Vk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 8h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-4 4v3c0 .22-.03.47-.07.7l-.1.65-.37.65c-.72 1.24-2.04 2-3.46 2s-2.74-.77-3.46-2l-.37-.64-.1-.65A4.27 4.27 0 0 1 8 15v-4c0-.23.03-.48.07-.7l.1-.65.37-.65c.3-.52.72-.97 1.21-1.31l.57-.39.74-.18a3.787 3.787 0 0 1 1.89 0l.68.16.61.42c.5.34.91.78 1.21 1.31l.38.65.1.65c.04.22.07.47.07.69v1zm-6 2h4v2h-4zm0-4h4v2h-4z"},child:[]}]})(e)}function Qx(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"},child:[]}]})(e)}function qk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M4 20h16v2H4zM4 2h16v2H4zM9.41 13.59 8 15l4 4 4-4-1.41-1.41L13 15.17V8.83l1.59 1.58L16 9l-4-4-4 4 1.41 1.41L11 8.83v6.34z"},child:[]}]})(e)}function Yk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.07 12.85c.77-1.39 2.25-2.21 3.11-3.44.91-1.29.4-3.7-2.18-3.7-1.69 0-2.52 1.28-2.87 2.34L6.54 6.96C7.25 4.83 9.18 3 11.99 3c2.35 0 3.96 1.07 4.78 2.41.7 1.15 1.11 3.3.03 4.9-1.2 1.77-2.35 2.31-2.97 3.45-.25.46-.35.76-.35 2.24h-2.89c-.01-.78-.13-2.05.48-3.15zM14 20c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2z"},child:[]}]})(e)}function Gk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16c1.1 0 2-.9 2-2V6a2 2 0 0 0-2-2zm0 14H4V8h16v10zm-2-1h-6v-2h6v2zM7.5 17l-1.41-1.41L8.67 13l-2.59-2.59L7.5 9l4 4-4 4z"},child:[]}]})(e)}function Zk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},child:[]}]})(e)}function Kk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"},child:[]}]})(e)}function Xk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"},child:[]}]})(e)}function Qk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(e)}function Jx(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zM7 9l1.41 1.41L11 7.83V16h2V7.83l2.59 2.58L17 9l-5-5-5 5z"},child:[]}]})(e)}function Jk(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"},child:[]}]})(e)}function eE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"},child:[]}]})(e)}function tE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h4.05l1.83-2h4.24l1.83 2H20v12zM12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0 8c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3z"},child:[]}]})(e)}function nE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.06 9.02.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83a.996.996 0 0 0 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"},child:[]}]})(e)}function rE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M20 4v12H8V4h12m0-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 9.67 1.69 2.26 2.48-3.1L19 15H9zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"},child:[]}]})(e)}function iE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"},child:[]}]})(e)}function aE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6-6-6z"},child:[]}]})(e)}function e2(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"},child:[]}]})(e)}function oE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"},child:[]}]})(e)}function t2(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(e)}function sE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function cE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M24 24H0V0h24v24z",opacity:".87"},child:[]},{tag:"path",attr:{d:"m19 15-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"},child:[]}]})(e)}function lE(e){return rt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{fill:"none"},child:[{tag:"path",attr:{d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M0 0h24v24H0V0z"},child:[]}]},{tag:"path",attr:{d:"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27z"},child:[]}]})(e)}const Kt=m.createContext({cookieDomain:"",axiosOptions:{},language:"",localizationContext:{},texts:{},ProjectIconComponent:{},chartColorPalette:void 0}),n2=m.createContext({show:!1,text:"",textSm:!1,showConfirm:(e,t)=>{},hideConfirm:()=>{}}),r2=m.createContext({isShown:!1,text:"",hidePrompt:()=>{},showPrompt:()=>{},resolveRef:{current:()=>{}},options:{input:"textarea",type:"text"},setOptions:()=>{}}),i2=()=>{const{isShown:e,text:t,showPrompt:n,hidePrompt:r,resolveRef:i,setOptions:a}=m.useContext(r2),o=m.useCallback(c=>{r(),i.current(c)},[r,i]),s=m.useCallback(async(c,l)=>(a(u=>({...u,...l})),n(c),new Promise(u=>{i.current=u})),[i,a,n]);return{isShown:e,text:t,prompt:s,onFinish:o}};let uE={data:""},dE=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||uE,fE=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,hE=/\/\*[^]*?\*\/| +/g,G0=/\n+/g,ii=(e,t)=>{let n="",r="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?n=a+" "+o+";":r+=a[1]=="f"?ii(o,a):a+"{"+ii(o,a[1]=="k"?"":t)+"}":typeof o=="object"?r+=ii(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ii.p?ii.p(a,o):a+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Ar={},a2=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+a2(e[n]);return t}return e},pE=(e,t,n,r,i)=>{let a=a2(e),o=Ar[a]||(Ar[a]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(a));if(!Ar[o]){let c=a!==e?e:(l=>{let u,d,f=[{}];for(;u=fE.exec(l.replace(hE,""));)u[4]?f.shift():u[3]?(d=u[3].replace(G0," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(G0," ").trim();return f[0]})(e);Ar[o]=ii(i?{["@keyframes "+o]:c}:c,n?"":"."+o)}let s=n&&Ar.g?Ar.g:null;return n&&(Ar.g=Ar[o]),((c,l,u,d)=>{d?l.data=l.data.replace(d,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Ar[o],t,r,s),o},mE=(e,t,n)=>e.reduce((r,i,a)=>{let o=t[a];if(o&&o.call){let s=o(n),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=c?"."+c:s&&typeof s=="object"?s.props?"":ii(s,""):s===!1?"":s}return r+i+(o??"")},"");function vu(e){let t=this||{},n=e.call?e(t.p):e;return pE(n.unshift?n.raw?mE(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,dE(t.target),t.g,t.o,t.k)}let o2,lh,uh;vu.bind({g:1});let Hr=vu.bind({k:1});function gE(e,t,n,r){ii.p=t,o2=e,lh=n,uh=r}function Ci(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),c=s.className||i.className;n.p=Object.assign({theme:lh&&lh()},s),n.o=/ *go\d+/.test(c),s.className=vu.apply(n,r)+(c?" "+c:"");let l=e;return e[0]&&(l=s.as||e,delete s.as),uh&&l[0]&&uh(s),o2(l,s)}return i}}var vE=e=>typeof e=="function",bl=(e,t)=>vE(e)?e(t):e,yE=(()=>{let e=0;return()=>(++e).toString()})(),s2=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),bE=20,Xc=new Map,xE=1e3,Z0=e=>{if(Xc.has(e))return;let t=setTimeout(()=>{Xc.delete(e),sa({type:4,toastId:e})},xE);Xc.set(e,t)},_E=e=>{let t=Xc.get(e);t&&clearTimeout(t)},dh=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,bE)};case 1:return t.toast.id&&_E(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:n}=t;return e.toasts.find(a=>a.id===n.id)?dh(e,{type:1,toast:n}):dh(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?Z0(r):e.toasts.forEach(a=>{Z0(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Qc=[],Jc={toasts:[],pausedAt:void 0},sa=e=>{Jc=dh(Jc,e),Qc.forEach(t=>{t(Jc)})},wE={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},CE=(e={})=>{let[t,n]=m.useState(Jc);m.useEffect(()=>(Qc.push(n),()=>{let i=Qc.indexOf(n);i>-1&&Qc.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var a,o;return{...e,...e[i.type],...i,duration:i.duration||((a=e[i.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||wE[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},TE=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||yE()}),Qs=e=>(t,n)=>{let r=TE(t,e,n);return sa({type:2,toast:r}),r.id},Dn=(e,t)=>Qs("blank")(e,t);Dn.error=Qs("error");Dn.success=Qs("success");Dn.loading=Qs("loading");Dn.custom=Qs("custom");Dn.dismiss=e=>{sa({type:3,toastId:e})};Dn.remove=e=>sa({type:4,toastId:e});Dn.promise=(e,t,n)=>{let r=Dn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Dn.success(bl(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Dn.error(bl(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var SE=(e,t)=>{sa({type:1,toast:{id:e,height:t}})},kE=()=>{sa({type:5,time:Date.now()})},EE=e=>{let{toasts:t,pausedAt:n}=CE(e);m.useEffect(()=>{if(n)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let c=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(c<0){s.visible&&Dn.dismiss(s.id);return}return setTimeout(()=>Dn.dismiss(s.id),c)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=m.useCallback(()=>{n&&sa({type:6,time:Date.now()})},[n]),i=m.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:c=8,defaultPosition:l}=o||{},u=t.filter(h=>(h.position||l)===(a.position||l)&&h.height),d=u.findIndex(h=>h.id===a.id),f=u.filter((h,g)=>g<d&&h.visible).length;return u.filter(h=>h.visible).slice(...s?[f+1]:[0,f]).reduce((h,g)=>h+(g.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:SE,startPause:kE,endPause:r,calculateOffset:i}}},OE=Hr`
|
|
54
54
|
from {
|
|
55
55
|
transform: scale(0) rotate(45deg);
|
|
56
56
|
opacity: 0;
|
|
@@ -58,7 +58,7 @@ from {
|
|
|
58
58
|
to {
|
|
59
59
|
transform: scale(1) rotate(45deg);
|
|
60
60
|
opacity: 1;
|
|
61
|
-
}
|
|
61
|
+
}`,ME=Hr`
|
|
62
62
|
from {
|
|
63
63
|
transform: scale(0);
|
|
64
64
|
opacity: 0;
|
|
@@ -66,7 +66,7 @@ from {
|
|
|
66
66
|
to {
|
|
67
67
|
transform: scale(1);
|
|
68
68
|
opacity: 1;
|
|
69
|
-
}
|
|
69
|
+
}`,$E=Hr`
|
|
70
70
|
from {
|
|
71
71
|
transform: scale(0) rotate(90deg);
|
|
72
72
|
opacity: 0;
|
|
@@ -74,7 +74,7 @@ from {
|
|
|
74
74
|
to {
|
|
75
75
|
transform: scale(1) rotate(90deg);
|
|
76
76
|
opacity: 1;
|
|
77
|
-
}`,
|
|
77
|
+
}`,AE=Ci("div")`
|
|
78
78
|
width: 20px;
|
|
79
79
|
opacity: 0;
|
|
80
80
|
height: 20px;
|
|
@@ -83,14 +83,14 @@ to {
|
|
|
83
83
|
position: relative;
|
|
84
84
|
transform: rotate(45deg);
|
|
85
85
|
|
|
86
|
-
animation: ${
|
|
86
|
+
animation: ${OE} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
87
87
|
forwards;
|
|
88
88
|
animation-delay: 100ms;
|
|
89
89
|
|
|
90
90
|
&:after,
|
|
91
91
|
&:before {
|
|
92
92
|
content: '';
|
|
93
|
-
animation: ${
|
|
93
|
+
animation: ${ME} 0.15s ease-out forwards;
|
|
94
94
|
animation-delay: 150ms;
|
|
95
95
|
position: absolute;
|
|
96
96
|
border-radius: 3px;
|
|
@@ -103,18 +103,18 @@ to {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
&:before {
|
|
106
|
-
animation: ${
|
|
106
|
+
animation: ${$E} 0.15s ease-out forwards;
|
|
107
107
|
animation-delay: 180ms;
|
|
108
108
|
transform: rotate(90deg);
|
|
109
109
|
}
|
|
110
|
-
`,
|
|
110
|
+
`,RE=Hr`
|
|
111
111
|
from {
|
|
112
112
|
transform: rotate(0deg);
|
|
113
113
|
}
|
|
114
114
|
to {
|
|
115
115
|
transform: rotate(360deg);
|
|
116
116
|
}
|
|
117
|
-
`,
|
|
117
|
+
`,jE=Ci("div")`
|
|
118
118
|
width: 12px;
|
|
119
119
|
height: 12px;
|
|
120
120
|
box-sizing: border-box;
|
|
@@ -122,8 +122,8 @@ to {
|
|
|
122
122
|
border-radius: 100%;
|
|
123
123
|
border-color: ${e=>e.secondary||"#e0e0e0"};
|
|
124
124
|
border-right-color: ${e=>e.primary||"#616161"};
|
|
125
|
-
animation: ${
|
|
126
|
-
`,
|
|
125
|
+
animation: ${RE} 1s linear infinite;
|
|
126
|
+
`,PE=Hr`
|
|
127
127
|
from {
|
|
128
128
|
transform: scale(0) rotate(45deg);
|
|
129
129
|
opacity: 0;
|
|
@@ -131,7 +131,7 @@ from {
|
|
|
131
131
|
to {
|
|
132
132
|
transform: scale(1) rotate(45deg);
|
|
133
133
|
opacity: 1;
|
|
134
|
-
}`,
|
|
134
|
+
}`,IE=Hr`
|
|
135
135
|
0% {
|
|
136
136
|
height: 0;
|
|
137
137
|
width: 0;
|
|
@@ -145,7 +145,7 @@ to {
|
|
|
145
145
|
100% {
|
|
146
146
|
opacity: 1;
|
|
147
147
|
height: 10px;
|
|
148
|
-
}`,
|
|
148
|
+
}`,DE=Ci("div")`
|
|
149
149
|
width: 20px;
|
|
150
150
|
opacity: 0;
|
|
151
151
|
height: 20px;
|
|
@@ -154,13 +154,13 @@ to {
|
|
|
154
154
|
position: relative;
|
|
155
155
|
transform: rotate(45deg);
|
|
156
156
|
|
|
157
|
-
animation: ${
|
|
157
|
+
animation: ${PE} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
158
158
|
forwards;
|
|
159
159
|
animation-delay: 100ms;
|
|
160
160
|
&:after {
|
|
161
161
|
content: '';
|
|
162
162
|
box-sizing: border-box;
|
|
163
|
-
animation: ${
|
|
163
|
+
animation: ${IE} 0.2s ease-out forwards;
|
|
164
164
|
opacity: 0;
|
|
165
165
|
animation-delay: 200ms;
|
|
166
166
|
position: absolute;
|
|
@@ -172,16 +172,16 @@ to {
|
|
|
172
172
|
height: 10px;
|
|
173
173
|
width: 6px;
|
|
174
174
|
}
|
|
175
|
-
`,
|
|
175
|
+
`,NE=Ci("div")`
|
|
176
176
|
position: absolute;
|
|
177
|
-
`,
|
|
177
|
+
`,LE=Ci("div")`
|
|
178
178
|
position: relative;
|
|
179
179
|
display: flex;
|
|
180
180
|
justify-content: center;
|
|
181
181
|
align-items: center;
|
|
182
182
|
min-width: 20px;
|
|
183
183
|
min-height: 20px;
|
|
184
|
-
`,
|
|
184
|
+
`,FE=Hr`
|
|
185
185
|
from {
|
|
186
186
|
transform: scale(0.6);
|
|
187
187
|
opacity: 0.4;
|
|
@@ -189,20 +189,20 @@ from {
|
|
|
189
189
|
to {
|
|
190
190
|
transform: scale(1);
|
|
191
191
|
opacity: 1;
|
|
192
|
-
}`,
|
|
192
|
+
}`,BE=Ci("div")`
|
|
193
193
|
position: relative;
|
|
194
194
|
transform: scale(0.6);
|
|
195
195
|
opacity: 0.4;
|
|
196
196
|
min-width: 20px;
|
|
197
|
-
animation: ${
|
|
197
|
+
animation: ${FE} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
198
198
|
forwards;
|
|
199
|
-
`,
|
|
199
|
+
`,UE=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?ue.createElement(BE,null,t):t:n==="blank"?null:ue.createElement(LE,null,ue.createElement(jE,{...r}),n!=="loading"&&ue.createElement(NE,null,n==="error"?ue.createElement(AE,{...r}):ue.createElement(DE,{...r})))},WE=e=>`
|
|
200
200
|
0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
|
|
201
201
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
202
|
-
`,
|
|
202
|
+
`,zE=e=>`
|
|
203
203
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
204
204
|
100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
|
|
205
|
-
`,
|
|
205
|
+
`,HE="0%{opacity:0;} 100%{opacity:1;}",VE="0%{opacity:1;} 100%{opacity:0;}",qE=Ci("div")`
|
|
206
206
|
display: flex;
|
|
207
207
|
align-items: center;
|
|
208
208
|
background: #fff;
|
|
@@ -214,45 +214,45 @@ to {
|
|
|
214
214
|
pointer-events: auto;
|
|
215
215
|
padding: 8px 10px;
|
|
216
216
|
border-radius: 8px;
|
|
217
|
-
`,
|
|
217
|
+
`,YE=Ci("div")`
|
|
218
218
|
display: flex;
|
|
219
219
|
justify-content: center;
|
|
220
220
|
margin: 4px 10px;
|
|
221
221
|
color: inherit;
|
|
222
222
|
flex: 1 1 auto;
|
|
223
223
|
white-space: pre-line;
|
|
224
|
-
`,
|
|
224
|
+
`,GE=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=s2()?[HE,VE]:[WE(n),zE(n)];return{animation:t?`${Hr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Hr(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},ZE=ue.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?GE(e.position||t||"top-center",e.visible):{opacity:0},a=ue.createElement(UE,{toast:e}),o=ue.createElement(YE,{...e.ariaProps},bl(e.message,e));return ue.createElement(qE,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:a,message:o}):ue.createElement(ue.Fragment,null,a,o))});gE(ue.createElement);var KE=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let a=ue.useCallback(o=>{if(o){let s=()=>{let c=o.getBoundingClientRect().height;r(e,c)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return ue.createElement("div",{ref:a,className:t,style:n},i)},XE=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:s2()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},QE=vu`
|
|
225
225
|
z-index: 9999;
|
|
226
226
|
> * {
|
|
227
227
|
pointer-events: auto;
|
|
228
228
|
}
|
|
229
|
-
`,$c=16,eO=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:c}=OE(n);return ue.createElement("div",{style:{position:"fixed",zIndex:9999,top:$c,left:$c,right:$c,bottom:$c,pointerEvents:"none",...a},className:o,onMouseEnter:c.startPause,onMouseLeave:c.endPause},s.map(l=>{let u=l.position||t,d=c.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),f=QE(u,d);return ue.createElement(XE,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?JE:"",style:f},l.type==="custom"?bl(l.message,l):i?i(l):ue.createElement(KE,{toast:l,position:u}))}))},xa=Dn;const yu=m.createContext({isLoading:!1,startLoading:e=>{},stopLoading:e=>{}});var fh;(function(e){e[e.LOGGING_IN=0]="LOGGING_IN",e[e.LOGGED_IN=1]="LOGGED_IN",e[e.LOGGED_OUT=2]="LOGGED_OUT",e[e.LOGIN_FAILED=3]="LOGIN_FAILED"})(fh||(fh={}));const c2=fh;var hh;(function(e){e[e.Odebrano=-2]="Odebrano",e[e.Zamitnuto=-1]="Zamitnuto",e[e.Nevyrizeno=0]="Nevyrizeno",e[e.Schvaleno=1]="Schvaleno"})(hh||(hh={}));const tO=hh,l2=m.createContext({user:null,userLoginState:{state:c2.LOGGED_OUT,user:null},loginUser:()=>Promise.resolve(!0),logoutUser:()=>{}}),bu=m.createContext({useMsal:!1,msalInstance:null,msalScopes:[],msalExtraScopes:[],getToken:async()=>null}),u2=m.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}}),xl=e=>e==null?!0:!(typeof e=="object"||typeof e=="function"),d2=e=>{xl(e)||Object.keys(e).forEach(t=>{const n=e[t];if(xl(n))return;const r=Object.keys(n);r.includes("id")&&r.length===1&&n.id===null?e[t]=null:d2(n)})},f2=e=>Object.values(e).every(t=>t===null),nO=e=>{const t={};return Object.entries(e).forEach(([n,r])=>{r&&typeof r=="object"&&f2(r)?t[n]=null:t[n]=r}),t},Qp=e=>{var n;const t=(n=e.response)==null?void 0:n.data;return t&&t.errorFields&&t.errorFields.length>0?t.errorFields.map(r=>({name:r.name.split(".").map(a=>`${a.charAt(0).toLowerCase()}${a.slice(1)}`).join("."),errors:r.errors})):[]},rO=(e,t)=>{Qp(t).forEach(r=>{e.setError(r.name,{message:r.errors,type:"server"},{shouldFocus:!0}),xl(e.getValues(r.name))||e.setError(`${r.name}.id`,{message:r.errors,type:"server"},{shouldFocus:!0})})},h2=e=>{var n;const t=(n=e.response)==null?void 0:n.data;return t!=null&&t.permissions&&t.permissions.length>0?t.permissions:null},p2=({heading:e,content:t,placement:n,children:r,trigger:i=["hover"],popoverClassName:a,small:o,delay:s,...c})=>{const l=i.includes("hover")&&!i.includes("focus")?[...i,"focus"]:i;return y.jsx(Zx,{placement:n,overlay:y.jsxs(Kc,{className:oe("luminus-popover",{"luminus-popover-sm":o},a),onClick:u=>u.stopPropagation(),children:[e&&y.jsx(Kc.Header,{children:typeof e=="string"?y.jsx(_n,{variant:"h6",className:"text-primary",children:e}):e}),y.jsx(Kc.Body,{children:t})]}),trigger:l,rootClose:!0,show:c.controlled?c.isOpen:void 0,onToggle:c.controlled?u=>c.setIsOpen(u):void 0,delay:s,children:r})},iO="_h1_14r4v_1",aO="_h3_14r4v_8",oO="_h6_14r4v_15",sO="_subtitle_14r4v_22",cO="_body_14r4v_29",lO="_body2_14r4v_36",uO="_caption_14r4v_43",dO="_form-label_14r4v_50",Qr={h1:iO,h3:aO,h6:oO,subtitle:sO,body:cO,body2:lO,caption:uO,"form-label":"_form-label_14r4v_50",formLabel:dO},fO=({variant:e,className:t,children:n})=>{switch(e){case"h1":return y.jsx("h1",{className:oe("luminus-text-primary luminus-h1",Qr.h1,t),children:n});case"h3":return y.jsx("h3",{className:oe("luminus-text luminus-h3",Qr.h3,t),children:n});case"h6":return y.jsx("h6",{className:oe("luminus-text luminus-h6",Qr.h6,t),children:n});case"subtitle":return y.jsx("div",{className:oe("luminus-text luminus-subtitle",Qr.subtitle,t),children:n});case"body":return y.jsx("div",{className:oe("luminus-text luminus-body",Qr.body,t),children:n});case"body2":return y.jsx("div",{className:oe("luminus-text luminus-body2",Qr.body2,t),children:n});case"caption":return y.jsx("div",{className:oe("luminus-text-muted luminus-caption",Qr.caption,t),children:n});case"form-label":return y.jsx("div",{className:oe("luminus-text luminus-form-label",Qr.formLabel,t),children:n});default:return y.jsx(y.Fragment,{children:n})}},_n=({variant:e,className:t,children:n})=>y.jsx(fO,{variant:e,className:t,children:n}),Jp=({text:e,placement:t,children:n,delay:r})=>y.jsx(p2,{content:y.jsx(_n,{variant:"body2",className:"text-center",children:e}),placement:t,delay:r,small:!0,children:n}),m2=e=>e.length<300?e:e.substring(0,300)+"...",Va=e=>e<1024?`${e.toFixed(2)} bytes`:e>=1024&&e<1048576?`${(e/1024).toFixed(1)} kB`:`${(e/1048576).toFixed(1)} MB`;function fs(e=" ",...t){return t.filter(n=>n!=null&&n.length>0).join(e)}const ph=(e,t)=>e.map(n=>`&${t}=${n}`).join("").substring(1),hO=(e,t)=>e===null?null:e.length<=t?e:e.slice(0,t)+"…";function pO(e){return e==null?"":_p(au(e),"dd.MM.yyyy")}function xu(e){return(e==null?void 0:e.toString().split("T")[0])??""}function mO(e){return e==null?"":_p(au(e),"dd.MM.yyyy HH:mm")}function gO(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}const vO=(e,t)=>fs(" ",e?`${e},`:void 0,t),yO=(e,t)=>`${t}${e!=null?` (${e})`:""}`,bO=(e,t)=>`[${e??""}] ${t??""}`,g2=e=>decodeURIComponent(atob(e).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")),v2=e=>{const t=au(e);return!Number.isNaN(t.getTime())};function xO(){const e=new Date,t=new Date(e);return t.setHours(24,0,0,0),t.getTime()-e.getTime()}function _O(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function wO(e,t){const n=new Date(e),r=new Date(t);return n.setHours(0,0,0,0),r.setHours(0,0,0,0),n.getTime()-r.getTime()}function CO(e,t){const n=new Date(e),r=new Date(t);return n.getTime()-r.getTime()}function TO(e=Date.now(),t=Date.now()){const n=new Date(e),r=new Date(t);n.setHours(10,0,0,0),r.setHours(0,0,0,0);const i=n.getTime()-r.getTime();return Math.floor(i/(1e3*3600*24))}function y2(e=new Date){const t=new Date(e);return t.setUTCDate(1),t}function b2(e=new Date){return hT(e)}function SO(e){const t=new Date;return t.setUTCMonth(t.getUTCMonth()+e),y2(t)}function kO(e){const t=new Date;return t.setUTCMonth(t.getUTCMonth()+e),b2(t)}function EO(e){const t=e??new Date().getFullYear(),n=new Date(t,0,1);return n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n}function OO(e){const t=e??new Date().getFullYear(),n=new Date(t,11,31);return n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n}function MO(e){return xu(e.toISOString())}function x2(e){const t=/filename\*?=(?:UTF-8''|")?(.*?)(?:''|")?(?:;|$)/i,n=e.match(t);if(n&&n[1]){let r=n[1];const i=/=\?([^?]+)\?([BbQq])\?([^?]+)\?=/,a=r.match(i);if(a){const o=a[2].toUpperCase(),s=a[3];try{return o==="B"?r=g2(s):o==="Q"&&(r=s.replace(/_/g," ").replace(/=([A-Fa-f0-9]{2})/g,(c,l)=>String.fromCharCode(parseInt(l,16)))),decodeURIComponent(r)}catch(c){return console.error("Error decoding MIME encoded filename:",c),r}}try{return decodeURIComponent(r)}catch(o){return console.error("Error decoding filename:",o),r}}return null}function _l(e,t,n=!0){const r=URL.createObjectURL(e),i=document.createElement("a");i.href=r,i.setAttribute("style","display: none"),n?(window.open(r,"_blank","noopener,noreferrer"),setTimeout(()=>URL.revokeObjectURL(r),6e4)):(i.setAttribute("download",t),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r))}const $O=["application/pdf","text/plain","text/html","application/xml","text/xml","image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/bmp","image/x-icon","audio/mpeg","audio/wav","audio/ogg","audio/mp4","video/mp4","video/webm","video/ogg"],AO=["pdf","txt","html","xml","jpg","jpeg","png","gif","webp","svg","bmp","ico","mp3","wav","ogg","m4a","mp4","webm","ogv"],_2=e=>$O.includes(e.type),w2=e=>AO.includes(e.toLowerCase());function RO(e,t){let n=(t==null?void 0:t.forcedName)??(t==null?void 0:t.fallbackName)??"file";if((t==null?void 0:t.forcedName)===void 0&&typeof e.headers.get=="function"){const a=e.headers.get("Content-disposition");typeof a=="string"&&a.length>0&&(n=x2(e.headers.get("Content-disposition"))??n)}const r=_2(e.data),i=(t==null?void 0:t.tryToOpen)===void 0?localStorage.getItem("file-download-try-opening")!=="false":t.tryToOpen;_l(e.data,n,r?i:!1)}function qa(e,t=qa.characters){return e.replace(/[^A-Za-z0-9]/g,function(n){return t[n]||n})}qa.characters={Á:"A",Ă:"A",Ắ:"A",Ặ:"A",Ằ:"A",Ẳ:"A",Ẵ:"A",Ǎ:"A",Â:"A",Ấ:"A",Ậ:"A",Ầ:"A",Ẩ:"A",Ẫ:"A",Ä:"A",Ǟ:"A",Ȧ:"A",Ǡ:"A",Ạ:"A",Ȁ:"A",À:"A",Ả:"A",Ȃ:"A",Ā:"A",Ą:"A",Å:"A",Ǻ:"A",Ḁ:"A","Ⱥ":"A",Ã:"A","Ꜳ":"AA",Æ:"AE",Ǽ:"AE",Ǣ:"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY",Ḃ:"B",Ḅ:"B",Ɓ:"B",Ḇ:"B","Ƀ":"B",Ƃ:"B",Ć:"C",Č:"C",Ç:"C",Ḉ:"C",Ĉ:"C",Ċ:"C",Ƈ:"C","Ȼ":"C",Ď:"D",Ḑ:"D",Ḓ:"D",Ḋ:"D",Ḍ:"D",Ɗ:"D",Ḏ:"D",Dz:"D",Dž:"D",Đ:"D",Ð:"D",Ƌ:"D",DZ:"DZ",DŽ:"DZ",É:"E",Ĕ:"E",Ě:"E",Ȩ:"E",Ḝ:"E",Ê:"E",Ế:"E",Ệ:"E",Ề:"E",Ể:"E",Ễ:"E",Ḙ:"E",Ë:"E",Ė:"E",Ẹ:"E",Ȅ:"E",È:"E",Ẻ:"E",Ȇ:"E",Ē:"E",Ḗ:"E",Ḕ:"E",Ę:"E","Ɇ":"E",Ẽ:"E",Ḛ:"E","Ꝫ":"ET",Ḟ:"F",Ƒ:"F",Ǵ:"G",Ğ:"G",Ǧ:"G",Ģ:"G",Ĝ:"G",Ġ:"G",Ɠ:"G",Ḡ:"G",Ǥ:"G",Ḫ:"H",Ȟ:"H",Ḩ:"H",Ĥ:"H","Ⱨ":"H",Ḧ:"H",Ḣ:"H",Ḥ:"H",Ħ:"H",Í:"I",Ĭ:"I",Ǐ:"I",Î:"I",Ï:"I",Ḯ:"I",İ:"I",Ị:"I",Ȉ:"I",Ì:"I",Ỉ:"I",Ȋ:"I",Ī:"I",Į:"I",Ɨ:"I",Ĩ:"I",Ḭ:"I",І:"I","Ꝺ":"D","Ꝼ":"F","Ᵹ":"G","Ꞃ":"R","Ꞅ":"S","Ꞇ":"T","Ꝭ":"IS",Ĵ:"J","Ɉ":"J",Ḱ:"K",Ǩ:"K",Ķ:"K","Ⱪ":"K","Ꝃ":"K",Ḳ:"K",Ƙ:"K",Ḵ:"K","Ꝁ":"K","Ꝅ":"K",Ĺ:"L","Ƚ":"L",Ľ:"L",Ļ:"L",Ḽ:"L",Ḷ:"L",Ḹ:"L","Ⱡ":"L","Ꝉ":"L",Ḻ:"L",Ŀ:"L","Ɫ":"L",Lj:"L",Ł:"L",LJ:"LJ",Ḿ:"M",Ṁ:"M",Ṃ:"M","Ɱ":"M",Ń:"N",Ň:"N",Ņ:"N",Ṋ:"N",Ṅ:"N",Ṇ:"N",Ǹ:"N",Ɲ:"N",Ṉ:"N","Ƞ":"N",Nj:"N",Ñ:"N",NJ:"NJ",Ó:"O",Ŏ:"O",Ǒ:"O",Ô:"O",Ố:"O",Ộ:"O",Ồ:"O",Ổ:"O",Ỗ:"O",Ö:"O",Ȫ:"O",Ȯ:"O",Ȱ:"O",Ọ:"O",Ő:"O",Ȍ:"O",Ò:"O",Ỏ:"O",Ơ:"O",Ớ:"O",Ợ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ȏ:"O","Ꝋ":"O","Ꝍ":"O",Ō:"O",Ṓ:"O",Ṑ:"O",Ɵ:"O",Ǫ:"O",Ǭ:"O",Ø:"O",Ǿ:"O",Õ:"O",Ṍ:"O",Ṏ:"O",Ȭ:"O",Ƣ:"OI","Ꝏ":"OO",Ɛ:"E",Ɔ:"O",Ȣ:"OU",Ṕ:"P",Ṗ:"P","Ꝓ":"P",Ƥ:"P","Ꝕ":"P","Ᵽ":"P","Ꝑ":"P","Ꝙ":"Q","Ꝗ":"Q",Ŕ:"R",Ř:"R",Ŗ:"R",Ṙ:"R",Ṛ:"R",Ṝ:"R",Ȑ:"R",Ȓ:"R",Ṟ:"R","Ɍ":"R","Ɽ":"R","Ꜿ":"C",Ǝ:"E",Ś:"S",Ṥ:"S",Š:"S",Ṧ:"S",Ş:"S",Ŝ:"S",Ș:"S",Ṡ:"S",Ṣ:"S",Ṩ:"S",ß:"ss",Ť:"T",Ţ:"T",Ṱ:"T",Ț:"T","Ⱦ":"T",Ṫ:"T",Ṭ:"T",Ƭ:"T",Ṯ:"T",Ʈ:"T",Ŧ:"T","Ɐ":"A","Ꞁ":"L",Ɯ:"M","Ʌ":"V","Ꜩ":"TZ",Ú:"U",Ŭ:"U",Ǔ:"U",Û:"U",Ṷ:"U",Ü:"U",Ǘ:"U",Ǚ:"U",Ǜ:"U",Ǖ:"U",Ṳ:"U",Ụ:"U",Ű:"U",Ȕ:"U",Ù:"U",Ủ:"U",Ư:"U",Ứ:"U",Ự:"U",Ừ:"U",Ử:"U",Ữ:"U",Ȗ:"U",Ū:"U",Ṻ:"U",Ų:"U",Ů:"U",Ũ:"U",Ṹ:"U",Ṵ:"U","Ꝟ":"V",Ṿ:"V",Ʋ:"V",Ṽ:"V","Ꝡ":"VY",Ẃ:"W",Ŵ:"W",Ẅ:"W",Ẇ:"W",Ẉ:"W",Ẁ:"W","Ⱳ":"W",Ẍ:"X",Ẋ:"X",Ý:"Y",Ŷ:"Y",Ÿ:"Y",Ẏ:"Y",Ỵ:"Y",Ỳ:"Y",Ƴ:"Y",Ỷ:"Y","Ỿ":"Y",Ȳ:"Y","Ɏ":"Y",Ỹ:"Y",Ї:"YI",Ź:"Z",Ž:"Z",Ẑ:"Z","Ⱬ":"Z",Ż:"Z",Ẓ:"Z",Ȥ:"Z",Ẕ:"Z",Ƶ:"Z",Þ:"TH",IJ:"IJ",Œ:"OE","ᴀ":"A","ᴁ":"AE",ʙ:"B","ᴃ":"B","ᴄ":"C","ᴅ":"D","ᴇ":"E","ꜰ":"F",ɢ:"G",ʛ:"G",ʜ:"H",ɪ:"I",ʁ:"R","ᴊ":"J","ᴋ":"K",ʟ:"L","ᴌ":"L","ᴍ":"M",ɴ:"N","ᴏ":"O",ɶ:"OE","ᴐ":"O","ᴕ":"OU","ᴘ":"P",ʀ:"R","ᴎ":"N","ᴙ":"R","ꜱ":"S","ᴛ":"T","ⱻ":"E","ᴚ":"R","ᴜ":"U","ᴠ":"V","ᴡ":"W",ʏ:"Y","ᴢ":"Z",á:"a",ă:"a",ắ:"a",ặ:"a",ằ:"a",ẳ:"a",ẵ:"a",ǎ:"a",â:"a",ấ:"a",ậ:"a",ầ:"a",ẩ:"a",ẫ:"a",ä:"a",ǟ:"a",ȧ:"a",ǡ:"a",ạ:"a",ȁ:"a",à:"a",ả:"a",ȃ:"a",ā:"a",ą:"a","ᶏ":"a",ẚ:"a",å:"a",ǻ:"a",ḁ:"a","ⱥ":"a",ã:"a","ꜳ":"aa",æ:"ae",ǽ:"ae",ǣ:"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay",ḃ:"b",ḅ:"b",ɓ:"b",ḇ:"b","ᵬ":"b","ᶀ":"b",ƀ:"b",ƃ:"b",ɵ:"o",ć:"c",č:"c",ç:"c",ḉ:"c",ĉ:"c",ɕ:"c",ċ:"c",ƈ:"c","ȼ":"c",ď:"d",ḑ:"d",ḓ:"d","ȡ":"d",ḋ:"d",ḍ:"d",ɗ:"d","ᶑ":"d",ḏ:"d","ᵭ":"d","ᶁ":"d",đ:"d",ɖ:"d",ƌ:"d",ð:"d",ı:"i","ȷ":"j",ɟ:"j",ʄ:"j",dz:"dz",dž:"dz",é:"e",ĕ:"e",ě:"e",ȩ:"e",ḝ:"e",ê:"e",ế:"e",ệ:"e",ề:"e",ể:"e",ễ:"e",ḙ:"e",ë:"e",ė:"e",ẹ:"e",ȅ:"e",è:"e",ẻ:"e",ȇ:"e",ē:"e",ḗ:"e",ḕ:"e","ⱸ":"e",ę:"e","ᶒ":"e","ɇ":"e",ẽ:"e",ḛ:"e","ꝫ":"et",ḟ:"f",ƒ:"f","ᵮ":"f","ᶂ":"f",ǵ:"g",ğ:"g",ǧ:"g",ģ:"g",ĝ:"g",ġ:"g",ɠ:"g",ḡ:"g","ᶃ":"g",ǥ:"g",ḫ:"h",ȟ:"h",ḩ:"h",ĥ:"h","ⱨ":"h",ḧ:"h",ḣ:"h",ḥ:"h",ɦ:"h",ẖ:"h",ħ:"h",ƕ:"hv",í:"i",ĭ:"i",ǐ:"i",î:"i",ï:"i",ḯ:"i",ị:"i",ȉ:"i",ì:"i",ỉ:"i",ȋ:"i",ī:"i",į:"i","ᶖ":"i",ɨ:"i",ĩ:"i",ḭ:"i",і:"i","ꝺ":"d","ꝼ":"f","ᵹ":"g","ꞃ":"r","ꞅ":"s","ꞇ":"t","ꝭ":"is",ǰ:"j",ĵ:"j",ʝ:"j","ɉ":"j",ḱ:"k",ǩ:"k",ķ:"k","ⱪ":"k","ꝃ":"k",ḳ:"k",ƙ:"k",ḵ:"k","ᶄ":"k","ꝁ":"k","ꝅ":"k",ĺ:"l",ƚ:"l",ɬ:"l",ľ:"l",ļ:"l",ḽ:"l","ȴ":"l",ḷ:"l",ḹ:"l","ⱡ":"l","ꝉ":"l",ḻ:"l",ŀ:"l",ɫ:"l","ᶅ":"l",ɭ:"l",ł:"l",lj:"lj",ſ:"s","ẜ":"s",ẛ:"s","ẝ":"s",ḿ:"m",ṁ:"m",ṃ:"m",ɱ:"m","ᵯ":"m","ᶆ":"m",ń:"n",ň:"n",ņ:"n",ṋ:"n","ȵ":"n",ṅ:"n",ṇ:"n",ǹ:"n",ɲ:"n",ṉ:"n",ƞ:"n","ᵰ":"n","ᶇ":"n",ɳ:"n",ñ:"n",nj:"nj",ó:"o",ŏ:"o",ǒ:"o",ô:"o",ố:"o",ộ:"o",ồ:"o",ổ:"o",ỗ:"o",ö:"o",ȫ:"o",ȯ:"o",ȱ:"o",ọ:"o",ő:"o",ȍ:"o",ò:"o",ỏ:"o",ơ:"o",ớ:"o",ợ:"o",ờ:"o",ở:"o",ỡ:"o",ȏ:"o","ꝋ":"o","ꝍ":"o","ⱺ":"o",ō:"o",ṓ:"o",ṑ:"o",ǫ:"o",ǭ:"o",ø:"o",ǿ:"o",õ:"o",ṍ:"o",ṏ:"o",ȭ:"o",ƣ:"oi","ꝏ":"oo",ɛ:"e","ᶓ":"e",ɔ:"o","ᶗ":"o",ȣ:"ou",ṕ:"p",ṗ:"p","ꝓ":"p",ƥ:"p","ᵱ":"p","ᶈ":"p","ꝕ":"p","ᵽ":"p","ꝑ":"p","ꝙ":"q",ʠ:"q","ɋ":"q","ꝗ":"q",ŕ:"r",ř:"r",ŗ:"r",ṙ:"r",ṛ:"r",ṝ:"r",ȑ:"r",ɾ:"r","ᵳ":"r",ȓ:"r",ṟ:"r",ɼ:"r","ᵲ":"r","ᶉ":"r","ɍ":"r",ɽ:"r","ↄ":"c","ꜿ":"c",ɘ:"e",ɿ:"r",ś:"s",ṥ:"s",š:"s",ṧ:"s",ş:"s",ŝ:"s",ș:"s",ṡ:"s",ṣ:"s",ṩ:"s",ʂ:"s","ᵴ":"s","ᶊ":"s","ȿ":"s",ɡ:"g","ᴑ":"o","ᴓ":"o","ᴝ":"u",ť:"t",ţ:"t",ṱ:"t",ț:"t","ȶ":"t",ẗ:"t","ⱦ":"t",ṫ:"t",ṭ:"t",ƭ:"t",ṯ:"t","ᵵ":"t",ƫ:"t",ʈ:"t",ŧ:"t","ᵺ":"th",ɐ:"a","ᴂ":"ae",ǝ:"e","ᵷ":"g",ɥ:"h","ʮ":"h","ʯ":"h","ᴉ":"i",ʞ:"k","ꞁ":"l",ɯ:"m",ɰ:"m","ᴔ":"oe",ɹ:"r",ɻ:"r",ɺ:"r","ⱹ":"r",ʇ:"t",ʌ:"v",ʍ:"w",ʎ:"y","ꜩ":"tz",ú:"u",ŭ:"u",ǔ:"u",û:"u",ṷ:"u",ü:"u",ǘ:"u",ǚ:"u",ǜ:"u",ǖ:"u",ṳ:"u",ụ:"u",ű:"u",ȕ:"u",ù:"u",ủ:"u",ư:"u",ứ:"u",ự:"u",ừ:"u",ử:"u",ữ:"u",ȗ:"u",ū:"u",ṻ:"u",ų:"u","ᶙ":"u",ů:"u",ũ:"u",ṹ:"u",ṵ:"u","ᵫ":"ue","ꝸ":"um","ⱴ":"v","ꝟ":"v",ṿ:"v",ʋ:"v","ᶌ":"v","ⱱ":"v",ṽ:"v","ꝡ":"vy",ẃ:"w",ŵ:"w",ẅ:"w",ẇ:"w",ẉ:"w",ẁ:"w","ⱳ":"w",ẘ:"w",ẍ:"x",ẋ:"x","ᶍ":"x",ý:"y",ŷ:"y",ÿ:"y",ẏ:"y",ỵ:"y",ỳ:"y",ƴ:"y",ỷ:"y","ỿ":"y",ȳ:"y",ẙ:"y","ɏ":"y",ỹ:"y",ї:"yi",ź:"z",ž:"z",ẑ:"z",ʑ:"z","ⱬ":"z",ż:"z",ẓ:"z",ȥ:"z",ẕ:"z","ᵶ":"z","ᶎ":"z",ʐ:"z",ƶ:"z","ɀ":"z",þ:"th",ff:"ff",ffi:"ffi",ffl:"ffl",fi:"fi",fl:"fl",ij:"ij",œ:"oe",st:"st","ₐ":"a","ₑ":"e","ᵢ":"i","ⱼ":"j","ₒ":"o","ᵣ":"r","ᵤ":"u","ᵥ":"v","ₓ":"x",Ё:"YO",Й:"I",Ц:"TS",У:"U",К:"K",Е:"E",Н:"N",Г:"G",Ґ:"G",Ш:"SH",Щ:"SCH",З:"Z",Х:"H",Ъ:"'",ё:"yo",й:"i",ц:"ts",у:"u",к:"k",е:"e",н:"n",г:"g",ґ:"g",ш:"sh",щ:"sch",з:"z",х:"h",ъ:"'",Ф:"F",Ы:"I",В:"V",А:"a",П:"P",Р:"R",О:"O",Л:"L",Д:"D",Ж:"ZH",Э:"E",ф:"f",ы:"i",в:"v",а:"a",п:"p",р:"r",о:"o",л:"l",д:"d",ж:"zh",э:"e",Я:"Ya",Ч:"CH",С:"S",М:"M",И:"I",Т:"T",Ь:"'",Б:"B",Ю:"YU",я:"ya",ч:"ch",с:"s",м:"m",и:"i",т:"t",ь:"'",б:"b",ю:"yu"};const mh=(e,t)=>t?e?qa(e).toLowerCase().includes(qa(t.toLowerCase())):!1:!0,C2=(e,t)=>t?e?qa(e).toLowerCase().startsWith(qa(t.toLowerCase())):!1:!0,em=(e,t,n)=>{const r=localStorage.getItem("search-use-asterisk")!=="false",i=n!=null&&n.trimSpaces?t==null?void 0:t.replaceAll(" ",""):t,a=n!=null&&n.trimSpaces?e==null?void 0:e.replaceAll(" ",""):e;return i?r?i.startsWith("*")?mh(a,i.substring(1)):C2(a,i):mh(a,i):!0};function T2(e,t){return function(){return e.apply(t,arguments)}}const{toString:jO}=Object.prototype,{getPrototypeOf:tm}=Object,_u=(e=>t=>{const n=jO.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),lr=e=>(e=e.toLowerCase(),t=>_u(t)===e),wu=e=>t=>typeof t===e,{isArray:oo}=Array,hs=wu("undefined");function PO(e){return e!==null&&!hs(e)&&e.constructor!==null&&!hs(e.constructor)&&Nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S2=lr("ArrayBuffer");function IO(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S2(e.buffer),t}const DO=wu("string"),Nn=wu("function"),k2=wu("number"),Cu=e=>e!==null&&typeof e=="object",NO=e=>e===!0||e===!1,el=e=>{if(_u(e)!=="object")return!1;const t=tm(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},LO=lr("Date"),FO=lr("File"),BO=lr("Blob"),UO=lr("FileList"),WO=e=>Cu(e)&&Nn(e.pipe),zO=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Nn(e.append)&&((t=_u(e))==="formdata"||t==="object"&&Nn(e.toString)&&e.toString()==="[object FormData]"))},HO=lr("URLSearchParams"),[VO,qO,YO,GO]=["ReadableStream","Request","Response","Headers"].map(lr),ZO=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Js(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),oo(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function E2(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,O2=e=>!hs(e)&&e!==Pi;function gh(){const{caseless:e}=O2(this)&&this||{},t={},n=(r,i)=>{const a=e&&E2(t,i)||i;el(t[a])&&el(r)?t[a]=gh(t[a],r):el(r)?t[a]=gh({},r):oo(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Js(arguments[r],n);return t}const KO=(e,t,n,{allOwnKeys:r}={})=>(Js(t,(i,a)=>{n&&Nn(i)?e[a]=T2(i,n):e[a]=i},{allOwnKeys:r}),e),XO=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),QO=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},JO=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&tm(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},eM=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},tM=e=>{if(!e)return null;if(oo(e))return e;let t=e.length;if(!k2(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},nM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&tm(Uint8Array)),rM=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},iM=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},aM=lr("HTMLFormElement"),oM=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),K0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sM=lr("RegExp"),M2=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Js(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},cM=e=>{M2(e,(t,n)=>{if(Nn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Nn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},lM=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return oo(e)?r(e):r(String(e).split(t)),n},uM=()=>{},dM=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,lf="abcdefghijklmnopqrstuvwxyz",X0="0123456789",$2={DIGIT:X0,ALPHA:lf,ALPHA_DIGIT:lf+lf.toUpperCase()+X0},fM=(e=16,t=$2.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function hM(e){return!!(e&&Nn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const pM=e=>{const t=new Array(10),n=(r,i)=>{if(Cu(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=oo(r)?[]:{};return Js(r,(o,s)=>{const c=n(o,i+1);!hs(c)&&(a[s]=c)}),t[i]=void 0,a}}return r};return n(e,0)},mM=lr("AsyncFunction"),gM=e=>e&&(Cu(e)||Nn(e))&&Nn(e.then)&&Nn(e.catch),A2=((e,t)=>e?setImmediate:t?((n,r)=>(Pi.addEventListener("message",({source:i,data:a})=>{i===Pi&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Pi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Nn(Pi.postMessage)),vM=typeof queueMicrotask<"u"?queueMicrotask.bind(Pi):typeof process<"u"&&process.nextTick||A2,ie={isArray:oo,isArrayBuffer:S2,isBuffer:PO,isFormData:zO,isArrayBufferView:IO,isString:DO,isNumber:k2,isBoolean:NO,isObject:Cu,isPlainObject:el,isReadableStream:VO,isRequest:qO,isResponse:YO,isHeaders:GO,isUndefined:hs,isDate:LO,isFile:FO,isBlob:BO,isRegExp:sM,isFunction:Nn,isStream:WO,isURLSearchParams:HO,isTypedArray:nM,isFileList:UO,forEach:Js,merge:gh,extend:KO,trim:ZO,stripBOM:XO,inherits:QO,toFlatObject:JO,kindOf:_u,kindOfTest:lr,endsWith:eM,toArray:tM,forEachEntry:rM,matchAll:iM,isHTMLForm:aM,hasOwnProperty:K0,hasOwnProp:K0,reduceDescriptors:M2,freezeMethods:cM,toObjectSet:lM,toCamelCase:oM,noop:uM,toFiniteNumber:dM,findKey:E2,global:Pi,isContextDefined:O2,ALPHABET:$2,generateString:fM,isSpecCompliantForm:hM,toJSONObject:pM,isAsyncFn:mM,isThenable:gM,setImmediate:A2,asap:vM};function Ze(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ie.inherits(Ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.status}}});const R2=Ze.prototype,j2={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{j2[e]={value:e}});Object.defineProperties(Ze,j2);Object.defineProperty(R2,"isAxiosError",{value:!0});Ze.from=(e,t,n,r,i,a)=>{const o=Object.create(R2);return ie.toFlatObject(e,o,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Ze.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const yM=null;function vh(e){return ie.isPlainObject(e)||ie.isArray(e)}function P2(e){return ie.endsWith(e,"[]")?e.slice(0,-2):e}function Q0(e,t,n){return e?e.concat(t).map(function(i,a){return i=P2(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function bM(e){return ie.isArray(e)&&!e.some(vh)}const xM=ie.toFlatObject(ie,{},null,function(t){return/^is[A-Z]/.test(t)});function Tu(e,t,n){if(!ie.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ie.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,v){return!ie.isUndefined(v[p])});const r=n.metaTokens,i=n.visitor||u,a=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(t);if(!ie.isFunction(i))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(ie.isDate(g))return g.toISOString();if(!c&&ie.isBlob(g))throw new Ze("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(g)||ie.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,v){let w=g;if(g&&!v&&typeof g=="object"){if(ie.endsWith(p,"{}"))p=r?p:p.slice(0,-2),g=JSON.stringify(g);else if(ie.isArray(g)&&bM(g)||(ie.isFileList(g)||ie.endsWith(p,"[]"))&&(w=ie.toArray(g)))return p=P2(p),w.forEach(function(x,S){!(ie.isUndefined(x)||x===null)&&t.append(o===!0?Q0([p],S,a):o===null?p:p+"[]",l(x))}),!1}return vh(g)?!0:(t.append(Q0(v,p,a),l(g)),!1)}const d=[],f=Object.assign(xM,{defaultVisitor:u,convertValue:l,isVisitable:vh});function h(g,p){if(!ie.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(g),ie.forEach(g,function(w,_){(!(ie.isUndefined(w)||w===null)&&i.call(t,w,ie.isString(_)?_.trim():_,p,f))===!0&&h(w,p?p.concat(_):[_])}),d.pop()}}if(!ie.isObject(e))throw new TypeError("data must be an object");return h(e),t}function J0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function nm(e,t){this._pairs=[],e&&Tu(e,this,t)}const I2=nm.prototype;I2.append=function(t,n){this._pairs.push([t,n])};I2.toString=function(t){const n=t?function(r){return t.call(this,r,J0)}:J0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function _M(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function D2(e,t,n){if(!t)return e;const r=n&&n.encode||_M,i=n&&n.serialize;let a;if(i?a=i(t,n):a=ie.isURLSearchParams(t)?t.toString():new nm(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ev{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ie.forEach(this.handlers,function(r){r!==null&&t(r)})}}const N2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},wM=typeof URLSearchParams<"u"?URLSearchParams:nm,CM=typeof FormData<"u"?FormData:null,TM=typeof Blob<"u"?Blob:null,SM={isBrowser:!0,classes:{URLSearchParams:wM,FormData:CM,Blob:TM},protocols:["http","https","file","blob","url","data"]},rm=typeof window<"u"&&typeof document<"u",yh=typeof navigator=="object"&&navigator||void 0,kM=rm&&(!yh||["ReactNative","NativeScript","NS"].indexOf(yh.product)<0),EM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",OM=rm&&window.location.href||"http://localhost",MM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rm,hasStandardBrowserEnv:kM,hasStandardBrowserWebWorkerEnv:EM,navigator:yh,origin:OM},Symbol.toStringTag,{value:"Module"})),Rn={...MM,...SM};function $M(e,t){return Tu(e,new Rn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Rn.isNode&&ie.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function AM(e){return ie.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function RM(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function L2(e){function t(n,r,i,a){let o=n[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),c=a>=n.length;return o=!o&&ie.isArray(i)?i.length:o,c?(ie.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!ie.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&ie.isArray(i[o])&&(i[o]=RM(i[o])),!s)}if(ie.isFormData(e)&&ie.isFunction(e.entries)){const n={};return ie.forEachEntry(e,(r,i)=>{t(AM(r),i,n,0)}),n}return null}function jM(e,t,n){if(ie.isString(e))try{return(t||JSON.parse)(e),ie.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ec={transitional:N2,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=ie.isObject(t);if(a&&ie.isHTMLForm(t)&&(t=new FormData(t)),ie.isFormData(t))return i?JSON.stringify(L2(t)):t;if(ie.isArrayBuffer(t)||ie.isBuffer(t)||ie.isStream(t)||ie.isFile(t)||ie.isBlob(t)||ie.isReadableStream(t))return t;if(ie.isArrayBufferView(t))return t.buffer;if(ie.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return $M(t,this.formSerializer).toString();if((s=ie.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Tu(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),jM(t)):t}],transformResponse:[function(t){const n=this.transitional||ec.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ie.isResponse(t)||ie.isReadableStream(t))return t;if(t&&ie.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?Ze.from(s,Ze.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rn.classes.FormData,Blob:Rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],e=>{ec.headers[e]={}});const PM=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),IM=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
230
|
-
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&
|
|
231
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[tv]=this[tv]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=jo(o);r[s]||(FM(i,o),r[s]=!0)}return ie.isArray(t)?t.forEach(a):a(t),this}}jn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(jn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ie.freezeMethods(jn);function df(e,t){const n=this||ec,r=t||n,i=jn.from(r.headers);let a=r.data;return ie.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function F2(e){return!!(e&&e.__CANCEL__)}function so(e,t,n){Ze.call(this,e??"canceled",Ze.ERR_CANCELED,t,n),this.name="CanceledError"}ie.inherits(so,Ze,{__CANCEL__:!0});function B2(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ze("Request failed with status code "+n.status,[Ze.ERR_BAD_REQUEST,Ze.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function BM(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function UM(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[a];o||(o=l),n[i]=c,r[i]=l;let d=a,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const h=u&&l-u;return h?Math.round(f*1e3/h):void 0}}function WM(e,t){let n=0,r=1e3/t,i,a;const o=(l,u=Date.now())=>{n=u,i=null,a&&(clearTimeout(a),a=null),e.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?o(l,u):(i=l,a||(a=setTimeout(()=>{a=null,o(i)},r-d)))},()=>i&&o(i)]}const wl=(e,t,n=3)=>{let r=0;const i=UM(50,250);return WM(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,c=o-r,l=i(c),u=o<=s;r=o;const d={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&u?(s-o)/l:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},nv=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},rv=e=>(...t)=>ie.asap(()=>e(...t)),zM=Rn.hasStandardBrowserEnv?function(){const t=Rn.navigator&&/(msie|trident)/i.test(Rn.navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=ie.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),HM=Rn.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];ie.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ie.isString(r)&&o.push("path="+r),ie.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function VM(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qM(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function U2(e,t){return e&&!VM(t)?qM(e,t):t}const iv=e=>e instanceof jn?{...e}:e;function Ki(e,t){t=t||{};const n={};function r(l,u,d){return ie.isPlainObject(l)&&ie.isPlainObject(u)?ie.merge.call({caseless:d},l,u):ie.isPlainObject(u)?ie.merge({},u):ie.isArray(u)?u.slice():u}function i(l,u,d){if(ie.isUndefined(u)){if(!ie.isUndefined(l))return r(void 0,l,d)}else return r(l,u,d)}function a(l,u){if(!ie.isUndefined(u))return r(void 0,u)}function o(l,u){if(ie.isUndefined(u)){if(!ie.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function s(l,u,d){if(d in t)return r(l,u);if(d in e)return r(void 0,l)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,u)=>i(iv(l),iv(u),!0)};return ie.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=c[u]||i,f=d(e[u],t[u],u);ie.isUndefined(f)&&d!==s||(n[u]=f)}),n}const W2=e=>{const t=Ki({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=jn.from(o),t.url=D2(U2(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(ie.isFormData(n)){if(Rn.hasStandardBrowserEnv||Rn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(Rn.hasStandardBrowserEnv&&(r&&ie.isFunction(r)&&(r=r(t)),r||r!==!1&&zM(t.url))){const l=i&&a&&HM.read(a);l&&o.set(i,l)}return t},YM=typeof XMLHttpRequest<"u",GM=YM&&function(e){return new Promise(function(n,r){const i=W2(e);let a=i.data;const o=jn.from(i.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:l}=i,u,d,f,h,g;function p(){h&&h(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function w(){if(!v)return;const x=jn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),b={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:x,config:e,request:v};B2(function(j){n(j),p()},function(j){r(j),p()},b),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new Ze("Request aborted",Ze.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new Ze("Network Error",Ze.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const b=i.transitional||N2;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ze(S,b.clarifyTimeoutError?Ze.ETIMEDOUT:Ze.ECONNABORTED,e,v)),v=null},a===void 0&&o.setContentType(null),"setRequestHeader"in v&&ie.forEach(o.toJSON(),function(S,b){v.setRequestHeader(b,S)}),ie.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),s&&s!=="json"&&(v.responseType=i.responseType),l&&([f,g]=wl(l,!0),v.addEventListener("progress",f)),c&&v.upload&&([d,h]=wl(c),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(u=x=>{v&&(r(!x||x.type?new so(null,e,v):x),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=BM(i.url);if(_&&Rn.protocols.indexOf(_)===-1){r(new Ze("Unsupported protocol "+_+":",Ze.ERR_BAD_REQUEST,e));return}v.send(a||null)})},ZM=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(l){if(!i){i=!0,s();const u=l instanceof Error?l:this.reason;r.abort(u instanceof Ze?u:new so(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,a(new Ze(`timeout ${t} of ms exceeded`,Ze.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>ie.asap(s),c}},KM=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},XM=async function*(e,t){for await(const n of QM(e))yield*KM(n,t)},QM=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},av=(e,t,n,r)=>{const i=XM(e,t);let a=0,o,s=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await i.next();if(l){s(),c.close();return}let d=u.byteLength;if(n){let f=a+=d;n(f)}c.enqueue(new Uint8Array(u))}catch(l){throw s(l),l}},cancel(c){return s(c),i.return()}},{highWaterMark:2})},Su=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",z2=Su&&typeof ReadableStream=="function",JM=Su&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),H2=(e,...t)=>{try{return!!e(...t)}catch{return!1}},e8=z2&&H2(()=>{let e=!1;const t=new Request(Rn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ov=64*1024,bh=z2&&H2(()=>ie.isReadableStream(new Response("").body)),Cl={stream:bh&&(e=>e.body)};Su&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Cl[t]&&(Cl[t]=ie.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ze(`Response type '${t}' is not supported`,Ze.ERR_NOT_SUPPORT,r)})})})(new Response);const t8=async e=>{if(e==null)return 0;if(ie.isBlob(e))return e.size;if(ie.isSpecCompliantForm(e))return(await new Request(Rn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ie.isArrayBufferView(e)||ie.isArrayBuffer(e))return e.byteLength;if(ie.isURLSearchParams(e)&&(e=e+""),ie.isString(e))return(await JM(e)).byteLength},n8=async(e,t)=>{const n=ie.toFiniteNumber(e.getContentLength());return n??t8(t)},r8=Su&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:f}=W2(e);l=l?(l+"").toLowerCase():"text";let h=ZM([i,a&&a.toAbortSignal()],o),g;const p=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(c&&e8&&n!=="get"&&n!=="head"&&(v=await n8(u,r))!==0){let b=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(ie.isFormData(r)&&(T=b.headers.get("content-type"))&&u.setContentType(T),b.body){const[j,M]=nv(v,wl(rv(c)));r=av(b.body,ov,j,M)}}ie.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let _=await fetch(g);const x=bh&&(l==="stream"||l==="response");if(bh&&(s||x&&p)){const b={};["status","statusText","headers"].forEach(k=>{b[k]=_[k]});const T=ie.toFiniteNumber(_.headers.get("content-length")),[j,M]=s&&nv(T,wl(rv(s),!0))||[];_=new Response(av(_.body,ov,j,()=>{M&&M(),p&&p()}),b)}l=l||"text";let S=await Cl[ie.findKey(Cl,l)||"text"](_,e);return!x&&p&&p(),await new Promise((b,T)=>{B2(b,T,{data:S,headers:jn.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:g})})}catch(w){throw p&&p(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Ze("Network Error",Ze.ERR_NETWORK,e,g),{cause:w.cause||w}):Ze.from(w,w&&w.code,e,g)}}),xh={http:yM,xhr:GM,fetch:r8};ie.forEach(xh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const sv=e=>`- ${e}`,i8=e=>ie.isFunction(e)||e===null||e===!1,V2={getAdapter:e=>{e=ie.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let o;if(r=n,!i8(n)&&(r=xh[(o=String(n)).toLowerCase()],r===void 0))throw new Ze(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+a]=r}if(!r){const a=Object.entries(i).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since :
|
|
229
|
+
`,$c=16,JE=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:c}=EE(n);return ue.createElement("div",{style:{position:"fixed",zIndex:9999,top:$c,left:$c,right:$c,bottom:$c,pointerEvents:"none",...a},className:o,onMouseEnter:c.startPause,onMouseLeave:c.endPause},s.map(l=>{let u=l.position||t,d=c.calculateOffset(l,{reverseOrder:e,gutter:r,defaultPosition:t}),f=XE(u,d);return ue.createElement(KE,{id:l.id,key:l.id,onHeightUpdate:c.updateHeight,className:l.visible?QE:"",style:f},l.type==="custom"?bl(l.message,l):i?i(l):ue.createElement(ZE,{toast:l,position:u}))}))},xa=Dn;const yu=m.createContext({isLoading:!1,startLoading:e=>{},stopLoading:e=>{}});var fh;(function(e){e[e.LOGGING_IN=0]="LOGGING_IN",e[e.LOGGED_IN=1]="LOGGED_IN",e[e.LOGGED_OUT=2]="LOGGED_OUT",e[e.LOGIN_FAILED=3]="LOGIN_FAILED"})(fh||(fh={}));const c2=fh;var hh;(function(e){e[e.Odebrano=-2]="Odebrano",e[e.Zamitnuto=-1]="Zamitnuto",e[e.Nevyrizeno=0]="Nevyrizeno",e[e.Schvaleno=1]="Schvaleno"})(hh||(hh={}));const eO=hh,l2=m.createContext({user:null,userLoginState:{state:c2.LOGGED_OUT,user:null},loginUser:()=>Promise.resolve(!0),logoutUser:()=>{}}),bu=m.createContext({useMsal:!1,msalInstance:null,msalScopes:[],msalExtraScopes:[],getToken:async()=>null}),u2=m.createContext({delegation:null,setDelegation:()=>{},availableDelegations:null,setAvailableDelegations:()=>{},refreshAvailableDelegations:async()=>{}}),xl=e=>e==null?!0:!(typeof e=="object"||typeof e=="function"),d2=e=>{xl(e)||Object.keys(e).forEach(t=>{const n=e[t];if(xl(n))return;const r=Object.keys(n);r.includes("id")&&r.length===1&&n.id===null?e[t]=null:d2(n)})},f2=e=>Object.values(e).every(t=>t===null),tO=e=>{const t={};return Object.entries(e).forEach(([n,r])=>{r&&typeof r=="object"&&f2(r)?t[n]=null:t[n]=r}),t},Qp=e=>{var n;const t=(n=e.response)==null?void 0:n.data;return t&&t.errorFields&&t.errorFields.length>0?t.errorFields.map(r=>({name:r.name.split(".").map(a=>`${a.charAt(0).toLowerCase()}${a.slice(1)}`).join("."),errors:r.errors})):[]},nO=(e,t)=>{Qp(t).forEach(r=>{e.setError(r.name,{message:r.errors,type:"server"},{shouldFocus:!0}),xl(e.getValues(r.name))||e.setError(`${r.name}.id`,{message:r.errors,type:"server"},{shouldFocus:!0})})},h2=e=>{var n;const t=(n=e.response)==null?void 0:n.data;return t!=null&&t.permissions&&t.permissions.length>0?t.permissions:null},p2=({heading:e,content:t,placement:n,children:r,trigger:i=["hover"],popoverClassName:a,small:o,delay:s,...c})=>{const l=i.includes("hover")&&!i.includes("focus")?[...i,"focus"]:i;return y.jsx(Zx,{placement:n,overlay:y.jsxs(Kc,{className:oe("luminus-popover",{"luminus-popover-sm":o},a),onClick:u=>u.stopPropagation(),children:[e&&y.jsx(Kc.Header,{children:typeof e=="string"?y.jsx(_n,{variant:"h6",className:"text-primary",children:e}):e}),y.jsx(Kc.Body,{children:t})]}),trigger:l,rootClose:!0,show:c.controlled?c.isOpen:void 0,onToggle:c.controlled?u=>c.setIsOpen(u):void 0,delay:s,children:r})},rO="_h1_14r4v_1",iO="_h3_14r4v_8",aO="_h6_14r4v_15",oO="_subtitle_14r4v_22",sO="_body_14r4v_29",cO="_body2_14r4v_36",lO="_caption_14r4v_43",uO="_form-label_14r4v_50",Qr={h1:rO,h3:iO,h6:aO,subtitle:oO,body:sO,body2:cO,caption:lO,"form-label":"_form-label_14r4v_50",formLabel:uO},dO=({variant:e,className:t,children:n})=>{switch(e){case"h1":return y.jsx("h1",{className:oe("luminus-text-primary luminus-h1",Qr.h1,t),children:n});case"h3":return y.jsx("h3",{className:oe("luminus-text luminus-h3",Qr.h3,t),children:n});case"h6":return y.jsx("h6",{className:oe("luminus-text luminus-h6",Qr.h6,t),children:n});case"subtitle":return y.jsx("div",{className:oe("luminus-text luminus-subtitle",Qr.subtitle,t),children:n});case"body":return y.jsx("div",{className:oe("luminus-text luminus-body",Qr.body,t),children:n});case"body2":return y.jsx("div",{className:oe("luminus-text luminus-body2",Qr.body2,t),children:n});case"caption":return y.jsx("div",{className:oe("luminus-text-muted luminus-caption",Qr.caption,t),children:n});case"form-label":return y.jsx("div",{className:oe("luminus-text luminus-form-label",Qr.formLabel,t),children:n});default:return y.jsx(y.Fragment,{children:n})}},_n=({variant:e,className:t,children:n})=>y.jsx(dO,{variant:e,className:t,children:n}),Jp=({text:e,placement:t,children:n,delay:r})=>y.jsx(p2,{content:y.jsx(_n,{variant:"body2",className:"text-center",children:e}),placement:t,delay:r,small:!0,children:n}),m2=e=>e.length<300?e:e.substring(0,300)+"...",Va=e=>e<1024?`${e.toFixed(2)} bytes`:e>=1024&&e<1048576?`${(e/1024).toFixed(1)} kB`:`${(e/1048576).toFixed(1)} MB`;function fs(e=" ",...t){return t.filter(n=>n!=null&&n.length>0).join(e)}const ph=(e,t)=>e.map(n=>`&${t}=${n}`).join("").substring(1),fO=(e,t)=>e===null?null:e.length<=t?e:e.slice(0,t)+"…";function hO(e){return e==null?"":_p(au(e),"dd.MM.yyyy")}function xu(e){return(e==null?void 0:e.toString().split("T")[0])??""}function pO(e){return e==null?"":_p(au(e),"dd.MM.yyyy HH:mm")}function mO(e){return e&&e.charAt(0).toUpperCase()+e.slice(1)}const gO=(e,t)=>fs(" ",e?`${e},`:void 0,t),vO=(e,t)=>`${t}${e!=null?` (${e})`:""}`,yO=(e,t)=>`[${e??""}] ${t??""}`,g2=e=>decodeURIComponent(atob(e).split("").map(t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join("")),v2=e=>{const t=au(e);return!Number.isNaN(t.getTime())};function bO(){const e=new Date,t=new Date(e);return t.setHours(24,0,0,0),t.getTime()-e.getTime()}function xO(e){return e instanceof Date&&!Number.isNaN(e.getTime())}function _O(e,t){const n=new Date(e),r=new Date(t);return n.setHours(0,0,0,0),r.setHours(0,0,0,0),n.getTime()-r.getTime()}function wO(e,t){const n=new Date(e),r=new Date(t);return n.getTime()-r.getTime()}function CO(e=Date.now(),t=Date.now()){const n=new Date(e),r=new Date(t);n.setHours(10,0,0,0),r.setHours(0,0,0,0);const i=n.getTime()-r.getTime();return Math.floor(i/(1e3*3600*24))}function y2(e=new Date){const t=new Date(e);return t.setUTCDate(1),t}function b2(e=new Date){return hT(e)}function TO(e){const t=new Date;return t.setUTCMonth(t.getUTCMonth()+e),y2(t)}function SO(e){const t=new Date;return t.setUTCMonth(t.getUTCMonth()+e),b2(t)}function kO(e){const t=e??new Date().getFullYear(),n=new Date(t,0,1);return n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n}function EO(e){const t=e??new Date().getFullYear(),n=new Date(t,11,31);return n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n}function OO(e){return xu(e.toISOString())}function x2(e){const t=/filename\*?=(?:UTF-8''|")?(.*?)(?:''|")?(?:;|$)/i,n=e.match(t);if(n&&n[1]){let r=n[1];const i=/=\?([^?]+)\?([BbQq])\?([^?]+)\?=/,a=r.match(i);if(a){const o=a[2].toUpperCase(),s=a[3];try{return o==="B"?r=g2(s):o==="Q"&&(r=s.replace(/_/g," ").replace(/=([A-Fa-f0-9]{2})/g,(c,l)=>String.fromCharCode(parseInt(l,16)))),decodeURIComponent(r)}catch(c){return console.error("Error decoding MIME encoded filename:",c),r}}try{return decodeURIComponent(r)}catch(o){return console.error("Error decoding filename:",o),r}}return null}function _l(e,t,n=!0){const r=URL.createObjectURL(e),i=document.createElement("a");i.href=r,i.setAttribute("style","display: none"),n?(window.open(r,"_blank","noopener,noreferrer"),setTimeout(()=>URL.revokeObjectURL(r),6e4)):(i.setAttribute("download",t),document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r))}const MO=["application/pdf","text/plain","text/html","application/xml","text/xml","image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/bmp","image/x-icon","audio/mpeg","audio/wav","audio/ogg","audio/mp4","video/mp4","video/webm","video/ogg"],$O=["pdf","txt","html","xml","jpg","jpeg","png","gif","webp","svg","bmp","ico","mp3","wav","ogg","m4a","mp4","webm","ogv"],_2=e=>MO.includes(e.type),w2=e=>$O.includes(e.toLowerCase());function AO(e,t){let n=(t==null?void 0:t.forcedName)??(t==null?void 0:t.fallbackName)??"file";if((t==null?void 0:t.forcedName)===void 0&&typeof e.headers.get=="function"){const a=e.headers.get("Content-disposition");typeof a=="string"&&a.length>0&&(n=x2(e.headers.get("Content-disposition"))??n)}const r=_2(e.data),i=(t==null?void 0:t.tryToOpen)===void 0?localStorage.getItem("file-download-try-opening")!=="false":t.tryToOpen;_l(e.data,n,r?i:!1)}function qa(e,t=qa.characters){return e.replace(/[^A-Za-z0-9]/g,function(n){return t[n]||n})}qa.characters={Á:"A",Ă:"A",Ắ:"A",Ặ:"A",Ằ:"A",Ẳ:"A",Ẵ:"A",Ǎ:"A",Â:"A",Ấ:"A",Ậ:"A",Ầ:"A",Ẩ:"A",Ẫ:"A",Ä:"A",Ǟ:"A",Ȧ:"A",Ǡ:"A",Ạ:"A",Ȁ:"A",À:"A",Ả:"A",Ȃ:"A",Ā:"A",Ą:"A",Å:"A",Ǻ:"A",Ḁ:"A","Ⱥ":"A",Ã:"A","Ꜳ":"AA",Æ:"AE",Ǽ:"AE",Ǣ:"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY",Ḃ:"B",Ḅ:"B",Ɓ:"B",Ḇ:"B","Ƀ":"B",Ƃ:"B",Ć:"C",Č:"C",Ç:"C",Ḉ:"C",Ĉ:"C",Ċ:"C",Ƈ:"C","Ȼ":"C",Ď:"D",Ḑ:"D",Ḓ:"D",Ḋ:"D",Ḍ:"D",Ɗ:"D",Ḏ:"D",Dz:"D",Dž:"D",Đ:"D",Ð:"D",Ƌ:"D",DZ:"DZ",DŽ:"DZ",É:"E",Ĕ:"E",Ě:"E",Ȩ:"E",Ḝ:"E",Ê:"E",Ế:"E",Ệ:"E",Ề:"E",Ể:"E",Ễ:"E",Ḙ:"E",Ë:"E",Ė:"E",Ẹ:"E",Ȅ:"E",È:"E",Ẻ:"E",Ȇ:"E",Ē:"E",Ḗ:"E",Ḕ:"E",Ę:"E","Ɇ":"E",Ẽ:"E",Ḛ:"E","Ꝫ":"ET",Ḟ:"F",Ƒ:"F",Ǵ:"G",Ğ:"G",Ǧ:"G",Ģ:"G",Ĝ:"G",Ġ:"G",Ɠ:"G",Ḡ:"G",Ǥ:"G",Ḫ:"H",Ȟ:"H",Ḩ:"H",Ĥ:"H","Ⱨ":"H",Ḧ:"H",Ḣ:"H",Ḥ:"H",Ħ:"H",Í:"I",Ĭ:"I",Ǐ:"I",Î:"I",Ï:"I",Ḯ:"I",İ:"I",Ị:"I",Ȉ:"I",Ì:"I",Ỉ:"I",Ȋ:"I",Ī:"I",Į:"I",Ɨ:"I",Ĩ:"I",Ḭ:"I",І:"I","Ꝺ":"D","Ꝼ":"F","Ᵹ":"G","Ꞃ":"R","Ꞅ":"S","Ꞇ":"T","Ꝭ":"IS",Ĵ:"J","Ɉ":"J",Ḱ:"K",Ǩ:"K",Ķ:"K","Ⱪ":"K","Ꝃ":"K",Ḳ:"K",Ƙ:"K",Ḵ:"K","Ꝁ":"K","Ꝅ":"K",Ĺ:"L","Ƚ":"L",Ľ:"L",Ļ:"L",Ḽ:"L",Ḷ:"L",Ḹ:"L","Ⱡ":"L","Ꝉ":"L",Ḻ:"L",Ŀ:"L","Ɫ":"L",Lj:"L",Ł:"L",LJ:"LJ",Ḿ:"M",Ṁ:"M",Ṃ:"M","Ɱ":"M",Ń:"N",Ň:"N",Ņ:"N",Ṋ:"N",Ṅ:"N",Ṇ:"N",Ǹ:"N",Ɲ:"N",Ṉ:"N","Ƞ":"N",Nj:"N",Ñ:"N",NJ:"NJ",Ó:"O",Ŏ:"O",Ǒ:"O",Ô:"O",Ố:"O",Ộ:"O",Ồ:"O",Ổ:"O",Ỗ:"O",Ö:"O",Ȫ:"O",Ȯ:"O",Ȱ:"O",Ọ:"O",Ő:"O",Ȍ:"O",Ò:"O",Ỏ:"O",Ơ:"O",Ớ:"O",Ợ:"O",Ờ:"O",Ở:"O",Ỡ:"O",Ȏ:"O","Ꝋ":"O","Ꝍ":"O",Ō:"O",Ṓ:"O",Ṑ:"O",Ɵ:"O",Ǫ:"O",Ǭ:"O",Ø:"O",Ǿ:"O",Õ:"O",Ṍ:"O",Ṏ:"O",Ȭ:"O",Ƣ:"OI","Ꝏ":"OO",Ɛ:"E",Ɔ:"O",Ȣ:"OU",Ṕ:"P",Ṗ:"P","Ꝓ":"P",Ƥ:"P","Ꝕ":"P","Ᵽ":"P","Ꝑ":"P","Ꝙ":"Q","Ꝗ":"Q",Ŕ:"R",Ř:"R",Ŗ:"R",Ṙ:"R",Ṛ:"R",Ṝ:"R",Ȑ:"R",Ȓ:"R",Ṟ:"R","Ɍ":"R","Ɽ":"R","Ꜿ":"C",Ǝ:"E",Ś:"S",Ṥ:"S",Š:"S",Ṧ:"S",Ş:"S",Ŝ:"S",Ș:"S",Ṡ:"S",Ṣ:"S",Ṩ:"S",ß:"ss",Ť:"T",Ţ:"T",Ṱ:"T",Ț:"T","Ⱦ":"T",Ṫ:"T",Ṭ:"T",Ƭ:"T",Ṯ:"T",Ʈ:"T",Ŧ:"T","Ɐ":"A","Ꞁ":"L",Ɯ:"M","Ʌ":"V","Ꜩ":"TZ",Ú:"U",Ŭ:"U",Ǔ:"U",Û:"U",Ṷ:"U",Ü:"U",Ǘ:"U",Ǚ:"U",Ǜ:"U",Ǖ:"U",Ṳ:"U",Ụ:"U",Ű:"U",Ȕ:"U",Ù:"U",Ủ:"U",Ư:"U",Ứ:"U",Ự:"U",Ừ:"U",Ử:"U",Ữ:"U",Ȗ:"U",Ū:"U",Ṻ:"U",Ų:"U",Ů:"U",Ũ:"U",Ṹ:"U",Ṵ:"U","Ꝟ":"V",Ṿ:"V",Ʋ:"V",Ṽ:"V","Ꝡ":"VY",Ẃ:"W",Ŵ:"W",Ẅ:"W",Ẇ:"W",Ẉ:"W",Ẁ:"W","Ⱳ":"W",Ẍ:"X",Ẋ:"X",Ý:"Y",Ŷ:"Y",Ÿ:"Y",Ẏ:"Y",Ỵ:"Y",Ỳ:"Y",Ƴ:"Y",Ỷ:"Y","Ỿ":"Y",Ȳ:"Y","Ɏ":"Y",Ỹ:"Y",Ї:"YI",Ź:"Z",Ž:"Z",Ẑ:"Z","Ⱬ":"Z",Ż:"Z",Ẓ:"Z",Ȥ:"Z",Ẕ:"Z",Ƶ:"Z",Þ:"TH",IJ:"IJ",Œ:"OE","ᴀ":"A","ᴁ":"AE",ʙ:"B","ᴃ":"B","ᴄ":"C","ᴅ":"D","ᴇ":"E","ꜰ":"F",ɢ:"G",ʛ:"G",ʜ:"H",ɪ:"I",ʁ:"R","ᴊ":"J","ᴋ":"K",ʟ:"L","ᴌ":"L","ᴍ":"M",ɴ:"N","ᴏ":"O",ɶ:"OE","ᴐ":"O","ᴕ":"OU","ᴘ":"P",ʀ:"R","ᴎ":"N","ᴙ":"R","ꜱ":"S","ᴛ":"T","ⱻ":"E","ᴚ":"R","ᴜ":"U","ᴠ":"V","ᴡ":"W",ʏ:"Y","ᴢ":"Z",á:"a",ă:"a",ắ:"a",ặ:"a",ằ:"a",ẳ:"a",ẵ:"a",ǎ:"a",â:"a",ấ:"a",ậ:"a",ầ:"a",ẩ:"a",ẫ:"a",ä:"a",ǟ:"a",ȧ:"a",ǡ:"a",ạ:"a",ȁ:"a",à:"a",ả:"a",ȃ:"a",ā:"a",ą:"a","ᶏ":"a",ẚ:"a",å:"a",ǻ:"a",ḁ:"a","ⱥ":"a",ã:"a","ꜳ":"aa",æ:"ae",ǽ:"ae",ǣ:"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay",ḃ:"b",ḅ:"b",ɓ:"b",ḇ:"b","ᵬ":"b","ᶀ":"b",ƀ:"b",ƃ:"b",ɵ:"o",ć:"c",č:"c",ç:"c",ḉ:"c",ĉ:"c",ɕ:"c",ċ:"c",ƈ:"c","ȼ":"c",ď:"d",ḑ:"d",ḓ:"d","ȡ":"d",ḋ:"d",ḍ:"d",ɗ:"d","ᶑ":"d",ḏ:"d","ᵭ":"d","ᶁ":"d",đ:"d",ɖ:"d",ƌ:"d",ð:"d",ı:"i","ȷ":"j",ɟ:"j",ʄ:"j",dz:"dz",dž:"dz",é:"e",ĕ:"e",ě:"e",ȩ:"e",ḝ:"e",ê:"e",ế:"e",ệ:"e",ề:"e",ể:"e",ễ:"e",ḙ:"e",ë:"e",ė:"e",ẹ:"e",ȅ:"e",è:"e",ẻ:"e",ȇ:"e",ē:"e",ḗ:"e",ḕ:"e","ⱸ":"e",ę:"e","ᶒ":"e","ɇ":"e",ẽ:"e",ḛ:"e","ꝫ":"et",ḟ:"f",ƒ:"f","ᵮ":"f","ᶂ":"f",ǵ:"g",ğ:"g",ǧ:"g",ģ:"g",ĝ:"g",ġ:"g",ɠ:"g",ḡ:"g","ᶃ":"g",ǥ:"g",ḫ:"h",ȟ:"h",ḩ:"h",ĥ:"h","ⱨ":"h",ḧ:"h",ḣ:"h",ḥ:"h",ɦ:"h",ẖ:"h",ħ:"h",ƕ:"hv",í:"i",ĭ:"i",ǐ:"i",î:"i",ï:"i",ḯ:"i",ị:"i",ȉ:"i",ì:"i",ỉ:"i",ȋ:"i",ī:"i",į:"i","ᶖ":"i",ɨ:"i",ĩ:"i",ḭ:"i",і:"i","ꝺ":"d","ꝼ":"f","ᵹ":"g","ꞃ":"r","ꞅ":"s","ꞇ":"t","ꝭ":"is",ǰ:"j",ĵ:"j",ʝ:"j","ɉ":"j",ḱ:"k",ǩ:"k",ķ:"k","ⱪ":"k","ꝃ":"k",ḳ:"k",ƙ:"k",ḵ:"k","ᶄ":"k","ꝁ":"k","ꝅ":"k",ĺ:"l",ƚ:"l",ɬ:"l",ľ:"l",ļ:"l",ḽ:"l","ȴ":"l",ḷ:"l",ḹ:"l","ⱡ":"l","ꝉ":"l",ḻ:"l",ŀ:"l",ɫ:"l","ᶅ":"l",ɭ:"l",ł:"l",lj:"lj",ſ:"s","ẜ":"s",ẛ:"s","ẝ":"s",ḿ:"m",ṁ:"m",ṃ:"m",ɱ:"m","ᵯ":"m","ᶆ":"m",ń:"n",ň:"n",ņ:"n",ṋ:"n","ȵ":"n",ṅ:"n",ṇ:"n",ǹ:"n",ɲ:"n",ṉ:"n",ƞ:"n","ᵰ":"n","ᶇ":"n",ɳ:"n",ñ:"n",nj:"nj",ó:"o",ŏ:"o",ǒ:"o",ô:"o",ố:"o",ộ:"o",ồ:"o",ổ:"o",ỗ:"o",ö:"o",ȫ:"o",ȯ:"o",ȱ:"o",ọ:"o",ő:"o",ȍ:"o",ò:"o",ỏ:"o",ơ:"o",ớ:"o",ợ:"o",ờ:"o",ở:"o",ỡ:"o",ȏ:"o","ꝋ":"o","ꝍ":"o","ⱺ":"o",ō:"o",ṓ:"o",ṑ:"o",ǫ:"o",ǭ:"o",ø:"o",ǿ:"o",õ:"o",ṍ:"o",ṏ:"o",ȭ:"o",ƣ:"oi","ꝏ":"oo",ɛ:"e","ᶓ":"e",ɔ:"o","ᶗ":"o",ȣ:"ou",ṕ:"p",ṗ:"p","ꝓ":"p",ƥ:"p","ᵱ":"p","ᶈ":"p","ꝕ":"p","ᵽ":"p","ꝑ":"p","ꝙ":"q",ʠ:"q","ɋ":"q","ꝗ":"q",ŕ:"r",ř:"r",ŗ:"r",ṙ:"r",ṛ:"r",ṝ:"r",ȑ:"r",ɾ:"r","ᵳ":"r",ȓ:"r",ṟ:"r",ɼ:"r","ᵲ":"r","ᶉ":"r","ɍ":"r",ɽ:"r","ↄ":"c","ꜿ":"c",ɘ:"e",ɿ:"r",ś:"s",ṥ:"s",š:"s",ṧ:"s",ş:"s",ŝ:"s",ș:"s",ṡ:"s",ṣ:"s",ṩ:"s",ʂ:"s","ᵴ":"s","ᶊ":"s","ȿ":"s",ɡ:"g","ᴑ":"o","ᴓ":"o","ᴝ":"u",ť:"t",ţ:"t",ṱ:"t",ț:"t","ȶ":"t",ẗ:"t","ⱦ":"t",ṫ:"t",ṭ:"t",ƭ:"t",ṯ:"t","ᵵ":"t",ƫ:"t",ʈ:"t",ŧ:"t","ᵺ":"th",ɐ:"a","ᴂ":"ae",ǝ:"e","ᵷ":"g",ɥ:"h","ʮ":"h","ʯ":"h","ᴉ":"i",ʞ:"k","ꞁ":"l",ɯ:"m",ɰ:"m","ᴔ":"oe",ɹ:"r",ɻ:"r",ɺ:"r","ⱹ":"r",ʇ:"t",ʌ:"v",ʍ:"w",ʎ:"y","ꜩ":"tz",ú:"u",ŭ:"u",ǔ:"u",û:"u",ṷ:"u",ü:"u",ǘ:"u",ǚ:"u",ǜ:"u",ǖ:"u",ṳ:"u",ụ:"u",ű:"u",ȕ:"u",ù:"u",ủ:"u",ư:"u",ứ:"u",ự:"u",ừ:"u",ử:"u",ữ:"u",ȗ:"u",ū:"u",ṻ:"u",ų:"u","ᶙ":"u",ů:"u",ũ:"u",ṹ:"u",ṵ:"u","ᵫ":"ue","ꝸ":"um","ⱴ":"v","ꝟ":"v",ṿ:"v",ʋ:"v","ᶌ":"v","ⱱ":"v",ṽ:"v","ꝡ":"vy",ẃ:"w",ŵ:"w",ẅ:"w",ẇ:"w",ẉ:"w",ẁ:"w","ⱳ":"w",ẘ:"w",ẍ:"x",ẋ:"x","ᶍ":"x",ý:"y",ŷ:"y",ÿ:"y",ẏ:"y",ỵ:"y",ỳ:"y",ƴ:"y",ỷ:"y","ỿ":"y",ȳ:"y",ẙ:"y","ɏ":"y",ỹ:"y",ї:"yi",ź:"z",ž:"z",ẑ:"z",ʑ:"z","ⱬ":"z",ż:"z",ẓ:"z",ȥ:"z",ẕ:"z","ᵶ":"z","ᶎ":"z",ʐ:"z",ƶ:"z","ɀ":"z",þ:"th",ff:"ff",ffi:"ffi",ffl:"ffl",fi:"fi",fl:"fl",ij:"ij",œ:"oe",st:"st","ₐ":"a","ₑ":"e","ᵢ":"i","ⱼ":"j","ₒ":"o","ᵣ":"r","ᵤ":"u","ᵥ":"v","ₓ":"x",Ё:"YO",Й:"I",Ц:"TS",У:"U",К:"K",Е:"E",Н:"N",Г:"G",Ґ:"G",Ш:"SH",Щ:"SCH",З:"Z",Х:"H",Ъ:"'",ё:"yo",й:"i",ц:"ts",у:"u",к:"k",е:"e",н:"n",г:"g",ґ:"g",ш:"sh",щ:"sch",з:"z",х:"h",ъ:"'",Ф:"F",Ы:"I",В:"V",А:"a",П:"P",Р:"R",О:"O",Л:"L",Д:"D",Ж:"ZH",Э:"E",ф:"f",ы:"i",в:"v",а:"a",п:"p",р:"r",о:"o",л:"l",д:"d",ж:"zh",э:"e",Я:"Ya",Ч:"CH",С:"S",М:"M",И:"I",Т:"T",Ь:"'",Б:"B",Ю:"YU",я:"ya",ч:"ch",с:"s",м:"m",и:"i",т:"t",ь:"'",б:"b",ю:"yu"};const mh=(e,t)=>t?e?qa(e).toLowerCase().includes(qa(t.toLowerCase())):!1:!0,C2=(e,t)=>t?e?qa(e).toLowerCase().startsWith(qa(t.toLowerCase())):!1:!0,em=(e,t,n)=>{const r=localStorage.getItem("search-use-asterisk")!=="false",i=n!=null&&n.trimSpaces?t==null?void 0:t.replaceAll(" ",""):t,a=n!=null&&n.trimSpaces?e==null?void 0:e.replaceAll(" ",""):e;return i?r?i.startsWith("*")?mh(a,i.substring(1)):C2(a,i):mh(a,i):!0};function T2(e,t){return function(){return e.apply(t,arguments)}}const{toString:RO}=Object.prototype,{getPrototypeOf:tm}=Object,_u=(e=>t=>{const n=RO.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),lr=e=>(e=e.toLowerCase(),t=>_u(t)===e),wu=e=>t=>typeof t===e,{isArray:oo}=Array,hs=wu("undefined");function jO(e){return e!==null&&!hs(e)&&e.constructor!==null&&!hs(e.constructor)&&Nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const S2=lr("ArrayBuffer");function PO(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&S2(e.buffer),t}const IO=wu("string"),Nn=wu("function"),k2=wu("number"),Cu=e=>e!==null&&typeof e=="object",DO=e=>e===!0||e===!1,el=e=>{if(_u(e)!=="object")return!1;const t=tm(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},NO=lr("Date"),LO=lr("File"),FO=lr("Blob"),BO=lr("FileList"),UO=e=>Cu(e)&&Nn(e.pipe),WO=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Nn(e.append)&&((t=_u(e))==="formdata"||t==="object"&&Nn(e.toString)&&e.toString()==="[object FormData]"))},zO=lr("URLSearchParams"),[HO,VO,qO,YO]=["ReadableStream","Request","Response","Headers"].map(lr),GO=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Js(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),oo(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function E2(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Pi=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,O2=e=>!hs(e)&&e!==Pi;function gh(){const{caseless:e}=O2(this)&&this||{},t={},n=(r,i)=>{const a=e&&E2(t,i)||i;el(t[a])&&el(r)?t[a]=gh(t[a],r):el(r)?t[a]=gh({},r):oo(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Js(arguments[r],n);return t}const ZO=(e,t,n,{allOwnKeys:r}={})=>(Js(t,(i,a)=>{n&&Nn(i)?e[a]=T2(i,n):e[a]=i},{allOwnKeys:r}),e),KO=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),XO=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},QO=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&tm(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},JO=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},eM=e=>{if(!e)return null;if(oo(e))return e;let t=e.length;if(!k2(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},tM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&tm(Uint8Array)),nM=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},rM=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},iM=lr("HTMLFormElement"),aM=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),K0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),oM=lr("RegExp"),M2=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Js(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},sM=e=>{M2(e,(t,n)=>{if(Nn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Nn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},cM=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return oo(e)?r(e):r(String(e).split(t)),n},lM=()=>{},uM=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,lf="abcdefghijklmnopqrstuvwxyz",X0="0123456789",$2={DIGIT:X0,ALPHA:lf,ALPHA_DIGIT:lf+lf.toUpperCase()+X0},dM=(e=16,t=$2.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function fM(e){return!!(e&&Nn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const hM=e=>{const t=new Array(10),n=(r,i)=>{if(Cu(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=oo(r)?[]:{};return Js(r,(o,s)=>{const c=n(o,i+1);!hs(c)&&(a[s]=c)}),t[i]=void 0,a}}return r};return n(e,0)},pM=lr("AsyncFunction"),mM=e=>e&&(Cu(e)||Nn(e))&&Nn(e.then)&&Nn(e.catch),A2=((e,t)=>e?setImmediate:t?((n,r)=>(Pi.addEventListener("message",({source:i,data:a})=>{i===Pi&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Pi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Nn(Pi.postMessage)),gM=typeof queueMicrotask<"u"?queueMicrotask.bind(Pi):typeof process<"u"&&process.nextTick||A2,ie={isArray:oo,isArrayBuffer:S2,isBuffer:jO,isFormData:WO,isArrayBufferView:PO,isString:IO,isNumber:k2,isBoolean:DO,isObject:Cu,isPlainObject:el,isReadableStream:HO,isRequest:VO,isResponse:qO,isHeaders:YO,isUndefined:hs,isDate:NO,isFile:LO,isBlob:FO,isRegExp:oM,isFunction:Nn,isStream:UO,isURLSearchParams:zO,isTypedArray:tM,isFileList:BO,forEach:Js,merge:gh,extend:ZO,trim:GO,stripBOM:KO,inherits:XO,toFlatObject:QO,kindOf:_u,kindOfTest:lr,endsWith:JO,toArray:eM,forEachEntry:nM,matchAll:rM,isHTMLForm:iM,hasOwnProperty:K0,hasOwnProp:K0,reduceDescriptors:M2,freezeMethods:sM,toObjectSet:cM,toCamelCase:aM,noop:lM,toFiniteNumber:uM,findKey:E2,global:Pi,isContextDefined:O2,ALPHABET:$2,generateString:dM,isSpecCompliantForm:fM,toJSONObject:hM,isAsyncFn:pM,isThenable:mM,setImmediate:A2,asap:gM};function Ze(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}ie.inherits(Ze,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ie.toJSONObject(this.config),code:this.code,status:this.status}}});const R2=Ze.prototype,j2={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{j2[e]={value:e}});Object.defineProperties(Ze,j2);Object.defineProperty(R2,"isAxiosError",{value:!0});Ze.from=(e,t,n,r,i,a)=>{const o=Object.create(R2);return ie.toFlatObject(e,o,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),Ze.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const vM=null;function vh(e){return ie.isPlainObject(e)||ie.isArray(e)}function P2(e){return ie.endsWith(e,"[]")?e.slice(0,-2):e}function Q0(e,t,n){return e?e.concat(t).map(function(i,a){return i=P2(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function yM(e){return ie.isArray(e)&&!e.some(vh)}const bM=ie.toFlatObject(ie,{},null,function(t){return/^is[A-Z]/.test(t)});function Tu(e,t,n){if(!ie.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=ie.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,v){return!ie.isUndefined(v[p])});const r=n.metaTokens,i=n.visitor||u,a=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&ie.isSpecCompliantForm(t);if(!ie.isFunction(i))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(ie.isDate(g))return g.toISOString();if(!c&&ie.isBlob(g))throw new Ze("Blob is not supported. Use a Buffer instead.");return ie.isArrayBuffer(g)||ie.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,p,v){let w=g;if(g&&!v&&typeof g=="object"){if(ie.endsWith(p,"{}"))p=r?p:p.slice(0,-2),g=JSON.stringify(g);else if(ie.isArray(g)&&yM(g)||(ie.isFileList(g)||ie.endsWith(p,"[]"))&&(w=ie.toArray(g)))return p=P2(p),w.forEach(function(x,S){!(ie.isUndefined(x)||x===null)&&t.append(o===!0?Q0([p],S,a):o===null?p:p+"[]",l(x))}),!1}return vh(g)?!0:(t.append(Q0(v,p,a),l(g)),!1)}const d=[],f=Object.assign(bM,{defaultVisitor:u,convertValue:l,isVisitable:vh});function h(g,p){if(!ie.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(g),ie.forEach(g,function(w,_){(!(ie.isUndefined(w)||w===null)&&i.call(t,w,ie.isString(_)?_.trim():_,p,f))===!0&&h(w,p?p.concat(_):[_])}),d.pop()}}if(!ie.isObject(e))throw new TypeError("data must be an object");return h(e),t}function J0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function nm(e,t){this._pairs=[],e&&Tu(e,this,t)}const I2=nm.prototype;I2.append=function(t,n){this._pairs.push([t,n])};I2.toString=function(t){const n=t?function(r){return t.call(this,r,J0)}:J0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function xM(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function D2(e,t,n){if(!t)return e;const r=n&&n.encode||xM,i=n&&n.serialize;let a;if(i?a=i(t,n):a=ie.isURLSearchParams(t)?t.toString():new nm(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class ev{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ie.forEach(this.handlers,function(r){r!==null&&t(r)})}}const N2={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_M=typeof URLSearchParams<"u"?URLSearchParams:nm,wM=typeof FormData<"u"?FormData:null,CM=typeof Blob<"u"?Blob:null,TM={isBrowser:!0,classes:{URLSearchParams:_M,FormData:wM,Blob:CM},protocols:["http","https","file","blob","url","data"]},rm=typeof window<"u"&&typeof document<"u",yh=typeof navigator=="object"&&navigator||void 0,SM=rm&&(!yh||["ReactNative","NativeScript","NS"].indexOf(yh.product)<0),kM=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",EM=rm&&window.location.href||"http://localhost",OM=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rm,hasStandardBrowserEnv:SM,hasStandardBrowserWebWorkerEnv:kM,navigator:yh,origin:EM},Symbol.toStringTag,{value:"Module"})),Rn={...OM,...TM};function MM(e,t){return Tu(e,new Rn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return Rn.isNode&&ie.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function $M(e){return ie.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function AM(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function L2(e){function t(n,r,i,a){let o=n[a++];if(o==="__proto__")return!0;const s=Number.isFinite(+o),c=a>=n.length;return o=!o&&ie.isArray(i)?i.length:o,c?(ie.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!ie.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&ie.isArray(i[o])&&(i[o]=AM(i[o])),!s)}if(ie.isFormData(e)&&ie.isFunction(e.entries)){const n={};return ie.forEachEntry(e,(r,i)=>{t($M(r),i,n,0)}),n}return null}function RM(e,t,n){if(ie.isString(e))try{return(t||JSON.parse)(e),ie.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ec={transitional:N2,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=ie.isObject(t);if(a&&ie.isHTMLForm(t)&&(t=new FormData(t)),ie.isFormData(t))return i?JSON.stringify(L2(t)):t;if(ie.isArrayBuffer(t)||ie.isBuffer(t)||ie.isStream(t)||ie.isFile(t)||ie.isBlob(t)||ie.isReadableStream(t))return t;if(ie.isArrayBufferView(t))return t.buffer;if(ie.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return MM(t,this.formSerializer).toString();if((s=ie.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Tu(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),RM(t)):t}],transformResponse:[function(t){const n=this.transitional||ec.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(ie.isResponse(t)||ie.isReadableStream(t))return t;if(t&&ie.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?Ze.from(s,Ze.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Rn.classes.FormData,Blob:Rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ie.forEach(["delete","get","head","post","put","patch"],e=>{ec.headers[e]={}});const jM=ie.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),PM=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
230
|
+
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&jM[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},tv=Symbol("internals");function jo(e){return e&&String(e).trim().toLowerCase()}function tl(e){return e===!1||e==null?e:ie.isArray(e)?e.map(tl):String(e)}function IM(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const DM=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function uf(e,t,n,r,i){if(ie.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!ie.isString(t)){if(ie.isString(r))return t.indexOf(r)!==-1;if(ie.isRegExp(r))return r.test(t)}}function NM(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function LM(e,t){const n=ie.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class jn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,c,l){const u=jo(c);if(!u)throw new Error("header name must be a non-empty string");const d=ie.findKey(i,u);(!d||i[d]===void 0||l===!0||l===void 0&&i[d]!==!1)&&(i[d||c]=tl(s))}const o=(s,c)=>ie.forEach(s,(l,u)=>a(l,u,c));if(ie.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(ie.isString(t)&&(t=t.trim())&&!DM(t))o(PM(t),n);else if(ie.isHeaders(t))for(const[s,c]of t.entries())a(c,s,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=jo(t),t){const r=ie.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return IM(i);if(ie.isFunction(n))return n.call(this,i,r);if(ie.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=jo(t),t){const r=ie.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||uf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=jo(o),o){const s=ie.findKey(r,o);s&&(!n||uf(r,r[s],s,n))&&(delete r[s],i=!0)}}return ie.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||uf(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return ie.forEach(this,(i,a)=>{const o=ie.findKey(r,a);if(o){n[o]=tl(i),delete n[a];return}const s=t?NM(a):String(a).trim();s!==a&&delete n[a],n[s]=tl(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return ie.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&ie.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
231
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[tv]=this[tv]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=jo(o);r[s]||(LM(i,o),r[s]=!0)}return ie.isArray(t)?t.forEach(a):a(t),this}}jn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ie.reduceDescriptors(jn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});ie.freezeMethods(jn);function df(e,t){const n=this||ec,r=t||n,i=jn.from(r.headers);let a=r.data;return ie.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function F2(e){return!!(e&&e.__CANCEL__)}function so(e,t,n){Ze.call(this,e??"canceled",Ze.ERR_CANCELED,t,n),this.name="CanceledError"}ie.inherits(so,Ze,{__CANCEL__:!0});function B2(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ze("Request failed with status code "+n.status,[Ze.ERR_BAD_REQUEST,Ze.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function FM(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function BM(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=r[a];o||(o=l),n[i]=c,r[i]=l;let d=a,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const h=u&&l-u;return h?Math.round(f*1e3/h):void 0}}function UM(e,t){let n=0,r=1e3/t,i,a;const o=(l,u=Date.now())=>{n=u,i=null,a&&(clearTimeout(a),a=null),e.apply(null,l)};return[(...l)=>{const u=Date.now(),d=u-n;d>=r?o(l,u):(i=l,a||(a=setTimeout(()=>{a=null,o(i)},r-d)))},()=>i&&o(i)]}const wl=(e,t,n=3)=>{let r=0;const i=BM(50,250);return UM(a=>{const o=a.loaded,s=a.lengthComputable?a.total:void 0,c=o-r,l=i(c),u=o<=s;r=o;const d={loaded:o,total:s,progress:s?o/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&u?(s-o)/l:void 0,event:a,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},nv=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},rv=e=>(...t)=>ie.asap(()=>e(...t)),WM=Rn.hasStandardBrowserEnv?function(){const t=Rn.navigator&&/(msie|trident)/i.test(Rn.navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=ie.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),zM=Rn.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const o=[e+"="+encodeURIComponent(t)];ie.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),ie.isString(r)&&o.push("path="+r),ie.isString(i)&&o.push("domain="+i),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function HM(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function VM(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function U2(e,t){return e&&!HM(t)?VM(e,t):t}const iv=e=>e instanceof jn?{...e}:e;function Ki(e,t){t=t||{};const n={};function r(l,u,d){return ie.isPlainObject(l)&&ie.isPlainObject(u)?ie.merge.call({caseless:d},l,u):ie.isPlainObject(u)?ie.merge({},u):ie.isArray(u)?u.slice():u}function i(l,u,d){if(ie.isUndefined(u)){if(!ie.isUndefined(l))return r(void 0,l,d)}else return r(l,u,d)}function a(l,u){if(!ie.isUndefined(u))return r(void 0,u)}function o(l,u){if(ie.isUndefined(u)){if(!ie.isUndefined(l))return r(void 0,l)}else return r(void 0,u)}function s(l,u,d){if(d in t)return r(l,u);if(d in e)return r(void 0,l)}const c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(l,u)=>i(iv(l),iv(u),!0)};return ie.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=c[u]||i,f=d(e[u],t[u],u);ie.isUndefined(f)&&d!==s||(n[u]=f)}),n}const W2=e=>{const t=Ki({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;t.headers=o=jn.from(o),t.url=D2(U2(t.baseURL,t.url),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(ie.isFormData(n)){if(Rn.hasStandardBrowserEnv||Rn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((c=o.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];o.setContentType([l||"multipart/form-data",...u].join("; "))}}if(Rn.hasStandardBrowserEnv&&(r&&ie.isFunction(r)&&(r=r(t)),r||r!==!1&&WM(t.url))){const l=i&&a&&zM.read(a);l&&o.set(i,l)}return t},qM=typeof XMLHttpRequest<"u",YM=qM&&function(e){return new Promise(function(n,r){const i=W2(e);let a=i.data;const o=jn.from(i.headers).normalize();let{responseType:s,onUploadProgress:c,onDownloadProgress:l}=i,u,d,f,h,g;function p(){h&&h(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(i.method.toUpperCase(),i.url,!0),v.timeout=i.timeout;function w(){if(!v)return;const x=jn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),b={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:x,config:e,request:v};B2(function(j){n(j),p()},function(j){r(j),p()},b),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new Ze("Request aborted",Ze.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new Ze("Network Error",Ze.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const b=i.transitional||N2;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Ze(S,b.clarifyTimeoutError?Ze.ETIMEDOUT:Ze.ECONNABORTED,e,v)),v=null},a===void 0&&o.setContentType(null),"setRequestHeader"in v&&ie.forEach(o.toJSON(),function(S,b){v.setRequestHeader(b,S)}),ie.isUndefined(i.withCredentials)||(v.withCredentials=!!i.withCredentials),s&&s!=="json"&&(v.responseType=i.responseType),l&&([f,g]=wl(l,!0),v.addEventListener("progress",f)),c&&v.upload&&([d,h]=wl(c),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(u=x=>{v&&(r(!x||x.type?new so(null,e,v):x),v.abort(),v=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const _=FM(i.url);if(_&&Rn.protocols.indexOf(_)===-1){r(new Ze("Unsupported protocol "+_+":",Ze.ERR_BAD_REQUEST,e));return}v.send(a||null)})},GM=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const a=function(l){if(!i){i=!0,s();const u=l instanceof Error?l:this.reason;r.abort(u instanceof Ze?u:new so(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,a(new Ze(`timeout ${t} of ms exceeded`,Ze.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(a):l.removeEventListener("abort",a)}),e=null)};e.forEach(l=>l.addEventListener("abort",a));const{signal:c}=r;return c.unsubscribe=()=>ie.asap(s),c}},ZM=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},KM=async function*(e,t){for await(const n of XM(e))yield*ZM(n,t)},XM=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},av=(e,t,n,r)=>{const i=KM(e,t);let a=0,o,s=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await i.next();if(l){s(),c.close();return}let d=u.byteLength;if(n){let f=a+=d;n(f)}c.enqueue(new Uint8Array(u))}catch(l){throw s(l),l}},cancel(c){return s(c),i.return()}},{highWaterMark:2})},Su=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",z2=Su&&typeof ReadableStream=="function",QM=Su&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),H2=(e,...t)=>{try{return!!e(...t)}catch{return!1}},JM=z2&&H2(()=>{let e=!1;const t=new Request(Rn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),ov=64*1024,bh=z2&&H2(()=>ie.isReadableStream(new Response("").body)),Cl={stream:bh&&(e=>e.body)};Su&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Cl[t]&&(Cl[t]=ie.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ze(`Response type '${t}' is not supported`,Ze.ERR_NOT_SUPPORT,r)})})})(new Response);const e8=async e=>{if(e==null)return 0;if(ie.isBlob(e))return e.size;if(ie.isSpecCompliantForm(e))return(await new Request(Rn.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(ie.isArrayBufferView(e)||ie.isArrayBuffer(e))return e.byteLength;if(ie.isURLSearchParams(e)&&(e=e+""),ie.isString(e))return(await QM(e)).byteLength},t8=async(e,t)=>{const n=ie.toFiniteNumber(e.getContentLength());return n??e8(t)},n8=Su&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:o,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:f}=W2(e);l=l?(l+"").toLowerCase():"text";let h=GM([i,a&&a.toAbortSignal()],o),g;const p=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(c&&JM&&n!=="get"&&n!=="head"&&(v=await t8(u,r))!==0){let b=new Request(t,{method:"POST",body:r,duplex:"half"}),T;if(ie.isFormData(r)&&(T=b.headers.get("content-type"))&&u.setContentType(T),b.body){const[j,M]=nv(v,wl(rv(c)));r=av(b.body,ov,j,M)}}ie.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;g=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let _=await fetch(g);const x=bh&&(l==="stream"||l==="response");if(bh&&(s||x&&p)){const b={};["status","statusText","headers"].forEach(k=>{b[k]=_[k]});const T=ie.toFiniteNumber(_.headers.get("content-length")),[j,M]=s&&nv(T,wl(rv(s),!0))||[];_=new Response(av(_.body,ov,j,()=>{M&&M(),p&&p()}),b)}l=l||"text";let S=await Cl[ie.findKey(Cl,l)||"text"](_,e);return!x&&p&&p(),await new Promise((b,T)=>{B2(b,T,{data:S,headers:jn.from(_.headers),status:_.status,statusText:_.statusText,config:e,request:g})})}catch(w){throw p&&p(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Ze("Network Error",Ze.ERR_NETWORK,e,g),{cause:w.cause||w}):Ze.from(w,w&&w.code,e,g)}}),xh={http:vM,xhr:YM,fetch:n8};ie.forEach(xh,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const sv=e=>`- ${e}`,r8=e=>ie.isFunction(e)||e===null||e===!1,V2={getAdapter:e=>{e=ie.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let o;if(r=n,!r8(n)&&(r=xh[(o=String(n)).toLowerCase()],r===void 0))throw new Ze(`Unknown adapter '${o}'`);if(r)break;i[o||"#"+a]=r}if(!r){const a=Object.entries(i).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let o=t?a.length>1?`since :
|
|
232
232
|
`+a.map(sv).join(`
|
|
233
|
-
`):" "+sv(a[0]):"as no adapter specified";throw new Ze("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:xh};function ff(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new so(null,e)}function cv(e){return ff(e),e.headers=jn.from(e.headers),e.data=df.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),V2.getAdapter(e.adapter||ec.adapter)(e).then(function(r){return ff(e),r.data=df.call(e,e.transformResponse,r),r.headers=jn.from(r.headers),r},function(r){return F2(r)||(ff(e),r&&r.response&&(r.response.data=df.call(e,e.transformResponse,r.response),r.response.headers=jn.from(r.response.headers))),Promise.reject(r)})}const q2="1.7.7",im={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{im[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const lv={};im.transitional=function(t,n,r){function i(a,o){return"[Axios v"+q2+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new Ze(i(o," has been removed"+(n?" in "+n:"")),Ze.ERR_DEPRECATED);return n&&!lv[o]&&(lv[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function
|
|
234
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ki(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&_h.assertOptions(r,{silentJSONParsing:Jr.transitional(Jr.boolean),forcedJSONParsing:Jr.transitional(Jr.boolean),clarifyTimeoutError:Jr.transitional(Jr.boolean)},!1),i!=null&&(ie.isFunction(i)?n.paramsSerializer={serialize:i}:_h.assertOptions(i,{encode:Jr.function,serialize:Jr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&ie.merge(a.common,a[n.method]);a&&ie.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=jn.concat(o,a);const s=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,d=0,f;if(!c){const g=[cv.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,l),f=g.length,u=Promise.resolve(n);d<f;)u=u.then(g[d++],g[d++]);return u}f=s.length;let h=n;for(d=0;d<f;){const g=s[d++],p=s[d++];try{h=g(h)}catch(v){p.call(this,v);break}}try{u=cv.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=l.length;d<f;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=Ki(this.defaults,t);const n=U2(t.baseURL,t.url);return D2(n,t.params,t.paramsSerializer)}}ie.forEach(["delete","get","head","options"],function(t){zi.prototype[t]=function(n,r){return this.request(Ki(r||{},{method:t,url:n,data:(r||{}).data}))}});ie.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(Ki(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}zi.prototype[t]=n(),zi.prototype[t+"Form"]=n(!0)});class am{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new so(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new am(function(i){t=i}),cancel:t}}}function
|
|
233
|
+
`):" "+sv(a[0]):"as no adapter specified";throw new Ze("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:xh};function ff(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new so(null,e)}function cv(e){return ff(e),e.headers=jn.from(e.headers),e.data=df.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),V2.getAdapter(e.adapter||ec.adapter)(e).then(function(r){return ff(e),r.data=df.call(e,e.transformResponse,r),r.headers=jn.from(r.headers),r},function(r){return F2(r)||(ff(e),r&&r.response&&(r.response.data=df.call(e,e.transformResponse,r.response),r.response.headers=jn.from(r.response.headers))),Promise.reject(r)})}const q2="1.7.7",im={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{im[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const lv={};im.transitional=function(t,n,r){function i(a,o){return"[Axios v"+q2+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new Ze(i(o," has been removed"+(n?" in "+n:"")),Ze.ERR_DEPRECATED);return n&&!lv[o]&&(lv[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function i8(e,t,n){if(typeof e!="object")throw new Ze("options must be an object",Ze.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],c=s===void 0||o(s,a,e);if(c!==!0)throw new Ze("option "+a+" must be "+c,Ze.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ze("Unknown option "+a,Ze.ERR_BAD_OPTION)}}const _h={assertOptions:i8,validators:im},Jr=_h.validators;class zi{constructor(t){this.defaults=t,this.interceptors={request:new ev,response:new ev}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
234
|
+
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ki(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&_h.assertOptions(r,{silentJSONParsing:Jr.transitional(Jr.boolean),forcedJSONParsing:Jr.transitional(Jr.boolean),clarifyTimeoutError:Jr.transitional(Jr.boolean)},!1),i!=null&&(ie.isFunction(i)?n.paramsSerializer={serialize:i}:_h.assertOptions(i,{encode:Jr.function,serialize:Jr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&ie.merge(a.common,a[n.method]);a&&ie.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),n.headers=jn.concat(o,a);const s=[];let c=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(c=c&&p.synchronous,s.unshift(p.fulfilled,p.rejected))});const l=[];this.interceptors.response.forEach(function(p){l.push(p.fulfilled,p.rejected)});let u,d=0,f;if(!c){const g=[cv.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,l),f=g.length,u=Promise.resolve(n);d<f;)u=u.then(g[d++],g[d++]);return u}f=s.length;let h=n;for(d=0;d<f;){const g=s[d++],p=s[d++];try{h=g(h)}catch(v){p.call(this,v);break}}try{u=cv.call(this,h)}catch(g){return Promise.reject(g)}for(d=0,f=l.length;d<f;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=Ki(this.defaults,t);const n=U2(t.baseURL,t.url);return D2(n,t.params,t.paramsSerializer)}}ie.forEach(["delete","get","head","options"],function(t){zi.prototype[t]=function(n,r){return this.request(Ki(r||{},{method:t,url:n,data:(r||{}).data}))}});ie.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request(Ki(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}zi.prototype[t]=n(),zi.prototype[t+"Form"]=n(!0)});class am{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new so(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new am(function(i){t=i}),cancel:t}}}function a8(e){return function(n){return e.apply(null,n)}}function o8(e){return ie.isObject(e)&&e.isAxiosError===!0}const wh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wh).forEach(([e,t])=>{wh[t]=e});function Y2(e){const t=new zi(e),n=T2(zi.prototype.request,t);return ie.extend(n,zi.prototype,t,{allOwnKeys:!0}),ie.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Y2(Ki(e,i))},n}const Ut=Y2(ec);Ut.Axios=zi;Ut.CanceledError=so;Ut.CancelToken=am;Ut.isCancel=F2;Ut.VERSION=q2;Ut.toFormData=Tu;Ut.AxiosError=Ze;Ut.Cancel=Ut.CanceledError;Ut.all=function(t){return Promise.all(t)};Ut.spread=a8;Ut.isAxiosError=o8;Ut.mergeConfig=Ki;Ut.AxiosHeaders=jn;Ut.formToJSON=e=>L2(ie.isHTMLForm(e)?new FormData(e):e);Ut.getAdapter=V2.getAdapter;Ut.HttpStatusCode=wh;Ut.default=Ut;var Ac={};/*!
|
|
235
235
|
* cookie
|
|
236
236
|
* Copyright(c) 2012-2014 Roman Shtylman
|
|
237
237
|
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
238
238
|
* MIT Licensed
|
|
239
|
-
*/var uv;function
|
|
239
|
+
*/var uv;function s8(){if(uv)return Ac;uv=1,Ac.parse=o,Ac.serialize=l;var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,r=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,i=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,a=/^[\u0020-\u003A\u003D-\u007E]*$/;function o(h,g){if(typeof h!="string")throw new TypeError("argument str must be a string");var p={},v=h.length;if(v<2)return p;var w=g&&g.decode||u,_=0,x=0,S=0;do{if(x=h.indexOf("=",_),x===-1)break;if(S=h.indexOf(";",_),S===-1)S=v;else if(x>S){_=h.lastIndexOf(";",x-1)+1;continue}var b=s(h,_,x),T=c(h,x,b),j=h.slice(b,T);if(!t.call(p,j)){var M=s(h,x+1,S),k=c(h,S,M);h.charCodeAt(M)===34&&h.charCodeAt(k-1)===34&&(M++,k--);var E=h.slice(M,k);p[j]=f(E,w)}_=S+1}while(_<v);return p}function s(h,g,p){do{var v=h.charCodeAt(g);if(v!==32&&v!==9)return g}while(++g<p);return p}function c(h,g,p){for(;g>p;){var v=h.charCodeAt(--g);if(v!==32&&v!==9)return g+1}return p}function l(h,g,p){var v=p&&p.encode||encodeURIComponent;if(typeof v!="function")throw new TypeError("option encode is invalid");if(!n.test(h))throw new TypeError("argument name is invalid");var w=v(g);if(!r.test(w))throw new TypeError("argument val is invalid");var _=h+"="+w;if(!p)return _;if(p.maxAge!=null){var x=Math.floor(p.maxAge);if(!isFinite(x))throw new TypeError("option maxAge is invalid");_+="; Max-Age="+x}if(p.domain){if(!i.test(p.domain))throw new TypeError("option domain is invalid");_+="; Domain="+p.domain}if(p.path){if(!a.test(p.path))throw new TypeError("option path is invalid");_+="; Path="+p.path}if(p.expires){var S=p.expires;if(!d(S)||isNaN(S.valueOf()))throw new TypeError("option expires is invalid");_+="; Expires="+S.toUTCString()}if(p.httpOnly&&(_+="; HttpOnly"),p.secure&&(_+="; Secure"),p.partitioned&&(_+="; Partitioned"),p.priority){var b=typeof p.priority=="string"?p.priority.toLowerCase():p.priority;switch(b){case"low":_+="; Priority=Low";break;case"medium":_+="; Priority=Medium";break;case"high":_+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(p.sameSite){var T=typeof p.sameSite=="string"?p.sameSite.toLowerCase():p.sameSite;switch(T){case!0:_+="; SameSite=Strict";break;case"lax":_+="; SameSite=Lax";break;case"strict":_+="; SameSite=Strict";break;case"none":_+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return _}function u(h){return h.indexOf("%")!==-1?decodeURIComponent(h):h}function d(h){return e.call(h)==="[object Date]"}function f(h,g){try{return g(h)}catch{return h}}return Ac}var nl=s8();function c8(){const e=typeof global>"u"?void 0:global.TEST_HAS_DOCUMENT_COOKIE;return typeof e=="boolean"?e:typeof document=="object"&&typeof document.cookie=="string"}function l8(e){return typeof e=="string"?nl.parse(e):typeof e=="object"&&e!==null?e:{}}function hf(e,t={}){const n=u8(e);if(!t.doNotParse)try{return JSON.parse(n)}catch{}return e}function u8(e){return e&&e[0]==="j"&&e[1]===":"?e.substr(2):e}class d8{constructor(t,n={}){this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.update=()=>{if(!this.HAS_DOCUMENT_COOKIE)return;const i=this.cookies;this.cookies=nl.parse(document.cookie),this._checkChanges(i)};const r=typeof document>"u"?"":document.cookie;this.cookies=l8(t||r),this.defaultSetOptions=n,this.HAS_DOCUMENT_COOKIE=c8()}_emitChange(t){for(let n=0;n<this.changeListeners.length;++n)this.changeListeners[n](t)}_checkChanges(t){new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach(r=>{t[r]!==this.cookies[r]&&this._emitChange({name:r,value:hf(this.cookies[r])})})}_startPolling(){this.pollingInterval=setInterval(this.update,300)}_stopPolling(){this.pollingInterval&&clearInterval(this.pollingInterval)}get(t,n={}){return n.doNotUpdate||this.update(),hf(this.cookies[t],n)}getAll(t={}){t.doNotUpdate||this.update();const n={};for(let r in this.cookies)n[r]=hf(this.cookies[r],t);return n}set(t,n,r){r?r=Object.assign(Object.assign({},this.defaultSetOptions),r):r=this.defaultSetOptions;const i=typeof n=="string"?n:JSON.stringify(n);this.cookies=Object.assign(Object.assign({},this.cookies),{[t]:i}),this.HAS_DOCUMENT_COOKIE&&(document.cookie=nl.serialize(t,i,r)),this._emitChange({name:t,value:n,options:r})}remove(t,n){const r=n=Object.assign(Object.assign(Object.assign({},this.defaultSetOptions),n),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=Object.assign({},this.cookies),delete this.cookies[t],this.HAS_DOCUMENT_COOKIE&&(document.cookie=nl.serialize(t,"",r)),this._emitChange({name:t,value:void 0,options:n})}addChangeListener(t){this.changeListeners.push(t),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===1&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.addEventListener("change",this.update):this._startPolling())}removeChangeListener(t){const n=this.changeListeners.indexOf(t);n>=0&&this.changeListeners.splice(n,1),this.HAS_DOCUMENT_COOKIE&&this.changeListeners.length===0&&(typeof window=="object"&&"cookieStore"in window?window.cookieStore.removeEventListener("change",this.update):this._stopPolling())}}const f8=ue.createContext(new d8);var Rc={exports:{}},xt={};/** @license React v16.13.1
|
|
240
240
|
* react-is.production.min.js
|
|
241
241
|
*
|
|
242
242
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
243
243
|
*
|
|
244
244
|
* This source code is licensed under the MIT license found in the
|
|
245
245
|
* LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/var dv;function
|
|
246
|
+
*/var dv;function h8(){if(dv)return xt;dv=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function x(b){if(typeof b=="object"&&b!==null){var T=b.$$typeof;switch(T){case t:switch(b=b.type,b){case c:case l:case r:case a:case i:case d:return b;default:switch(b=b&&b.$$typeof,b){case s:case u:case g:case h:case o:return b;default:return T}}case n:return T}}}function S(b){return x(b)===l}return xt.AsyncMode=c,xt.ConcurrentMode=l,xt.ContextConsumer=s,xt.ContextProvider=o,xt.Element=t,xt.ForwardRef=u,xt.Fragment=r,xt.Lazy=g,xt.Memo=h,xt.Portal=n,xt.Profiler=a,xt.StrictMode=i,xt.Suspense=d,xt.isAsyncMode=function(b){return S(b)||x(b)===c},xt.isConcurrentMode=S,xt.isContextConsumer=function(b){return x(b)===s},xt.isContextProvider=function(b){return x(b)===o},xt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},xt.isForwardRef=function(b){return x(b)===u},xt.isFragment=function(b){return x(b)===r},xt.isLazy=function(b){return x(b)===g},xt.isMemo=function(b){return x(b)===h},xt.isPortal=function(b){return x(b)===n},xt.isProfiler=function(b){return x(b)===a},xt.isStrictMode=function(b){return x(b)===i},xt.isSuspense=function(b){return x(b)===d},xt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===r||b===l||b===a||b===i||b===d||b===f||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===o||b.$$typeof===s||b.$$typeof===u||b.$$typeof===v||b.$$typeof===w||b.$$typeof===_||b.$$typeof===p)},xt.typeOf=x,xt}var _t={};/** @license React v16.13.1
|
|
247
247
|
* react-is.development.js
|
|
248
248
|
*
|
|
249
249
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
250
250
|
*
|
|
251
251
|
* This source code is licensed under the MIT license found in the
|
|
252
252
|
* LICENSE file in the root directory of this source tree.
|
|
253
|
-
*/var fv;function m8(){return fv||(fv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===r||R===l||R===a||R===i||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===h||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===v||R.$$typeof===w||R.$$typeof===_||R.$$typeof===p)}function S(R){if(typeof R=="object"&&R!==null){var K=R.$$typeof;switch(K){case t:var Z=R.type;switch(Z){case c:case l:case r:case a:case i:case d:return Z;default:var ee=Z&&Z.$$typeof;switch(ee){case s:case u:case g:case h:case o:return ee;default:return K}}case n:return K}}}var b=c,T=l,j=s,M=o,k=t,E=u,C=r,O=g,$=h,A=n,P=a,D=i,N=d,q=!1;function z(R){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),U(R)||S(R)===c}function U(R){return S(R)===l}function G(R){return S(R)===s}function ne(R){return S(R)===o}function te(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function X(R){return S(R)===u}function J(R){return S(R)===r}function Q(R){return S(R)===g}function re(R){return S(R)===h}function F(R){return S(R)===n}function I(R){return S(R)===a}function L(R){return S(R)===i}function H(R){return S(R)===d}_t.AsyncMode=b,_t.ConcurrentMode=T,_t.ContextConsumer=j,_t.ContextProvider=M,_t.Element=k,_t.ForwardRef=E,_t.Fragment=C,_t.Lazy=O,_t.Memo=$,_t.Portal=A,_t.Profiler=P,_t.StrictMode=D,_t.Suspense=N,_t.isAsyncMode=z,_t.isConcurrentMode=U,_t.isContextConsumer=G,_t.isContextProvider=ne,_t.isElement=te,_t.isForwardRef=X,_t.isFragment=J,_t.isLazy=Q,_t.isMemo=re,_t.isPortal=F,_t.isProfiler=I,_t.isStrictMode=L,_t.isSuspense=H,_t.isValidElementType=x,_t.typeOf=S}()),_t}var hv;function g8(){return hv||(hv=1,process.env.NODE_ENV==="production"?Rc.exports=p8():Rc.exports=m8()),Rc.exports}var pf,pv;function v8(){if(pv)return pf;pv=1;var e=g8(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function o(g){return e.isMemo(g)?i:a[g.$$typeof]||t}var s=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(g,p,v){if(typeof p!="string"){if(f){var w=d(p);w&&w!==f&&h(g,w,v)}var _=c(p);l&&(_=_.concat(l(p)));for(var x=o(g),S=o(p),b=0;b<_.length;++b){var T=_[b];if(!n[T]&&!(v&&v[T])&&!(S&&S[T])&&!(x&&x[T])){var j=u(p,T);try{s(g,T,j)}catch{}}}}return g}return pf=h,pf}v8();function y8(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function om(e,t){const n=m.useContext(h8);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[a,o]=m.useState(()=>n.getAll(i));y8()&&m.useLayoutEffect(()=>{function u(){const d=n.getAll(i);b8(e||null,d,a)&&o(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,a]);const s=m.useMemo(()=>n.set.bind(n),[n]),c=m.useMemo(()=>n.remove.bind(n),[n]),l=m.useMemo(()=>n.update.bind(n),[n]);return[a,s,c,l]}function b8(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const x8=()=>{const{axiosOptions:e,cookieDomain:t}=m.useContext(Kt),[,n,r]=om(["Authorization"]),i=Ut.create(e),a=m.useCallback(()=>{const c=localStorage.getItem("token");return c!==null&&c.length>0},[]),o=m.useCallback(async(c,l)=>i.post("/user/login",{kid:c,password:l}).then(u=>(localStorage.setItem("token",u.data),n("Authorization",u.data,{path:"/",secure:!0,sameSite:"none",domain:t,expires:hb(new Date(Date.now()),24)}),u.data)).catch(u=>(console.log(u),null)),[i,n,t]),s=m.useCallback(()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),r("Authorization")},[r]);return{isAuthenticated:a,login:o,logout:s}},_8=()=>{const[,,e]=om(["Authorization"]),{msalScopes:t,msalExtraScopes:n}=m.useContext(bu),{instance:r,inProgress:i}=a0.useMsal(),a=a0.useIsAuthenticated(),o=m.useCallback(()=>a,[a]),s=m.useCallback(()=>!o()&&i!==QC.InteractionStatus.None,[o,i]),c=m.useCallback(async()=>r.loginRedirect({scopes:t,extraScopesToConsent:n}).then(()=>"").catch(()=>null),[r,t,n]),l=m.useCallback(()=>{r.logout(),localStorage.removeItem("user"),e("Authorization")},[e,r]);return{isAuthenticated:o,isAuthenticating:s,login:c,logout:l}},G2=()=>{const{useMsal:e}=m.useContext(bu),t=x8(),n=_8();return{isAuthenticated:e?n.isAuthenticated:t.isAuthenticated,isAuthenticating:e?n.isAuthenticating:()=>!1,login:e?n.login:t.login,logout:e?n.logout:t.logout}},w8="_toast_1s57i_1",Po={toast:w8},C8=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},ku=()=>({addNotification:m.useCallback((t,n)=>{const r=m2(t),i=C8(n),a=y.jsxs(y.Fragment,{children:[r,y.jsx(e2,{onClick:()=>xa.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});switch(n){case"success":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(aE,{size:12}),className:oe("luminus-toast-success rounded shadow bg-success",Po.toast)});break}case"danger":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(Zk,{size:12}),className:oe("luminus-toast-danger rounded shadow bg-danger",Po.toast)});break}case"warning":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(Vk,{size:12}),className:oe("luminus-toast-warning rounded shadow bg-warning",Po.toast)});break}case"info":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(Yk,{size:12}),className:oe("luminus-toast-info rounded shadow bg-info",Po.toast)});break}case"prompt":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(Gk,{size:12}),className:oe("luminus-toast-prompt rounded shadow bg-light",Po.toast)});break}}},[])}),T8=Ut.CancelToken,Eu=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:a,noToastOnStatus:o}={...e},{language:s,axiosOptions:c,texts:{axios:l}}=m.useContext(Kt),{delegation:u}=m.useContext(u2),{getToken:d}=m.useContext(bu),f=m.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:h}=ku(),{isAuthenticating:g}=G2(),p=m.useMemo(()=>Ut.create(c),[c]),v=m.useCallback(async _=>{var S,b,T;if(t&&!_.headers.Authorization){if(g())return console.log("Authentication in progress, waiting for token..."),Promise.reject(new Error("Authentication in progress"));const j=i?{token:i,expiresOn:hb(new Date(Date.now()),1)}:await d();if(!j)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(yb(j.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));_.headers.Authorization=`Bearer ${j.token}`}f!==null&&!a&&(_.headers.DelegationId=f.toString());const x=localStorage.getItem("search-use-asterisk")!=="false";return _.headers["Search-Use-Asterisk"]=x?"true":"false",(S=_.url)!=null&&S.includes("culture=")?_.url=(b=_.url)==null?void 0:b.replace(/culture=[a-z]{2}/,`culture=${s}`):_.url=`${_.url}${(T=_.url)!=null&&T.includes("?")?"&":"?"}culture=${s}`,_},[t,d,s,i,f,a,g]),w=m.useCallback(_=>{var b,T;if(console.log(_),Ut.isCancel(_)||_.message==="Authentication in progress"||_.message==="No bearer token"||_.message==="Token expired")return Promise.reject(_);const x=Qp(_);if(x.length>0){const j=x.find(M=>M.name.toLowerCase()==="others");return j?(!r&&h(j.errors,"danger"),Promise.reject(_)):(!r&&h(l.validationError,"warning"),Promise.reject(_))}const S=h2(_);return S!==null?(!r&&h(`${l.permissionError}: ${fs(", ",...S)}`,"danger"),Promise.reject(_)):(o??[]).includes((b=_.response)==null?void 0:b.status)?Promise.reject(_):((T=_.response)==null?void 0:T.status)===403?(!r&&h(l.forbiddenError,"danger"),Promise.reject(_)):_.message&&_.message==="Network Error"?(!r&&h(l.networkError,"danger"),Promise.reject(_)):(Ut.isCancel(_)||(!r&&h(l.unexpectedError,"danger"),(_.response||_.request)&&!r&&h(l.unexpectedError,"danger")),Promise.reject(_))},[h,l.forbiddenError,l.networkError,l.permissionError,l.unexpectedError,l.validationError,r,o]);return m.useEffect(()=>{n&&(p.defaults.baseURL=n),p.interceptors.request.clear(),p.interceptors.response.clear();const _=p.interceptors.request.use(v,S=>Promise.reject(S)),x=p.interceptors.response.use(S=>S,w);return()=>{p.interceptors.request.eject(_),p.interceptors.response.eject(x)}},[p.defaults,p.interceptors.request,p.interceptors.response,n,v,w]),p};let Io;const sm=()=>{const{show:e,text:t,showConfirm:n,hideConfirm:r,textSm:i}=m.useContext(n2),a=()=>{r()};return{confirm:async(l,u)=>(n(l,u),new Promise(d=>{Io=d})),onConfirm:()=>{a(),Io&&Io(!0)},onCancel:()=>{a(),Io&&Io(!1)},show:e,text:t,textSm:i}};var lt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(lt||(lt={}));var Ch;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Ch||(Ch={}));const Ce=lt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ai=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},he=lt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),S8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ln extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof Ln))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,lt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ln.create=e=>new Ln(e);const Ya=(e,t)=>{let n;switch(e.code){case he.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,lt.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:n=`Unrecognized key(s) in object: ${lt.joinValues(e.keys,", ")}`;break;case he.invalid_union:n="Invalid input";break;case he.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${lt.joinValues(e.options)}`;break;case he.invalid_enum_value:n=`Invalid enum value. Expected ${lt.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:n="Invalid function arguments";break;case he.invalid_return_type:n="Invalid function return type";break;case he.invalid_date:n="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:lt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case he.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case he.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case he.custom:n="Invalid input";break;case he.invalid_intersection_types:n="Intersection results could not be merged";break;case he.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:n="Number must be finite";break;default:n=t.defaultError,lt.assertNever(e)}return{message:n}};let Z2=Ya;function k8(e){Z2=e}function Tl(){return Z2}const Sl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},E8=[];function _e(e,t){const n=Tl(),r=Sl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ya?void 0:Ya].filter(i=>!!i)});e.common.issues.push(r)}class yn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Be;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Be;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Be=Object.freeze({status:"aborted"}),Oa=e=>({status:"dirty",value:e}),Tn=e=>({status:"valid",value:e}),Th=e=>e.status==="aborted",Sh=e=>e.status==="dirty",ps=e=>e.status==="valid",ms=e=>typeof Promise<"u"&&e instanceof Promise;function kl(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function K2(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var $e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})($e||($e={}));var Zo,Ko;class vr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const mv=(e,t)=>{if(ps(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ln(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class et{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ai(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ms(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ai(t)},a=this._parseSync({data:t,path:i.path,parent:i});return mv(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ai(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(ms(i)?i:Promise.resolve(i));return mv(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:he.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new sr({schema:this,typeName:Fe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return mr.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return or.create(this,this._def)}promise(){return Za.create(this,this._def)}or(t){return bs.create([this,t],this._def)}and(t){return xs.create(this,t,this._def)}transform(t){return new sr({...Ke(this._def),schema:this,typeName:Fe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ss({...Ke(this._def),innerType:this,defaultValue:n,typeName:Fe.ZodDefault})}brand(){return new cm({typeName:Fe.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ks({...Ke(this._def),innerType:this,catchValue:n,typeName:Fe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tc.create(this,t)}readonly(){return Es.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const O8=/^c[^\s-]{8,}$/i,M8=/^[0-9a-z]+$/,$8=/^[0-9A-HJKMNP-TV-Z]{26}$/,A8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,R8=/^[a-z0-9_-]{21}$/i,j8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,P8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,I8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mf;const D8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,N8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,L8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,X2="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",F8=new RegExp(`^${X2}$`);function Q2(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function B8(e){return new RegExp(`^${Q2(e)}$`)}function J2(e){let t=`${X2}T${Q2(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function U8(e,t){return!!((t==="v4"||!t)&&D8.test(e)||(t==="v6"||!t)&&N8.test(e))}class ir extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Ce.string,received:a.parsedType}),Be}const r=new yn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?_e(i,{code:he.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&_e(i,{code:he.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")P8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")mf||(mf=new RegExp(I8,"u")),mf.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")A8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")R8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")O8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")M8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")$8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:he.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:he.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?J2(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?F8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?B8(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?j8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?U8(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?L8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:he.invalid_string,message:a.message}),r.dirty()):lt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:he.invalid_string,...$e.errToObj(r)})}_addCheck(t){return new ir({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...$e.errToObj(t)})}url(t){return this._addCheck({kind:"url",...$e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...$e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...$e.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...$e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...$e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...$e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...$e.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...$e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...$e.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...$e.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...$e.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...$e.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...$e.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...$e.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...$e.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...$e.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...$e.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...$e.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...$e.errToObj(n)})}nonempty(t){return this.min(1,$e.errToObj(t))}trim(){return new ir({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ir.create=e=>{var t;return new ir({checks:[],typeName:Fe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};function W8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hi extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Ce.number,received:a.parsedType}),Be}let r;const i=new yn;for(const a of this._def.checks)a.kind==="int"?lt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?W8(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_finite,message:a.message}),i.dirty()):lt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$e.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$e.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$e.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$e.toString(n))}setLimit(t,n,r,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$e.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:$e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$e.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:$e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$e.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&<.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}hi.create=e=>new hi({checks:[],typeName:Fe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class pi extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Ce.bigint){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Ce.bigint,received:a.parsedType}),Be}let r;const i=new yn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):lt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$e.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$e.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$e.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$e.toString(n))}setLimit(t,n,r,i){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$e.toString(i)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}pi.create=e=>{var t;return new pi({checks:[],typeName:Fe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};class gs extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.boolean,received:r.parsedType}),Be}return Tn(t.data)}}gs.create=e=>new gs({typeName:Fe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class Xi extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Ce.date,received:a.parsedType}),Be}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_date}),Be}const r=new yn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):lt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Xi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:$e.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:$e.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Xi.create=e=>new Xi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Fe.ZodDate,...Ke(e)});class El extends et{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.symbol,received:r.parsedType}),Be}return Tn(t.data)}}El.create=e=>new El({typeName:Fe.ZodSymbol,...Ke(e)});class vs extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.undefined,received:r.parsedType}),Be}return Tn(t.data)}}vs.create=e=>new vs({typeName:Fe.ZodUndefined,...Ke(e)});class ys extends et{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.null,received:r.parsedType}),Be}return Tn(t.data)}}ys.create=e=>new ys({typeName:Fe.ZodNull,...Ke(e)});class Ga extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return Tn(t.data)}}Ga.create=e=>new Ga({typeName:Fe.ZodAny,...Ke(e)});class Hi extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Tn(t.data)}}Hi.create=e=>new Hi({typeName:Fe.ZodUnknown,...Ke(e)});class Vr extends et{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:he.invalid_type,expected:Ce.never,received:n.parsedType}),Be}}Vr.create=e=>new Vr({typeName:Fe.ZodNever,...Ke(e)});class Ol extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.void,received:r.parsedType}),Be}return Tn(t.data)}}Ol.create=e=>new Ol({typeName:Fe.ZodVoid,...Ke(e)});class or extends et{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Ce.array)return _e(n,{code:he.invalid_type,expected:Ce.array,received:n.parsedType}),Be;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(_e(n,{code:o?he.too_big:he.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:he.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:he.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new vr(n,o,n.path,s)))).then(o=>yn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new vr(n,o,n.path,s)));return yn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new or({...this._def,minLength:{value:t,message:$e.toString(n)}})}max(t,n){return new or({...this._def,maxLength:{value:t,message:$e.toString(n)}})}length(t,n){return new or({...this._def,exactLength:{value:t,message:$e.toString(n)}})}nonempty(t){return this.min(1,t)}}or.create=(e,t)=>new or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Fe.ZodArray,...Ke(t)});function Ea(e){if(e instanceof Zt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=mr.create(Ea(r))}return new Zt({...e._def,shape:()=>t})}else return e instanceof or?new or({...e._def,type:Ea(e.element)}):e instanceof mr?mr.create(Ea(e.unwrap())):e instanceof gi?gi.create(Ea(e.unwrap())):e instanceof yr?yr.create(e.items.map(t=>Ea(t))):e}class Zt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=lt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ce.object){const l=this._getOrReturnCtx(t);return _e(l,{code:he.invalid_type,expected:Ce.object,received:l.parsedType}),Be}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const c=[];for(const l of o){const u=a[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new vr(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Vr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(_e(i,{code:he.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new vr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>yn.mergeObjectSync(r,l)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return $e.errToObj,new Zt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=$e.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new Zt({...this._def,unknownKeys:"strip"})}passthrough(){return new Zt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Zt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Zt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Fe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Zt({...this._def,catchall:t})}pick(t){const n={};return lt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}omit(t){const n={};return lt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}deepPartial(){return Ea(this)}partial(t){const n={};return lt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Zt({...this._def,shape:()=>n})}required(t){const n={};return lt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof mr;)a=a._def.innerType;n[r]=a}}),new Zt({...this._def,shape:()=>n})}keyof(){return e_(lt.objectKeys(this.shape))}}Zt.create=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:Fe.ZodObject,...Ke(t)});Zt.strictCreate=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:Fe.ZodObject,...Ke(t)});Zt.lazycreate=(e,t)=>new Zt({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:Fe.ZodObject,...Ke(t)});class bs extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Ln(s.ctx.common.issues));return _e(n,{code:he.invalid_union,unionErrors:o}),Be}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new Ln(c));return _e(n,{code:he.invalid_union,unionErrors:s}),Be}}get options(){return this._def.options}}bs.create=(e,t)=>new bs({options:e,typeName:Fe.ZodUnion,...Ke(t)});const jr=e=>e instanceof ws?jr(e.schema):e instanceof sr?jr(e.innerType()):e instanceof Cs?[e.value]:e instanceof mi?e.options:e instanceof Ts?lt.objectValues(e.enum):e instanceof Ss?jr(e._def.innerType):e instanceof vs?[void 0]:e instanceof ys?[null]:e instanceof mr?[void 0,...jr(e.unwrap())]:e instanceof gi?[null,...jr(e.unwrap())]:e instanceof cm||e instanceof Es?jr(e.unwrap()):e instanceof ks?jr(e._def.innerType):[];class Ou extends et{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return _e(n,{code:he.invalid_type,expected:Ce.object,received:n.parsedType}),Be;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:he.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=jr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Ou({typeName:Fe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Ke(r)})}}function kh(e,t){const n=ai(e),r=ai(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const i=lt.objectKeys(t),a=lt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=kh(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=kh(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class xs extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Th(a)||Th(o))return Be;const s=kh(a.value,o.value);return s.valid?((Sh(a)||Sh(o))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:he.invalid_intersection_types}),Be)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}xs.create=(e,t,n)=>new xs({left:e,right:t,typeName:Fe.ZodIntersection,...Ke(n)});class yr extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return _e(r,{code:he.invalid_type,expected:Ce.array,received:r.parsedType}),Be;if(r.data.length<this._def.items.length)return _e(r,{code:he.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new vr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>yn.mergeArray(n,o)):yn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new yr({...this._def,rest:t})}}yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yr({items:e,typeName:Fe.ZodTuple,rest:null,...Ke(t)})};class _s extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return _e(r,{code:he.invalid_type,expected:Ce.object,received:r.parsedType}),Be;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new vr(r,s,r.path,s)),value:o._parse(new vr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?yn.mergeObjectAsync(n,i):yn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof et?new _s({keyType:t,valueType:n,typeName:Fe.ZodRecord,...Ke(r)}):new _s({keyType:ir.create(),valueType:t,typeName:Fe.ZodRecord,...Ke(n)})}}class Ml extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return _e(r,{code:he.invalid_type,expected:Ce.map,received:r.parsedType}),Be;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],l)=>({key:i._parse(new vr(r,s,r.path,[l,"key"])),value:a._parse(new vr(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Be;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Be;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}Ml.create=(e,t,n)=>new Ml({valueType:t,keyType:e,typeName:Fe.ZodMap,...Ke(n)});class Qi extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return _e(r,{code:he.invalid_type,expected:Ce.set,received:r.parsedType}),Be;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:he.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:he.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Be;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>a._parse(new vr(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new Qi({...this._def,minSize:{value:t,message:$e.toString(n)}})}max(t,n){return new Qi({...this._def,maxSize:{value:t,message:$e.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Qi.create=(e,t)=>new Qi({valueType:e,minSize:null,maxSize:null,typeName:Fe.ZodSet,...Ke(t)});class ja extends et{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.function)return _e(n,{code:he.invalid_type,expected:Ce.function,received:n.parsedType}),Be;function r(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tl(),Ya].filter(l=>!!l),issueData:{code:he.invalid_arguments,argumentsError:c}})}function i(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tl(),Ya].filter(l=>!!l),issueData:{code:he.invalid_return_type,returnTypeError:c}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Za){const s=this;return Tn(async function(...c){const l=new Ln([]),u=await s._def.args.parseAsync(c,a).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(h=>{throw l.addIssue(i(d,h)),l})})}else{const s=this;return Tn(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new Ln([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new Ln([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ja({...this._def,args:yr.create(t).rest(Hi.create())})}returns(t){return new ja({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ja({args:t||yr.create([]).rest(Hi.create()),returns:n||Hi.create(),typeName:Fe.ZodFunction,...Ke(r)})}}class ws extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ws.create=(e,t)=>new ws({getter:e,typeName:Fe.ZodLazy,...Ke(t)});class Cs extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:he.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cs.create=(e,t)=>new Cs({value:e,typeName:Fe.ZodLiteral,...Ke(t)});function e_(e,t){return new mi({values:e,typeName:Fe.ZodEnum,...Ke(t)})}class mi extends et{constructor(){super(...arguments),Zo.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:lt.joinValues(r),received:n.parsedType,code:he.invalid_type}),Be}if(kl(this,Zo)||K2(this,Zo,new Set(this._def.values)),!kl(this,Zo).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:he.invalid_enum_value,options:r}),Be}return Tn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return mi.create(t,{...this._def,...n})}exclude(t,n=this._def){return mi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Zo=new WeakMap;mi.create=e_;class Ts extends et{constructor(){super(...arguments),Ko.set(this,void 0)}_parse(t){const n=lt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const i=lt.objectValues(n);return _e(r,{expected:lt.joinValues(i),received:r.parsedType,code:he.invalid_type}),Be}if(kl(this,Ko)||K2(this,Ko,new Set(lt.getValidEnumValues(this._def.values))),!kl(this,Ko).has(t.data)){const i=lt.objectValues(n);return _e(r,{received:r.data,code:he.invalid_enum_value,options:i}),Be}return Tn(t.data)}get enum(){return this._def.values}}Ko=new WeakMap;Ts.create=(e,t)=>new Ts({values:e,typeName:Fe.ZodNativeEnum,...Ke(t)});class Za extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return _e(n,{code:he.invalid_type,expected:Ce.promise,received:n.parsedType}),Be;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Tn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Za.create=(e,t)=>new Za({type:e,typeName:Fe.ZodPromise,...Ke(t)});class sr extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{_e(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Be;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Be:c.status==="dirty"||n.value==="dirty"?Oa(c.value):c});{if(n.value==="aborted")return Be;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Be:s.status==="dirty"||n.value==="dirty"?Oa(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Be:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Be:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ps(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ps(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);lt.assertNever(i)}}sr.create=(e,t,n)=>new sr({schema:e,typeName:Fe.ZodEffects,effect:t,...Ke(n)});sr.createWithPreprocess=(e,t,n)=>new sr({schema:t,effect:{type:"preprocess",transform:e},typeName:Fe.ZodEffects,...Ke(n)});class mr extends et{_parse(t){return this._getType(t)===Ce.undefined?Tn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}mr.create=(e,t)=>new mr({innerType:e,typeName:Fe.ZodOptional,...Ke(t)});class gi extends et{_parse(t){return this._getType(t)===Ce.null?Tn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Fe.ZodNullable,...Ke(t)});class Ss extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ss.create=(e,t)=>new Ss({innerType:e,typeName:Fe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class ks extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ms(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ks.create=(e,t)=>new ks({innerType:e,typeName:Fe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class $l extends et{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.nan,received:r.parsedType}),Be}return{status:"valid",value:t.data}}}$l.create=e=>new $l({typeName:Fe.ZodNaN,...Ke(e)});const z8=Symbol("zod_brand");class cm extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tc extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Be:a.status==="dirty"?(n.dirty(),Oa(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Be:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new tc({in:t,out:n,typeName:Fe.ZodPipeline})}}class Es extends et{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ps(i)&&(i.value=Object.freeze(i.value)),i);return ms(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Fe.ZodReadonly,...Ke(t)});function t_(e,t={},n){return e?Ga.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:c})}}):Ga.create()}const H8={object:Zt.lazycreate};var Fe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Fe||(Fe={}));const V8=(e,t={message:`Input not instance of ${e.name}`})=>t_(n=>n instanceof e,t),n_=ir.create,r_=hi.create,q8=$l.create,Y8=pi.create,i_=gs.create,G8=Xi.create,Z8=El.create,K8=vs.create,X8=ys.create,Q8=Ga.create,J8=Hi.create,e$=Vr.create,t$=Ol.create,n$=or.create,r$=Zt.create,i$=Zt.strictCreate,a$=bs.create,o$=Ou.create,s$=xs.create,c$=yr.create,l$=_s.create,u$=Ml.create,d$=Qi.create,f$=ja.create,h$=ws.create,p$=Cs.create,m$=mi.create,g$=Ts.create,v$=Za.create,gv=sr.create,y$=mr.create,b$=gi.create,x$=sr.createWithPreprocess,_$=tc.create,w$=()=>n_().optional(),C$=()=>r_().optional(),T$=()=>i_().optional(),S$={string:e=>ir.create({...e,coerce:!0}),number:e=>hi.create({...e,coerce:!0}),boolean:e=>gs.create({...e,coerce:!0}),bigint:e=>pi.create({...e,coerce:!0}),date:e=>Xi.create({...e,coerce:!0})},k$=Be;var sn=Object.freeze({__proto__:null,defaultErrorMap:Ya,setErrorMap:k8,getErrorMap:Tl,makeIssue:Sl,EMPTY_PATH:E8,addIssueToContext:_e,ParseStatus:yn,INVALID:Be,DIRTY:Oa,OK:Tn,isAborted:Th,isDirty:Sh,isValid:ps,isAsync:ms,get util(){return lt},get objectUtil(){return Ch},ZodParsedType:Ce,getParsedType:ai,ZodType:et,datetimeRegex:J2,ZodString:ir,ZodNumber:hi,ZodBigInt:pi,ZodBoolean:gs,ZodDate:Xi,ZodSymbol:El,ZodUndefined:vs,ZodNull:ys,ZodAny:Ga,ZodUnknown:Hi,ZodNever:Vr,ZodVoid:Ol,ZodArray:or,ZodObject:Zt,ZodUnion:bs,ZodDiscriminatedUnion:Ou,ZodIntersection:xs,ZodTuple:yr,ZodRecord:_s,ZodMap:Ml,ZodSet:Qi,ZodFunction:ja,ZodLazy:ws,ZodLiteral:Cs,ZodEnum:mi,ZodNativeEnum:Ts,ZodPromise:Za,ZodEffects:sr,ZodTransformer:sr,ZodOptional:mr,ZodNullable:gi,ZodDefault:Ss,ZodCatch:ks,ZodNaN:$l,BRAND:z8,ZodBranded:cm,ZodPipeline:tc,ZodReadonly:Es,custom:t_,Schema:et,ZodSchema:et,late:H8,get ZodFirstPartyTypeKind(){return Fe},coerce:S$,any:Q8,array:n$,bigint:Y8,boolean:i_,date:G8,discriminatedUnion:o$,effect:gv,enum:m$,function:f$,instanceof:V8,intersection:s$,lazy:h$,literal:p$,map:u$,nan:q8,nativeEnum:g$,never:e$,null:X8,nullable:b$,number:r_,object:r$,oboolean:T$,onumber:C$,optional:y$,ostring:w$,pipeline:_$,preprocess:x$,promise:v$,record:l$,set:d$,strictObject:i$,string:n_,symbol:Z8,transformer:gv,tuple:c$,undefined:K8,union:a$,unknown:J8,void:t$,NEVER:k$,ZodIssueCode:he,quotelessJson:S8,ZodError:Ln});const Mu=()=>{const{texts:{formValidation:e}}=m.useContext(Kt),t=m.useCallback(p=>{let v=(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required});return p!=null&&p.email&&(v=v.email(e.invalidEmail)),p!=null&&p.length&&(v=v.min(p.length,e.length(p.length))),p!=null&&p.minLength&&(v=v.min(p.minLength,e.minLength(p.minLength))),p!=null&&p.maxLength&&(v=v.max(p.maxLength,e.maxLength(p.maxLength))),p!=null&&p.numeric&&(v=v.regex(/^\d+$/,e.noCharactersOtherThanNumbers)),p!=null&&p.regex&&(v=v.regex(p.regex,e.invalidFormat)),v.transform(w=>w??null)},[e]),n=m.useCallback(p=>t(p).nullable().optional().transform(v=>v??null),[t]),r=m.useCallback(p=>{const v=(p==null?void 0:p.min)??Number.MIN_SAFE_INTEGER,w=(p==null?void 0:p.max)??Number.MAX_SAFE_INTEGER,_=(p!=null&&p.useCoerce?sn.coerce:sn).number({invalid_type_error:e.required,required_error:e.required}).min(v,e.lessThanMin(v)).max(w,e.moreThanMax(w));return _.transform(x=>x??null),_},[e]),i=m.useCallback(p=>r(p).nullable().optional().transform(v=>v??null),[r]),a=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).boolean({invalid_type_error:e.required,required_error:e.required}).transform(v=>v??null),[e.required]),o=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required}).refine(v2,{message:e.invalidDate}).transform(w=>w??null),[e.invalidDate,e.required]),s=m.useCallback(p=>o(p).nullable().transform(v=>v??null),[o]),c=m.useCallback((p,v)=>sn.enum(p,{invalid_type_error:e.required,required_error:e.required}).transform(_=>_??null),[e.required]),l=m.useCallback((p,v)=>c(p,v).nullable().transform(w=>w??null),[c]),u=m.useCallback(p=>sn.object({id:i({useCoerce:!0})}).nullable().transform(w=>w??null),[i]),d=m.useCallback(p=>sn.object({id:r()}).transform(w=>w??null),[r]),f=m.useCallback(p=>sn.object({id:n({useCoerce:!0})}).nullable().transform(w=>w??null),[n]),h=m.useCallback(p=>sn.object({id:t()}).transform(w=>w??null),[t]),g=m.useCallback(({required:p,multiple:v,maxFileSize:w})=>sn.any().transform(x=>Array.from(x??[])).refine(x=>!p||(x==null?void 0:x.length)>0,"File is required.").refine(x=>v||(x==null?void 0:x.length)<=1,"Multiple files not allowed.").refine(x=>x.every(S=>S.size<=w),`Maximum file size is ${Va(w)}.`).transform(x=>(v?x:x==null?void 0:x[0])??null),[]);return{zString:n,zStringRequired:t,zNumber:i,zNumberRequired:r,zBool:a,zDate:s,zDateRequired:o,zEnum:l,zEnumRequired:c,zObjectIdInt:u,zObjectIdIntRequired:d,zObjectIdStr:f,zObjectIdStrRequired:h,zFile:g}},a_=(e,t)=>{m.useEffect(()=>{const n=r=>{e.some(i=>i.current&&i.current.contains(r.target))||t()};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}},[e,t])},o_=()=>{const{user:e}=m.useContext(l2);return{checkUserHasPermissions:m.useCallback((n,r="any")=>n.length===0?!0:r==="any"?n.some(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}):n.every(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}),[e])}},s_=(e,t)=>{m.useEffect(()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),[e]),m.useEffect(()=>t===void 0?()=>{}:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),[t])},lm=(e,t,n)=>m.useMemo(()=>n||e!=="date"&&e!=="datetime-local"&&e!=="time"||t?e:"text",[t,e,n]),c_=()=>{const{addNotification:e}=ku(),{texts:{clipboard:t}}=m.useContext(Kt);return{copyToClipboard:m.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(a){console.error(a),e(t.copyError,"danger")}},[e,t])}},nc=()=>{const[e,t]=m.useState(window.innerWidth),[n,r]=m.useState(window.innerHeight),i=()=>{t(window.innerWidth),r(window.innerHeight)};return m.useEffect(()=>(window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),{width:e,height:n,isMobile:e<992}},l_=m.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),u_=m.createContext(void 0),vv={falseIfNotInit:!1},$u=({falseIfNotInit:e=vv.falseIfNotInit}=vv)=>{const t=m.useContext(u_);if(!e&&t===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return t??!1},E$="_button_1wjon_1",O$="_filled_1wjon_7",M$="_sm_1wjon_13",$$="_md_1wjon_18",A$="_lg_1wjon_23",_a={button:E$,filled:O$,sm:M$,md:$$,lg:A$},Ji=({variant:e="filled",color:t="primary",size:n="md",className:r,children:i,...a})=>a.as==="link"?y.jsx(no.Link,{to:a.href??"/",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,_a.button,_a[e],_a[n]),...a,children:i}):a.as==="button"||a.as===void 0?y.jsx("button",{type:"button",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,_a.button,_a[e],_a[n]),...a,children:i}):null,R$="_button_1r3i0_1",Eh={button:R$},Au=({color:e="primary",icon:t,className:n,children:r,...i})=>i.as==="link"?y.jsxs(no.Link,{to:i.href??"/",className:oe(`luminus-context-button btn text-${e} ${n??""}`,Eh.button),...i,children:[t,r]}):i.as==="button"||i.as===void 0?y.jsxs("button",{type:"button",className:oe(`luminus-context-button btn text-${e} ${n??""}`,Eh.button),...i,children:[t,r]}):null,j$=m.forwardRef(({color:e="primary",icon:t=y.jsx(Jx,{size:12}),inputId:n="context-file-input",accept:r="*",onUpload:i,className:a,children:o,multiple:s,...c},l)=>{const u=d=>{d.target.files&&(i(d.target.files),d.target.value="")};return y.jsxs(y.Fragment,{children:[y.jsxs("label",{ref:l,htmlFor:n,className:oe(`luminus-context-button btn text-${e} ${a??""}`,Eh.button),...c,children:[t,o]}),y.jsx("input",{id:n,type:"file",accept:r,onChange:u,hidden:!0,multiple:s})]})}),P$="_icon-button_15e26_1",I$="_sm_15e26_14",D$="_md_15e26_23",N$="_lg_15e26_32",jc={"icon-button":"_icon-button_15e26_1",iconButton:P$,sm:I$,md:D$,lg:N$},rc=({type:e="button",color:t="primary",size:n="md",children:r,className:i,...a})=>a.as==="link"?y.jsx(no.Link,{to:a.href??"/",className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):a.as==="button"||a.as===void 0?y.jsx("button",{type:e,className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):null,L$="_feedback_esh1j_1",F$="_feedback-spacer_esh1j_8",yv={feedback:L$,"feedback-spacer":"_feedback-spacer_esh1j_8",feedbackSpacer:F$},Ru=({message:e})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:oe("invalid-feedback luminus-invalid-feedback",yv.feedback),children:e}),y.jsx("div",{className:oe("invalid-feedback-spacer",yv.feedbackSpacer),children:e})]}),B$="_item_1dy8x_1",d_={item:B$},Ii=({color:e="primary",icon:t,className:n,children:r,to:i,as:a,...o})=>y.jsxs(Ha.Item,{className:oe(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${n??""}`,d_.item),as:a==="link"?no.Link:void 0,to:i??"",...o,children:[t,r]}),U$="_button_qhwih_1",W$={button:U$},um=m.forwardRef(({color:e="primary",icon:t=y.jsx(t2,{size:21}),text:n,onClick:r,className:i,children:a,...o},s)=>y.jsxs("button",{type:"button",ref:s,onClick:c=>{c.preventDefault(),r(c)},"aria-label":"dropdown toggle",className:oe(`btn luminus-context-button text-${e} ${i??""}`,W$.button),...o,children:[t,n]})),z$="_avatar-icon_1axl6_1",H$={"avatar-icon":"_avatar-icon_1axl6_1",avatarIcon:z$},f_=({name:e,fontSize:t,size:n})=>{const r=m.useMemo(()=>{const o=e.split(" ");return o.length<2?e:fs(" ",o.at(o.length-2),o.at(o.length-1))},[e]),i=m.useMemo(()=>{const o=r.split(" ");return fs("",...o.map(s=>s.at(0)??void 0))},[r]),a=o=>{let s=0,c;for(c=0;c<o.length;c+=1)s=o.charCodeAt(c)+((s<<5)-s);let l="#";for(c=0;c<3;c+=1){const u=s>>c*8&255;l+=`00${u.toString(16)}`.slice(-2)}return l};return y.jsx(Zx,{placement:"bottom",overlay:y.jsx(Yx,{children:e}),children:y.jsx("div",{className:oe("luminus-avatar-icon",H$.avatarIcon),style:{backgroundColor:a(r),fontSize:t??void 0,minHeight:n??void 0,height:n??void 0,maxHeight:n??void 0,minWidth:n??void 0,width:n??void 0,maxWidth:n??void 0},children:y.jsx("div",{children:i})})})},V$=m.forwardRef(({userName:e,onClick:t,children:n},r)=>y.jsxs("button",{type:"button",ref:r,onClick:i=>{i.preventDefault(),t(i)},"aria-label":"User avatar toggle",className:"m-0 p-0",style:{backgroundColor:"transparent",border:"none",cursor:"pointer"},children:[y.jsx(f_,{name:e}),n]})),dm=e=>y.jsx(Ha.Toggle,{...e}),q$="_divider_1e6rk_1",Y$={divider:q$},Oh=({className:e})=>y.jsx(Ha.Divider,{className:oe("luminus-dropdown-divider",e,Y$.divider)}),G$="_dropdown_1lk66_1",Z$={dropdown:G$},fm=({toggle:e,children:t,align:n,...r})=>y.jsxs(Ha,{...r,align:n,children:[e,y.jsx(Ha.Menu,{className:oe("luminus-dropdown rounded shadow",Z$.dropdown),align:n,children:t})]});function K$(e,t,n){var r=this,i=m.useRef(null),a=m.useRef(0),o=m.useRef(null),s=m.useRef([]),c=m.useRef(),l=m.useRef(),u=m.useRef(e),d=m.useRef(!0);u.current=e;var f=typeof window<"u",h=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,v="maxWait"in n,w="debounceOnServer"in n&&!!n.debounceOnServer,_=v?Math.max(+n.maxWait||0,t):null;m.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var x=m.useMemo(function(){var S=function(E){var C=s.current,O=c.current;return s.current=c.current=null,a.current=E,l.current=u.current.apply(O,C)},b=function(E,C){h&&cancelAnimationFrame(o.current),o.current=h?requestAnimationFrame(E):setTimeout(E,C)},T=function(E){if(!d.current)return!1;var C=E-i.current;return!i.current||C>=t||C<0||v&&E-a.current>=_},j=function(E){return o.current=null,p&&s.current?S(E):(s.current=c.current=null,l.current)},M=function E(){var C=Date.now();if(T(C))return j(C);if(d.current){var O=t-(C-i.current),$=v?Math.min(O,_-(C-a.current)):O;b(E,$)}},k=function(){if(f||w){var E=Date.now(),C=T(E);if(s.current=[].slice.call(arguments),c.current=r,i.current=E,C){if(!o.current&&d.current)return a.current=i.current,b(M,t),g?S(i.current):l.current;if(v)return b(M,t),S(i.current)}return o.current||b(M,t),l.current}};return k.cancel=function(){o.current&&(h?cancelAnimationFrame(o.current):clearTimeout(o.current)),a.current=0,s.current=i.current=c.current=o.current=null},k.isPending=function(){return!!o.current},k.flush=function(){return o.current?j(Date.now()):l.current},k},[g,v,t,_,p,h,f,w]);return x}function X$(e,t){return e===t}function h_(e,t,n){var r=X$,i=m.useRef(e),a=m.useState({})[1],o=K$(m.useCallback(function(c){i.current=c,a({})},[a]),t,n),s=m.useRef(e);return r(s.current,e)||(o(e),s.current=e),[i.current,o]}const Q$="_wrapper_1mvyk_1",J$="_open_1mvyk_9",e7="_dropdown_1mvyk_13",t7="_search-input-container_1mvyk_19",n7="_search-input_1mvyk_19",r7="_loading-container_1mvyk_25",i7="_items-container_1mvyk_32",a7="_header-row_1mvyk_38",o7="_name_1mvyk_49",s7="_item_1mvyk_32",c7="_column-item_1mvyk_65",l7="_icon_1mvyk_69",u7="_action-buttons-container_1mvyk_89",d7="_reverse_1mvyk_97",f7="_action-button_1mvyk_89",h7="_actions-dropdown_1mvyk_110",on={wrapper:Q$,open:J$,dropdown:e7,"search-input-container":"_search-input-container_1mvyk_19",searchInputContainer:t7,"search-input":"_search-input_1mvyk_19",searchInput:n7,"loading-container":"_loading-container_1mvyk_25",loadingContainer:r7,"items-container":"_items-container_1mvyk_32",itemsContainer:i7,"header-row":"_header-row_1mvyk_38",headerRow:a7,name:o7,item:s7,"column-item":"_column-item_1mvyk_65",columnItem:c7,icon:l7,"action-buttons-container":"_action-buttons-container_1mvyk_89",actionButtonsContainer:u7,reverse:d7,"action-button":"_action-button_1mvyk_89",actionButton:f7,"actions-dropdown":"_actions-dropdown_1mvyk_110",actionsDropdown:h7},p_=({show:e,onCancel:t,items:n,suggestedItems:r,suggestedItemsTitle:i,currentSelection:a,onSelectionChange:o,onSearchQueryChange:s,texts:c,itemsNameWidth:l,additionalColumns:u,displayIdAsName:d=!1,autoHideSearch:f=!1,allItemsLength:h,disabled:g,isLoading:p=!1,inputRef:v,archiveColumn:w="archive",addNewOptionPath:_,refreshOptions:x,noRemoveButton:S=!1,customEllipsisOptions:b})=>{var at;const{texts:{customSelect:T}}=m.useContext(Kt),j=m.useRef(null),M=m.useRef(null),k=m.useRef(null),E=m.useRef(null),C=m.useRef(null),[O,$]=m.useState(""),[A]=h_(O,500),[,P]=m.useState(!1),{copyToClipboard:D}=c_(),N=(at=v.current)==null?void 0:at.getBoundingClientRect(),q=(N==null?void 0:N.x)??0,z=((N==null?void 0:N.x)??0)+((N==null?void 0:N.width)??0),U=(N==null?void 0:N.y)??0,G=((N==null?void 0:N.y)??0)+((N==null?void 0:N.height)??0),ne=(N==null?void 0:N.width)??0,te=(N==null?void 0:N.height)??0,X=5,{isMobile:J}=nc(),Q=8,re=m.useMemo(()=>q?q>window.innerWidth/2-Q:!1,[q]),F=m.useMemo(()=>U?U>window.innerHeight/2-Q:!1,[U]);m.useEffect(()=>{var de;e&&((de=k.current)==null||de.focus())},[k,e]),m.useEffect(()=>{e||$("")},[e]),m.useEffect(()=>{s&&s(A)},[A,s]);const[I,L]=m.useState(null);m.useEffect(()=>{e&&n.length>0?L(0):L(null)},[n,e]);const H=m.useMemo(()=>I!==null?n.at(I)??null:null,[I,n]),R=m.useCallback((de,me)=>{var tt,Et;const ke=document.getElementById(`item-${de}`);if(ke){const qe=ke.clientHeight??0;me==="down"?(tt=E.current)==null||tt.scrollBy({left:0,top:qe,behavior:"smooth"}):(Et=E.current)==null||Et.scrollBy({left:0,top:-qe,behavior:"smooth"})}},[]),K=m.useCallback(de=>{if(I===null||g)return;const me=I+de;me<0||me>=n.length||L(ke=>(ke!==null&&R(ke,de>0?"down":"up"),me))},[I,n,g,R]),Z=m.useCallback(de=>{if(e)switch(de.key){case"Escape":de.stopPropagation(),de.preventDefault(),t();break;case"Enter":de.stopPropagation(),de.preventDefault(),g||o(H);break;case"ArrowUp":de.stopPropagation(),de.preventDefault(),K(-1);break;case"ArrowDown":de.stopPropagation(),de.preventDefault(),K(1);break}},[t,e,K,H,g,o]),ee=m.useCallback(()=>{P(de=>!de)},[]);m.useEffect(()=>(window.addEventListener("scroll",ee),()=>{window.removeEventListener("scroll",ee)}),[ee]),m.useEffect(()=>(window.addEventListener("resize",ee),()=>{window.removeEventListener("resize",ee)}),[ee]),s_(Z),a_([j,M,C],t);const pe=l??(u&&u.length>0?250:0),we=(u==null?void 0:u.reduce((de,me)=>de+(me.width??100),0))??0,ve=m.useMemo(()=>(a&&e&&!g&&!S)??!1,[a,e,g,S]),Le=m.useMemo(()=>(a&&e)??!1,[a,e]),Re=m.useMemo(()=>e&&(Le||_!==void 0||x!==void 0||b!=null&&b.length>0),[e,Le,_,x,b]),Ve=32,ze=J?`calc(100vw - ${Ve}px)`:`calc(max(${ne}px, calc(${pe}px + ${we}px)))`,ut=m.useMemo(()=>(O.length<1&&r&&r.length>0?r:n).map(de=>{var me,ke;return d?((me=de.id)==null?void 0:me.toString())??"":((ke=de.name)==null?void 0:ke.toString())??""}).reduce((de,me)=>de.length>me.length?de:me,""),[O,r,n,d]);return y.jsxs(y.Fragment,{children:[y.jsx(C_,{show:e,onClick:t}),y.jsxs("div",{className:oe("luminus-dropdown-picker-actions",on.actionButtonsContainer,{[on.reverse]:re}),style:{top:`calc(${U}px + ${te/2}px - 12px)`,left:re?ve&&Le?`calc(${q}px - 24px - 8px - 24px - 4px)`:`calc(${q}px - 24px - 8px)`:`calc(${z}px + 8px)`},children:[ve&&y.jsx("button",{ref:M,type:"button",className:oe("luminus-dropdown-picker-clear-button",on.actionButton),onClick:()=>!g&&o(null),children:y.jsx(_n,{variant:"caption",className:"text-danger",children:y.jsx(Qx,{size:16})})}),Re?y.jsx("div",{ref:C,children:y.jsxs(fm,{toggle:y.jsx(dm,{as:um,className:oe("luminus-dropdown-picker-actions-dropdown",on.actionsDropdown),icon:y.jsx(_n,{variant:"caption",className:"text-primary",children:y.jsx(t2,{size:16})})}),children:[Le?y.jsx(Ii,{icon:y.jsx(Qk,{}),onClick:()=>{var de,me;D(d?((de=a==null?void 0:a.id)==null?void 0:de.toString())??"":((me=a==null?void 0:a.name)==null?void 0:me.toString())??"")},children:T.copySelection}):null,Le&&(_||x)?y.jsx(Oh,{}):null,_?y.jsx(Ii,{icon:y.jsx(Xk,{}),onClick:()=>{window.open(_,"_blank")},children:T.addNewOption}):null,x?y.jsx(Ii,{icon:y.jsx(cE,{}),onClick:()=>{x()},children:T.refreshOptions}):null,b&&b.length>0?y.jsx(Oh,{}):null,b==null?void 0:b.map(de=>y.jsxs(Ii,{onClick:()=>{de.onClick(),t()},children:[de.icon??null,de.label]},de.label))]})}):null]}),y.jsx("div",{className:oe("luminus-dropdown-picker",on.wrapper,{[on.open]:e}),style:{top:F?`calc(${U}px - 50vh - 8px)`:`calc(${G}px + 8px)`,left:J?`${Ve/2}px`:re?`calc(${z}px - ${ze})`:q,right:J?`${Ve/2}px`:re?`${z}px`:`calc(${q}px + ${ze})`,width:ze,justifyContent:F?"flex-end":"flex-start"},children:y.jsx("div",{ref:j,className:oe("shadow rounded",on.dropdown),children:!g&&y.jsxs(y.Fragment,{children:[!s||f&&(h??n.length)<=X?null:y.jsx("div",{className:oe("search-input-container border-bottom",on.searchInputContainer),children:y.jsx(Tr.Control,{ref:k,type:"search",size:"sm",className:on.searchInput,placeholder:c.searchPlaceholder,value:O,onChange:de=>{var me;return $(((me=de.target)==null?void 0:me.value)??"")}})}),O.length<1&&r&&r.length>0?y.jsx(vm,{variant:"info",size:"sm",children:i??T.suggestedItemsTitle}):null,p?y.jsx("div",{className:on.loadingContainer,children:y.jsx(Xp,{animation:"border",variant:"primary"})}):(O.length<1&&r&&(r==null?void 0:r.length)>0||n.length>0)&&y.jsxs("div",{ref:E,className:oe("items",on.itemsContainer),children:[u&&u.length>0&&y.jsxs("div",{className:oe("header-row border-bottom",on.headerRow),children:[y.jsx("div",{className:on.name,children:y.jsx(_n,{variant:"body2",children:ut})}),u==null?void 0:u.filter(de=>de.key!==w).map(de=>y.jsx("div",{className:on.columnItem,style:{width:`${de.width??100}px`,minWidth:`${de.width??100}px`,maxWidth:`${de.width??100}px`},children:y.jsx(_n,{variant:"caption",children:de.name})},de.key))]}),(O.length<1&&r&&r.length>0?r:n).map((de,me)=>y.jsxs("button",{id:`item-${me}`,type:"button",className:oe("item cursor-pointer",on.item,{[on.focused]:I===me},{focused:I===me},{archive:de.additionalColumns?de.additionalColumns[w]:!1}),onClick:()=>!g&&o(de),onMouseEnter:()=>L(me),children:[y.jsx("div",{className:on.name,children:y.jsx(_n,{variant:"body2",children:d?de.id:de.name})}),u==null?void 0:u.filter(ke=>ke.key!==w).map(ke=>y.jsx("div",{className:on.columnItem,style:{width:`${ke.width??100}px`,minWidth:`${ke.width??100}px`,maxWidth:`${ke.width??100}px`},children:y.jsx(_n,{variant:"caption",className:oe("text-muted"),children:de.additionalColumns&&de.additionalColumns[ke.key]})},ke.key))]},de.id))]})]})})})]})};var hm={};hm.match=b7;hm.parse=m_;var p7=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,m7=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,g7=/^(?:(min|max)-)?(.+)/,v7=/(em|rem|px|cm|mm|in|pt|pc)?$/,y7=/(dpi|dpcm|dppx)?$/;function b7(e,t){return m_(e).some(function(n){var r=n.inverse,i=n.type==="all"||t.type===n.type;if(i&&r||!(i||r))return!1;var a=n.expressions.every(function(o){var s=o.feature,c=o.modifier,l=o.value,u=t[s];if(!u)return!1;switch(s){case"orientation":case"scan":return u.toLowerCase()===l.toLowerCase();case"width":case"height":case"device-width":case"device-height":l=_v(l),u=_v(u);break;case"resolution":l=xv(l),u=xv(u);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":l=bv(l),u=bv(u);break;case"grid":case"color":case"color-index":case"monochrome":l=parseInt(l,10)||1,u=parseInt(u,10)||0;break}switch(c){case"min":return u>=l;case"max":return u<=l;default:return u===l}});return a&&!r||!a&&r})}function m_(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(p7),r=n[1],i=n[2],a=n[3]||"",o={};return o.inverse=!!r&&r.toLowerCase()==="not",o.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],o.expressions=a.map(function(s){var c=s.match(m7),l=c[1].toLowerCase().match(g7);return{modifier:l[1],feature:l[2],value:c[2]}}),o})}function bv(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function xv(e){var t=parseFloat(e),n=String(e).match(y7)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function _v(e){var t=parseFloat(e),n=String(e).match(v7)[1];switch(n){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}var x7=hm.match,wv=typeof window<"u"?window.matchMedia:null;function _7(e,t,n){var r=this,i;wv&&!n&&(i=wv.call(window,e)),i?(this.matches=i.matches,this.media=i.media,i.addListener(s)):(this.matches=x7(e,t),this.media=e),this.addListener=a,this.removeListener=o,this.dispose=c;function a(l){i&&i.addListener(l)}function o(l){i&&i.removeListener(l)}function s(l){r.matches=l.matches,r.media=l.media}function c(){i&&i.removeListener(s)}}function w7(e,t,n){return new _7(e,t,n)}var C7=w7;const T7=Ht(C7);var S7=/[A-Z]/g,k7=/^ms-/,gf={};function E7(e){return"-"+e.toLowerCase()}function g_(e){if(gf.hasOwnProperty(e))return gf[e];var t=e.replace(S7,E7);return gf[e]=k7.test(t)?"-"+t:t}function O7(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(let a=0;a<i;a++){const o=n[a];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}const xn=V.oneOfType([V.string,V.number]),pm={all:V.bool,grid:V.bool,aural:V.bool,braille:V.bool,handheld:V.bool,print:V.bool,projection:V.bool,screen:V.bool,tty:V.bool,tv:V.bool,embossed:V.bool},v_={orientation:V.oneOf(["portrait","landscape"]),scan:V.oneOf(["progressive","interlace"]),aspectRatio:V.string,deviceAspectRatio:V.string,height:xn,deviceHeight:xn,width:xn,deviceWidth:xn,color:V.bool,colorIndex:V.bool,monochrome:V.bool,resolution:xn,type:Object.keys(pm)},{type:Kne,...M7}=v_,y_={minAspectRatio:V.string,maxAspectRatio:V.string,minDeviceAspectRatio:V.string,maxDeviceAspectRatio:V.string,minHeight:xn,maxHeight:xn,minDeviceHeight:xn,maxDeviceHeight:xn,minWidth:xn,maxWidth:xn,minDeviceWidth:xn,maxDeviceWidth:xn,minColor:V.number,maxColor:V.number,minColorIndex:V.number,maxColorIndex:V.number,minMonochrome:V.number,maxMonochrome:V.number,minResolution:xn,maxResolution:xn,...M7},$7={...pm,...y_};var A7={all:$7,types:pm,matchers:v_,features:y_};const R7=e=>`not ${e}`,j7=(e,t)=>{const n=g_(e);return typeof t=="number"&&(t=`${t}px`),t===!0?n:t===!1?R7(n):`(${n}: ${t})`},P7=e=>e.join(" and "),I7=e=>{const t=[];return Object.keys(A7.all).forEach(n=>{const r=e[n];r!=null&&t.push(j7(n,r))}),P7(t)},D7=m.createContext(void 0),N7=e=>e.query||I7(e),Cv=e=>e?Object.keys(e).reduce((n,r)=>(n[g_(r)]=e[r],n),{}):void 0,b_=()=>{const e=m.useRef(!1);return m.useEffect(()=>{e.current=!0},[]),e.current},L7=e=>{const t=m.useContext(D7),n=()=>Cv(e)||Cv(t),[r,i]=m.useState(n);return m.useEffect(()=>{const a=n();O7(r,a)||i(a)},[e,t]),r},F7=e=>{const t=()=>N7(e),[n,r]=m.useState(t);return m.useEffect(()=>{const i=t();n!==i&&r(i)},[e]),n},B7=(e,t)=>{const n=()=>T7(e,t||{},!!t),[r,i]=m.useState(n),a=b_();return m.useEffect(()=>{if(a){const o=n();return i(o),()=>{o&&o.dispose()}}},[e,t]),r},U7=e=>{const[t,n]=m.useState(e.matches);return m.useEffect(()=>{const r=i=>{n(i.matches)};return e.addListener(r),n(e.matches),()=>{e.removeListener(r)}},[e]),t},vf=(e,t,n)=>{const r=L7(t),i=F7(e);if(!i)throw new Error("Invalid or missing MediaQuery!");const a=B7(i,r),o=U7(a),s=b_();return m.useEffect(()=>{s&&n&&n(o)},[o]),m.useEffect(()=>()=>{a&&a.dispose()},[]),o},W7=["sm","md","lg","always"],x_="ResponsiveContextDropdownItem",z7=e=>e.type.displayName===x_,mm=e=>({});mm.displayName=x_;function H7(e){return e.type&&e.type===m.Fragment}const __=e=>{const t=[];Array.isArray(e)?t.push(...e):t.push(e);const n=[];return t.forEach(r=>{if(r){if(H7(r)){n.push(...__(r.props.children));return}n.push(r)}}),n},V7=(e,t)=>{if(t===void 0)return e;const{searchQueryString:n,...r}=t;return no.generatePath(e,r)+"?"+n},q7="_disabled_9mp5v_1",Y7={disabled:q7},G7=()=>{const{ProjectIconComponent:e}=m.useContext(Kt),{checkUserHasPermissions:t}=o_();return{getProcessedChildren:m.useCallback((r,i)=>{const a=[],o=[];let s=null;const c=u=>{const{hideOn:d,children:f,cKey:h,to:g,toRoute:p,disabled:v,icon:w,pathParams:_,...x}=u.props,S=(p==null?void 0:p.permissions)!=null,b=(p==null?void 0:p.permissions)!=null&&t(p==null?void 0:p.permissions),T=(v??!1)||S&&!b,j=g??(p==null?void 0:V7(p==null?void 0:p.route,_)),M=f??(p==null?void 0:p.name),k=w??(p!=null?y.jsx(e,{icon:"link"}):void 0);if(d==="always"||W7.indexOf(d)>=i){s&&o.length>0&&o.push(s),s=null;const E=oe(x.className,{[Y7.disabled]:T});j!=null?o.push(y.jsx(Ii,{...x,as:"link",to:j,disabled:T,icon:k,className:E,children:M},h)):o.push(y.jsx(Ii,{...x,icon:k,className:E,children:M},h))}else{const E=j!=null?{as:"link",href:j}:{};a.push(y.jsx(Au,{...x,...E,icon:k,className:oe(T?"disabled":void 0,x.className),children:M},h))}};return __(r).forEach(u=>{u&&m.isValidElement(u)&&(z7(u)?c(u):s=u)}),{buttons:a,dropdownItems:o}},[e,t])}},w_=({children:e})=>{const{getProcessedChildren:t}=G7(),n=vf({maxWidth:768}),r=vf({minWidth:769,maxWidth:1200}),i=vf({minWidth:1201}),a=[n,r,i].indexOf(!0),{buttons:o,dropdownItems:s}=t(e,a);return y.jsxs("div",{className:"d-flex gap-1",children:[y.jsx(y.Fragment,{children:o}),s.length>0?y.jsx(fm,{toggle:y.jsx(dm,{as:um}),children:s}):null]})};w_.Item=mm;const Z7="Left",K7="Right",X7="Up",Q7="Down",Ma={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Mh={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},Tv="mousemove",Sv="mouseup",J7="touchend",eA="touchmove",tA="touchstart";function nA(e,t,n,r){return e>t?n>0?K7:Z7:r>0?Q7:X7}function kv(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function rA(e,t){const n=u=>{const d="touches"in u;d&&u.touches.length>1||e((f,h)=>{h.trackMouse&&!d&&(document.addEventListener(Tv,r),document.addEventListener(Sv,o));const{clientX:g,clientY:p}=d?u.touches[0]:u,v=kv([g,p],h.rotationAngle);return h.onTouchStartOrOnMouseDown&&h.onTouchStartOrOnMouseDown({event:u}),Object.assign(Object.assign(Object.assign({},f),Mh),{initial:v.slice(),xy:v,start:u.timeStamp||0})})},r=u=>{e((d,f)=>{const h="touches"in u;if(h&&u.touches.length>1)return d;if(u.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:g,clientY:p}=h?u.touches[0]:u,[v,w]=kv([g,p],f.rotationAngle),_=v-d.xy[0],x=w-d.xy[1],S=Math.abs(_),b=Math.abs(x),T=(u.timeStamp||0)-d.start,j=Math.sqrt(S*S+b*b)/(T||1),M=[_/(T||1),x/(T||1)],k=nA(S,b,_,x),E=typeof f.delta=="number"?f.delta:f.delta[k.toLowerCase()]||Ma.delta;if(S<E&&b<E&&!d.swiping)return d;const C={absX:S,absY:b,deltaX:_,deltaY:x,dir:k,event:u,first:d.first,initial:d.initial,velocity:j,vxvy:M};C.first&&f.onSwipeStart&&f.onSwipeStart(C),f.onSwiping&&f.onSwiping(C);let O=!1;return(f.onSwiping||f.onSwiped||f[`onSwiped${k}`])&&(O=!0),O&&f.preventScrollOnSwipe&&f.trackTouch&&u.cancelable&&u.preventDefault(),Object.assign(Object.assign({},d),{first:!1,eventData:C,swiping:!0})})},i=u=>{e((d,f)=>{let h;if(d.swiping&&d.eventData){if(u.timeStamp-d.start<f.swipeDuration){h=Object.assign(Object.assign({},d.eventData),{event:u}),f.onSwiped&&f.onSwiped(h);const g=f[`onSwiped${h.dir}`];g&&g(h)}}else f.onTap&&f.onTap({event:u});return f.onTouchEndOrOnMouseUp&&f.onTouchEndOrOnMouseUp({event:u}),Object.assign(Object.assign(Object.assign({},d),Mh),{eventData:h})})},a=()=>{document.removeEventListener(Tv,r),document.removeEventListener(Sv,o)},o=u=>{a(),i(u)},s=(u,d)=>{let f=()=>{};if(u&&u.addEventListener){const h=Object.assign(Object.assign({},Ma.touchEventOptions),d.touchEventOptions),g=[[tA,n,h],[eA,r,Object.assign(Object.assign({},h),d.preventScrollOnSwipe?{passive:!1}:{})],[J7,i,h]];g.forEach(([p,v,w])=>u.addEventListener(p,v,w)),f=()=>g.forEach(([p,v])=>u.removeEventListener(p,v))}return f},l={ref:u=>{u!==null&&e((d,f)=>{if(d.el===u)return d;const h={};return d.el&&d.el!==u&&d.cleanUpTouch&&(d.cleanUpTouch(),h.cleanUpTouch=void 0),f.trackTouch&&u&&(h.cleanUpTouch=s(u,f)),Object.assign(Object.assign(Object.assign({},d),{el:u}),h)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function iA(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function gm(e){const{trackMouse:t}=e,n=ue.useRef(Object.assign({},Mh)),r=ue.useRef(Object.assign({},Ma)),i=ue.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Ma),e);let a;for(a in Ma)r.current[a]===void 0&&(r.current[a]=Ma[a]);const[o,s]=ue.useMemo(()=>rA(c=>n.current=c(n.current,r.current),{trackMouse:t}),[t]);return n.current=iA(n.current,r.current,i.current,s),o}const aA="_backdrop_3huvf_1",oA="_show_3huvf_11",Ev={backdrop:aA,show:oA},C_=({show:e,onClick:t})=>y.jsx("div",{className:oe("luminus-backdrop",Ev.backdrop,{[Ev.show]:e}),onClick:()=>t&&t()}),vm=e=>{const{variant:t,children:n,className:r,size:i="md",typographyVariant:a=i==="sm"?"body2":"body",...o}={...e};return y.jsx(p5,{variant:t,className:`text-center ${i==="sm"?"p-1":i==="md"?"p-3":"p-4"} bg-${t} bg-opacity-10 border-none ${r??""}`,...o,children:y.jsx(_n,{variant:a,children:n})})},sA="_floating-label_3xm9u_1",cA="_without-label_3xm9u_21",lA="_floating-label-check_3xm9u_184",yf={"floating-label":"_floating-label_3xm9u_1",floatingLabel:sA,"without-label":"_without-label_3xm9u_21",withoutLabel:cA,"floating-label-check":"_floating-label-check_3xm9u_184",floatingLabelCheck:lA},uA=({hint:e,children:t})=>e?y.jsx(Jp,{text:e,placement:"top",children:t}):t,ju=m.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:i,inputContainerClassName:a,isForCheckInput:o,hint:s,required:c,disabled:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?"":y.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[u.label,c?y.jsx("span",{className:oe("fw-bold",{"text-danger":!l}),style:{fontSize:"16px"},children:"*"}):null,s?y.jsx("div",{className:"d-flex align-items-center",children:y.jsx(f,{icon:"info"})}):null]});return o?y.jsx("div",{className:oe("luminus-floating-label-check",yf.floatingLabelCheck),children:t}):y.jsx(uA,{hint:s,children:y.jsx(Vp,{ref:d,label:y.jsx("div",{className:"d-flex gap-1 align-items-center",children:h}),hidden:e??!1,className:oe(`luminus-floating-label ${n??""}`,yf.floatingLabel,{[a??""]:a},{[yf.withoutLabel]:u.withoutLabel}),children:t})})});ju.displayName="FloatingLabelInput";const dA="_row-label-input_i295l_1",fA="_label_i295l_4",hA="_input-container_i295l_9",pA="_invalid-feedback_i295l_104",mA="_keep-check-label_i295l_132",gA="_is-invalid_i295l_160",Do={"row-label-input":"_row-label-input_i295l_1",rowLabelInput:dA,label:fA,"input-container":"_input-container_i295l_9",inputContainer:hA,"invalid-feedback":"_invalid-feedback_i295l_104",invalidFeedback:pA,"keep-check-label":"_keep-check-label_i295l_132",keepCheckLabel:mA,"is-invalid":"_is-invalid_i295l_160",isInvalid:gA},ic=m.forwardRef(({hidden:e,children:t,required:n,disabled:r,className:i,isInvalid:a,isForRadioInput:o,isForTextAreaInput:s,inputContainerClassName:c,hint:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?y.jsx(y.Fragment,{}):y.jsx("label",{className:oe("label col-6",{"col-12":s},Do.label),children:y.jsxs(_n,{variant:"form-label",className:oe("d-flex gap-1 align-items-center",a?"text-danger":""),children:[u.label,n?y.jsx("span",{className:oe("fw-bold",{"text-danger":!r}),style:{fontSize:"16px"},children:"*"}):null,l?y.jsx("div",{className:"d-flex align-items-center",style:{paddingTop:"2px"},children:y.jsx(f,{icon:"info"})}):null]})});return y.jsxs("div",{ref:d,className:oe("luminus-row-label row gx-0 gy-0",{"is-invalid":a},{[Do.isInvalid]:a},{[i??""]:i},{"d-none":e},Do.rowLabelInput),children:[l?y.jsx(Jp,{text:l,placement:"top",children:h}):h,y.jsx("div",{className:oe("input-container",Do.inputContainer,{"col-6":!u.withoutLabel&&!s},{"col-12":u.withoutLabel||s},{[Do.keepCheckLabel]:o},{[c??""]:c}),children:t})]})});ic.displayName="RowLabelInput";const T_=m.forwardRef(({children:e,className:t,hidden:n},r)=>y.jsx("div",{ref:r,className:`${n?"d-none":""} ${t}`,children:e}));T_.displayName="NoInputContainer";const S_=({currentSelection:e,selectedItemNavigateTo:t,children:n})=>{if(!e||!e.id||!t)return y.jsx("div",{className:"luminus-input-container position-relative w-100",children:n});const r=t(e);return y.jsx(no.Link,{to:r,className:"luminus-input-container position-relative w-100 text-decoration-none",children:n})},k_=({InputContainer:e=ju,type:t,value:n,onChange:r,debounceMs:i,label:a,withoutLabel:o,placeholder:s,size:c,hidden:l,disabled:u,showClearIcon:d,clearValue:f,list:h,className:g,step:p,minLength:v,maxLength:w,noSelectOnFocus:_,hint:x,onConfirm:S,autoComplete:b})=>{var U,G,ne;const T=t==="number",j=m.useCallback(()=>{if(!r)return;const te=f??null;r(T?te?Number(te):null:(te==null?void 0:te.toString())??"")},[f,T,r]),M=m.useRef(null),[k,E]=m.useState((n==null?void 0:n.toString())??""),C=m.useCallback(te=>{const X=te;r&&r(T?X==null||X===""?null:Number(X):X||null)},[T,r]),O=m.useCallback(te=>{var J;const X=(J=te.target)==null?void 0:J.value;if(!i){C(X);return}E(X),M.current!==null&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>{C(X)},i)},[i,C]),$=m.useMemo(()=>{if(S!==void 0)return te=>{te.key==="Enter"&&S&&S()}},[S]);m.useEffect(()=>{E(n===null?"":n.toString())},[n]);const[A,P]=m.useState(!1),D=lm(t,n?n.toString()??null:null,A),N=m.useRef(null),q=(((U=N.current)==null?void 0:U.scrollWidth)??0)>(((G=N.current)==null?void 0:G.clientWidth)??0),z=(ne=N.current)==null?void 0:ne.getBoundingClientRect();return y.jsxs(e,{withoutLabel:o,label:a??"",hidden:l,className:g,hint:x,disabled:u,children:[y.jsx(Tr.Control,{type:D,placeholder:s??a,size:c,value:i?k:(n==null?void 0:n.toString())??"",onChange:O,className:g??"",hidden:l,disabled:u??!1,list:h,onFocus:te=>{P(!0),!_&&te.target.select()},onBlur:()=>P(!1),onKeyDown:$,step:p,minLength:v,maxLength:w,autoComplete:b,ref:N}),d&&n!==null&&r&&!u&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(rc,{color:"secondary",size:"sm",onClick:j,children:y.jsx(Xs,{})})}),q?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((z==null?void 0:z.top)??0)+((z==null?void 0:z.height)??0),left:(z==null?void 0:z.left)??0},children:i?k:(n==null?void 0:n.toString())??""}):null]})};var ym={},Al={exports:{}};Al.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",p="[object Map]",v="[object Number]",w="[object Null]",_="[object Object]",x="[object Promise]",S="[object Proxy]",b="[object RegExp]",T="[object Set]",j="[object String]",M="[object Symbol]",k="[object Undefined]",E="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",$="[object Float32Array]",A="[object Float64Array]",P="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",q="[object Uint8Array]",z="[object Uint8ClampedArray]",U="[object Uint16Array]",G="[object Uint32Array]",ne=/[\\^$.*+?()[\]{}|]/g,te=/^\[object .+?Constructor\]$/,X=/^(?:0|[1-9]\d*)$/,J={};J[$]=J[A]=J[P]=J[D]=J[N]=J[q]=J[z]=J[U]=J[G]=!0,J[s]=J[c]=J[C]=J[u]=J[O]=J[d]=J[f]=J[h]=J[p]=J[v]=J[_]=J[b]=J[T]=J[j]=J[E]=!1;var Q=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,re=typeof self=="object"&&self&&self.Object===Object&&self,F=Q||re||Function("return this")(),I=t&&!t.nodeType&&t,L=I&&!0&&e&&!e.nodeType&&e,H=L&&L.exports===I,R=H&&Q.process,K=function(){try{return R&&R.binding&&R.binding("util")}catch{}}(),Z=K&&K.isTypedArray;function ee(B,Y){for(var le=-1,Te=B==null?0:B.length,Nt=0,Qe=[];++le<Te;){var Qt=B[le];Y(Qt,le,B)&&(Qe[Nt++]=Qt)}return Qe}function pe(B,Y){for(var le=-1,Te=Y.length,Nt=B.length;++le<Te;)B[Nt+le]=Y[le];return B}function we(B,Y){for(var le=-1,Te=B==null?0:B.length;++le<Te;)if(Y(B[le],le,B))return!0;return!1}function ve(B,Y){for(var le=-1,Te=Array(B);++le<B;)Te[le]=Y(le);return Te}function Le(B){return function(Y){return B(Y)}}function Re(B,Y){return B.has(Y)}function Ve(B,Y){return B==null?void 0:B[Y]}function ze(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te,Nt){le[++Y]=[Nt,Te]}),le}function ut(B,Y){return function(le){return B(Y(le))}}function at(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te){le[++Y]=Te}),le}var de=Array.prototype,me=Function.prototype,ke=Object.prototype,tt=F["__core-js_shared__"],Et=me.toString,qe=ke.hasOwnProperty,ot=function(){var B=/[^.]+$/.exec(tt&&tt.keys&&tt.keys.IE_PROTO||"");return B?"Symbol(src)_1."+B:""}(),pt=ke.toString,It=RegExp("^"+Et.call(qe).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=H?F.Buffer:void 0,dt=F.Symbol,mt=F.Uint8Array,Wt=ke.propertyIsEnumerable,De=de.splice,Ae=dt?dt.toStringTag:void 0,Ye=Object.getOwnPropertySymbols,ct=st?st.isBuffer:void 0,gt=ut(Object.keys,Object),St=ga(F,"DataView"),Vt=ga(F,"Map"),Rt=ga(F,"Promise"),Dt=ga(F,"Set"),qt=ga(F,"WeakMap"),vt=ga(Object,"create"),Yt=Si(St),rn=Si(Vt),Jt=Si(Rt),ye=Si(Dt),Ee=Si(qt),je=dt?dt.prototype:void 0,Ge=je?je.valueOf:void 0;function Ue(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function ft(){this.__data__=vt?vt(null):{},this.size=0}function W(B){var Y=this.has(B)&&delete this.__data__[B];return this.size-=Y?1:0,Y}function ce(B){var Y=this.__data__;if(vt){var le=Y[B];return le===r?void 0:le}return qe.call(Y,B)?Y[B]:void 0}function ae(B){var Y=this.__data__;return vt?Y[B]!==void 0:qe.call(Y,B)}function se(B,Y){var le=this.__data__;return this.size+=this.has(B)?0:1,le[B]=vt&&Y===void 0?r:Y,this}Ue.prototype.clear=ft,Ue.prototype.delete=W,Ue.prototype.get=ce,Ue.prototype.has=ae,Ue.prototype.set=se;function be(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Oe(){this.__data__=[],this.size=0}function xe(B){var Y=this.__data__,le=xc(Y,B);if(le<0)return!1;var Te=Y.length-1;return le==Te?Y.pop():De.call(Y,le,1),--this.size,!0}function Se(B){var Y=this.__data__,le=xc(Y,B);return le<0?void 0:Y[le][1]}function Ne(B){return xc(this.__data__,B)>-1}function Pe(B,Y){var le=this.__data__,Te=xc(le,B);return Te<0?(++this.size,le.push([B,Y])):le[Te][1]=Y,this}be.prototype.clear=Oe,be.prototype.delete=xe,be.prototype.get=Se,be.prototype.has=Ne,be.prototype.set=Pe;function Xe(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function zt(){this.size=0,this.__data__={hash:new Ue,map:new(Vt||be),string:new Ue}}function Ot(B){var Y=_c(this,B).delete(B);return this.size-=Y?1:0,Y}function Xt(B){return _c(this,B).get(B)}function ge(B){return _c(this,B).has(B)}function ln(B,Y){var le=_c(this,B),Te=le.size;return le.set(B,Y),this.size+=le.size==Te?0:1,this}Xe.prototype.clear=zt,Xe.prototype.delete=Ot,Xe.prototype.get=Xt,Xe.prototype.has=ge,Xe.prototype.set=ln;function Mt(B){var Y=-1,le=B==null?0:B.length;for(this.__data__=new Xe;++Y<le;)this.add(B[Y])}function Jn(B){return this.__data__.set(B,r),this}function yc(B){return this.__data__.has(B)}Mt.prototype.add=Mt.prototype.push=Jn,Mt.prototype.has=yc;function er(B){var Y=this.__data__=new be(B);this.size=Y.size}function Ti(){this.__data__=new be,this.size=0}function bc(B){var Y=this.__data__,le=Y.delete(B);return this.size=Y.size,le}function Or(B){return this.__data__.get(B)}function qd(B){return this.__data__.has(B)}function Mr(B,Y){var le=this.__data__;if(le instanceof be){var Te=le.__data__;if(!Vt||Te.length<n-1)return Te.push([B,Y]),this.size=++le.size,this;le=this.__data__=new Xe(Te)}return le.set(B,Y),this.size=le.size,this}er.prototype.clear=Ti,er.prototype.delete=bc,er.prototype.get=Or,er.prototype.has=qd,er.prototype.set=Mr;function To(B,Y){var le=wc(B),Te=!le&&qC(B),Nt=!le&&!Te&&Yd(B),Qe=!le&&!Te&&!Nt&&r0(B),Qt=le||Te||Nt||Qe,an=Qt?ve(B.length,String):[],un=an.length;for(var Gt in B)qe.call(B,Gt)&&!(Qt&&(Gt=="length"||Nt&&(Gt=="offset"||Gt=="parent")||Qe&&(Gt=="buffer"||Gt=="byteLength"||Gt=="byteOffset")||UC(Gt,un)))&&an.push(Gt);return an}function xc(B,Y){for(var le=B.length;le--;)if(Jg(B[le][0],Y))return le;return-1}function RC(B,Y,le){var Te=Y(B);return wc(B)?Te:pe(Te,le(B))}function So(B){return B==null?B===void 0?k:w:Ae&&Ae in Object(B)?FC(B):VC(B)}function Zg(B){return ko(B)&&So(B)==s}function Kg(B,Y,le,Te,Nt){return B===Y?!0:B==null||Y==null||!ko(B)&&!ko(Y)?B!==B&&Y!==Y:jC(B,Y,le,Te,Kg,Nt)}function jC(B,Y,le,Te,Nt,Qe){var Qt=wc(B),an=wc(Y),un=Qt?c:Zr(B),Gt=an?c:Zr(Y);un=un==s?_:un,Gt=Gt==s?_:Gt;var In=un==_,tr=Gt==_,fn=un==Gt;if(fn&&Yd(B)){if(!Yd(Y))return!1;Qt=!0,In=!1}if(fn&&!In)return Qe||(Qe=new er),Qt||r0(B)?Xg(B,Y,le,Te,Nt,Qe):NC(B,Y,un,le,Te,Nt,Qe);if(!(le&i)){var Bn=In&&qe.call(B,"__wrapped__"),Un=tr&&qe.call(Y,"__wrapped__");if(Bn||Un){var Kr=Bn?B.value():B,$r=Un?Y.value():Y;return Qe||(Qe=new er),Nt(Kr,$r,le,Te,Qe)}}return fn?(Qe||(Qe=new er),LC(B,Y,le,Te,Nt,Qe)):!1}function PC(B){if(!n0(B)||zC(B))return!1;var Y=e0(B)?It:te;return Y.test(Si(B))}function IC(B){return ko(B)&&t0(B.length)&&!!J[So(B)]}function DC(B){if(!HC(B))return gt(B);var Y=[];for(var le in Object(B))qe.call(B,le)&&le!="constructor"&&Y.push(le);return Y}function Xg(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=B.length,un=Y.length;if(an!=un&&!(Qt&&un>an))return!1;var Gt=Qe.get(B);if(Gt&&Qe.get(Y))return Gt==Y;var In=-1,tr=!0,fn=le&a?new Mt:void 0;for(Qe.set(B,Y),Qe.set(Y,B);++In<an;){var Bn=B[In],Un=Y[In];if(Te)var Kr=Qt?Te(Un,Bn,In,Y,B,Qe):Te(Bn,Un,In,B,Y,Qe);if(Kr!==void 0){if(Kr)continue;tr=!1;break}if(fn){if(!we(Y,function($r,ki){if(!Re(fn,ki)&&(Bn===$r||Nt(Bn,$r,le,Te,Qe)))return fn.push(ki)})){tr=!1;break}}else if(!(Bn===Un||Nt(Bn,Un,le,Te,Qe))){tr=!1;break}}return Qe.delete(B),Qe.delete(Y),tr}function NC(B,Y,le,Te,Nt,Qe,Qt){switch(le){case O:if(B.byteLength!=Y.byteLength||B.byteOffset!=Y.byteOffset)return!1;B=B.buffer,Y=Y.buffer;case C:return!(B.byteLength!=Y.byteLength||!Qe(new mt(B),new mt(Y)));case u:case d:case v:return Jg(+B,+Y);case f:return B.name==Y.name&&B.message==Y.message;case b:case j:return B==Y+"";case p:var an=ze;case T:var un=Te&i;if(an||(an=at),B.size!=Y.size&&!un)return!1;var Gt=Qt.get(B);if(Gt)return Gt==Y;Te|=a,Qt.set(B,Y);var In=Xg(an(B),an(Y),Te,Nt,Qe,Qt);return Qt.delete(B),In;case M:if(Ge)return Ge.call(B)==Ge.call(Y)}return!1}function LC(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=Qg(B),un=an.length,Gt=Qg(Y),In=Gt.length;if(un!=In&&!Qt)return!1;for(var tr=un;tr--;){var fn=an[tr];if(!(Qt?fn in Y:qe.call(Y,fn)))return!1}var Bn=Qe.get(B);if(Bn&&Qe.get(Y))return Bn==Y;var Un=!0;Qe.set(B,Y),Qe.set(Y,B);for(var Kr=Qt;++tr<un;){fn=an[tr];var $r=B[fn],ki=Y[fn];if(Te)var i0=Qt?Te(ki,$r,fn,Y,B,Qe):Te($r,ki,fn,B,Y,Qe);if(!(i0===void 0?$r===ki||Nt($r,ki,le,Te,Qe):i0)){Un=!1;break}Kr||(Kr=fn=="constructor")}if(Un&&!Kr){var Cc=B.constructor,Tc=Y.constructor;Cc!=Tc&&"constructor"in B&&"constructor"in Y&&!(typeof Cc=="function"&&Cc instanceof Cc&&typeof Tc=="function"&&Tc instanceof Tc)&&(Un=!1)}return Qe.delete(B),Qe.delete(Y),Un}function Qg(B){return RC(B,ZC,BC)}function _c(B,Y){var le=B.__data__;return WC(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function ga(B,Y){var le=Ve(B,Y);return PC(le)?le:void 0}function FC(B){var Y=qe.call(B,Ae),le=B[Ae];try{B[Ae]=void 0;var Te=!0}catch{}var Nt=pt.call(B);return Te&&(Y?B[Ae]=le:delete B[Ae]),Nt}var BC=Ye?function(B){return B==null?[]:(B=Object(B),ee(Ye(B),function(Y){return Wt.call(B,Y)}))}:KC,Zr=So;(St&&Zr(new St(new ArrayBuffer(1)))!=O||Vt&&Zr(new Vt)!=p||Rt&&Zr(Rt.resolve())!=x||Dt&&Zr(new Dt)!=T||qt&&Zr(new qt)!=E)&&(Zr=function(B){var Y=So(B),le=Y==_?B.constructor:void 0,Te=le?Si(le):"";if(Te)switch(Te){case Yt:return O;case rn:return p;case Jt:return x;case ye:return T;case Ee:return E}return Y});function UC(B,Y){return Y=Y??o,!!Y&&(typeof B=="number"||X.test(B))&&B>-1&&B%1==0&&B<Y}function WC(B){var Y=typeof B;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?B!=="__proto__":B===null}function zC(B){return!!ot&&ot in B}function HC(B){var Y=B&&B.constructor,le=typeof Y=="function"&&Y.prototype||ke;return B===le}function VC(B){return pt.call(B)}function Si(B){if(B!=null){try{return Et.call(B)}catch{}try{return B+""}catch{}}return""}function Jg(B,Y){return B===Y||B!==B&&Y!==Y}var qC=Zg(function(){return arguments}())?Zg:function(B){return ko(B)&&qe.call(B,"callee")&&!Wt.call(B,"callee")},wc=Array.isArray;function YC(B){return B!=null&&t0(B.length)&&!e0(B)}var Yd=ct||XC;function GC(B,Y){return Kg(B,Y)}function e0(B){if(!n0(B))return!1;var Y=So(B);return Y==h||Y==g||Y==l||Y==S}function t0(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function n0(B){var Y=typeof B;return B!=null&&(Y=="object"||Y=="function")}function ko(B){return B!=null&&typeof B=="object"}var r0=Z?Le(Z):IC;function ZC(B){return YC(B)?To(B):DC(B)}function KC(){return[]}function XC(){return!1}e.exports=GC})(Al,Al.exports);var vA=Al.exports,E_={exports:{}};(function(e,t){var n=function(){var r=function(b,T){var j=236,M=17,k=b,E=a[T],C=null,O=0,$=null,A=[],P={},D=function(F,I){O=k*4+17,C=function(L){for(var H=new Array(L),R=0;R<L;R+=1){H[R]=new Array(L);for(var K=0;K<L;K+=1)H[R][K]=null}return H}(O),N(0,0),N(O-7,0),N(0,O-7),U(),z(),ne(F,I),k>=7&&G(F),$==null&&($=J(k,E,A)),te($,I)},N=function(F,I){for(var L=-1;L<=7;L+=1)if(!(F+L<=-1||O<=F+L))for(var H=-1;H<=7;H+=1)I+H<=-1||O<=I+H||(0<=L&&L<=6&&(H==0||H==6)||0<=H&&H<=6&&(L==0||L==6)||2<=L&&L<=4&&2<=H&&H<=4?C[F+L][I+H]=!0:C[F+L][I+H]=!1)},q=function(){for(var F=0,I=0,L=0;L<8;L+=1){D(!0,L);var H=s.getLostPoint(P);(L==0||F>H)&&(F=H,I=L)}return I},z=function(){for(var F=8;F<O-8;F+=1)C[F][6]==null&&(C[F][6]=F%2==0);for(var I=8;I<O-8;I+=1)C[6][I]==null&&(C[6][I]=I%2==0)},U=function(){for(var F=s.getPatternPosition(k),I=0;I<F.length;I+=1)for(var L=0;L<F.length;L+=1){var H=F[I],R=F[L];if(C[H][R]==null)for(var K=-2;K<=2;K+=1)for(var Z=-2;Z<=2;Z+=1)K==-2||K==2||Z==-2||Z==2||K==0&&Z==0?C[H+K][R+Z]=!0:C[H+K][R+Z]=!1}},G=function(F){for(var I=s.getBCHTypeNumber(k),L=0;L<18;L+=1){var H=!F&&(I>>L&1)==1;C[Math.floor(L/3)][L%3+O-8-3]=H}for(var L=0;L<18;L+=1){var H=!F&&(I>>L&1)==1;C[L%3+O-8-3][Math.floor(L/3)]=H}},ne=function(F,I){for(var L=E<<3|I,H=s.getBCHTypeInfo(L),R=0;R<15;R+=1){var K=!F&&(H>>R&1)==1;R<6?C[R][8]=K:R<8?C[R+1][8]=K:C[O-15+R][8]=K}for(var R=0;R<15;R+=1){var K=!F&&(H>>R&1)==1;R<8?C[8][O-R-1]=K:R<9?C[8][15-R-1+1]=K:C[8][15-R-1]=K}C[O-8][8]=!F},te=function(F,I){for(var L=-1,H=O-1,R=7,K=0,Z=s.getMaskFunction(I),ee=O-1;ee>0;ee-=2)for(ee==6&&(ee-=1);;){for(var pe=0;pe<2;pe+=1)if(C[H][ee-pe]==null){var we=!1;K<F.length&&(we=(F[K]>>>R&1)==1);var ve=Z(H,ee-pe);ve&&(we=!we),C[H][ee-pe]=we,R-=1,R==-1&&(K+=1,R=7)}if(H+=L,H<0||O<=H){H-=L,L=-L;break}}},X=function(F,I){for(var L=0,H=0,R=0,K=new Array(I.length),Z=new Array(I.length),ee=0;ee<I.length;ee+=1){var pe=I[ee].dataCount,we=I[ee].totalCount-pe;H=Math.max(H,pe),R=Math.max(R,we),K[ee]=new Array(pe);for(var ve=0;ve<K[ee].length;ve+=1)K[ee][ve]=255&F.getBuffer()[ve+L];L+=pe;var Le=s.getErrorCorrectPolynomial(we),Re=l(K[ee],Le.getLength()-1),Ve=Re.mod(Le);Z[ee]=new Array(Le.getLength()-1);for(var ve=0;ve<Z[ee].length;ve+=1){var ze=ve+Ve.getLength()-Z[ee].length;Z[ee][ve]=ze>=0?Ve.getAt(ze):0}}for(var ut=0,ve=0;ve<I.length;ve+=1)ut+=I[ve].totalCount;for(var at=new Array(ut),de=0,ve=0;ve<H;ve+=1)for(var ee=0;ee<I.length;ee+=1)ve<K[ee].length&&(at[de]=K[ee][ve],de+=1);for(var ve=0;ve<R;ve+=1)for(var ee=0;ee<I.length;ee+=1)ve<Z[ee].length&&(at[de]=Z[ee][ve],de+=1);return at},J=function(F,I,L){for(var H=u.getRSBlocks(F,I),R=d(),K=0;K<L.length;K+=1){var Z=L[K];R.put(Z.getMode(),4),R.put(Z.getLength(),s.getLengthInBits(Z.getMode(),F)),Z.write(R)}for(var ee=0,K=0;K<H.length;K+=1)ee+=H[K].dataCount;if(R.getLengthInBits()>ee*8)throw"code length overflow. ("+R.getLengthInBits()+">"+ee*8+")";for(R.getLengthInBits()+4<=ee*8&&R.put(0,4);R.getLengthInBits()%8!=0;)R.putBit(!1);for(;!(R.getLengthInBits()>=ee*8||(R.put(j,8),R.getLengthInBits()>=ee*8));)R.put(M,8);return X(R,H)};P.addData=function(F,I){I=I||"Byte";var L=null;switch(I){case"Numeric":L=f(F);break;case"Alphanumeric":L=h(F);break;case"Byte":L=g(F);break;case"Kanji":L=p(F);break;default:throw"mode:"+I}A.push(L),$=null},P.isDark=function(F,I){if(F<0||O<=F||I<0||O<=I)throw F+","+I;return C[F][I]},P.getModuleCount=function(){return O},P.make=function(){if(k<1){for(var F=1;F<40;F++){for(var I=u.getRSBlocks(F,E),L=d(),H=0;H<A.length;H++){var R=A[H];L.put(R.getMode(),4),L.put(R.getLength(),s.getLengthInBits(R.getMode(),F)),R.write(L)}for(var K=0,H=0;H<I.length;H++)K+=I[H].dataCount;if(L.getLengthInBits()<=K*8)break}k=F}D(!1,q())},P.createTableTag=function(F,I){F=F||2,I=typeof I>"u"?F*4:I;var L="";L+='<table style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: "+I+"px;",L+='">',L+="<tbody>";for(var H=0;H<P.getModuleCount();H+=1){L+="<tr>";for(var R=0;R<P.getModuleCount();R+=1)L+='<td style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: 0px;",L+=" width: "+F+"px;",L+=" height: "+F+"px;",L+=" background-color: ",L+=P.isDark(H,R)?"#000000":"#ffffff",L+=";",L+='"/>';L+="</tr>"}return L+="</tbody>",L+="</table>",L},P.createSvgTag=function(F,I,L,H){var R={};typeof arguments[0]=="object"&&(R=arguments[0],F=R.cellSize,I=R.margin,L=R.alt,H=R.title),F=F||2,I=typeof I>"u"?F*4:I,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-description":null,H=typeof H=="string"?{text:H}:H||{},H.text=H.text||null,H.id=H.text?H.id||"qrcode-title":null;var K=P.getModuleCount()*F+I*2,Z,ee,pe,we,ve="",Le;for(Le="l"+F+",0 0,"+F+" -"+F+",0 0,-"+F+"z ",ve+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',ve+=R.scalable?"":' width="'+K+'px" height="'+K+'px"',ve+=' viewBox="0 0 '+K+" "+K+'" ',ve+=' preserveAspectRatio="xMinYMin meet"',ve+=H.text||L.text?' role="img" aria-labelledby="'+Q([H.id,L.id].join(" ").trim())+'"':"",ve+=">",ve+=H.text?'<title id="'+Q(H.id)+'">'+Q(H.text)+"</title>":"",ve+=L.text?'<description id="'+Q(L.id)+'">'+Q(L.text)+"</description>":"",ve+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',ve+='<path d="',pe=0;pe<P.getModuleCount();pe+=1)for(we=pe*F+I,Z=0;Z<P.getModuleCount();Z+=1)P.isDark(pe,Z)&&(ee=Z*F+I,ve+="M"+ee+","+we+Le);return ve+='" stroke="transparent" fill="black"/>',ve+="</svg>",ve},P.createDataURL=function(F,I){F=F||2,I=typeof I>"u"?F*4:I;var L=P.getModuleCount()*F+I*2,H=I,R=L-I;return S(L,L,function(K,Z){if(H<=K&&K<R&&H<=Z&&Z<R){var ee=Math.floor((K-H)/F),pe=Math.floor((Z-H)/F);return P.isDark(pe,ee)?0:1}else return 1})},P.createImgTag=function(F,I,L){F=F||2,I=typeof I>"u"?F*4:I;var H=P.getModuleCount()*F+I*2,R="";return R+="<img",R+=' src="',R+=P.createDataURL(F,I),R+='"',R+=' width="',R+=H,R+='"',R+=' height="',R+=H,R+='"',L&&(R+=' alt="',R+=Q(L),R+='"'),R+="/>",R};var Q=function(F){for(var I="",L=0;L<F.length;L+=1){var H=F.charAt(L);switch(H){case"<":I+="<";break;case">":I+=">";break;case"&":I+="&";break;case'"':I+=""";break;default:I+=H;break}}return I},re=function(F){var I=1;F=typeof F>"u"?I*2:F;var L=P.getModuleCount()*I+F*2,H=F,R=L-F,K,Z,ee,pe,we,ve={"██":"█","█ ":"▀"," █":"▄"," ":" "},Le={"██":"▀","█ ":"▀"," █":" "," ":" "},Re="";for(K=0;K<L;K+=2){for(ee=Math.floor((K-H)/I),pe=Math.floor((K+1-H)/I),Z=0;Z<L;Z+=1)we="█",H<=Z&&Z<R&&H<=K&&K<R&&P.isDark(ee,Math.floor((Z-H)/I))&&(we=" "),H<=Z&&Z<R&&H<=K+1&&K+1<R&&P.isDark(pe,Math.floor((Z-H)/I))?we+=" ":we+="█",Re+=F<1&&K+1>=R?Le[we]:ve[we];Re+=`
|
|
253
|
+
*/var fv;function p8(){return fv||(fv=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,p=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,_=e?Symbol.for("react.scope"):60119;function x(R){return typeof R=="string"||typeof R=="function"||R===r||R===l||R===a||R===i||R===d||R===f||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===h||R.$$typeof===o||R.$$typeof===s||R.$$typeof===u||R.$$typeof===v||R.$$typeof===w||R.$$typeof===_||R.$$typeof===p)}function S(R){if(typeof R=="object"&&R!==null){var K=R.$$typeof;switch(K){case t:var Z=R.type;switch(Z){case c:case l:case r:case a:case i:case d:return Z;default:var ee=Z&&Z.$$typeof;switch(ee){case s:case u:case g:case h:case o:return ee;default:return K}}case n:return K}}}var b=c,T=l,j=s,M=o,k=t,E=u,C=r,O=g,$=h,A=n,P=a,D=i,N=d,q=!1;function z(R){return q||(q=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),U(R)||S(R)===c}function U(R){return S(R)===l}function G(R){return S(R)===s}function ne(R){return S(R)===o}function te(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function X(R){return S(R)===u}function J(R){return S(R)===r}function Q(R){return S(R)===g}function re(R){return S(R)===h}function F(R){return S(R)===n}function I(R){return S(R)===a}function L(R){return S(R)===i}function H(R){return S(R)===d}_t.AsyncMode=b,_t.ConcurrentMode=T,_t.ContextConsumer=j,_t.ContextProvider=M,_t.Element=k,_t.ForwardRef=E,_t.Fragment=C,_t.Lazy=O,_t.Memo=$,_t.Portal=A,_t.Profiler=P,_t.StrictMode=D,_t.Suspense=N,_t.isAsyncMode=z,_t.isConcurrentMode=U,_t.isContextConsumer=G,_t.isContextProvider=ne,_t.isElement=te,_t.isForwardRef=X,_t.isFragment=J,_t.isLazy=Q,_t.isMemo=re,_t.isPortal=F,_t.isProfiler=I,_t.isStrictMode=L,_t.isSuspense=H,_t.isValidElementType=x,_t.typeOf=S}()),_t}var hv;function m8(){return hv||(hv=1,process.env.NODE_ENV==="production"?Rc.exports=h8():Rc.exports=p8()),Rc.exports}var pf,pv;function g8(){if(pv)return pf;pv=1;var e=m8(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};a[e.ForwardRef]=r,a[e.Memo]=i;function o(g){return e.isMemo(g)?i:a[g.$$typeof]||t}var s=Object.defineProperty,c=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,u=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,f=Object.prototype;function h(g,p,v){if(typeof p!="string"){if(f){var w=d(p);w&&w!==f&&h(g,w,v)}var _=c(p);l&&(_=_.concat(l(p)));for(var x=o(g),S=o(p),b=0;b<_.length;++b){var T=_[b];if(!n[T]&&!(v&&v[T])&&!(S&&S[T])&&!(x&&x[T])){var j=u(p,T);try{s(g,T,j)}catch{}}}}return g}return pf=h,pf}g8();function v8(){return typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"}function om(e,t){const n=m.useContext(f8);if(!n)throw new Error("Missing <CookiesProvider>");const i=Object.assign(Object.assign({},{doNotUpdate:!0}),t),[a,o]=m.useState(()=>n.getAll(i));v8()&&m.useLayoutEffect(()=>{function u(){const d=n.getAll(i);y8(e||null,d,a)&&o(d)}return n.addChangeListener(u),()=>{n.removeChangeListener(u)}},[n,a]);const s=m.useMemo(()=>n.set.bind(n),[n]),c=m.useMemo(()=>n.remove.bind(n),[n]),l=m.useMemo(()=>n.update.bind(n),[n]);return[a,s,c,l]}function y8(e,t,n){if(!e)return!0;for(let r of e)if(t[r]!==n[r])return!0;return!1}const b8=()=>{const{axiosOptions:e,cookieDomain:t}=m.useContext(Kt),[,n,r]=om(["Authorization"]),i=Ut.create(e),a=m.useCallback(()=>{const c=localStorage.getItem("token");return c!==null&&c.length>0},[]),o=m.useCallback(async(c,l)=>i.post("/user/login",{kid:c,password:l}).then(u=>(localStorage.setItem("token",u.data),n("Authorization",u.data,{path:"/",secure:!0,sameSite:"none",domain:t,expires:hb(new Date(Date.now()),24)}),u.data)).catch(u=>(console.log(u),null)),[i,n,t]),s=m.useCallback(()=>{localStorage.removeItem("token"),localStorage.removeItem("user"),r("Authorization")},[r]);return{isAuthenticated:a,login:o,logout:s}},x8=()=>{const[,,e]=om(["Authorization"]),{msalScopes:t,msalExtraScopes:n}=m.useContext(bu),{instance:r,inProgress:i}=a0.useMsal(),a=a0.useIsAuthenticated(),o=m.useCallback(()=>a,[a]),s=m.useCallback(()=>!o()&&i!==QC.InteractionStatus.None,[o,i]),c=m.useCallback(async()=>r.loginRedirect({scopes:t,extraScopesToConsent:n}).then(()=>"").catch(()=>null),[r,t,n]),l=m.useCallback(()=>{r.logout(),localStorage.removeItem("user"),e("Authorization")},[e,r]);return{isAuthenticated:o,isAuthenticating:s,login:c,logout:l}},G2=()=>{const{useMsal:e}=m.useContext(bu),t=b8(),n=x8();return{isAuthenticated:e?n.isAuthenticated:t.isAuthenticated,isAuthenticating:e?n.isAuthenticating:()=>!1,login:e?n.login:t.login,logout:e?n.logout:t.logout}},_8="_toast_1s57i_1",Po={toast:_8},w8=e=>{switch(e){case"success":return 5e3;case"info":return 5e3;case"danger":return 1e4;case"warning":return 1e4;case"prompt":return 1e4;default:return 5e3}},ku=()=>({addNotification:m.useCallback((t,n)=>{const r=m2(t),i=w8(n),a=y.jsxs(y.Fragment,{children:[r,y.jsx(e2,{onClick:()=>xa.dismiss(r),type:"button",style:{position:"absolute",fontSize:"12px",top:"calc(50% - 6px)",right:"8px"}})]});switch(n){case"success":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(iE,{size:12}),className:oe("luminus-toast-success rounded shadow bg-success",Po.toast)});break}case"danger":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(Zk,{size:12}),className:oe("luminus-toast-danger rounded shadow bg-danger",Po.toast)});break}case"warning":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(Vk,{size:12}),className:oe("luminus-toast-warning rounded shadow bg-warning",Po.toast)});break}case"info":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(Yk,{size:12}),className:oe("luminus-toast-info rounded shadow bg-info",Po.toast)});break}case"prompt":{xa(a,{id:r,duration:i,position:"top-center",icon:y.jsx(Gk,{size:12}),className:oe("luminus-toast-prompt rounded shadow bg-light",Po.toast)});break}}},[])}),C8=Ut.CancelToken,Eu=e=>{const{authenticated:t=!0,differentBaseUrl:n,silent:r=!1,customToken:i,ignoreDelegation:a,noToastOnStatus:o}={...e},{language:s,axiosOptions:c,texts:{axios:l}}=m.useContext(Kt),{delegation:u}=m.useContext(u2),{getToken:d}=m.useContext(bu),f=m.useMemo(()=>(u==null?void 0:u.id)??null,[u==null?void 0:u.id]),{addNotification:h}=ku(),{isAuthenticating:g}=G2(),p=m.useMemo(()=>Ut.create(c),[c]),v=m.useCallback(async _=>{var S,b,T;if(t&&!_.headers.Authorization){if(g())return console.log("Authentication in progress, waiting for token..."),Promise.reject(new Error("Authentication in progress"));const j=i?{token:i,expiresOn:hb(new Date(Date.now()),1)}:await d();if(!j)return console.log("No bearer token"),Promise.reject(new Error("No bearer token"));if(yb(j.expiresOn))return console.log("Token expired"),Promise.reject(new Error("Token expired"));_.headers.Authorization=`Bearer ${j.token}`}f!==null&&!a&&(_.headers.DelegationId=f.toString());const x=localStorage.getItem("search-use-asterisk")!=="false";return _.headers["Search-Use-Asterisk"]=x?"true":"false",(S=_.url)!=null&&S.includes("culture=")?_.url=(b=_.url)==null?void 0:b.replace(/culture=[a-z]{2}/,`culture=${s}`):_.url=`${_.url}${(T=_.url)!=null&&T.includes("?")?"&":"?"}culture=${s}`,_},[t,d,s,i,f,a,g]),w=m.useCallback(_=>{var b,T;if(console.log(_),Ut.isCancel(_)||_.message==="Authentication in progress"||_.message==="No bearer token"||_.message==="Token expired")return Promise.reject(_);const x=Qp(_);if(x.length>0){const j=x.find(M=>M.name.toLowerCase()==="others");return j?(!r&&h(j.errors,"danger"),Promise.reject(_)):(!r&&h(l.validationError,"warning"),Promise.reject(_))}const S=h2(_);return S!==null?(!r&&h(`${l.permissionError}: ${fs(", ",...S)}`,"danger"),Promise.reject(_)):(o??[]).includes((b=_.response)==null?void 0:b.status)?Promise.reject(_):((T=_.response)==null?void 0:T.status)===403?(!r&&h(l.forbiddenError,"danger"),Promise.reject(_)):_.message&&_.message==="Network Error"?(!r&&h(l.networkError,"danger"),Promise.reject(_)):(Ut.isCancel(_)||(!r&&h(l.unexpectedError,"danger"),(_.response||_.request)&&!r&&h(l.unexpectedError,"danger")),Promise.reject(_))},[h,l.forbiddenError,l.networkError,l.permissionError,l.unexpectedError,l.validationError,r,o]);return m.useEffect(()=>{n&&(p.defaults.baseURL=n),p.interceptors.request.clear(),p.interceptors.response.clear();const _=p.interceptors.request.use(v,S=>Promise.reject(S)),x=p.interceptors.response.use(S=>S,w);return()=>{p.interceptors.request.eject(_),p.interceptors.response.eject(x)}},[p.defaults,p.interceptors.request,p.interceptors.response,n,v,w]),p};let Io;const sm=()=>{const{show:e,text:t,showConfirm:n,hideConfirm:r,textSm:i}=m.useContext(n2),a=()=>{r()};return{confirm:async(l,u)=>(n(l,u),new Promise(d=>{Io=d})),onConfirm:()=>{a(),Io&&Io(!0)},onCancel:()=>{a(),Io&&Io(!1)},show:e,text:t,textSm:i}};var lt;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(lt||(lt={}));var Ch;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Ch||(Ch={}));const Ce=lt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ai=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},he=lt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),T8=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ln extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,c=0;for(;c<o.path.length;){const l=o.path[c];c===o.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(o))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return i(this),r}static assert(t){if(!(t instanceof Ln))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,lt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ln.create=e=>new Ln(e);const Ya=(e,t)=>{let n;switch(e.code){case he.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case he.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,lt.jsonStringifyReplacer)}`;break;case he.unrecognized_keys:n=`Unrecognized key(s) in object: ${lt.joinValues(e.keys,", ")}`;break;case he.invalid_union:n="Invalid input";break;case he.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${lt.joinValues(e.options)}`;break;case he.invalid_enum_value:n=`Invalid enum value. Expected ${lt.joinValues(e.options)}, received '${e.received}'`;break;case he.invalid_arguments:n="Invalid function arguments";break;case he.invalid_return_type:n="Invalid function return type";break;case he.invalid_date:n="Invalid date";break;case he.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:lt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case he.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case he.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case he.custom:n="Invalid input";break;case he.invalid_intersection_types:n="Intersection results could not be merged";break;case he.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case he.not_finite:n="Number must be finite";break;default:n=t.defaultError,lt.assertNever(e)}return{message:n}};let Z2=Ya;function S8(e){Z2=e}function Tl(){return Z2}const Sl=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const c=r.filter(l=>!!l).slice().reverse();for(const l of c)s=l(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},k8=[];function _e(e,t){const n=Tl(),r=Sl({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Ya?void 0:Ya].filter(i=>!!i)});e.common.issues.push(r)}class yn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Be;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return yn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Be;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Be=Object.freeze({status:"aborted"}),Oa=e=>({status:"dirty",value:e}),Tn=e=>({status:"valid",value:e}),Th=e=>e.status==="aborted",Sh=e=>e.status==="dirty",ps=e=>e.status==="valid",ms=e=>typeof Promise<"u"&&e instanceof Promise;function kl(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function K2(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var $e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})($e||($e={}));var Zo,Ko;class vr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const mv=(e,t)=>{if(ps(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ln(e.common.issues);return this._error=n,this._error}}};function Ke(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var c,l;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(c=u??r)!==null&&c!==void 0?c:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(l=u??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class et{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ai(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new yn,ctx:{common:t.parent.common,data:t.data,parsedType:ai(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ms(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ai(t)},a=this._parseSync({data:t,path:i.path,parent:i});return mv(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ai(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(ms(i)?i:Promise.resolve(i));return mv(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:he.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(c=>c?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new sr({schema:this,typeName:Fe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return mr.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return or.create(this,this._def)}promise(){return Za.create(this,this._def)}or(t){return bs.create([this,t],this._def)}and(t){return xs.create(this,t,this._def)}transform(t){return new sr({...Ke(this._def),schema:this,typeName:Fe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ss({...Ke(this._def),innerType:this,defaultValue:n,typeName:Fe.ZodDefault})}brand(){return new cm({typeName:Fe.ZodBranded,type:this,...Ke(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ks({...Ke(this._def),innerType:this,catchValue:n,typeName:Fe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return tc.create(this,t)}readonly(){return Es.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const E8=/^c[^\s-]{8,}$/i,O8=/^[0-9a-z]+$/,M8=/^[0-9A-HJKMNP-TV-Z]{26}$/,$8=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,A8=/^[a-z0-9_-]{21}$/i,R8=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,j8=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,P8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let mf;const I8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,D8=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,N8=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,X2="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",L8=new RegExp(`^${X2}$`);function Q2(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function F8(e){return new RegExp(`^${Q2(e)}$`)}function J2(e){let t=`${X2}T${Q2(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function B8(e,t){return!!((t==="v4"||!t)&&I8.test(e)||(t==="v6"||!t)&&D8.test(e))}class ir extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Ce.string,received:a.parsedType}),Be}const r=new yn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?_e(i,{code:he.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&_e(i,{code:he.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")j8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"email",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")mf||(mf=new RegExp(P8,"u")),mf.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"emoji",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")$8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"uuid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")A8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"nanoid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")E8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")O8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"cuid2",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")M8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ulid",code:he.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),_e(i,{validation:"url",code:he.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"regex",code:he.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?J2(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?L8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?F8(a).test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{code:he.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?R8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"duration",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?B8(t.data,a.version)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"ip",code:he.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?N8.test(t.data)||(i=this._getOrReturnCtx(t,i),_e(i,{validation:"base64",code:he.invalid_string,message:a.message}),r.dirty()):lt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:he.invalid_string,...$e.errToObj(r)})}_addCheck(t){return new ir({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...$e.errToObj(t)})}url(t){return this._addCheck({kind:"url",...$e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...$e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...$e.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...$e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...$e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...$e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...$e.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...$e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...$e.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...$e.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...$e.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...$e.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...$e.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...$e.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...$e.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...$e.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...$e.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...$e.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...$e.errToObj(n)})}nonempty(t){return this.min(1,$e.errToObj(t))}trim(){return new ir({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ir({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}ir.create=e=>{var t;return new ir({checks:[],typeName:Fe.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};function U8(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hi extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Ce.number,received:a.parsedType}),Be}let r;const i=new yn;for(const a of this._def.checks)a.kind==="int"?lt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?U8(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_finite,message:a.message}),i.dirty()):lt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$e.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$e.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$e.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$e.toString(n))}setLimit(t,n,r,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$e.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:$e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$e.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:$e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$e.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&<.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}hi.create=e=>new hi({checks:[],typeName:Fe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class pi extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Ce.bigint){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Ce.bigint,received:a.parsedType}),Be}let r;const i=new yn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),_e(r,{code:he.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):lt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$e.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$e.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$e.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$e.toString(n))}setLimit(t,n,r,i){return new pi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$e.toString(i)}]})}_addCheck(t){return new pi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}pi.create=e=>{var t;return new pi({checks:[],typeName:Fe.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Ke(e)})};class gs extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.boolean,received:r.parsedType}),Be}return Tn(t.data)}}gs.create=e=>new gs({typeName:Fe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ke(e)});class Xi extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_type,expected:Ce.date,received:a.parsedType}),Be}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return _e(a,{code:he.invalid_date}),Be}const r=new yn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),_e(i,{code:he.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):lt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Xi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:$e.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:$e.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Xi.create=e=>new Xi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Fe.ZodDate,...Ke(e)});class El extends et{_parse(t){if(this._getType(t)!==Ce.symbol){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.symbol,received:r.parsedType}),Be}return Tn(t.data)}}El.create=e=>new El({typeName:Fe.ZodSymbol,...Ke(e)});class vs extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.undefined,received:r.parsedType}),Be}return Tn(t.data)}}vs.create=e=>new vs({typeName:Fe.ZodUndefined,...Ke(e)});class ys extends et{_parse(t){if(this._getType(t)!==Ce.null){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.null,received:r.parsedType}),Be}return Tn(t.data)}}ys.create=e=>new ys({typeName:Fe.ZodNull,...Ke(e)});class Ga extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return Tn(t.data)}}Ga.create=e=>new Ga({typeName:Fe.ZodAny,...Ke(e)});class Hi extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Tn(t.data)}}Hi.create=e=>new Hi({typeName:Fe.ZodUnknown,...Ke(e)});class Vr extends et{_parse(t){const n=this._getOrReturnCtx(t);return _e(n,{code:he.invalid_type,expected:Ce.never,received:n.parsedType}),Be}}Vr.create=e=>new Vr({typeName:Fe.ZodNever,...Ke(e)});class Ol extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.void,received:r.parsedType}),Be}return Tn(t.data)}}Ol.create=e=>new Ol({typeName:Fe.ZodVoid,...Ke(e)});class or extends et{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Ce.array)return _e(n,{code:he.invalid_type,expected:Ce.array,received:n.parsedType}),Be;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(_e(n,{code:o?he.too_big:he.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(_e(n,{code:he.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(_e(n,{code:he.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new vr(n,o,n.path,s)))).then(o=>yn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new vr(n,o,n.path,s)));return yn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new or({...this._def,minLength:{value:t,message:$e.toString(n)}})}max(t,n){return new or({...this._def,maxLength:{value:t,message:$e.toString(n)}})}length(t,n){return new or({...this._def,exactLength:{value:t,message:$e.toString(n)}})}nonempty(t){return this.min(1,t)}}or.create=(e,t)=>new or({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Fe.ZodArray,...Ke(t)});function Ea(e){if(e instanceof Zt){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=mr.create(Ea(r))}return new Zt({...e._def,shape:()=>t})}else return e instanceof or?new or({...e._def,type:Ea(e.element)}):e instanceof mr?mr.create(Ea(e.unwrap())):e instanceof gi?gi.create(Ea(e.unwrap())):e instanceof yr?yr.create(e.items.map(t=>Ea(t))):e}class Zt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=lt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Ce.object){const l=this._getOrReturnCtx(t);return _e(l,{code:he.invalid_type,expected:Ce.object,received:l.parsedType}),Be}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Vr&&this._def.unknownKeys==="strip"))for(const l in i.data)o.includes(l)||s.push(l);const c=[];for(const l of o){const u=a[l],d=i.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new vr(i,d,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof Vr){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(l==="strict")s.length>0&&(_e(i,{code:he.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=i.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new vr(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key,f=await u.value;l.push({key:d,value:f,alwaysSet:u.alwaysSet})}return l}).then(l=>yn.mergeObjectSync(r,l)):yn.mergeObjectSync(r,c)}get shape(){return this._def.shape()}strict(t){return $e.errToObj,new Zt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const c=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=$e.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new Zt({...this._def,unknownKeys:"strip"})}passthrough(){return new Zt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Zt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Zt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Fe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Zt({...this._def,catchall:t})}pick(t){const n={};return lt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}omit(t){const n={};return lt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Zt({...this._def,shape:()=>n})}deepPartial(){return Ea(this)}partial(t){const n={};return lt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Zt({...this._def,shape:()=>n})}required(t){const n={};return lt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof mr;)a=a._def.innerType;n[r]=a}}),new Zt({...this._def,shape:()=>n})}keyof(){return e_(lt.objectKeys(this.shape))}}Zt.create=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strip",catchall:Vr.create(),typeName:Fe.ZodObject,...Ke(t)});Zt.strictCreate=(e,t)=>new Zt({shape:()=>e,unknownKeys:"strict",catchall:Vr.create(),typeName:Fe.ZodObject,...Ke(t)});Zt.lazycreate=(e,t)=>new Zt({shape:e,unknownKeys:"strip",catchall:Vr.create(),typeName:Fe.ZodObject,...Ke(t)});class bs extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Ln(s.ctx.common.issues));return _e(n,{code:he.invalid_union,unionErrors:o}),Be}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const c of r){const l={...n,common:{...n.common,issues:[]},parent:null},u=c._parseSync({data:n.data,path:n.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:l}),l.common.issues.length&&o.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(c=>new Ln(c));return _e(n,{code:he.invalid_union,unionErrors:s}),Be}}get options(){return this._def.options}}bs.create=(e,t)=>new bs({options:e,typeName:Fe.ZodUnion,...Ke(t)});const jr=e=>e instanceof ws?jr(e.schema):e instanceof sr?jr(e.innerType()):e instanceof Cs?[e.value]:e instanceof mi?e.options:e instanceof Ts?lt.objectValues(e.enum):e instanceof Ss?jr(e._def.innerType):e instanceof vs?[void 0]:e instanceof ys?[null]:e instanceof mr?[void 0,...jr(e.unwrap())]:e instanceof gi?[null,...jr(e.unwrap())]:e instanceof cm||e instanceof Es?jr(e.unwrap()):e instanceof ks?jr(e._def.innerType):[];class Ou extends et{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return _e(n,{code:he.invalid_type,expected:Ce.object,received:n.parsedType}),Be;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(_e(n,{code:he.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=jr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Ou({typeName:Fe.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Ke(r)})}}function kh(e,t){const n=ai(e),r=ai(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&r===Ce.object){const i=lt.objectKeys(t),a=lt.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const c=kh(e[s],t[s]);if(!c.valid)return{valid:!1};o[s]=c.data}return{valid:!0,data:o}}else if(n===Ce.array&&r===Ce.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],c=kh(o,s);if(!c.valid)return{valid:!1};i.push(c.data)}return{valid:!0,data:i}}else return n===Ce.date&&r===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class xs extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Th(a)||Th(o))return Be;const s=kh(a.value,o.value);return s.valid?((Sh(a)||Sh(o))&&n.dirty(),{status:n.value,value:s.data}):(_e(r,{code:he.invalid_intersection_types}),Be)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}xs.create=(e,t,n)=>new xs({left:e,right:t,typeName:Fe.ZodIntersection,...Ke(n)});class yr extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.array)return _e(r,{code:he.invalid_type,expected:Ce.array,received:r.parsedType}),Be;if(r.data.length<this._def.items.length)return _e(r,{code:he.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&r.data.length>this._def.items.length&&(_e(r,{code:he.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new vr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>yn.mergeArray(n,o)):yn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new yr({...this._def,rest:t})}}yr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yr({items:e,typeName:Fe.ZodTuple,rest:null,...Ke(t)})};class _s extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.object)return _e(r,{code:he.invalid_type,expected:Ce.object,received:r.parsedType}),Be;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new vr(r,s,r.path,s)),value:o._parse(new vr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?yn.mergeObjectAsync(n,i):yn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof et?new _s({keyType:t,valueType:n,typeName:Fe.ZodRecord,...Ke(r)}):new _s({keyType:ir.create(),valueType:t,typeName:Fe.ZodRecord,...Ke(n)})}}class Ml extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.map)return _e(r,{code:he.invalid_type,expected:Ce.map,received:r.parsedType}),Be;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,c],l)=>({key:i._parse(new vr(r,s,r.path,[l,"key"])),value:a._parse(new vr(r,c,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of o){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return Be;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of o){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return Be;(l.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(l.value,u.value)}return{status:n.value,value:s}}}}Ml.create=(e,t,n)=>new Ml({valueType:t,keyType:e,typeName:Fe.ZodMap,...Ke(n)});class Qi extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Ce.set)return _e(r,{code:he.invalid_type,expected:Ce.set,received:r.parsedType}),Be;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(_e(r,{code:he.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(_e(r,{code:he.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(c){const l=new Set;for(const u of c){if(u.status==="aborted")return Be;u.status==="dirty"&&n.dirty(),l.add(u.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((c,l)=>a._parse(new vr(r,c,r.path,l)));return r.common.async?Promise.all(s).then(c=>o(c)):o(s)}min(t,n){return new Qi({...this._def,minSize:{value:t,message:$e.toString(n)}})}max(t,n){return new Qi({...this._def,maxSize:{value:t,message:$e.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Qi.create=(e,t)=>new Qi({valueType:e,minSize:null,maxSize:null,typeName:Fe.ZodSet,...Ke(t)});class ja extends et{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.function)return _e(n,{code:he.invalid_type,expected:Ce.function,received:n.parsedType}),Be;function r(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tl(),Ya].filter(l=>!!l),issueData:{code:he.invalid_arguments,argumentsError:c}})}function i(s,c){return Sl({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Tl(),Ya].filter(l=>!!l),issueData:{code:he.invalid_return_type,returnTypeError:c}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Za){const s=this;return Tn(async function(...c){const l=new Ln([]),u=await s._def.args.parseAsync(c,a).catch(h=>{throw l.addIssue(r(c,h)),l}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,a).catch(h=>{throw l.addIssue(i(d,h)),l})})}else{const s=this;return Tn(function(...c){const l=s._def.args.safeParse(c,a);if(!l.success)throw new Ln([r(c,l.error)]);const u=Reflect.apply(o,this,l.data),d=s._def.returns.safeParse(u,a);if(!d.success)throw new Ln([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new ja({...this._def,args:yr.create(t).rest(Hi.create())})}returns(t){return new ja({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new ja({args:t||yr.create([]).rest(Hi.create()),returns:n||Hi.create(),typeName:Fe.ZodFunction,...Ke(r)})}}class ws extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ws.create=(e,t)=>new ws({getter:e,typeName:Fe.ZodLazy,...Ke(t)});class Cs extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return _e(n,{received:n.data,code:he.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}Cs.create=(e,t)=>new Cs({value:e,typeName:Fe.ZodLiteral,...Ke(t)});function e_(e,t){return new mi({values:e,typeName:Fe.ZodEnum,...Ke(t)})}class mi extends et{constructor(){super(...arguments),Zo.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{expected:lt.joinValues(r),received:n.parsedType,code:he.invalid_type}),Be}if(kl(this,Zo)||K2(this,Zo,new Set(this._def.values)),!kl(this,Zo).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return _e(n,{received:n.data,code:he.invalid_enum_value,options:r}),Be}return Tn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return mi.create(t,{...this._def,...n})}exclude(t,n=this._def){return mi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Zo=new WeakMap;mi.create=e_;class Ts extends et{constructor(){super(...arguments),Ko.set(this,void 0)}_parse(t){const n=lt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Ce.string&&r.parsedType!==Ce.number){const i=lt.objectValues(n);return _e(r,{expected:lt.joinValues(i),received:r.parsedType,code:he.invalid_type}),Be}if(kl(this,Ko)||K2(this,Ko,new Set(lt.getValidEnumValues(this._def.values))),!kl(this,Ko).has(t.data)){const i=lt.objectValues(n);return _e(r,{received:r.data,code:he.invalid_enum_value,options:i}),Be}return Tn(t.data)}get enum(){return this._def.values}}Ko=new WeakMap;Ts.create=(e,t)=>new Ts({values:e,typeName:Fe.ZodNativeEnum,...Ke(t)});class Za extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return _e(n,{code:he.invalid_type,expected:Ce.promise,received:n.parsedType}),Be;const r=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return Tn(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Za.create=(e,t)=>new Za({type:e,typeName:Fe.ZodPromise,...Ke(t)});class sr extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{_e(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return Be;const c=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return c.status==="aborted"?Be:c.status==="dirty"||n.value==="dirty"?Oa(c.value):c});{if(n.value==="aborted")return Be;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?Be:s.status==="dirty"||n.value==="dirty"?Oa(s.value):s}}if(i.type==="refinement"){const o=s=>{const c=i.refinement(s,a);if(r.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Be:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Be:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ps(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ps(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);lt.assertNever(i)}}sr.create=(e,t,n)=>new sr({schema:e,typeName:Fe.ZodEffects,effect:t,...Ke(n)});sr.createWithPreprocess=(e,t,n)=>new sr({schema:t,effect:{type:"preprocess",transform:e},typeName:Fe.ZodEffects,...Ke(n)});class mr extends et{_parse(t){return this._getType(t)===Ce.undefined?Tn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}mr.create=(e,t)=>new mr({innerType:e,typeName:Fe.ZodOptional,...Ke(t)});class gi extends et{_parse(t){return this._getType(t)===Ce.null?Tn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Fe.ZodNullable,...Ke(t)});class Ss extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Ce.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ss.create=(e,t)=>new Ss({innerType:e,typeName:Fe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ke(t)});class ks extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return ms(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ln(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ks.create=(e,t)=>new ks({innerType:e,typeName:Fe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ke(t)});class $l extends et{_parse(t){if(this._getType(t)!==Ce.nan){const r=this._getOrReturnCtx(t);return _e(r,{code:he.invalid_type,expected:Ce.nan,received:r.parsedType}),Be}return{status:"valid",value:t.data}}}$l.create=e=>new $l({typeName:Fe.ZodNaN,...Ke(e)});const W8=Symbol("zod_brand");class cm extends et{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class tc extends et{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Be:a.status==="dirty"?(n.dirty(),Oa(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Be:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new tc({in:t,out:n,typeName:Fe.ZodPipeline})}}class Es extends et{_parse(t){const n=this._def.innerType._parse(t),r=i=>(ps(i)&&(i.value=Object.freeze(i.value)),i);return ms(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Fe.ZodReadonly,...Ke(t)});function t_(e,t={},n){return e?Ga.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,c=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:c})}}):Ga.create()}const z8={object:Zt.lazycreate};var Fe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Fe||(Fe={}));const H8=(e,t={message:`Input not instance of ${e.name}`})=>t_(n=>n instanceof e,t),n_=ir.create,r_=hi.create,V8=$l.create,q8=pi.create,i_=gs.create,Y8=Xi.create,G8=El.create,Z8=vs.create,K8=ys.create,X8=Ga.create,Q8=Hi.create,J8=Vr.create,e$=Ol.create,t$=or.create,n$=Zt.create,r$=Zt.strictCreate,i$=bs.create,a$=Ou.create,o$=xs.create,s$=yr.create,c$=_s.create,l$=Ml.create,u$=Qi.create,d$=ja.create,f$=ws.create,h$=Cs.create,p$=mi.create,m$=Ts.create,g$=Za.create,gv=sr.create,v$=mr.create,y$=gi.create,b$=sr.createWithPreprocess,x$=tc.create,_$=()=>n_().optional(),w$=()=>r_().optional(),C$=()=>i_().optional(),T$={string:e=>ir.create({...e,coerce:!0}),number:e=>hi.create({...e,coerce:!0}),boolean:e=>gs.create({...e,coerce:!0}),bigint:e=>pi.create({...e,coerce:!0}),date:e=>Xi.create({...e,coerce:!0})},S$=Be;var sn=Object.freeze({__proto__:null,defaultErrorMap:Ya,setErrorMap:S8,getErrorMap:Tl,makeIssue:Sl,EMPTY_PATH:k8,addIssueToContext:_e,ParseStatus:yn,INVALID:Be,DIRTY:Oa,OK:Tn,isAborted:Th,isDirty:Sh,isValid:ps,isAsync:ms,get util(){return lt},get objectUtil(){return Ch},ZodParsedType:Ce,getParsedType:ai,ZodType:et,datetimeRegex:J2,ZodString:ir,ZodNumber:hi,ZodBigInt:pi,ZodBoolean:gs,ZodDate:Xi,ZodSymbol:El,ZodUndefined:vs,ZodNull:ys,ZodAny:Ga,ZodUnknown:Hi,ZodNever:Vr,ZodVoid:Ol,ZodArray:or,ZodObject:Zt,ZodUnion:bs,ZodDiscriminatedUnion:Ou,ZodIntersection:xs,ZodTuple:yr,ZodRecord:_s,ZodMap:Ml,ZodSet:Qi,ZodFunction:ja,ZodLazy:ws,ZodLiteral:Cs,ZodEnum:mi,ZodNativeEnum:Ts,ZodPromise:Za,ZodEffects:sr,ZodTransformer:sr,ZodOptional:mr,ZodNullable:gi,ZodDefault:Ss,ZodCatch:ks,ZodNaN:$l,BRAND:W8,ZodBranded:cm,ZodPipeline:tc,ZodReadonly:Es,custom:t_,Schema:et,ZodSchema:et,late:z8,get ZodFirstPartyTypeKind(){return Fe},coerce:T$,any:X8,array:t$,bigint:q8,boolean:i_,date:Y8,discriminatedUnion:a$,effect:gv,enum:p$,function:d$,instanceof:H8,intersection:o$,lazy:f$,literal:h$,map:l$,nan:V8,nativeEnum:m$,never:J8,null:K8,nullable:y$,number:r_,object:n$,oboolean:C$,onumber:w$,optional:v$,ostring:_$,pipeline:x$,preprocess:b$,promise:g$,record:c$,set:u$,strictObject:r$,string:n_,symbol:G8,transformer:gv,tuple:s$,undefined:Z8,union:i$,unknown:Q8,void:e$,NEVER:S$,ZodIssueCode:he,quotelessJson:T8,ZodError:Ln});const Mu=()=>{const{texts:{formValidation:e}}=m.useContext(Kt),t=m.useCallback(p=>{let v=(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required});return p!=null&&p.email&&(v=v.email(e.invalidEmail)),p!=null&&p.length&&(v=v.min(p.length,e.length(p.length))),p!=null&&p.minLength&&(v=v.min(p.minLength,e.minLength(p.minLength))),p!=null&&p.maxLength&&(v=v.max(p.maxLength,e.maxLength(p.maxLength))),p!=null&&p.numeric&&(v=v.regex(/^\d+$/,e.noCharactersOtherThanNumbers)),p!=null&&p.regex&&(v=v.regex(p.regex,e.invalidFormat)),v.transform(w=>w??null)},[e]),n=m.useCallback(p=>t(p).nullable().optional().transform(v=>v??null),[t]),r=m.useCallback(p=>{const v=(p==null?void 0:p.min)??Number.MIN_SAFE_INTEGER,w=(p==null?void 0:p.max)??Number.MAX_SAFE_INTEGER,_=(p!=null&&p.useCoerce?sn.coerce:sn).number({invalid_type_error:e.required,required_error:e.required}).min(v,e.lessThanMin(v)).max(w,e.moreThanMax(w));return _.transform(x=>x??null),_},[e]),i=m.useCallback(p=>r(p).nullable().optional().transform(v=>v??null),[r]),a=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).boolean({invalid_type_error:e.required,required_error:e.required}).transform(v=>v??null),[e.required]),o=m.useCallback(p=>(p!=null&&p.useCoerce?sn.coerce:sn).string({invalid_type_error:e.required,required_error:e.required}).refine(v2,{message:e.invalidDate}).transform(w=>w??null),[e.invalidDate,e.required]),s=m.useCallback(p=>o(p).nullable().transform(v=>v??null),[o]),c=m.useCallback((p,v)=>sn.enum(p,{invalid_type_error:e.required,required_error:e.required}).transform(_=>_??null),[e.required]),l=m.useCallback((p,v)=>c(p,v).nullable().transform(w=>w??null),[c]),u=m.useCallback(p=>sn.object({id:i({useCoerce:!0})}).nullable().transform(w=>w??null),[i]),d=m.useCallback(p=>sn.object({id:r()}).transform(w=>w??null),[r]),f=m.useCallback(p=>sn.object({id:n({useCoerce:!0})}).nullable().transform(w=>w??null),[n]),h=m.useCallback(p=>sn.object({id:t()}).transform(w=>w??null),[t]),g=m.useCallback(({required:p,multiple:v,maxFileSize:w})=>sn.any().transform(x=>Array.from(x??[])).refine(x=>!p||(x==null?void 0:x.length)>0,"File is required.").refine(x=>v||(x==null?void 0:x.length)<=1,"Multiple files not allowed.").refine(x=>x.every(S=>S.size<=w),`Maximum file size is ${Va(w)}.`).transform(x=>(v?x:x==null?void 0:x[0])??null),[]);return{zString:n,zStringRequired:t,zNumber:i,zNumberRequired:r,zBool:a,zDate:s,zDateRequired:o,zEnum:l,zEnumRequired:c,zObjectIdInt:u,zObjectIdIntRequired:d,zObjectIdStr:f,zObjectIdStrRequired:h,zFile:g}},a_=(e,t)=>{m.useEffect(()=>{const n=r=>{e.some(i=>i.current&&i.current.contains(r.target))||t()};return document.addEventListener("mouseup",n),()=>{document.removeEventListener("mouseup",n)}},[e,t])},o_=()=>{const{user:e}=m.useContext(l2);return{checkUserHasPermissions:m.useCallback((n,r="any")=>n.length===0?!0:r==="any"?n.some(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}):n.every(i=>{var a;return(a=e==null?void 0:e.permissions)==null?void 0:a.includes(i)}),[e])}},s_=(e,t)=>{m.useEffect(()=>(document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}),[e]),m.useEffect(()=>t===void 0?()=>{}:(document.addEventListener("keyup",t),()=>{document.removeEventListener("keyup",t)}),[t])},lm=(e,t,n)=>m.useMemo(()=>n||e!=="date"&&e!=="datetime-local"&&e!=="time"||t?e:"text",[t,e,n]),c_=()=>{const{addNotification:e}=ku(),{texts:{clipboard:t}}=m.useContext(Kt);return{copyToClipboard:m.useCallback(async r=>{var i;try{await((i=navigator.clipboard)==null?void 0:i.writeText(r)),e(t.copySuccess(r),"prompt")}catch(a){console.error(a),e(t.copyError,"danger")}},[e,t])}},nc=()=>{const[e,t]=m.useState(window.innerWidth),[n,r]=m.useState(window.innerHeight),i=()=>{t(window.innerWidth),r(window.innerHeight)};return m.useEffect(()=>(window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)),[]),{width:e,height:n,isMobile:e<992}},l_=m.createContext({addHelmet:e=>{},removeHelmet:()=>{}}),u_=m.createContext(void 0),vv={falseIfNotInit:!1},$u=({falseIfNotInit:e=vv.falseIfNotInit}=vv)=>{const t=m.useContext(u_);if(!e&&t===void 0)throw new Error("FormDisabledProvider not initilized. Probably tried to use useFormDisabledContext outside FormDisabledProvider.");return t??!1},k$="_button_1wjon_1",E$="_filled_1wjon_7",O$="_sm_1wjon_13",M$="_md_1wjon_18",$$="_lg_1wjon_23",_a={button:k$,filled:E$,sm:O$,md:M$,lg:$$},Ji=({variant:e="filled",color:t="primary",size:n="md",className:r,children:i,...a})=>a.as==="link"?y.jsx(no.Link,{to:a.href??"/",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,_a.button,_a[e],_a[n]),...a,children:i}):a.as==="button"||a.as===void 0?y.jsx("button",{type:"button",className:oe(`luminus-primary-button ${t} btn ${e==="outlined"?`btn-outline-${t}`:`btn-${t}`} ${r??""}`,_a.button,_a[e],_a[n]),...a,children:i}):null,A$="_button_1r3i0_1",Eh={button:A$},Au=({color:e="primary",icon:t,className:n,children:r,...i})=>i.as==="link"?y.jsxs(no.Link,{to:i.href??"/",className:oe(`luminus-context-button btn text-${e} ${n??""}`,Eh.button),...i,children:[t,r]}):i.as==="button"||i.as===void 0?y.jsxs("button",{type:"button",className:oe(`luminus-context-button btn text-${e} ${n??""}`,Eh.button),...i,children:[t,r]}):null,R$=m.forwardRef(({color:e="primary",icon:t=y.jsx(Jx,{size:12}),inputId:n="context-file-input",accept:r="*",onUpload:i,className:a,children:o,multiple:s,...c},l)=>{const u=d=>{d.target.files&&(i(d.target.files),d.target.value="")};return y.jsxs(y.Fragment,{children:[y.jsxs("label",{ref:l,htmlFor:n,className:oe(`luminus-context-button btn text-${e} ${a??""}`,Eh.button),...c,children:[t,o]}),y.jsx("input",{id:n,type:"file",accept:r,onChange:u,hidden:!0,multiple:s})]})}),j$="_icon-button_15e26_1",P$="_sm_15e26_14",I$="_md_15e26_23",D$="_lg_15e26_32",jc={"icon-button":"_icon-button_15e26_1",iconButton:j$,sm:P$,md:I$,lg:D$},rc=({type:e="button",color:t="primary",size:n="md",children:r,className:i,...a})=>a.as==="link"?y.jsx(no.Link,{to:a.href??"/",className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):a.as==="button"||a.as===void 0?y.jsx("button",{type:e,className:oe(`luminus-icon-button btn text-${t} ${i??""}`,jc.iconButton,jc[n]),...a,children:r}):null,N$="_feedback_esh1j_1",L$="_feedback-spacer_esh1j_8",yv={feedback:N$,"feedback-spacer":"_feedback-spacer_esh1j_8",feedbackSpacer:L$},Ru=({message:e})=>y.jsxs(y.Fragment,{children:[y.jsx("div",{className:oe("invalid-feedback luminus-invalid-feedback",yv.feedback),children:e}),y.jsx("div",{className:oe("invalid-feedback-spacer",yv.feedbackSpacer),children:e})]}),F$="_item_1dy8x_1",d_={item:F$},Ii=({color:e="primary",icon:t,className:n,children:r,to:i,as:a,...o})=>y.jsxs(Ha.Item,{className:oe(`btn luminus-dropdown-item text-nowrap rounded text-${e} ${n??""}`,d_.item),as:a==="link"?no.Link:void 0,to:i??"",...o,children:[t,r]}),B$="_button_qhwih_1",U$={button:B$},um=m.forwardRef(({color:e="primary",icon:t=y.jsx(t2,{size:21}),text:n,onClick:r,className:i,children:a,...o},s)=>y.jsxs("button",{type:"button",ref:s,onClick:c=>{c.preventDefault(),r(c)},"aria-label":"dropdown toggle",className:oe(`btn luminus-context-button text-${e} ${i??""}`,U$.button),...o,children:[t,n]})),W$="_avatar-icon_1axl6_1",z$={"avatar-icon":"_avatar-icon_1axl6_1",avatarIcon:W$},f_=({name:e,fontSize:t,size:n})=>{const r=m.useMemo(()=>{const o=e.split(" ");return o.length<2?e:fs(" ",o.at(o.length-2),o.at(o.length-1))},[e]),i=m.useMemo(()=>{const o=r.split(" ");return fs("",...o.map(s=>s.at(0)??void 0))},[r]),a=o=>{let s=0,c;for(c=0;c<o.length;c+=1)s=o.charCodeAt(c)+((s<<5)-s);let l="#";for(c=0;c<3;c+=1){const u=s>>c*8&255;l+=`00${u.toString(16)}`.slice(-2)}return l};return y.jsx(Zx,{placement:"bottom",overlay:y.jsx(Yx,{children:e}),children:y.jsx("div",{className:oe("luminus-avatar-icon",z$.avatarIcon),style:{backgroundColor:a(r),fontSize:t??void 0,minHeight:n??void 0,height:n??void 0,maxHeight:n??void 0,minWidth:n??void 0,width:n??void 0,maxWidth:n??void 0},children:y.jsx("div",{children:i})})})},H$=m.forwardRef(({userName:e,onClick:t,children:n},r)=>y.jsxs("button",{type:"button",ref:r,onClick:i=>{i.preventDefault(),t(i)},"aria-label":"User avatar toggle",className:"m-0 p-0",style:{backgroundColor:"transparent",border:"none",cursor:"pointer"},children:[y.jsx(f_,{name:e}),n]})),dm=e=>y.jsx(Ha.Toggle,{...e}),V$="_divider_1e6rk_1",q$={divider:V$},Oh=({className:e})=>y.jsx(Ha.Divider,{className:oe("luminus-dropdown-divider",e,q$.divider)}),Y$="_dropdown_1lk66_1",G$={dropdown:Y$},fm=({toggle:e,children:t,align:n,...r})=>y.jsxs(Ha,{...r,align:n,children:[e,y.jsx(Ha.Menu,{className:oe("luminus-dropdown rounded shadow",G$.dropdown),align:n,children:t})]});function Z$(e,t,n){var r=this,i=m.useRef(null),a=m.useRef(0),o=m.useRef(null),s=m.useRef([]),c=m.useRef(),l=m.useRef(),u=m.useRef(e),d=m.useRef(!0);u.current=e;var f=typeof window<"u",h=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,v="maxWait"in n,w="debounceOnServer"in n&&!!n.debounceOnServer,_=v?Math.max(+n.maxWait||0,t):null;m.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var x=m.useMemo(function(){var S=function(E){var C=s.current,O=c.current;return s.current=c.current=null,a.current=E,l.current=u.current.apply(O,C)},b=function(E,C){h&&cancelAnimationFrame(o.current),o.current=h?requestAnimationFrame(E):setTimeout(E,C)},T=function(E){if(!d.current)return!1;var C=E-i.current;return!i.current||C>=t||C<0||v&&E-a.current>=_},j=function(E){return o.current=null,p&&s.current?S(E):(s.current=c.current=null,l.current)},M=function E(){var C=Date.now();if(T(C))return j(C);if(d.current){var O=t-(C-i.current),$=v?Math.min(O,_-(C-a.current)):O;b(E,$)}},k=function(){if(f||w){var E=Date.now(),C=T(E);if(s.current=[].slice.call(arguments),c.current=r,i.current=E,C){if(!o.current&&d.current)return a.current=i.current,b(M,t),g?S(i.current):l.current;if(v)return b(M,t),S(i.current)}return o.current||b(M,t),l.current}};return k.cancel=function(){o.current&&(h?cancelAnimationFrame(o.current):clearTimeout(o.current)),a.current=0,s.current=i.current=c.current=o.current=null},k.isPending=function(){return!!o.current},k.flush=function(){return o.current?j(Date.now()):l.current},k},[g,v,t,_,p,h,f,w]);return x}function K$(e,t){return e===t}function h_(e,t,n){var r=K$,i=m.useRef(e),a=m.useState({})[1],o=Z$(m.useCallback(function(c){i.current=c,a({})},[a]),t,n),s=m.useRef(e);return r(s.current,e)||(o(e),s.current=e),[i.current,o]}const X$="_wrapper_1mvyk_1",Q$="_open_1mvyk_9",J$="_dropdown_1mvyk_13",e7="_search-input-container_1mvyk_19",t7="_search-input_1mvyk_19",n7="_loading-container_1mvyk_25",r7="_items-container_1mvyk_32",i7="_header-row_1mvyk_38",a7="_name_1mvyk_49",o7="_item_1mvyk_32",s7="_column-item_1mvyk_65",c7="_icon_1mvyk_69",l7="_action-buttons-container_1mvyk_89",u7="_reverse_1mvyk_97",d7="_action-button_1mvyk_89",f7="_actions-dropdown_1mvyk_110",on={wrapper:X$,open:Q$,dropdown:J$,"search-input-container":"_search-input-container_1mvyk_19",searchInputContainer:e7,"search-input":"_search-input_1mvyk_19",searchInput:t7,"loading-container":"_loading-container_1mvyk_25",loadingContainer:n7,"items-container":"_items-container_1mvyk_32",itemsContainer:r7,"header-row":"_header-row_1mvyk_38",headerRow:i7,name:a7,item:o7,"column-item":"_column-item_1mvyk_65",columnItem:s7,icon:c7,"action-buttons-container":"_action-buttons-container_1mvyk_89",actionButtonsContainer:l7,reverse:u7,"action-button":"_action-button_1mvyk_89",actionButton:d7,"actions-dropdown":"_actions-dropdown_1mvyk_110",actionsDropdown:f7},p_=({show:e,onCancel:t,items:n,suggestedItems:r,suggestedItemsTitle:i,currentSelection:a,onSelectionChange:o,onSearchQueryChange:s,texts:c,itemsNameWidth:l,additionalColumns:u,displayIdAsName:d=!1,autoHideSearch:f=!1,allItemsLength:h,disabled:g,isLoading:p=!1,inputRef:v,archiveColumn:w="archive",addNewOptionPath:_,refreshOptions:x,noRemoveButton:S=!1,customEllipsisOptions:b})=>{var at;const{texts:{customSelect:T}}=m.useContext(Kt),j=m.useRef(null),M=m.useRef(null),k=m.useRef(null),E=m.useRef(null),C=m.useRef(null),[O,$]=m.useState(""),[A]=h_(O,500),[,P]=m.useState(!1),{copyToClipboard:D}=c_(),N=(at=v.current)==null?void 0:at.getBoundingClientRect(),q=(N==null?void 0:N.x)??0,z=((N==null?void 0:N.x)??0)+((N==null?void 0:N.width)??0),U=(N==null?void 0:N.y)??0,G=((N==null?void 0:N.y)??0)+((N==null?void 0:N.height)??0),ne=(N==null?void 0:N.width)??0,te=(N==null?void 0:N.height)??0,X=5,{isMobile:J}=nc(),Q=8,re=m.useMemo(()=>q?q>window.innerWidth/2-Q:!1,[q]),F=m.useMemo(()=>U?U>window.innerHeight/2-Q:!1,[U]);m.useEffect(()=>{var de;e&&((de=k.current)==null||de.focus())},[k,e]),m.useEffect(()=>{e||$("")},[e]),m.useEffect(()=>{s&&s(A)},[A,s]);const[I,L]=m.useState(null);m.useEffect(()=>{e&&n.length>0?L(0):L(null)},[n,e]);const H=m.useMemo(()=>I!==null?n.at(I)??null:null,[I,n]),R=m.useCallback((de,me)=>{var tt,Et;const ke=document.getElementById(`item-${de}`);if(ke){const qe=ke.clientHeight??0;me==="down"?(tt=E.current)==null||tt.scrollBy({left:0,top:qe,behavior:"smooth"}):(Et=E.current)==null||Et.scrollBy({left:0,top:-qe,behavior:"smooth"})}},[]),K=m.useCallback(de=>{if(I===null||g)return;const me=I+de;me<0||me>=n.length||L(ke=>(ke!==null&&R(ke,de>0?"down":"up"),me))},[I,n,g,R]),Z=m.useCallback(de=>{if(e)switch(de.key){case"Escape":de.stopPropagation(),de.preventDefault(),t();break;case"Enter":de.stopPropagation(),de.preventDefault(),g||o(H);break;case"ArrowUp":de.stopPropagation(),de.preventDefault(),K(-1);break;case"ArrowDown":de.stopPropagation(),de.preventDefault(),K(1);break}},[t,e,K,H,g,o]),ee=m.useCallback(()=>{P(de=>!de)},[]);m.useEffect(()=>(window.addEventListener("scroll",ee),()=>{window.removeEventListener("scroll",ee)}),[ee]),m.useEffect(()=>(window.addEventListener("resize",ee),()=>{window.removeEventListener("resize",ee)}),[ee]),s_(Z),a_([j,M,C],t);const pe=l??(u&&u.length>0?250:0),we=(u==null?void 0:u.reduce((de,me)=>de+(me.width??100),0))??0,ve=m.useMemo(()=>(a&&e&&!g&&!S)??!1,[a,e,g,S]),Le=m.useMemo(()=>(a&&e)??!1,[a,e]),Re=m.useMemo(()=>e&&(Le||_!==void 0||x!==void 0||b!=null&&b.length>0),[e,Le,_,x,b]),Ve=32,ze=J?`calc(100vw - ${Ve}px)`:`calc(max(${ne}px, calc(${pe}px + ${we}px)))`,ut=m.useMemo(()=>(O.length<1&&r&&r.length>0?r:n).map(de=>{var me,ke;return d?((me=de.id)==null?void 0:me.toString())??"":((ke=de.name)==null?void 0:ke.toString())??""}).reduce((de,me)=>de.length>me.length?de:me,""),[O,r,n,d]);return y.jsxs(y.Fragment,{children:[y.jsx(C_,{show:e,onClick:t}),y.jsxs("div",{className:oe("luminus-dropdown-picker-actions",on.actionButtonsContainer,{[on.reverse]:re}),style:{top:`calc(${U}px + ${te/2}px - 12px)`,left:re?ve&&Le?`calc(${q}px - 24px - 8px - 24px - 4px)`:`calc(${q}px - 24px - 8px)`:`calc(${z}px + 8px)`},children:[ve&&y.jsx("button",{ref:M,type:"button",className:oe("luminus-dropdown-picker-clear-button",on.actionButton),onClick:()=>!g&&o(null),children:y.jsx(_n,{variant:"caption",className:"text-danger",children:y.jsx(Qx,{size:16})})}),Re?y.jsx("div",{ref:C,children:y.jsxs(fm,{toggle:y.jsx(dm,{as:um,className:oe("luminus-dropdown-picker-actions-dropdown",on.actionsDropdown),icon:y.jsx(_n,{variant:"caption",className:"text-primary",children:y.jsx(t2,{size:16})})}),children:[Le?y.jsx(Ii,{icon:y.jsx(Qk,{}),onClick:()=>{var de,me;D(d?((de=a==null?void 0:a.id)==null?void 0:de.toString())??"":((me=a==null?void 0:a.name)==null?void 0:me.toString())??"")},children:T.copySelection}):null,Le&&(_||x)?y.jsx(Oh,{}):null,_?y.jsx(Ii,{icon:y.jsx(Xk,{}),onClick:()=>{window.open(_,"_blank")},children:T.addNewOption}):null,x?y.jsx(Ii,{icon:y.jsx(sE,{}),onClick:()=>{x()},children:T.refreshOptions}):null,b&&b.length>0?y.jsx(Oh,{}):null,b==null?void 0:b.map(de=>y.jsxs(Ii,{onClick:()=>{de.onClick(),t()},children:[de.icon??null,de.label]},de.label))]})}):null]}),y.jsx("div",{className:oe("luminus-dropdown-picker",on.wrapper,{[on.open]:e}),style:{top:F?`calc(${U}px - 50vh - 8px)`:`calc(${G}px + 8px)`,left:J?`${Ve/2}px`:re?`calc(${z}px - ${ze})`:q,right:J?`${Ve/2}px`:re?`${z}px`:`calc(${q}px + ${ze})`,width:ze,justifyContent:F?"flex-end":"flex-start"},children:y.jsx("div",{ref:j,className:oe("shadow rounded",on.dropdown),children:!g&&y.jsxs(y.Fragment,{children:[!s||f&&(h??n.length)<=X?null:y.jsx("div",{className:oe("search-input-container border-bottom",on.searchInputContainer),children:y.jsx(Tr.Control,{ref:k,type:"search",size:"sm",className:on.searchInput,placeholder:c.searchPlaceholder,value:O,onChange:de=>{var me;return $(((me=de.target)==null?void 0:me.value)??"")}})}),O.length<1&&r&&r.length>0?y.jsx(vm,{variant:"info",size:"sm",children:i??T.suggestedItemsTitle}):null,p?y.jsx("div",{className:on.loadingContainer,children:y.jsx(Xp,{animation:"border",variant:"primary"})}):(O.length<1&&r&&(r==null?void 0:r.length)>0||n.length>0)&&y.jsxs("div",{ref:E,className:oe("items",on.itemsContainer),children:[u&&u.length>0&&y.jsxs("div",{className:oe("header-row border-bottom",on.headerRow),children:[y.jsx("div",{className:on.name,children:y.jsx(_n,{variant:"body2",children:ut})}),u==null?void 0:u.filter(de=>de.key!==w).map(de=>y.jsx("div",{className:on.columnItem,style:{width:`${de.width??100}px`,minWidth:`${de.width??100}px`,maxWidth:`${de.width??100}px`},children:y.jsx(_n,{variant:"caption",children:de.name})},de.key))]}),(O.length<1&&r&&r.length>0?r:n).map((de,me)=>y.jsxs("button",{id:`item-${me}`,type:"button",className:oe("item cursor-pointer",on.item,{[on.focused]:I===me},{focused:I===me},{archive:de.additionalColumns?de.additionalColumns[w]:!1}),onClick:()=>!g&&o(de),onMouseEnter:()=>L(me),children:[y.jsx("div",{className:on.name,children:y.jsx(_n,{variant:"body2",children:d?de.id:de.name})}),u==null?void 0:u.filter(ke=>ke.key!==w).map(ke=>y.jsx("div",{className:on.columnItem,style:{width:`${ke.width??100}px`,minWidth:`${ke.width??100}px`,maxWidth:`${ke.width??100}px`},children:y.jsx(_n,{variant:"caption",className:oe("text-muted"),children:de.additionalColumns&&de.additionalColumns[ke.key]})},ke.key))]},de.id))]})]})})})]})};var hm={};hm.match=y7;hm.parse=m_;var h7=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,p7=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,m7=/^(?:(min|max)-)?(.+)/,g7=/(em|rem|px|cm|mm|in|pt|pc)?$/,v7=/(dpi|dpcm|dppx)?$/;function y7(e,t){return m_(e).some(function(n){var r=n.inverse,i=n.type==="all"||t.type===n.type;if(i&&r||!(i||r))return!1;var a=n.expressions.every(function(o){var s=o.feature,c=o.modifier,l=o.value,u=t[s];if(!u)return!1;switch(s){case"orientation":case"scan":return u.toLowerCase()===l.toLowerCase();case"width":case"height":case"device-width":case"device-height":l=_v(l),u=_v(u);break;case"resolution":l=xv(l),u=xv(u);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":l=bv(l),u=bv(u);break;case"grid":case"color":case"color-index":case"monochrome":l=parseInt(l,10)||1,u=parseInt(u,10)||0;break}switch(c){case"min":return u>=l;case"max":return u<=l;default:return u===l}});return a&&!r||!a&&r})}function m_(e){return e.split(",").map(function(t){t=t.trim();var n=t.match(h7),r=n[1],i=n[2],a=n[3]||"",o={};return o.inverse=!!r&&r.toLowerCase()==="not",o.type=i?i.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],o.expressions=a.map(function(s){var c=s.match(p7),l=c[1].toLowerCase().match(m7);return{modifier:l[1],feature:l[2],value:c[2]}}),o})}function bv(e){var t=Number(e),n;return t||(n=e.match(/^(\d+)\s*\/\s*(\d+)$/),t=n[1]/n[2]),t}function xv(e){var t=parseFloat(e),n=String(e).match(v7)[1];switch(n){case"dpcm":return t/2.54;case"dppx":return t*96;default:return t}}function _v(e){var t=parseFloat(e),n=String(e).match(g7)[1];switch(n){case"em":return t*16;case"rem":return t*16;case"cm":return t*96/2.54;case"mm":return t*96/2.54/10;case"in":return t*96;case"pt":return t*72;case"pc":return t*72/12;default:return t}}var b7=hm.match,wv=typeof window<"u"?window.matchMedia:null;function x7(e,t,n){var r=this,i;wv&&!n&&(i=wv.call(window,e)),i?(this.matches=i.matches,this.media=i.media,i.addListener(s)):(this.matches=b7(e,t),this.media=e),this.addListener=a,this.removeListener=o,this.dispose=c;function a(l){i&&i.addListener(l)}function o(l){i&&i.removeListener(l)}function s(l){r.matches=l.matches,r.media=l.media}function c(){i&&i.removeListener(s)}}function _7(e,t,n){return new x7(e,t,n)}var w7=_7;const C7=Ht(w7);var T7=/[A-Z]/g,S7=/^ms-/,gf={};function k7(e){return"-"+e.toLowerCase()}function g_(e){if(gf.hasOwnProperty(e))return gf[e];var t=e.replace(T7,k7);return gf[e]=S7.test(t)?"-"+t:t}function E7(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(let a=0;a<i;a++){const o=n[a];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}const xn=V.oneOfType([V.string,V.number]),pm={all:V.bool,grid:V.bool,aural:V.bool,braille:V.bool,handheld:V.bool,print:V.bool,projection:V.bool,screen:V.bool,tty:V.bool,tv:V.bool,embossed:V.bool},v_={orientation:V.oneOf(["portrait","landscape"]),scan:V.oneOf(["progressive","interlace"]),aspectRatio:V.string,deviceAspectRatio:V.string,height:xn,deviceHeight:xn,width:xn,deviceWidth:xn,color:V.bool,colorIndex:V.bool,monochrome:V.bool,resolution:xn,type:Object.keys(pm)},{type:Zne,...O7}=v_,y_={minAspectRatio:V.string,maxAspectRatio:V.string,minDeviceAspectRatio:V.string,maxDeviceAspectRatio:V.string,minHeight:xn,maxHeight:xn,minDeviceHeight:xn,maxDeviceHeight:xn,minWidth:xn,maxWidth:xn,minDeviceWidth:xn,maxDeviceWidth:xn,minColor:V.number,maxColor:V.number,minColorIndex:V.number,maxColorIndex:V.number,minMonochrome:V.number,maxMonochrome:V.number,minResolution:xn,maxResolution:xn,...O7},M7={...pm,...y_};var $7={all:M7,types:pm,matchers:v_,features:y_};const A7=e=>`not ${e}`,R7=(e,t)=>{const n=g_(e);return typeof t=="number"&&(t=`${t}px`),t===!0?n:t===!1?A7(n):`(${n}: ${t})`},j7=e=>e.join(" and "),P7=e=>{const t=[];return Object.keys($7.all).forEach(n=>{const r=e[n];r!=null&&t.push(R7(n,r))}),j7(t)},I7=m.createContext(void 0),D7=e=>e.query||P7(e),Cv=e=>e?Object.keys(e).reduce((n,r)=>(n[g_(r)]=e[r],n),{}):void 0,b_=()=>{const e=m.useRef(!1);return m.useEffect(()=>{e.current=!0},[]),e.current},N7=e=>{const t=m.useContext(I7),n=()=>Cv(e)||Cv(t),[r,i]=m.useState(n);return m.useEffect(()=>{const a=n();E7(r,a)||i(a)},[e,t]),r},L7=e=>{const t=()=>D7(e),[n,r]=m.useState(t);return m.useEffect(()=>{const i=t();n!==i&&r(i)},[e]),n},F7=(e,t)=>{const n=()=>C7(e,t||{},!!t),[r,i]=m.useState(n),a=b_();return m.useEffect(()=>{if(a){const o=n();return i(o),()=>{o&&o.dispose()}}},[e,t]),r},B7=e=>{const[t,n]=m.useState(e.matches);return m.useEffect(()=>{const r=i=>{n(i.matches)};return e.addListener(r),n(e.matches),()=>{e.removeListener(r)}},[e]),t},vf=(e,t,n)=>{const r=N7(t),i=L7(e);if(!i)throw new Error("Invalid or missing MediaQuery!");const a=F7(i,r),o=B7(a),s=b_();return m.useEffect(()=>{s&&n&&n(o)},[o]),m.useEffect(()=>()=>{a&&a.dispose()},[]),o},U7=["sm","md","lg","always"],x_="ResponsiveContextDropdownItem",W7=e=>e.type.displayName===x_,mm=e=>({});mm.displayName=x_;function z7(e){return e.type&&e.type===m.Fragment}const __=e=>{const t=[];Array.isArray(e)?t.push(...e):t.push(e);const n=[];return t.forEach(r=>{if(r){if(z7(r)){n.push(...__(r.props.children));return}n.push(r)}}),n},H7=(e,t)=>{if(t===void 0)return e;const{searchQueryString:n,...r}=t;return no.generatePath(e,r)+"?"+n},V7="_disabled_9mp5v_1",q7={disabled:V7},Y7=()=>{const{ProjectIconComponent:e}=m.useContext(Kt),{checkUserHasPermissions:t}=o_();return{getProcessedChildren:m.useCallback((r,i)=>{const a=[],o=[];let s=null;const c=u=>{const{hideOn:d,children:f,cKey:h,to:g,toRoute:p,disabled:v,icon:w,pathParams:_,...x}=u.props,S=(p==null?void 0:p.permissions)!=null,b=(p==null?void 0:p.permissions)!=null&&t(p==null?void 0:p.permissions),T=(v??!1)||S&&!b,j=g??(p==null?void 0:H7(p==null?void 0:p.route,_)),M=f??(p==null?void 0:p.name),k=w??(p!=null?y.jsx(e,{icon:"link"}):void 0);if(d==="always"||U7.indexOf(d)>=i){s&&o.length>0&&o.push(s),s=null;const E=oe(x.className,{[q7.disabled]:T});j!=null?o.push(y.jsx(Ii,{...x,as:"link",to:j,disabled:T,icon:k,className:E,children:M},h)):o.push(y.jsx(Ii,{...x,icon:k,className:E,children:M},h))}else{const E=j!=null?{as:"link",href:j}:{};a.push(y.jsx(Au,{...x,...E,icon:k,className:oe(T?"disabled":void 0,x.className),children:M},h))}};return __(r).forEach(u=>{u&&m.isValidElement(u)&&(W7(u)?c(u):s=u)}),{buttons:a,dropdownItems:o}},[e,t])}},w_=({children:e})=>{const{getProcessedChildren:t}=Y7(),n=vf({maxWidth:768}),r=vf({minWidth:769,maxWidth:1200}),i=vf({minWidth:1201}),a=[n,r,i].indexOf(!0),{buttons:o,dropdownItems:s}=t(e,a);return y.jsxs("div",{className:"d-flex gap-1",children:[y.jsx(y.Fragment,{children:o}),s.length>0?y.jsx(fm,{toggle:y.jsx(dm,{as:um}),children:s}):null]})};w_.Item=mm;const G7="Left",Z7="Right",K7="Up",X7="Down",Ma={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Mh={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},Tv="mousemove",Sv="mouseup",Q7="touchend",J7="touchmove",eA="touchstart";function tA(e,t,n,r){return e>t?n>0?Z7:G7:r>0?X7:K7}function kv(e,t){if(t===0)return e;const n=Math.PI/180*t,r=e[0]*Math.cos(n)+e[1]*Math.sin(n),i=e[1]*Math.cos(n)-e[0]*Math.sin(n);return[r,i]}function nA(e,t){const n=u=>{const d="touches"in u;d&&u.touches.length>1||e((f,h)=>{h.trackMouse&&!d&&(document.addEventListener(Tv,r),document.addEventListener(Sv,o));const{clientX:g,clientY:p}=d?u.touches[0]:u,v=kv([g,p],h.rotationAngle);return h.onTouchStartOrOnMouseDown&&h.onTouchStartOrOnMouseDown({event:u}),Object.assign(Object.assign(Object.assign({},f),Mh),{initial:v.slice(),xy:v,start:u.timeStamp||0})})},r=u=>{e((d,f)=>{const h="touches"in u;if(h&&u.touches.length>1)return d;if(u.timeStamp-d.start>f.swipeDuration)return d.swiping?Object.assign(Object.assign({},d),{swiping:!1}):d;const{clientX:g,clientY:p}=h?u.touches[0]:u,[v,w]=kv([g,p],f.rotationAngle),_=v-d.xy[0],x=w-d.xy[1],S=Math.abs(_),b=Math.abs(x),T=(u.timeStamp||0)-d.start,j=Math.sqrt(S*S+b*b)/(T||1),M=[_/(T||1),x/(T||1)],k=tA(S,b,_,x),E=typeof f.delta=="number"?f.delta:f.delta[k.toLowerCase()]||Ma.delta;if(S<E&&b<E&&!d.swiping)return d;const C={absX:S,absY:b,deltaX:_,deltaY:x,dir:k,event:u,first:d.first,initial:d.initial,velocity:j,vxvy:M};C.first&&f.onSwipeStart&&f.onSwipeStart(C),f.onSwiping&&f.onSwiping(C);let O=!1;return(f.onSwiping||f.onSwiped||f[`onSwiped${k}`])&&(O=!0),O&&f.preventScrollOnSwipe&&f.trackTouch&&u.cancelable&&u.preventDefault(),Object.assign(Object.assign({},d),{first:!1,eventData:C,swiping:!0})})},i=u=>{e((d,f)=>{let h;if(d.swiping&&d.eventData){if(u.timeStamp-d.start<f.swipeDuration){h=Object.assign(Object.assign({},d.eventData),{event:u}),f.onSwiped&&f.onSwiped(h);const g=f[`onSwiped${h.dir}`];g&&g(h)}}else f.onTap&&f.onTap({event:u});return f.onTouchEndOrOnMouseUp&&f.onTouchEndOrOnMouseUp({event:u}),Object.assign(Object.assign(Object.assign({},d),Mh),{eventData:h})})},a=()=>{document.removeEventListener(Tv,r),document.removeEventListener(Sv,o)},o=u=>{a(),i(u)},s=(u,d)=>{let f=()=>{};if(u&&u.addEventListener){const h=Object.assign(Object.assign({},Ma.touchEventOptions),d.touchEventOptions),g=[[eA,n,h],[J7,r,Object.assign(Object.assign({},h),d.preventScrollOnSwipe?{passive:!1}:{})],[Q7,i,h]];g.forEach(([p,v,w])=>u.addEventListener(p,v,w)),f=()=>g.forEach(([p,v])=>u.removeEventListener(p,v))}return f},l={ref:u=>{u!==null&&e((d,f)=>{if(d.el===u)return d;const h={};return d.el&&d.el!==u&&d.cleanUpTouch&&(d.cleanUpTouch(),h.cleanUpTouch=void 0),f.trackTouch&&u&&(h.cleanUpTouch=s(u,f)),Object.assign(Object.assign(Object.assign({},d),{el:u}),h)})}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}function rA(e,t,n,r){return!t.trackTouch||!e.el?(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0})):e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})}function gm(e){const{trackMouse:t}=e,n=ue.useRef(Object.assign({},Mh)),r=ue.useRef(Object.assign({},Ma)),i=ue.useRef(Object.assign({},r.current));i.current=Object.assign({},r.current),r.current=Object.assign(Object.assign({},Ma),e);let a;for(a in Ma)r.current[a]===void 0&&(r.current[a]=Ma[a]);const[o,s]=ue.useMemo(()=>nA(c=>n.current=c(n.current,r.current),{trackMouse:t}),[t]);return n.current=rA(n.current,r.current,i.current,s),o}const iA="_backdrop_3huvf_1",aA="_show_3huvf_11",Ev={backdrop:iA,show:aA},C_=({show:e,onClick:t})=>y.jsx("div",{className:oe("luminus-backdrop",Ev.backdrop,{[Ev.show]:e}),onClick:()=>t&&t()}),vm=e=>{const{variant:t,children:n,className:r,size:i="md",typographyVariant:a=i==="sm"?"body2":"body",...o}={...e};return y.jsx(p5,{variant:t,className:`text-center ${i==="sm"?"p-1":i==="md"?"p-3":"p-4"} bg-${t} bg-opacity-10 border-none ${r??""}`,...o,children:y.jsx(_n,{variant:a,children:n})})},oA="_floating-label_3xm9u_1",sA="_without-label_3xm9u_21",cA="_floating-label-check_3xm9u_184",yf={"floating-label":"_floating-label_3xm9u_1",floatingLabel:oA,"without-label":"_without-label_3xm9u_21",withoutLabel:sA,"floating-label-check":"_floating-label-check_3xm9u_184",floatingLabelCheck:cA},lA=({hint:e,children:t})=>e?y.jsx(Jp,{text:e,placement:"top",children:t}):t,ju=m.forwardRef(({hidden:e,children:t,className:n,isInvalid:r,isForRadioInput:i,inputContainerClassName:a,isForCheckInput:o,hint:s,required:c,disabled:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?"":y.jsxs("div",{className:"d-flex gap-1 align-items-center",children:[u.label,c?y.jsx("span",{className:oe("fw-bold",{"text-danger":!l}),style:{fontSize:"16px"},children:"*"}):null,s?y.jsx("div",{className:"d-flex align-items-center",children:y.jsx(f,{icon:"info"})}):null]});return o?y.jsx("div",{className:oe("luminus-floating-label-check",yf.floatingLabelCheck),children:t}):y.jsx(lA,{hint:s,children:y.jsx(Vp,{ref:d,label:y.jsx("div",{className:"d-flex gap-1 align-items-center",children:h}),hidden:e??!1,className:oe(`luminus-floating-label ${n??""}`,yf.floatingLabel,{[a??""]:a},{[yf.withoutLabel]:u.withoutLabel}),children:t})})});ju.displayName="FloatingLabelInput";const uA="_row-label-input_i295l_1",dA="_label_i295l_4",fA="_input-container_i295l_9",hA="_invalid-feedback_i295l_104",pA="_keep-check-label_i295l_132",mA="_is-invalid_i295l_160",Do={"row-label-input":"_row-label-input_i295l_1",rowLabelInput:uA,label:dA,"input-container":"_input-container_i295l_9",inputContainer:fA,"invalid-feedback":"_invalid-feedback_i295l_104",invalidFeedback:hA,"keep-check-label":"_keep-check-label_i295l_132",keepCheckLabel:pA,"is-invalid":"_is-invalid_i295l_160",isInvalid:mA},ic=m.forwardRef(({hidden:e,children:t,required:n,disabled:r,className:i,isInvalid:a,isForRadioInput:o,isForTextAreaInput:s,inputContainerClassName:c,hint:l,...u},d)=>{const{ProjectIconComponent:f}=m.useContext(Kt),h=u.withoutLabel?y.jsx(y.Fragment,{}):y.jsx("label",{className:oe("label col-6",{"col-12":s},Do.label),children:y.jsxs(_n,{variant:"form-label",className:oe("d-flex gap-1 align-items-center",a?"text-danger":""),children:[u.label,n?y.jsx("span",{className:oe("fw-bold",{"text-danger":!r}),style:{fontSize:"16px"},children:"*"}):null,l?y.jsx("div",{className:"d-flex align-items-center",style:{paddingTop:"2px"},children:y.jsx(f,{icon:"info"})}):null]})});return y.jsxs("div",{ref:d,className:oe("luminus-row-label row gx-0 gy-0",{"is-invalid":a},{[Do.isInvalid]:a},{[i??""]:i},{"d-none":e},Do.rowLabelInput),children:[l?y.jsx(Jp,{text:l,placement:"top",children:h}):h,y.jsx("div",{className:oe("input-container",Do.inputContainer,{"col-6":!u.withoutLabel&&!s},{"col-12":u.withoutLabel||s},{[Do.keepCheckLabel]:o},{[c??""]:c}),children:t})]})});ic.displayName="RowLabelInput";const T_=m.forwardRef(({children:e,className:t,hidden:n},r)=>y.jsx("div",{ref:r,className:`${n?"d-none":""} ${t}`,children:e}));T_.displayName="NoInputContainer";const S_=({currentSelection:e,selectedItemNavigateTo:t,children:n})=>{if(!e||!e.id||!t)return y.jsx("div",{className:"luminus-input-container position-relative w-100",children:n});const r=t(e);return y.jsx(no.Link,{to:r,className:"luminus-input-container position-relative w-100 text-decoration-none",children:n})},k_=({InputContainer:e=ju,type:t,value:n,onChange:r,debounceMs:i,label:a,withoutLabel:o,placeholder:s,size:c,hidden:l,disabled:u,showClearIcon:d,clearValue:f,list:h,className:g,step:p,minLength:v,maxLength:w,noSelectOnFocus:_,hint:x,onConfirm:S,autoComplete:b})=>{var U,G,ne;const T=t==="number",j=m.useCallback(()=>{if(!r)return;const te=f??null;r(T?te?Number(te):null:(te==null?void 0:te.toString())??"")},[f,T,r]),M=m.useRef(null),[k,E]=m.useState((n==null?void 0:n.toString())??""),C=m.useCallback(te=>{const X=te;r&&r(T?X==null||X===""?null:Number(X):X||null)},[T,r]),O=m.useCallback(te=>{var J;const X=(J=te.target)==null?void 0:J.value;if(!i){C(X);return}E(X),M.current!==null&&window.clearTimeout(M.current),M.current=window.setTimeout(()=>{C(X)},i)},[i,C]),$=m.useMemo(()=>{if(S!==void 0)return te=>{te.key==="Enter"&&S&&S()}},[S]);m.useEffect(()=>{E(n===null?"":n.toString())},[n]);const[A,P]=m.useState(!1),D=lm(t,n?n.toString()??null:null,A),N=m.useRef(null),q=(((U=N.current)==null?void 0:U.scrollWidth)??0)>(((G=N.current)==null?void 0:G.clientWidth)??0),z=(ne=N.current)==null?void 0:ne.getBoundingClientRect();return y.jsxs(e,{withoutLabel:o,label:a??"",hidden:l,className:g,hint:x,disabled:u,children:[y.jsx(Tr.Control,{type:D,placeholder:s??a,size:c,value:i?k:(n==null?void 0:n.toString())??"",onChange:O,className:g??"",hidden:l,disabled:u??!1,list:h,onFocus:te=>{P(!0),!_&&te.target.select()},onBlur:()=>P(!1),onKeyDown:$,step:p,minLength:v,maxLength:w,autoComplete:b,ref:N}),d&&n!==null&&r&&!u&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(rc,{color:"secondary",size:"sm",onClick:j,children:y.jsx(Xs,{})})}),q?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((z==null?void 0:z.top)??0)+((z==null?void 0:z.height)??0),left:(z==null?void 0:z.left)??0},children:i?k:(n==null?void 0:n.toString())??""}):null]})};var ym={},Al={exports:{}};Al.exports;(function(e,t){var n=200,r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",c="[object Array]",l="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",h="[object Function]",g="[object GeneratorFunction]",p="[object Map]",v="[object Number]",w="[object Null]",_="[object Object]",x="[object Promise]",S="[object Proxy]",b="[object RegExp]",T="[object Set]",j="[object String]",M="[object Symbol]",k="[object Undefined]",E="[object WeakMap]",C="[object ArrayBuffer]",O="[object DataView]",$="[object Float32Array]",A="[object Float64Array]",P="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",q="[object Uint8Array]",z="[object Uint8ClampedArray]",U="[object Uint16Array]",G="[object Uint32Array]",ne=/[\\^$.*+?()[\]{}|]/g,te=/^\[object .+?Constructor\]$/,X=/^(?:0|[1-9]\d*)$/,J={};J[$]=J[A]=J[P]=J[D]=J[N]=J[q]=J[z]=J[U]=J[G]=!0,J[s]=J[c]=J[C]=J[u]=J[O]=J[d]=J[f]=J[h]=J[p]=J[v]=J[_]=J[b]=J[T]=J[j]=J[E]=!1;var Q=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,re=typeof self=="object"&&self&&self.Object===Object&&self,F=Q||re||Function("return this")(),I=t&&!t.nodeType&&t,L=I&&!0&&e&&!e.nodeType&&e,H=L&&L.exports===I,R=H&&Q.process,K=function(){try{return R&&R.binding&&R.binding("util")}catch{}}(),Z=K&&K.isTypedArray;function ee(B,Y){for(var le=-1,Te=B==null?0:B.length,Nt=0,Qe=[];++le<Te;){var Qt=B[le];Y(Qt,le,B)&&(Qe[Nt++]=Qt)}return Qe}function pe(B,Y){for(var le=-1,Te=Y.length,Nt=B.length;++le<Te;)B[Nt+le]=Y[le];return B}function we(B,Y){for(var le=-1,Te=B==null?0:B.length;++le<Te;)if(Y(B[le],le,B))return!0;return!1}function ve(B,Y){for(var le=-1,Te=Array(B);++le<B;)Te[le]=Y(le);return Te}function Le(B){return function(Y){return B(Y)}}function Re(B,Y){return B.has(Y)}function Ve(B,Y){return B==null?void 0:B[Y]}function ze(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te,Nt){le[++Y]=[Nt,Te]}),le}function ut(B,Y){return function(le){return B(Y(le))}}function at(B){var Y=-1,le=Array(B.size);return B.forEach(function(Te){le[++Y]=Te}),le}var de=Array.prototype,me=Function.prototype,ke=Object.prototype,tt=F["__core-js_shared__"],Et=me.toString,qe=ke.hasOwnProperty,ot=function(){var B=/[^.]+$/.exec(tt&&tt.keys&&tt.keys.IE_PROTO||"");return B?"Symbol(src)_1."+B:""}(),pt=ke.toString,It=RegExp("^"+Et.call(qe).replace(ne,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=H?F.Buffer:void 0,dt=F.Symbol,mt=F.Uint8Array,Wt=ke.propertyIsEnumerable,De=de.splice,Ae=dt?dt.toStringTag:void 0,Ye=Object.getOwnPropertySymbols,ct=st?st.isBuffer:void 0,gt=ut(Object.keys,Object),St=ga(F,"DataView"),Vt=ga(F,"Map"),Rt=ga(F,"Promise"),Dt=ga(F,"Set"),qt=ga(F,"WeakMap"),vt=ga(Object,"create"),Yt=Si(St),rn=Si(Vt),Jt=Si(Rt),ye=Si(Dt),Ee=Si(qt),je=dt?dt.prototype:void 0,Ge=je?je.valueOf:void 0;function Ue(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function ft(){this.__data__=vt?vt(null):{},this.size=0}function W(B){var Y=this.has(B)&&delete this.__data__[B];return this.size-=Y?1:0,Y}function ce(B){var Y=this.__data__;if(vt){var le=Y[B];return le===r?void 0:le}return qe.call(Y,B)?Y[B]:void 0}function ae(B){var Y=this.__data__;return vt?Y[B]!==void 0:qe.call(Y,B)}function se(B,Y){var le=this.__data__;return this.size+=this.has(B)?0:1,le[B]=vt&&Y===void 0?r:Y,this}Ue.prototype.clear=ft,Ue.prototype.delete=W,Ue.prototype.get=ce,Ue.prototype.has=ae,Ue.prototype.set=se;function be(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function Oe(){this.__data__=[],this.size=0}function xe(B){var Y=this.__data__,le=xc(Y,B);if(le<0)return!1;var Te=Y.length-1;return le==Te?Y.pop():De.call(Y,le,1),--this.size,!0}function Se(B){var Y=this.__data__,le=xc(Y,B);return le<0?void 0:Y[le][1]}function Ne(B){return xc(this.__data__,B)>-1}function Pe(B,Y){var le=this.__data__,Te=xc(le,B);return Te<0?(++this.size,le.push([B,Y])):le[Te][1]=Y,this}be.prototype.clear=Oe,be.prototype.delete=xe,be.prototype.get=Se,be.prototype.has=Ne,be.prototype.set=Pe;function Xe(B){var Y=-1,le=B==null?0:B.length;for(this.clear();++Y<le;){var Te=B[Y];this.set(Te[0],Te[1])}}function zt(){this.size=0,this.__data__={hash:new Ue,map:new(Vt||be),string:new Ue}}function Ot(B){var Y=_c(this,B).delete(B);return this.size-=Y?1:0,Y}function Xt(B){return _c(this,B).get(B)}function ge(B){return _c(this,B).has(B)}function ln(B,Y){var le=_c(this,B),Te=le.size;return le.set(B,Y),this.size+=le.size==Te?0:1,this}Xe.prototype.clear=zt,Xe.prototype.delete=Ot,Xe.prototype.get=Xt,Xe.prototype.has=ge,Xe.prototype.set=ln;function Mt(B){var Y=-1,le=B==null?0:B.length;for(this.__data__=new Xe;++Y<le;)this.add(B[Y])}function Jn(B){return this.__data__.set(B,r),this}function yc(B){return this.__data__.has(B)}Mt.prototype.add=Mt.prototype.push=Jn,Mt.prototype.has=yc;function er(B){var Y=this.__data__=new be(B);this.size=Y.size}function Ti(){this.__data__=new be,this.size=0}function bc(B){var Y=this.__data__,le=Y.delete(B);return this.size=Y.size,le}function Or(B){return this.__data__.get(B)}function qd(B){return this.__data__.has(B)}function Mr(B,Y){var le=this.__data__;if(le instanceof be){var Te=le.__data__;if(!Vt||Te.length<n-1)return Te.push([B,Y]),this.size=++le.size,this;le=this.__data__=new Xe(Te)}return le.set(B,Y),this.size=le.size,this}er.prototype.clear=Ti,er.prototype.delete=bc,er.prototype.get=Or,er.prototype.has=qd,er.prototype.set=Mr;function To(B,Y){var le=wc(B),Te=!le&&qC(B),Nt=!le&&!Te&&Yd(B),Qe=!le&&!Te&&!Nt&&r0(B),Qt=le||Te||Nt||Qe,an=Qt?ve(B.length,String):[],un=an.length;for(var Gt in B)qe.call(B,Gt)&&!(Qt&&(Gt=="length"||Nt&&(Gt=="offset"||Gt=="parent")||Qe&&(Gt=="buffer"||Gt=="byteLength"||Gt=="byteOffset")||UC(Gt,un)))&&an.push(Gt);return an}function xc(B,Y){for(var le=B.length;le--;)if(Jg(B[le][0],Y))return le;return-1}function RC(B,Y,le){var Te=Y(B);return wc(B)?Te:pe(Te,le(B))}function So(B){return B==null?B===void 0?k:w:Ae&&Ae in Object(B)?FC(B):VC(B)}function Zg(B){return ko(B)&&So(B)==s}function Kg(B,Y,le,Te,Nt){return B===Y?!0:B==null||Y==null||!ko(B)&&!ko(Y)?B!==B&&Y!==Y:jC(B,Y,le,Te,Kg,Nt)}function jC(B,Y,le,Te,Nt,Qe){var Qt=wc(B),an=wc(Y),un=Qt?c:Zr(B),Gt=an?c:Zr(Y);un=un==s?_:un,Gt=Gt==s?_:Gt;var In=un==_,tr=Gt==_,fn=un==Gt;if(fn&&Yd(B)){if(!Yd(Y))return!1;Qt=!0,In=!1}if(fn&&!In)return Qe||(Qe=new er),Qt||r0(B)?Xg(B,Y,le,Te,Nt,Qe):NC(B,Y,un,le,Te,Nt,Qe);if(!(le&i)){var Bn=In&&qe.call(B,"__wrapped__"),Un=tr&&qe.call(Y,"__wrapped__");if(Bn||Un){var Kr=Bn?B.value():B,$r=Un?Y.value():Y;return Qe||(Qe=new er),Nt(Kr,$r,le,Te,Qe)}}return fn?(Qe||(Qe=new er),LC(B,Y,le,Te,Nt,Qe)):!1}function PC(B){if(!n0(B)||zC(B))return!1;var Y=e0(B)?It:te;return Y.test(Si(B))}function IC(B){return ko(B)&&t0(B.length)&&!!J[So(B)]}function DC(B){if(!HC(B))return gt(B);var Y=[];for(var le in Object(B))qe.call(B,le)&&le!="constructor"&&Y.push(le);return Y}function Xg(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=B.length,un=Y.length;if(an!=un&&!(Qt&&un>an))return!1;var Gt=Qe.get(B);if(Gt&&Qe.get(Y))return Gt==Y;var In=-1,tr=!0,fn=le&a?new Mt:void 0;for(Qe.set(B,Y),Qe.set(Y,B);++In<an;){var Bn=B[In],Un=Y[In];if(Te)var Kr=Qt?Te(Un,Bn,In,Y,B,Qe):Te(Bn,Un,In,B,Y,Qe);if(Kr!==void 0){if(Kr)continue;tr=!1;break}if(fn){if(!we(Y,function($r,ki){if(!Re(fn,ki)&&(Bn===$r||Nt(Bn,$r,le,Te,Qe)))return fn.push(ki)})){tr=!1;break}}else if(!(Bn===Un||Nt(Bn,Un,le,Te,Qe))){tr=!1;break}}return Qe.delete(B),Qe.delete(Y),tr}function NC(B,Y,le,Te,Nt,Qe,Qt){switch(le){case O:if(B.byteLength!=Y.byteLength||B.byteOffset!=Y.byteOffset)return!1;B=B.buffer,Y=Y.buffer;case C:return!(B.byteLength!=Y.byteLength||!Qe(new mt(B),new mt(Y)));case u:case d:case v:return Jg(+B,+Y);case f:return B.name==Y.name&&B.message==Y.message;case b:case j:return B==Y+"";case p:var an=ze;case T:var un=Te&i;if(an||(an=at),B.size!=Y.size&&!un)return!1;var Gt=Qt.get(B);if(Gt)return Gt==Y;Te|=a,Qt.set(B,Y);var In=Xg(an(B),an(Y),Te,Nt,Qe,Qt);return Qt.delete(B),In;case M:if(Ge)return Ge.call(B)==Ge.call(Y)}return!1}function LC(B,Y,le,Te,Nt,Qe){var Qt=le&i,an=Qg(B),un=an.length,Gt=Qg(Y),In=Gt.length;if(un!=In&&!Qt)return!1;for(var tr=un;tr--;){var fn=an[tr];if(!(Qt?fn in Y:qe.call(Y,fn)))return!1}var Bn=Qe.get(B);if(Bn&&Qe.get(Y))return Bn==Y;var Un=!0;Qe.set(B,Y),Qe.set(Y,B);for(var Kr=Qt;++tr<un;){fn=an[tr];var $r=B[fn],ki=Y[fn];if(Te)var i0=Qt?Te(ki,$r,fn,Y,B,Qe):Te($r,ki,fn,B,Y,Qe);if(!(i0===void 0?$r===ki||Nt($r,ki,le,Te,Qe):i0)){Un=!1;break}Kr||(Kr=fn=="constructor")}if(Un&&!Kr){var Cc=B.constructor,Tc=Y.constructor;Cc!=Tc&&"constructor"in B&&"constructor"in Y&&!(typeof Cc=="function"&&Cc instanceof Cc&&typeof Tc=="function"&&Tc instanceof Tc)&&(Un=!1)}return Qe.delete(B),Qe.delete(Y),Un}function Qg(B){return RC(B,ZC,BC)}function _c(B,Y){var le=B.__data__;return WC(Y)?le[typeof Y=="string"?"string":"hash"]:le.map}function ga(B,Y){var le=Ve(B,Y);return PC(le)?le:void 0}function FC(B){var Y=qe.call(B,Ae),le=B[Ae];try{B[Ae]=void 0;var Te=!0}catch{}var Nt=pt.call(B);return Te&&(Y?B[Ae]=le:delete B[Ae]),Nt}var BC=Ye?function(B){return B==null?[]:(B=Object(B),ee(Ye(B),function(Y){return Wt.call(B,Y)}))}:KC,Zr=So;(St&&Zr(new St(new ArrayBuffer(1)))!=O||Vt&&Zr(new Vt)!=p||Rt&&Zr(Rt.resolve())!=x||Dt&&Zr(new Dt)!=T||qt&&Zr(new qt)!=E)&&(Zr=function(B){var Y=So(B),le=Y==_?B.constructor:void 0,Te=le?Si(le):"";if(Te)switch(Te){case Yt:return O;case rn:return p;case Jt:return x;case ye:return T;case Ee:return E}return Y});function UC(B,Y){return Y=Y??o,!!Y&&(typeof B=="number"||X.test(B))&&B>-1&&B%1==0&&B<Y}function WC(B){var Y=typeof B;return Y=="string"||Y=="number"||Y=="symbol"||Y=="boolean"?B!=="__proto__":B===null}function zC(B){return!!ot&&ot in B}function HC(B){var Y=B&&B.constructor,le=typeof Y=="function"&&Y.prototype||ke;return B===le}function VC(B){return pt.call(B)}function Si(B){if(B!=null){try{return Et.call(B)}catch{}try{return B+""}catch{}}return""}function Jg(B,Y){return B===Y||B!==B&&Y!==Y}var qC=Zg(function(){return arguments}())?Zg:function(B){return ko(B)&&qe.call(B,"callee")&&!Wt.call(B,"callee")},wc=Array.isArray;function YC(B){return B!=null&&t0(B.length)&&!e0(B)}var Yd=ct||XC;function GC(B,Y){return Kg(B,Y)}function e0(B){if(!n0(B))return!1;var Y=So(B);return Y==h||Y==g||Y==l||Y==S}function t0(B){return typeof B=="number"&&B>-1&&B%1==0&&B<=o}function n0(B){var Y=typeof B;return B!=null&&(Y=="object"||Y=="function")}function ko(B){return B!=null&&typeof B=="object"}var r0=Z?Le(Z):IC;function ZC(B){return YC(B)?To(B):DC(B)}function KC(){return[]}function XC(){return!1}e.exports=GC})(Al,Al.exports);var gA=Al.exports,E_={exports:{}};(function(e,t){var n=function(){var r=function(b,T){var j=236,M=17,k=b,E=a[T],C=null,O=0,$=null,A=[],P={},D=function(F,I){O=k*4+17,C=function(L){for(var H=new Array(L),R=0;R<L;R+=1){H[R]=new Array(L);for(var K=0;K<L;K+=1)H[R][K]=null}return H}(O),N(0,0),N(O-7,0),N(0,O-7),U(),z(),ne(F,I),k>=7&&G(F),$==null&&($=J(k,E,A)),te($,I)},N=function(F,I){for(var L=-1;L<=7;L+=1)if(!(F+L<=-1||O<=F+L))for(var H=-1;H<=7;H+=1)I+H<=-1||O<=I+H||(0<=L&&L<=6&&(H==0||H==6)||0<=H&&H<=6&&(L==0||L==6)||2<=L&&L<=4&&2<=H&&H<=4?C[F+L][I+H]=!0:C[F+L][I+H]=!1)},q=function(){for(var F=0,I=0,L=0;L<8;L+=1){D(!0,L);var H=s.getLostPoint(P);(L==0||F>H)&&(F=H,I=L)}return I},z=function(){for(var F=8;F<O-8;F+=1)C[F][6]==null&&(C[F][6]=F%2==0);for(var I=8;I<O-8;I+=1)C[6][I]==null&&(C[6][I]=I%2==0)},U=function(){for(var F=s.getPatternPosition(k),I=0;I<F.length;I+=1)for(var L=0;L<F.length;L+=1){var H=F[I],R=F[L];if(C[H][R]==null)for(var K=-2;K<=2;K+=1)for(var Z=-2;Z<=2;Z+=1)K==-2||K==2||Z==-2||Z==2||K==0&&Z==0?C[H+K][R+Z]=!0:C[H+K][R+Z]=!1}},G=function(F){for(var I=s.getBCHTypeNumber(k),L=0;L<18;L+=1){var H=!F&&(I>>L&1)==1;C[Math.floor(L/3)][L%3+O-8-3]=H}for(var L=0;L<18;L+=1){var H=!F&&(I>>L&1)==1;C[L%3+O-8-3][Math.floor(L/3)]=H}},ne=function(F,I){for(var L=E<<3|I,H=s.getBCHTypeInfo(L),R=0;R<15;R+=1){var K=!F&&(H>>R&1)==1;R<6?C[R][8]=K:R<8?C[R+1][8]=K:C[O-15+R][8]=K}for(var R=0;R<15;R+=1){var K=!F&&(H>>R&1)==1;R<8?C[8][O-R-1]=K:R<9?C[8][15-R-1+1]=K:C[8][15-R-1]=K}C[O-8][8]=!F},te=function(F,I){for(var L=-1,H=O-1,R=7,K=0,Z=s.getMaskFunction(I),ee=O-1;ee>0;ee-=2)for(ee==6&&(ee-=1);;){for(var pe=0;pe<2;pe+=1)if(C[H][ee-pe]==null){var we=!1;K<F.length&&(we=(F[K]>>>R&1)==1);var ve=Z(H,ee-pe);ve&&(we=!we),C[H][ee-pe]=we,R-=1,R==-1&&(K+=1,R=7)}if(H+=L,H<0||O<=H){H-=L,L=-L;break}}},X=function(F,I){for(var L=0,H=0,R=0,K=new Array(I.length),Z=new Array(I.length),ee=0;ee<I.length;ee+=1){var pe=I[ee].dataCount,we=I[ee].totalCount-pe;H=Math.max(H,pe),R=Math.max(R,we),K[ee]=new Array(pe);for(var ve=0;ve<K[ee].length;ve+=1)K[ee][ve]=255&F.getBuffer()[ve+L];L+=pe;var Le=s.getErrorCorrectPolynomial(we),Re=l(K[ee],Le.getLength()-1),Ve=Re.mod(Le);Z[ee]=new Array(Le.getLength()-1);for(var ve=0;ve<Z[ee].length;ve+=1){var ze=ve+Ve.getLength()-Z[ee].length;Z[ee][ve]=ze>=0?Ve.getAt(ze):0}}for(var ut=0,ve=0;ve<I.length;ve+=1)ut+=I[ve].totalCount;for(var at=new Array(ut),de=0,ve=0;ve<H;ve+=1)for(var ee=0;ee<I.length;ee+=1)ve<K[ee].length&&(at[de]=K[ee][ve],de+=1);for(var ve=0;ve<R;ve+=1)for(var ee=0;ee<I.length;ee+=1)ve<Z[ee].length&&(at[de]=Z[ee][ve],de+=1);return at},J=function(F,I,L){for(var H=u.getRSBlocks(F,I),R=d(),K=0;K<L.length;K+=1){var Z=L[K];R.put(Z.getMode(),4),R.put(Z.getLength(),s.getLengthInBits(Z.getMode(),F)),Z.write(R)}for(var ee=0,K=0;K<H.length;K+=1)ee+=H[K].dataCount;if(R.getLengthInBits()>ee*8)throw"code length overflow. ("+R.getLengthInBits()+">"+ee*8+")";for(R.getLengthInBits()+4<=ee*8&&R.put(0,4);R.getLengthInBits()%8!=0;)R.putBit(!1);for(;!(R.getLengthInBits()>=ee*8||(R.put(j,8),R.getLengthInBits()>=ee*8));)R.put(M,8);return X(R,H)};P.addData=function(F,I){I=I||"Byte";var L=null;switch(I){case"Numeric":L=f(F);break;case"Alphanumeric":L=h(F);break;case"Byte":L=g(F);break;case"Kanji":L=p(F);break;default:throw"mode:"+I}A.push(L),$=null},P.isDark=function(F,I){if(F<0||O<=F||I<0||O<=I)throw F+","+I;return C[F][I]},P.getModuleCount=function(){return O},P.make=function(){if(k<1){for(var F=1;F<40;F++){for(var I=u.getRSBlocks(F,E),L=d(),H=0;H<A.length;H++){var R=A[H];L.put(R.getMode(),4),L.put(R.getLength(),s.getLengthInBits(R.getMode(),F)),R.write(L)}for(var K=0,H=0;H<I.length;H++)K+=I[H].dataCount;if(L.getLengthInBits()<=K*8)break}k=F}D(!1,q())},P.createTableTag=function(F,I){F=F||2,I=typeof I>"u"?F*4:I;var L="";L+='<table style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: "+I+"px;",L+='">',L+="<tbody>";for(var H=0;H<P.getModuleCount();H+=1){L+="<tr>";for(var R=0;R<P.getModuleCount();R+=1)L+='<td style="',L+=" border-width: 0px; border-style: none;",L+=" border-collapse: collapse;",L+=" padding: 0px; margin: 0px;",L+=" width: "+F+"px;",L+=" height: "+F+"px;",L+=" background-color: ",L+=P.isDark(H,R)?"#000000":"#ffffff",L+=";",L+='"/>';L+="</tr>"}return L+="</tbody>",L+="</table>",L},P.createSvgTag=function(F,I,L,H){var R={};typeof arguments[0]=="object"&&(R=arguments[0],F=R.cellSize,I=R.margin,L=R.alt,H=R.title),F=F||2,I=typeof I>"u"?F*4:I,L=typeof L=="string"?{text:L}:L||{},L.text=L.text||null,L.id=L.text?L.id||"qrcode-description":null,H=typeof H=="string"?{text:H}:H||{},H.text=H.text||null,H.id=H.text?H.id||"qrcode-title":null;var K=P.getModuleCount()*F+I*2,Z,ee,pe,we,ve="",Le;for(Le="l"+F+",0 0,"+F+" -"+F+",0 0,-"+F+"z ",ve+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',ve+=R.scalable?"":' width="'+K+'px" height="'+K+'px"',ve+=' viewBox="0 0 '+K+" "+K+'" ',ve+=' preserveAspectRatio="xMinYMin meet"',ve+=H.text||L.text?' role="img" aria-labelledby="'+Q([H.id,L.id].join(" ").trim())+'"':"",ve+=">",ve+=H.text?'<title id="'+Q(H.id)+'">'+Q(H.text)+"</title>":"",ve+=L.text?'<description id="'+Q(L.id)+'">'+Q(L.text)+"</description>":"",ve+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',ve+='<path d="',pe=0;pe<P.getModuleCount();pe+=1)for(we=pe*F+I,Z=0;Z<P.getModuleCount();Z+=1)P.isDark(pe,Z)&&(ee=Z*F+I,ve+="M"+ee+","+we+Le);return ve+='" stroke="transparent" fill="black"/>',ve+="</svg>",ve},P.createDataURL=function(F,I){F=F||2,I=typeof I>"u"?F*4:I;var L=P.getModuleCount()*F+I*2,H=I,R=L-I;return S(L,L,function(K,Z){if(H<=K&&K<R&&H<=Z&&Z<R){var ee=Math.floor((K-H)/F),pe=Math.floor((Z-H)/F);return P.isDark(pe,ee)?0:1}else return 1})},P.createImgTag=function(F,I,L){F=F||2,I=typeof I>"u"?F*4:I;var H=P.getModuleCount()*F+I*2,R="";return R+="<img",R+=' src="',R+=P.createDataURL(F,I),R+='"',R+=' width="',R+=H,R+='"',R+=' height="',R+=H,R+='"',L&&(R+=' alt="',R+=Q(L),R+='"'),R+="/>",R};var Q=function(F){for(var I="",L=0;L<F.length;L+=1){var H=F.charAt(L);switch(H){case"<":I+="<";break;case">":I+=">";break;case"&":I+="&";break;case'"':I+=""";break;default:I+=H;break}}return I},re=function(F){var I=1;F=typeof F>"u"?I*2:F;var L=P.getModuleCount()*I+F*2,H=F,R=L-F,K,Z,ee,pe,we,ve={"██":"█","█ ":"▀"," █":"▄"," ":" "},Le={"██":"▀","█ ":"▀"," █":" "," ":" "},Re="";for(K=0;K<L;K+=2){for(ee=Math.floor((K-H)/I),pe=Math.floor((K+1-H)/I),Z=0;Z<L;Z+=1)we="█",H<=Z&&Z<R&&H<=K&&K<R&&P.isDark(ee,Math.floor((Z-H)/I))&&(we=" "),H<=Z&&Z<R&&H<=K+1&&K+1<R&&P.isDark(pe,Math.floor((Z-H)/I))?we+=" ":we+="█",Re+=F<1&&K+1>=R?Le[we]:ve[we];Re+=`
|
|
254
254
|
`}return L%2&&F>0?Re.substring(0,Re.length-L-1)+Array(L+1).join("▀"):Re.substring(0,Re.length-1)};return P.createASCII=function(F,I){if(F=F||1,F<2)return re(I);F-=1,I=typeof I>"u"?F*2:I;var L=P.getModuleCount()*F+I*2,H=I,R=L-I,K,Z,ee,pe,we=Array(F+1).join("██"),ve=Array(F+1).join(" "),Le="",Re="";for(K=0;K<L;K+=1){for(ee=Math.floor((K-H)/F),Re="",Z=0;Z<L;Z+=1)pe=1,H<=Z&&Z<R&&H<=K&&K<R&&P.isDark(ee,Math.floor((Z-H)/F))&&(pe=0),Re+=pe?we:ve;for(ee=0;ee<F;ee+=1)Le+=Re+`
|
|
255
|
-
`}return Le.substring(0,Le.length-1)},P.renderTo2dContext=function(F,I){I=I||2;for(var L=P.getModuleCount(),H=0;H<L;H++)for(var R=0;R<L;R++)F.fillStyle=P.isDark(H,R)?"black":"white",F.fillRect(H*I,R*I,I,I)},P};r.stringToBytesFuncs={default:function(b){for(var T=[],j=0;j<b.length;j+=1){var M=b.charCodeAt(j);T.push(M&255)}return T}},r.stringToBytes=r.stringToBytesFuncs.default,r.createStringToBytes=function(b,T){var j=function(){for(var k=_(b),E=function(){var z=k.read();if(z==-1)throw"eof";return z},C=0,O={};;){var $=k.read();if($==-1)break;var A=E(),P=E(),D=E(),N=String.fromCharCode($<<8|A),q=P<<8|D;O[N]=q,C+=1}if(C!=T)throw C+" != "+T;return O}(),M=63;return function(k){for(var E=[],C=0;C<k.length;C+=1){var O=k.charCodeAt(C);if(O<128)E.push(O);else{var $=j[k.charAt(C)];typeof $=="number"?($&255)==$?E.push($):(E.push($>>>8),E.push($&255)):E.push(M)}}return E}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},a={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var b=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],T=1335,j=7973,M=21522,k={},E=function(C){for(var O=0;C!=0;)O+=1,C>>>=1;return O};return k.getBCHTypeInfo=function(C){for(var O=C<<10;E(O)-E(T)>=0;)O^=T<<E(O)-E(T);return(C<<10|O)^M},k.getBCHTypeNumber=function(C){for(var O=C<<12;E(O)-E(j)>=0;)O^=j<<E(O)-E(j);return C<<12|O},k.getPatternPosition=function(C){return b[C-1]},k.getMaskFunction=function(C){switch(C){case o.PATTERN000:return function(O,$){return(O+$)%2==0};case o.PATTERN001:return function(O,$){return O%2==0};case o.PATTERN010:return function(O,$){return $%3==0};case o.PATTERN011:return function(O,$){return(O+$)%3==0};case o.PATTERN100:return function(O,$){return(Math.floor(O/2)+Math.floor($/3))%2==0};case o.PATTERN101:return function(O,$){return O*$%2+O*$%3==0};case o.PATTERN110:return function(O,$){return(O*$%2+O*$%3)%2==0};case o.PATTERN111:return function(O,$){return(O*$%3+(O+$)%2)%2==0};default:throw"bad maskPattern:"+C}},k.getErrorCorrectPolynomial=function(C){for(var O=l([1],0),$=0;$<C;$+=1)O=O.multiply(l([1,c.gexp($)],0));return O},k.getLengthInBits=function(C,O){if(1<=O&&O<10)switch(C){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+C}else if(O<27)switch(C){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+C}else if(O<41)switch(C){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+C}else throw"type:"+O},k.getLostPoint=function(C){for(var O=C.getModuleCount(),$=0,A=0;A<O;A+=1)for(var P=0;P<O;P+=1){for(var D=0,N=C.isDark(A,P),q=-1;q<=1;q+=1)if(!(A+q<0||O<=A+q))for(var z=-1;z<=1;z+=1)P+z<0||O<=P+z||q==0&&z==0||N==C.isDark(A+q,P+z)&&(D+=1);D>5&&($+=3+D-5)}for(var A=0;A<O-1;A+=1)for(var P=0;P<O-1;P+=1){var U=0;C.isDark(A,P)&&(U+=1),C.isDark(A+1,P)&&(U+=1),C.isDark(A,P+1)&&(U+=1),C.isDark(A+1,P+1)&&(U+=1),(U==0||U==4)&&($+=3)}for(var A=0;A<O;A+=1)for(var P=0;P<O-6;P+=1)C.isDark(A,P)&&!C.isDark(A,P+1)&&C.isDark(A,P+2)&&C.isDark(A,P+3)&&C.isDark(A,P+4)&&!C.isDark(A,P+5)&&C.isDark(A,P+6)&&($+=40);for(var P=0;P<O;P+=1)for(var A=0;A<O-6;A+=1)C.isDark(A,P)&&!C.isDark(A+1,P)&&C.isDark(A+2,P)&&C.isDark(A+3,P)&&C.isDark(A+4,P)&&!C.isDark(A+5,P)&&C.isDark(A+6,P)&&($+=40);for(var G=0,P=0;P<O;P+=1)for(var A=0;A<O;A+=1)C.isDark(A,P)&&(G+=1);var ne=Math.abs(100*G/O/O-50)/5;return $+=ne*10,$},k}(),c=function(){for(var b=new Array(256),T=new Array(256),j=0;j<8;j+=1)b[j]=1<<j;for(var j=8;j<256;j+=1)b[j]=b[j-4]^b[j-5]^b[j-6]^b[j-8];for(var j=0;j<255;j+=1)T[b[j]]=j;var M={};return M.glog=function(k){if(k<1)throw"glog("+k+")";return T[k]},M.gexp=function(k){for(;k<0;)k+=255;for(;k>=256;)k-=255;return b[k]},M}();function l(b,T){if(typeof b.length>"u")throw b.length+"/"+T;var j=function(){for(var k=0;k<b.length&&b[k]==0;)k+=1;for(var E=new Array(b.length-k+T),C=0;C<b.length-k;C+=1)E[C]=b[C+k];return E}(),M={};return M.getAt=function(k){return j[k]},M.getLength=function(){return j.length},M.multiply=function(k){for(var E=new Array(M.getLength()+k.getLength()-1),C=0;C<M.getLength();C+=1)for(var O=0;O<k.getLength();O+=1)E[C+O]^=c.gexp(c.glog(M.getAt(C))+c.glog(k.getAt(O)));return l(E,0)},M.mod=function(k){if(M.getLength()-k.getLength()<0)return M;for(var E=c.glog(M.getAt(0))-c.glog(k.getAt(0)),C=new Array(M.getLength()),O=0;O<M.getLength();O+=1)C[O]=M.getAt(O);for(var O=0;O<k.getLength();O+=1)C[O]^=c.gexp(c.glog(k.getAt(O))+E);return l(C,0).mod(k)},M}var u=function(){var b=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],T=function(k,E){var C={};return C.totalCount=k,C.dataCount=E,C},j={},M=function(k,E){switch(E){case a.L:return b[(k-1)*4+0];case a.M:return b[(k-1)*4+1];case a.Q:return b[(k-1)*4+2];case a.H:return b[(k-1)*4+3];default:return}};return j.getRSBlocks=function(k,E){var C=M(k,E);if(typeof C>"u")throw"bad rs block @ typeNumber:"+k+"/errorCorrectionLevel:"+E;for(var O=C.length/3,$=[],A=0;A<O;A+=1)for(var P=C[A*3+0],D=C[A*3+1],N=C[A*3+2],q=0;q<P;q+=1)$.push(T(D,N));return $},j}(),d=function(){var b=[],T=0,j={};return j.getBuffer=function(){return b},j.getAt=function(M){var k=Math.floor(M/8);return(b[k]>>>7-M%8&1)==1},j.put=function(M,k){for(var E=0;E<k;E+=1)j.putBit((M>>>k-E-1&1)==1)},j.getLengthInBits=function(){return T},j.putBit=function(M){var k=Math.floor(T/8);b.length<=k&&b.push(0),M&&(b[k]|=128>>>T%8),T+=1},j},f=function(b){var T=i.MODE_NUMBER,j=b,M={};M.getMode=function(){return T},M.getLength=function(C){return j.length},M.write=function(C){for(var O=j,$=0;$+2<O.length;)C.put(k(O.substring($,$+3)),10),$+=3;$<O.length&&(O.length-$==1?C.put(k(O.substring($,$+1)),4):O.length-$==2&&C.put(k(O.substring($,$+2)),7))};var k=function(C){for(var O=0,$=0;$<C.length;$+=1)O=O*10+E(C.charAt($));return O},E=function(C){if("0"<=C&&C<="9")return C.charCodeAt(0)-48;throw"illegal char :"+C};return M},h=function(b){var T=i.MODE_ALPHA_NUM,j=b,M={};M.getMode=function(){return T},M.getLength=function(E){return j.length},M.write=function(E){for(var C=j,O=0;O+1<C.length;)E.put(k(C.charAt(O))*45+k(C.charAt(O+1)),11),O+=2;O<C.length&&E.put(k(C.charAt(O)),6)};var k=function(E){if("0"<=E&&E<="9")return E.charCodeAt(0)-48;if("A"<=E&&E<="Z")return E.charCodeAt(0)-65+10;switch(E){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+E}};return M},g=function(b){var T=i.MODE_8BIT_BYTE,j=r.stringToBytes(b),M={};return M.getMode=function(){return T},M.getLength=function(k){return j.length},M.write=function(k){for(var E=0;E<j.length;E+=1)k.put(j[E],8)},M},p=function(b){var T=i.MODE_KANJI,j=r.stringToBytesFuncs.SJIS;if(!j)throw"sjis not supported.";(function(E,C){var O=j(E);if(O.length!=2||(O[0]<<8|O[1])!=C)throw"sjis not supported."})("友",38726);var M=j(b),k={};return k.getMode=function(){return T},k.getLength=function(E){return~~(M.length/2)},k.write=function(E){for(var C=M,O=0;O+1<C.length;){var $=(255&C[O])<<8|255&C[O+1];if(33088<=$&&$<=40956)$-=33088;else if(57408<=$&&$<=60351)$-=49472;else throw"illegal char at "+(O+1)+"/"+$;$=($>>>8&255)*192+($&255),E.put($,13),O+=2}if(O<C.length)throw"illegal char at "+(O+1)},k},v=function(){var b=[],T={};return T.writeByte=function(j){b.push(j&255)},T.writeShort=function(j){T.writeByte(j),T.writeByte(j>>>8)},T.writeBytes=function(j,M,k){M=M||0,k=k||j.length;for(var E=0;E<k;E+=1)T.writeByte(j[E+M])},T.writeString=function(j){for(var M=0;M<j.length;M+=1)T.writeByte(j.charCodeAt(M))},T.toByteArray=function(){return b},T.toString=function(){var j="";j+="[";for(var M=0;M<b.length;M+=1)M>0&&(j+=","),j+=b[M];return j+="]",j},T},w=function(){var b=0,T=0,j=0,M="",k={},E=function(O){M+=String.fromCharCode(C(O&63))},C=function(O){if(!(O<0)){if(O<26)return 65+O;if(O<52)return 97+(O-26);if(O<62)return 48+(O-52);if(O==62)return 43;if(O==63)return 47}throw"n:"+O};return k.writeByte=function(O){for(b=b<<8|O&255,T+=8,j+=1;T>=6;)E(b>>>T-6),T-=6},k.flush=function(){if(T>0&&(E(b<<6-T),b=0,T=0),j%3!=0)for(var O=3-j%3,$=0;$<O;$+=1)M+="="},k.toString=function(){return M},k},_=function(b){var T=b,j=0,M=0,k=0,E={};E.read=function(){for(;k<8;){if(j>=T.length){if(k==0)return-1;throw"unexpected end of file./"+k}var O=T.charAt(j);if(j+=1,O=="=")return k=0,-1;if(O.match(/^\s$/))continue;M=M<<6|C(O.charCodeAt(0)),k+=6}var $=M>>>k-8&255;return k-=8,$};var C=function(O){if(65<=O&&O<=90)return O-65;if(97<=O&&O<=122)return O-97+26;if(48<=O&&O<=57)return O-48+52;if(O==43)return 62;if(O==47)return 63;throw"c:"+O};return E},x=function(b,T){var j=b,M=T,k=new Array(b*T),E={};E.setPixel=function(A,P,D){k[P*j+A]=D},E.write=function(A){A.writeString("GIF87a"),A.writeShort(j),A.writeShort(M),A.writeByte(128),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(255),A.writeByte(255),A.writeByte(255),A.writeString(","),A.writeShort(0),A.writeShort(0),A.writeShort(j),A.writeShort(M),A.writeByte(0);var P=2,D=O(P);A.writeByte(P);for(var N=0;D.length-N>255;)A.writeByte(255),A.writeBytes(D,N,255),N+=255;A.writeByte(D.length-N),A.writeBytes(D,N,D.length-N),A.writeByte(0),A.writeString(";")};var C=function(A){var P=A,D=0,N=0,q={};return q.write=function(z,U){if(z>>>U)throw"length over";for(;D+U>=8;)P.writeByte(255&(z<<D|N)),U-=8-D,z>>>=8-D,N=0,D=0;N=z<<D|N,D=D+U},q.flush=function(){D>0&&P.writeByte(N)},q},O=function(A){for(var P=1<<A,D=(1<<A)+1,N=A+1,q=$(),z=0;z<P;z+=1)q.add(String.fromCharCode(z));q.add(String.fromCharCode(P)),q.add(String.fromCharCode(D));var U=v(),G=C(U);G.write(P,N);var ne=0,te=String.fromCharCode(k[ne]);for(ne+=1;ne<k.length;){var X=String.fromCharCode(k[ne]);ne+=1,q.contains(te+X)?te=te+X:(G.write(q.indexOf(te),N),q.size()<4095&&(q.size()==1<<N&&(N+=1),q.add(te+X)),te=X)}return G.write(q.indexOf(te),N),G.write(D,N),G.flush(),U.toByteArray()},$=function(){var A={},P=0,D={};return D.add=function(N){if(D.contains(N))throw"dup key:"+N;A[N]=P,P+=1},D.size=function(){return P},D.indexOf=function(N){return A[N]},D.contains=function(N){return typeof A[N]<"u"},D};return E},S=function(b,T,j){for(var M=x(b,T),k=0;k<T;k+=1)for(var E=0;E<b;E+=1)M.setPixel(E,k,j(E,k));var C=v();M.write(C);for(var O=w(),$=C.toByteArray(),A=0;A<$.length;A+=1)O.writeByte($[A]);return O.flush(),"data:image/gif;base64,"+O};return r}();(function(){n.stringToBytesFuncs["UTF-8"]=function(r){function i(a){for(var o=[],s=0;s<a.length;s++){var c=a.charCodeAt(s);c<128?o.push(c):c<2048?o.push(192|c>>6,128|c&63):c<55296||c>=57344?o.push(224|c>>12,128|c>>6&63,128|c&63):(s++,c=65536+((c&1023)<<10|a.charCodeAt(s)&1023),o.push(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63))}return o}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(E_);var yA=E_.exports,bA=Hn&&Hn.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$h=Hn&&Hn.__assign||function(){return $h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},$h.apply(this,arguments)};Object.defineProperty(ym,"__esModule",{value:!0});exports.QRCode_1=ym.QRCode=void 0;var xA=vA,_A=yA,bf=m,wA=function(e){bA(t,e);function t(n){var r=e.call(this,n)||this;return r.canvasRef=bf.createRef(),r}return t.prototype.download=function(n,r){if(this.canvasRef.current){var i=void 0;switch(n){case"jpg":i="image/jpeg";break;case"webp":i="image/webp";break;case"png":default:i="image/png";break}var a=this.canvasRef.current.toDataURL(i,1),o=document.createElement("a");o.download=r??"react-qrcode-logo",o.href=a,o.click()}},t.prototype.utf16to8=function(n){var r="",i,a,o=n.length;for(i=0;i<o;i++)a=n.charCodeAt(i),a>=1&&a<=127?r+=n.charAt(i):a>2047?(r+=String.fromCharCode(224|a>>12&15),r+=String.fromCharCode(128|a>>6&63),r+=String.fromCharCode(128|a>>0&63)):(r+=String.fromCharCode(192|a>>6&31),r+=String.fromCharCode(128|a>>0&63));return r},t.prototype.drawRoundedSquare=function(n,r,i,a,o,s,c,l){l.lineWidth=n,l.fillStyle=o,l.strokeStyle=o,i+=n/2,r+=n/2,a-=n,Array.isArray(s)||(s=[s,s,s,s]),s=s.map(function(g){return g=Math.min(g,a/2),g<0?0:g});var u=s[0]||0,d=s[1]||0,f=s[2]||0,h=s[3]||0;l.beginPath(),l.moveTo(r+u,i),l.lineTo(r+a-d,i),d&&l.quadraticCurveTo(r+a,i,r+a,i+d),l.lineTo(r+a,i+a-f),f&&l.quadraticCurveTo(r+a,i+a,r+a-f,i+a),l.lineTo(r+h,i+a),h&&l.quadraticCurveTo(r,i+a,r,i+a-h),l.lineTo(r,i+u),u&&l.quadraticCurveTo(r,i,r+u,i),l.closePath(),l.stroke(),c&&l.fill()},t.prototype.drawPositioningPattern=function(n,r,i,a,o,s,c){c===void 0&&(c=[0,0,0,0]);var l=Math.ceil(r),u,d;typeof c!="number"&&!Array.isArray(c)?(u=c.outer||0,d=c.inner||0):(u=c,d=u);var f,h;typeof s!="string"?(f=s.outer,h=s.inner):(f=s,h=s);var g=a*r+i,p=o*r+i,v=r*7;this.drawRoundedSquare(l,p,g,v,f,u,!1,n),v=r*3,g+=r*2,p+=r*2,this.drawRoundedSquare(l,p,g,v,h,d,!0,n)},t.prototype.isInPositioninZone=function(n,r,i){return i.some(function(a){return r>=a.row&&r<=a.row+7&&n>=a.col&&n<=a.col+7})},t.prototype.transformPixelLengthIntoNumberOfCells=function(n,r){return n/r},t.prototype.isCoordinateInImage=function(n,r,i,a,o,s,c,l){if(l){var u=2,d=this.transformPixelLengthIntoNumberOfCells(o,c),f=this.transformPixelLengthIntoNumberOfCells(s,c),h=this.transformPixelLengthIntoNumberOfCells(i,c)-1,g=this.transformPixelLengthIntoNumberOfCells(a,c)-1;return r>=d-u&&r<=d+h+u&&n>=f-u&&n<=f+g+u}else return!1},t.prototype.shouldComponentUpdate=function(n){return!xA(this.props,n)},t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(){this.update()},t.prototype.update=function(){var n,r=this.props,i=r.value,a=r.ecLevel,o=r.enableCORS,s=r.bgColor,c=r.fgColor,l=r.logoImage,u=r.logoOpacity,d=r.logoOnLoad,f=r.removeQrCodeBehindLogo,h=r.qrStyle,g=r.eyeRadius,p=r.eyeColor,v=r.logoPaddingStyle,w=+this.props.size,_=+this.props.quietZone,x=this.props.logoWidth?+this.props.logoWidth:0,S=this.props.logoHeight?+this.props.logoHeight:0,b=this.props.logoPadding?+this.props.logoPadding:0,T=_A(0,a);T.addData(this.utf16to8(i)),T.make();var j=(n=this.canvasRef)===null||n===void 0?void 0:n.current,M=j.getContext("2d"),k=w+2*_,E=T.getModuleCount(),C=w/E,O=window.devicePixelRatio||1;j.height=j.width=k*O,M.scale(O,O),M.fillStyle=s,M.fillRect(0,0,k,k);var $=_,A=[{row:0,col:0},{row:0,col:E-7},{row:E-7,col:0}];if(M.strokeStyle=c,h==="dots"){M.fillStyle=c;for(var P=C/2,D=0;D<E;D++)for(var N=0;N<E;N++)T.isDark(D,N)&&!this.isInPositioninZone(D,N,A)&&(M.beginPath(),M.arc(Math.round(N*C)+P+$,Math.round(D*C)+P+$,P/100*75,0,2*Math.PI,!1),M.closePath(),M.fill())}else if(h==="fluid"){for(var P=Math.ceil(C/2),D=0;D<E;D++)for(var N=0;N<E;N++)if(T.isDark(D,N)&&!this.isInPositioninZone(D,N,A)){var q=[!1,!1,!1,!1];D>0&&!T.isDark(D-1,N)&&N>0&&!T.isDark(D,N-1)&&(q[0]=!0),D>0&&!T.isDark(D-1,N)&&N<E-1&&!T.isDark(D,N+1)&&(q[1]=!0),D<E-1&&!T.isDark(D+1,N)&&N<E-1&&!T.isDark(D,N+1)&&(q[2]=!0),D<E-1&&!T.isDark(D+1,N)&&N>0&&!T.isDark(D,N-1)&&(q[3]=!0);var z=Math.ceil((N+1)*C)-Math.floor(N*C),U=Math.ceil((D+1)*C)-Math.floor(D*C);M.fillStyle=c,M.beginPath(),M.arc(Math.round(N*C)+P+$,Math.round(D*C)+P+$,P,0,2*Math.PI,!1),M.closePath(),M.fill(),q[0]||M.fillRect(Math.round(N*C)+$,Math.round(D*C)+$,z/2,U/2),q[1]||M.fillRect(Math.round(N*C)+$+Math.floor(z/2),Math.round(D*C)+$,z/2,U/2),q[2]||M.fillRect(Math.round(N*C)+$+Math.floor(z/2),Math.round(D*C)+$+Math.floor(U/2),z/2,U/2),q[3]||M.fillRect(Math.round(N*C)+$,Math.round(D*C)+$+Math.floor(U/2),z/2,U/2)}}else for(var D=0;D<E;D++)for(var N=0;N<E;N++)if(T.isDark(D,N)&&!this.isInPositioninZone(D,N,A)){M.fillStyle=c;var z=Math.ceil((N+1)*C)-Math.floor(N*C),U=Math.ceil((D+1)*C)-Math.floor(D*C);M.fillRect(Math.round(N*C)+$,Math.round(D*C)+$,z,U)}for(var G=0;G<3;G++){var ne=A[G],D=ne.row,N=ne.col,te=g,X=void 0;Array.isArray(te)&&(te=te[G]),typeof te=="number"&&(te=[te,te,te,te]),p?Array.isArray(p)?X=p[G]:X=p:X=c,this.drawPositioningPattern(M,C,$,D,N,X,te)}if(l){var J=new Image;o&&(J.crossOrigin="Anonymous"),J.onload=function(Q){M.save();var re=x||w*.2,F=S||re,I=(w-re)/2,L=(w-F)/2;if(f||b){M.beginPath(),M.strokeStyle=s,M.fillStyle=s;var H=re+2*b,R=F+2*b,K=I+$-b,Z=L+$-b;if(v==="circle"){var ee=K+H/2,pe=Z+R/2;M.ellipse(ee,pe,H/2,R/2,0,0,2*Math.PI),M.stroke(),M.fill()}else M.fillRect(K,Z,H,R)}M.globalAlpha=u,M.drawImage(J,I+$,L+$,re,F),M.restore(),d&&d(Q)},J.src=l}},t.prototype.render=function(){var n,r=+this.props.size+2*+this.props.quietZone;return bf.createElement("canvas",{id:(n=this.props.id)!==null&&n!==void 0?n:"react-qrcode-logo",height:r,width:r,style:$h({height:r+"px",width:r+"px"},this.props.style),ref:this.canvasRef})},t.defaultProps={value:"https://reactjs.org/",ecLevel:"M",enableCORS:!1,size:150,quietZone:10,bgColor:"#FFFFFF",fgColor:"#000000",logoOpacity:1,qrStyle:"squares",eyeRadius:[0,0,0],logoPaddingStyle:"square"},t}(bf.Component);exports.QRCode_1=ym.QRCode=wA;const O_=({value:e,MiniDetailComponent:t,children:n,miniDetailPlacement:r})=>!e||!t?n:y.jsx(t,{id:e.toString(),placement:r,children:n}),M_=({InputContainer:e=ju,value:t,options:n,onChange:r,label:i,withoutLabel:a,isNumber:o,size:s,hidden:c,disabled:l,noSortOptions:u,className:d,suffixIdToName:f,noEmptyOption:h,appendCurrentSelectionWithName:g,dropdownWidth:p,hint:v,addNewOptionPath:w,refreshOptions:_,MiniDetailComponent:x,miniDetailPlacement:S,selectedItemNavigateTo:b,noRemoveButton:T})=>{const{texts:{customSelect:j}}=m.useContext(Kt),[M,k]=m.useState(!1),[E,C]=m.useState(""),O=m.useCallback(z=>{C(z)},[]),$=m.useMemo(()=>n.find(z=>z.id===t)??null,[n,t]),A=m.useCallback(z=>{var U;return z===null?"":!z.name||z.name.length===0?((U=z.id)==null?void 0:U.toString())??"":f?`${z.name} (${z.id})`:z.name},[f]),P=m.useMemo(()=>{const z=n?[...n]:[];return g!==void 0&&t!==void 0&&t!==null&&(z.some(U=>U.id===t)||z.push({id:t,name:g})),z.map(U=>({id:U.id,name:A(U)})).filter(U=>em(U.name,E)).sort((U,G)=>u?0:(U.name??"").localeCompare(G.name??""))},[n,u,E,A,g,t]),D=m.useCallback(z=>{var U;r&&r((z==null?void 0:z.id)===void 0||(z==null?void 0:z.id)===null?null:o?Number(z.id):(U=z.id)==null?void 0:U.toString())},[r,o]),N=m.useCallback(z=>{k(!1),D(z)},[D]),q=m.useRef(null);return y.jsx(y.Fragment,{children:y.jsxs(e,{withoutLabel:a,label:i??"",hidden:c,inputContainerClassName:oe({"luminus-dropdown-select-open":M}),className:d,hint:v,disabled:l,children:[y.jsx(S_,{currentSelection:$,selectedItemNavigateTo:b,children:y.jsx(O_,{value:t,MiniDetailComponent:x,miniDetailPlacement:S,children:y.jsxs(Tr.Select,{ref:q,size:s,value:t??"",onMouseDown:z=>{z.currentTarget.focus(),z.preventDefault()},onClick:()=>{!l&&k(!0)},onChange:()=>{},className:oe("w-100",{"luminus-dropdown-picker-disabled":l}),hidden:c,children:[h&&!(t==null||t==="")?void 0:y.jsx("option",{value:""}),t!=null&&y.jsx("option",{value:t,children:A($)})]})})}),q.current&&y.jsx(p_,{show:M,onCancel:()=>k(!1),items:P,currentSelection:$??null,onSelectionChange:N,onSearchQueryChange:O,texts:j,disabled:l,inputRef:q,autoHideSearch:!0,allItemsLength:n.length,itemsNameWidth:p,addNewOptionPath:w,refreshOptions:_,noRemoveButton:T})]})})};function CA(e){return rt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function TA(e){return rt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function SA(e){return rt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function kA(e){return rt({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"},child:[]}]})(e)}const EA=m.forwardRef(({onClick:e,text:t},n)=>y.jsx("div",{ref:n,onClick:r=>{r.preventDefault(),e(r)},role:"button",className:"middle-div",children:y.jsxs("div",{className:"d-flex flex-column align-items-center",children:[y.jsx("div",{className:"mt-",children:"…"}),y.jsx("div",{className:"mt-1 middle-letter",children:t})]})}));var bm=oc(),He=e=>ac(e,bm),xm=oc();He.write=e=>ac(e,xm);var Pu=oc();He.onStart=e=>ac(e,Pu);var _m=oc();He.onFrame=e=>ac(e,_m);var wm=oc();He.onFinish=e=>ac(e,wm);var Pa=[];He.setTimeout=(e,t)=>{const n=He.now()+t,r=()=>{const a=Pa.findIndex(o=>o.cancel==r);~a&&Pa.splice(a,1),ci-=~a?1:0},i={time:n,handler:e,cancel:r};return Pa.splice($_(n),0,i),ci+=1,A_(),i};var $_=e=>~(~Pa.findIndex(t=>t.time>e)||~Pa.length);He.cancel=e=>{Pu.delete(e),_m.delete(e),wm.delete(e),bm.delete(e),xm.delete(e)};He.sync=e=>{Ah=!0,He.batchedUpdates(e),Ah=!1};He.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,He.onStart(n)}return r.handler=e,r.cancel=()=>{Pu.delete(n),t=null},r};var Cm=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>Cm=e;He.now=typeof performance<"u"?()=>performance.now():Date.now;He.batchedUpdates=e=>e();He.catch=console.error;He.frameLoop="always";He.advance=()=>{He.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):j_()};var si=-1,ci=0,Ah=!1;function ac(e,t){Ah?(t.delete(e),e(0)):(t.add(e),A_())}function A_(){si<0&&(si=0,He.frameLoop!=="demand"&&Cm(R_))}function OA(){si=-1}function R_(){~si&&(Cm(R_),He.batchedUpdates(j_))}function j_(){const e=si;si=He.now();const t=$_(si);if(t&&(P_(Pa.splice(0,t),n=>n.handler()),ci-=t),!ci){OA();return}Pu.flush(),bm.flush(e?Math.min(64,si-e):16.667),_m.flush(),xm.flush(),wm.flush()}function oc(){let e=new Set,t=e;return{add(n){ci+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ci-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ci-=t.size,P_(t,r=>r(n)&&e.add(r)),ci+=e.size,t=e)}}}function P_(e,t){e.forEach(n=>{try{t(n)}catch(r){He.catch(r)}})}var MA=Object.defineProperty,$A=(e,t)=>{for(var n in t)MA(e,n,{get:t[n],enumerable:!0})},cr={};$A(cr,{assign:()=>RA,colors:()=>ui,createStringInterpolator:()=>Sm,skipAnimation:()=>D_,to:()=>I_,willAdvance:()=>km});function Rh(){}var AA=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),fe={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Pr(e,t){if(fe.arr(e)){if(!fe.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var We=(e,t)=>e.forEach(t);function br(e,t,n){if(fe.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var wn=e=>fe.und(e)?[]:fe.arr(e)?e:[e];function ns(e,t){if(e.size){const n=Array.from(e);e.clear(),We(n,t)}}var Xo=(e,...t)=>ns(e,n=>n(...t)),Tm=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Sm,I_,ui=null,D_=!1,km=Rh,RA=e=>{e.to&&(I_=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(ui=e.colors),e.skipAnimation!=null&&(D_=e.skipAnimation),e.createStringInterpolator&&(Sm=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(km=e.willAdvance),e.frameLoop&&(He.frameLoop=e.frameLoop)},rs=new Set,zn=[],xf=[],Rl=0,Iu={get idle(){return!rs.size&&!zn.length},start(e){Rl>e.priority?(rs.add(e),He.onStart(jA)):(N_(e),He(jh))},advance:jh,sort(e){if(Rl)He.onFrame(()=>Iu.sort(e));else{const t=zn.indexOf(e);~t&&(zn.splice(t,1),L_(e))}},clear(){zn=[],rs.clear()}};function jA(){rs.forEach(N_),rs.clear(),He(jh)}function N_(e){zn.includes(e)||L_(e)}function L_(e){zn.splice(PA(zn,t=>t.priority>e.priority),0,e)}function jh(e){const t=xf;for(let n=0;n<zn.length;n++){const r=zn[n];Rl=r.priority,r.idle||(km(r),r.advance(e),r.idle||t.push(r))}return Rl=0,xf=zn,xf.length=0,zn=t,zn.length>0}function PA(e,t){const n=e.findIndex(t);return n<0?e.length:n}var IA=(e,t,n)=>Math.min(Math.max(n,e),t),DA={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ar="[-+]?\\d*\\.?\\d+",jl=ar+"%";function Du(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var NA=new RegExp("rgb"+Du(ar,ar,ar)),LA=new RegExp("rgba"+Du(ar,ar,ar,ar)),FA=new RegExp("hsl"+Du(ar,jl,jl)),BA=new RegExp("hsla"+Du(ar,jl,jl,ar)),UA=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,WA=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,zA=/^#([0-9a-fA-F]{6})$/,HA=/^#([0-9a-fA-F]{8})$/;function VA(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=zA.exec(e))?parseInt(t[1]+"ff",16)>>>0:ui&&ui[e]!==void 0?ui[e]:(t=NA.exec(e))?(wa(t[1])<<24|wa(t[2])<<16|wa(t[3])<<8|255)>>>0:(t=LA.exec(e))?(wa(t[1])<<24|wa(t[2])<<16|wa(t[3])<<8|$v(t[4]))>>>0:(t=UA.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=HA.exec(e))?parseInt(t[1],16)>>>0:(t=WA.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=FA.exec(e))?(Ov(Mv(t[1]),Pc(t[2]),Pc(t[3]))|255)>>>0:(t=BA.exec(e))?(Ov(Mv(t[1]),Pc(t[2]),Pc(t[3]))|$v(t[4]))>>>0:null}function _f(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ov(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=_f(i,r,e+1/3),o=_f(i,r,e),s=_f(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function wa(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Mv(e){return(parseFloat(e)%360+360)%360/360}function $v(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Pc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Av(e){let t=VA(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var Os=(e,t,n)=>{if(fe.fun(e))return e;if(fe.arr(e))return Os({range:e,output:t,extrapolate:n});if(fe.str(e.output[0]))return Sm(e);const r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const u=YA(l,a);return qA(l,a[u],a[u+1],i[u],i[u+1],c,o,s,r.map)}};function qA(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o==="identity")return l;o==="clamp"&&(l=t)}if(l>n){if(s==="identity")return l;s==="clamp"&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l=l-t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l=l+r:l=l*(i-r)+r,l)}function YA(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var GA=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return IA(0,1,i/e)},Pl=1.70158,Ic=Pl*1.525,Rv=Pl+1,jv=2*Math.PI/3,Pv=2*Math.PI/4.5,Dc=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,ZA={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Rv*e*e*e-Pl*e*e,easeOutBack:e=>1+Rv*Math.pow(e-1,3)+Pl*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Ic+1)*2*e-Ic)/2:(Math.pow(2*e-2,2)*((Ic+1)*(e*2-2)+Ic)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*jv),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*jv)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Pv))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Pv)/2+1,easeInBounce:e=>1-Dc(1-e),easeOutBounce:Dc,easeInOutBounce:e=>e<.5?(1-Dc(1-2*e))/2:(1+Dc(2*e-1))/2,steps:GA},Ms=Symbol.for("FluidValue.get"),Ka=Symbol.for("FluidValue.observers"),Wn=e=>!!(e&&e[Ms]),En=e=>e&&e[Ms]?e[Ms]():e,Iv=e=>e[Ka]||null;function KA(e,t){e.eventObserved?e.eventObserved(t):e(t)}function $s(e,t){const n=e[Ka];n&&n.forEach(r=>{KA(r,t)})}var F_=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");XA(this,e)}},XA=(e,t)=>B_(e,Ms,t);function co(e,t){if(e[Ms]){let n=e[Ka];n||B_(e,Ka,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function As(e,t){const n=e[Ka];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ka]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var B_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),rl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,QA=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Dv=new RegExp(`(${rl.source})(%|[a-z]+)`,"i"),JA=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Nu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,U_=e=>{const[t,n]=eR(e);if(!t||Tm())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&Nu.test(n))return U_(n);if(n)return n}return e},eR=e=>{const t=Nu.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},wf,tR=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,W_=e=>{wf||(wf=ui?new RegExp(`(${Object.keys(ui).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>En(a).replace(Nu,U_).replace(QA,Av).replace(wf,Av)),n=t.map(a=>a.match(rl).map(Number)),i=n[0].map((a,o)=>n.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(a=>Os({...e,output:a}));return a=>{var c;const o=!Dv.test(t[0])&&((c=t.find(l=>Dv.test(l)))==null?void 0:c.replace(rl,""));let s=0;return t[0].replace(rl,()=>`${i[s++](a)}${o||""}`).replace(JA,tR)}},Em="react-spring: ",z_=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Em}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},nR=z_(console.warn);function rR(){nR(`${Em}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var iR=z_(console.warn);function aR(){iR(`${Em}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Lu(e){return fe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Tm()&&Nu.test(e)||e in(ui||{}))}var Di=Tm()?m.useEffect:m.useLayoutEffect,oR=()=>{const e=m.useRef(!1);return Di(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Om(){const e=m.useState()[1],t=oR();return()=>{t.current&&e(Math.random())}}function sR(e,t){const[n]=m.useState(()=>({inputs:t,result:e()})),r=m.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&cR(t,a.inputs)||(a={inputs:t,result:e()}):a=n,m.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function cR(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Mm=e=>m.useEffect(e,lR),lR=[];function Ph(e){const t=m.useRef();return m.useEffect(()=>{t.current=e}),t.current}var Rs=Symbol.for("Animated:node"),uR=e=>!!e&&e[Rs]===e,fr=e=>e&&e[Rs],$m=(e,t)=>AA(e,Rs,t),Fu=e=>e&&e[Rs]&&e[Rs].getPayload(),H_=class{constructor(){$m(this,this)}getPayload(){return this.payload||[]}},sc=class extends H_{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,fe.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new sc(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return fe.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,fe.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},js=class extends sc{constructor(e){super(0),this._string=null,this._toString=Os({output:[e,e]})}static create(e){return new js(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(fe.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Os({output:[this.getValue(),e]})),this._value=0,super.reset()}},Il={dependencies:null},Bu=class extends H_{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return br(this.source,(n,r)=>{uR(n)?t[r]=n.getValue(e):Wn(n)?t[r]=En(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&We(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return br(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Il.dependencies&&Wn(e)&&Il.dependencies.add(e);const t=Fu(e);t&&We(t,n=>this.add(n))}},V_=class extends Bu{constructor(e){super(e)}static create(e){return new V_(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(dR)),!0)}};function dR(e){return(Lu(e)?js:sc).create(e)}function Ih(e){const t=fr(e);return t?t.constructor:fe.arr(e)?V_:Lu(e)?js:sc}var Nv=(e,t)=>{const n=!fe.fun(e)||e.prototype&&e.prototype.isReactComponent;return m.forwardRef((r,i)=>{const a=m.useRef(null),o=n&&m.useCallback(g=>{a.current=pR(i,g)},[i]),[s,c]=hR(r,t),l=Om(),u=()=>{const g=a.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,s.getValue(!0)):!1)===!1&&l()},d=new fR(u,c),f=m.useRef();Di(()=>(f.current=d,We(c,g=>co(g,d)),()=>{f.current&&(We(f.current.deps,g=>As(g,f.current)),He.cancel(f.current.update))})),m.useEffect(u,[]),Mm(()=>()=>{const g=f.current;We(g.deps,p=>As(p,g))});const h=t.getComponentProps(s.getValue());return ue.createElement(e,{...h,ref:o})})},fR=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function hR(e,t){const n=new Set;return Il.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Bu(e),Il.dependencies=null,[e,n]}function pR(e,t){return e&&(fe.fun(e)?e(t):e.current=t),t}var Lv=Symbol.for("AnimatedComponent"),mR=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Bu(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=o=>{const s=Fv(o)||"Anonymous";return fe.str(o)?o=a[o]||(a[o]=Nv(o,i)):o=o[Lv]||(o[Lv]=Nv(o,i)),o.displayName=`Animated(${s})`,o};return br(e,(o,s)=>{fe.arr(e)&&(s=Fv(o)),a[s]=a(o)}),{animated:a}},Fv=e=>fe.str(e)?e:e&&fe.str(e.displayName)?e.displayName:fe.fun(e)&&e.name||null;function On(e,...t){return fe.fun(e)?e(...t):e}var is=(e,t)=>e===!0||!!(t&&e&&(fe.fun(e)?e(t):wn(e).includes(t))),q_=(e,t)=>fe.obj(e)?t&&e[t]:e,Y_=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,gR=e=>e,Uu=(e,t=gR)=>{let n=vR;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);fe.und(a)||(r[i]=a)}return r},vR=["config","onProps","onStart","onChange","onPause","onResume","onRest"],yR={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function bR(e){const t={};let n=0;if(br(e,(r,i)=>{yR[i]||(t[i]=r,n++)}),n)return t}function Am(e){const t=bR(e);if(t){const n={to:t};return br(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ps(e){return e=En(e),fe.arr(e)?e.map(Ps):Lu(e)?cr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function G_(e){for(const t in e)return!0;return!1}function Dh(e){return fe.fun(e)||fe.arr(e)&&fe.obj(e[0])}function Nh(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Z_(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Rm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Lh={...Rm.default,mass:1,damping:1,easing:ZA.linear,clamp:!1},xR=class{constructor(){this.velocity=0,Object.assign(this,Lh)}};function _R(e,t,n){n&&(n={...n},Bv(n,t),t={...n,...t}),Bv(e,t),Object.assign(e,t);for(const o in Lh)e[o]==null&&(e[o]=Lh[o]);let{frequency:r,damping:i}=e;const{mass:a}=e;return fe.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function Bv(e,t){if(!fe.und(t.decay))e.duration=void 0;else{const n=!fe.und(t.tension)||!fe.und(t.friction);(n||!fe.und(t.frequency)||!fe.und(t.damping)||!fe.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Uv=[],wR=class{constructor(){this.changed=!1,this.values=Uv,this.toValues=null,this.fromValues=Uv,this.config=new xR,this.immediate=!1}};function K_(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=is(n.cancel??(r==null?void 0:r.cancel),t);if(u)h();else{fe.und(n.pause)||(i.paused=is(n.pause,t));let g=r==null?void 0:r.pause;g!==!0&&(g=i.paused||is(g,t)),c=On(n.delay||0,t),g?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-He.now()}function f(){c>0&&!cr.skipAnimation?(i.delayed=!0,l=He.setTimeout(h,c),i.pauseQueue.add(d),i.timeouts.add(l)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(g){s(g)}}})}var jm=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ia(e.get()):t.every(n=>n.noop)?X_(e.get()):nr(e.get(),t.every(n=>n.finished)),X_=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),nr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ia=e=>({value:e,cancelled:!0,finished:!1});function Q_(e,t,n,r){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const l=Uu(t,(v,w)=>w==="onRest"?void 0:v);let u,d;const f=new Promise((v,w)=>(u=v,d=w)),h=v=>{const w=i<=(n.cancelId||0)&&Ia(r)||i!==n.asyncId&&nr(r,!1);if(w)throw v.result=w,d(v),v},g=(v,w)=>{const _=new Wv,x=new zv;return(async()=>{if(cr.skipAnimation)throw Is(n),x.result=nr(r,!1),d(x),x;h(_);const S=fe.obj(v)?{...v}:{...w,to:v};S.parentId=i,br(l,(T,j)=>{fe.und(S[j])&&(S[j]=T)});const b=await r.start(S);return h(_),n.paused&&await new Promise(T=>{n.resumeQueue.add(T)}),b})()};let p;if(cr.skipAnimation)return Is(n),nr(r,!1);try{let v;fe.arr(e)?v=(async w=>{for(const _ of w)await g(_)})(e):v=Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([v.then(u),f]),p=nr(r.get(),!0,!1)}catch(v){if(v instanceof Wv)p=v.result;else if(v instanceof zv)p=v.result;else throw v}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return fe.fun(o)&&He.batchedUpdates(()=>{o(p,r,r.item)}),p})()}function Is(e,t){ns(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Wv=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},zv=class extends Error{constructor(){super("SkipAnimationSignal")}},Fh=e=>e instanceof Pm,CR=1,Pm=class extends F_{constructor(){super(...arguments),this.id=CR++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=fr(this);return e&&e.getValue()}to(...e){return cr.to(this,e)}interpolate(...e){return rR(),cr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){$s(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Iu.sort(this),$s(this,{type:"priority",parent:this,priority:e})}},ea=Symbol.for("SpringPhase"),J_=1,Bh=2,Uh=4,Cf=e=>(e[ea]&J_)>0,ei=e=>(e[ea]&Bh)>0,No=e=>(e[ea]&Uh)>0,Hv=(e,t)=>t?e[ea]|=Bh|J_:e[ea]&=~Bh,Vv=(e,t)=>t?e[ea]|=Uh:e[ea]&=~Uh,TR=class extends Pm{constructor(e,t){if(super(),this.animation=new wR,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!fe.und(e)||!fe.und(t)){const n=fe.obj(e)?{...e}:{...t,from:e};fe.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ei(this)||this._state.asyncTo)||No(this)}get goal(){return En(this.animation.to)}get velocity(){const e=fr(this);return e instanceof sc?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Cf(this)}get isAnimating(){return ei(this)}get isPaused(){return No(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,o=Fu(r.to);!o&&Wn(r.to)&&(i=wn(En(r.to))),r.values.forEach((l,u)=>{if(l.done)return;const d=l.constructor==js?1:o?o[u].lastPosition:i[u];let f=r.immediate,h=d;if(!f){if(h=l.lastPosition,a.tension<=0){l.done=!0;return}let g=l.elapsedTime+=e;const p=r.fromValues[u],v=l.v0!=null?l.v0:l.v0=fe.arr(a.velocity)?a.velocity[u]:a.velocity;let w;const _=a.precision||(p==d?.005:Math.min(1,Math.abs(d-p)*.001));if(fe.und(a.duration))if(a.decay){const x=a.decay===!0?.998:a.decay,S=Math.exp(-(1-x)*g);h=p+v/(1-x)*(1-S),f=Math.abs(l.lastPosition-h)<=_,w=v*S}else{w=l.lastVelocity==null?v:l.lastVelocity;const x=a.restVelocity||_/10,S=a.clamp?0:a.bounce,b=!fe.und(S),T=p==d?l.v0>0:p<d;let j,M=!1;const k=1,E=Math.ceil(e/k);for(let C=0;C<E&&(j=Math.abs(w)>x,!(!j&&(f=Math.abs(d-h)<=_,f)));++C){b&&(M=h==d||h>d==T,M&&(w=-w*S,h=d));const O=-a.tension*1e-6*(h-d),$=-a.friction*.001*w,A=(O+$)/a.mass;w=w+A*k,h=h+w*k}}else{let x=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,l.durationProgress>0&&(l.elapsedTime=a.duration*l.durationProgress,g=l.elapsedTime+=e)),x=(a.progress||0)+g/this._memoizedDuration,x=x>1?1:x<0?0:x,l.durationProgress=x),h=p+a.easing(x)*(d-p),w=(h-l.lastPosition)/e,f=x==1}l.lastVelocity=w,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?l.done=!0:t=!1,l.setValue(h,a.round)&&(n=!0)});const s=fr(this),c=s.getValue();if(t){const l=En(r.to);(c!==l||n)&&!a.decay?(s.setValue(l),this._onChange(l)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return He.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ei(this)){const{to:e,config:t}=this.animation;He.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return fe.und(e)?(n=this.queue||[],this.queue=[]):n=[fe.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>jm(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Is(this._state,e&&this._lastCallId),He.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=fe.obj(n)?n[t]:n,(n==null||Dh(n))&&(n=void 0),r=fe.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Cf(this)||(e.reverse&&([n,r]=[r,n]),r=En(r),fe.und(r)?fr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Uu(e,(o,s)=>/^on/.test(s)?q_(o,n):o)),Yv(this,e,"onProps"),Fo(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return K_(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{No(this)||(Vv(this,!0),Xo(a.pauseQueue),Fo(this,"onPause",nr(this,Lo(this,this.animation.to)),this))},resume:()=>{No(this)&&(Vv(this,!1),ei(this)&&this._resume(),Xo(a.resumeQueue),Fo(this,"onResume",nr(this,Lo(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const s=ew(e);if(s)return this._update(s,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ia(this));const r=!fe.und(e.to),i=!fe.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ia(this));const{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s;let{to:u=c,from:d=l}=e;i&&!r&&(!t.default||fe.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Pr(d,l);f&&(s.from=d),d=En(d);const h=!Pr(u,c);h&&this._focus(u);const g=Dh(t.to),{config:p}=s,{decay:v,velocity:w}=p;(r||i)&&(p.velocity=0),t.config&&!g&&_R(p,On(t.config,a),t.config!==o.config?On(o.config,a):void 0);let _=fr(this);if(!_||fe.und(u))return n(nr(this,!0));const x=fe.und(t.reset)?i&&!t.default:!fe.und(d)&&is(t.reset,a),S=x?d:this.get(),b=Ps(u),T=fe.num(b)||fe.arr(b)||Lu(b),j=!g&&(!T||is(o.immediate||t.immediate,a));if(h){const C=Ih(u);if(C!==_.constructor)if(j)_=this._set(b);else throw Error(`Cannot animate between ${_.constructor.name} and ${C.name}, as the "to" prop suggests`)}const M=_.constructor;let k=Wn(u),E=!1;if(!k){const C=x||!Cf(this)&&f;(h||C)&&(E=Pr(Ps(S),b),k=!E),(!Pr(s.immediate,j)&&!j||!Pr(p.decay,v)||!Pr(p.velocity,w))&&(k=!0)}if(E&&ei(this)&&(s.changed&&!x?k=!0:k||this._stop(c)),!g&&((k||Wn(c))&&(s.values=_.getPayload(),s.toValues=Wn(u)?null:M==js?[1]:wn(b)),s.immediate!=j&&(s.immediate=j,!j&&!x&&this._set(c)),k)){const{onRest:C}=s;We(kR,$=>Yv(this,t,$));const O=nr(this,Lo(this,c));Xo(this._pendingCalls,O),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var $;s.changed=!x,C==null||C(O,this),x?On(o.onRest,O):($=s.onStart)==null||$.call(s,O,this)})}x&&this._set(S),g?n(Q_(t.to,t,this._state,this)):k?this._start():ei(this)&&!h?this._pendingCalls.add(n):n(X_(S))}_focus(e){const t=this.animation;e!==t.to&&(Iv(this)&&this._detach(),t.to=e,Iv(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Wn(t)&&(co(t,this),Fh(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Wn(e)&&As(e,this)}_set(e,t=!0){const n=En(e);if(!fe.und(n)){const r=fr(this);if(!r||!Pr(n,r.getValue())){const i=Ih(n);!r||r.constructor!=i?$m(this,i.create(n)):r.setValue(n),r&&He.batchedUpdates(()=>{this._onChange(n,t)})}}return fr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Fo(this,"onStart",nr(this,Lo(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),On(this.animation.onChange,e,this)),On(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;fr(this).reset(En(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ei(this)||(Hv(this,!0),No(this)||this._resume())}_resume(){cr.skipAnimation?this.finish():Iu.start(this)}_stop(e,t){if(ei(this)){Hv(this,!1);const n=this.animation;We(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),$s(this,{type:"idle",parent:this});const r=t?Ia(this.get()):nr(this.get(),Lo(this,e??n.to));Xo(this._pendingCalls,r),n.changed&&(n.changed=!1,Fo(this,"onRest",r,this))}}};function Lo(e,t){const n=Ps(t),r=Ps(e.get());return Pr(r,n)}function ew(e,t=e.loop,n=e.to){const r=On(t);if(r){const i=r!==!0&&Am(r),a=(i||e).reverse,o=!i||i.reset;return Ds({...e,loop:t,default:!1,pause:void 0,to:!a||Dh(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Ds(e){const{to:t,from:n}=e=Am(e),r=new Set;return fe.obj(t)&&qv(t,r),fe.obj(n)&&qv(n,r),e.keys=r.size?Array.from(r):null,e}function SR(e){const t=Ds(e);return fe.und(t.default)&&(t.default=Uu(t)),t}function qv(e,t){br(e,(n,r)=>n!=null&&t.add(r))}var kR=["onStart","onRest","onChange","onPause","onResume"];function Yv(e,t,n){e.animation[n]=t[n]!==Y_(t,n)?q_(t[n],e.key):void 0}function Fo(e,t,...n){var r,i,a,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(a=e.defaultProps)[t])==null||o.call(a,...n)}var ER=["onStart","onChange","onRest"],OR=1,tw=class{constructor(e,t){this.id=OR++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];fe.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ds(e)),this}start(e){let{queue:t}=this;return e?t=wn(e).map(Ds):this.queue=[],this._flush?this._flush(this,t):(ow(this,t),Wh(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;We(wn(t),r=>n[r].stop(!!e))}else Is(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(fe.und(e))this.start({pause:!0});else{const t=this.springs;We(wn(e),n=>t[n].pause())}return this}resume(e){if(fe.und(e))this.start({pause:!1});else{const t=this.springs;We(wn(e),n=>t[n].resume())}return this}each(e){br(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,ns(e,([s,c])=>{c.value=this.get(),s(c,this,this._item)}));const a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&ns(t,([s,c])=>{c.value=o,s(c,this,this._item)}),a&&(this._started=!1,ns(n,([s,c])=>{c.value=o,s(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;He.onFrame(this._onFrame)}};function Wh(e,t){return Promise.all(t.map(n=>nw(e,n))).then(n=>jm(e,n))}async function nw(e,t,n){const{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=fe.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const u=fe.arr(i)||fe.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):We(ER,p=>{const v=t[p];if(fe.fun(v)){const w=e._events[p];t[p]=({finished:_,cancelled:x})=>{const S=w.get(v);S?(_||(S.finished=!1),x&&(S.cancelled=!0)):w.set(v,{value:null,finished:_||!1,cancelled:x||!1})},l&&(l[p]=t[p])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Xo(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),h=t.cancel===!0||Y_(t,"cancel")===!0;(u||h&&d.asyncId)&&f.push(K_(++e._lastAsyncId,{props:t,state:d,actions:{pause:Rh,resume:Rh,start(p,v){h?(Is(d,e._lastAsyncId),v(Ia(e))):(p.onRest=s,v(Q_(u,p,d,e)))}}})),d.paused&&await new Promise(p=>{d.resumeQueue.add(p)});const g=jm(e,await Promise.all(f));if(o&&g.finished&&!(n&&g.noop)){const p=ew(t,o,i);if(p)return ow(e,[p]),nw(e,p,!0)}return c&&He.batchedUpdates(()=>c(g,e,e.item)),g}function zh(e,t){const n={...e.springs};return t&&We(wn(t),r=>{fe.und(r.keys)&&(r=Ds(r)),fe.obj(r.to)||(r={...r,to:void 0}),aw(n,r,i=>iw(i))}),rw(e,n),n}function rw(e,t){br(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,co(n,e))})}function iw(e,t){const n=new TR;return n.key=e,t&&co(n,t),n}function aw(e,t,n){t.keys&&We(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ow(e,t){We(t,n=>{aw(e.springs,n,r=>iw(r,e))})}var cc=({children:e,...t})=>{const n=m.useContext(Dl),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=sR(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=Dl;return ue.createElement(a,{value:t},e)},Dl=MR(cc,{});cc.Provider=Dl.Provider;cc.Consumer=Dl.Consumer;function MR(e,t){return Object.assign(e,ue.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var sw=()=>{const e=[],t=function(r){aR();const i=[];return We(e,(a,o)=>{if(fe.und(r))i.push(a.start());else{const s=n(r,a,o);s&&i.push(a.start(s))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return We(e,r=>r.pause(...arguments)),this},t.resume=function(){return We(e,r=>r.resume(...arguments)),this},t.set=function(r){We(e,(i,a)=>{const o=fe.fun(r)?r(a,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return We(e,(a,o)=>{if(fe.und(r))i.push(a.start());else{const s=this._getProps(r,a,o);s&&i.push(a.start(s))}}),i},t.stop=function(){return We(e,r=>r.stop(...arguments)),this},t.update=function(r){return We(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return fe.fun(r)?r(a,i):r};return t._getProps=n,t};function $R(e,t,n){const r=fe.fun(t)&&t;r&&!n&&(n=[]);const i=m.useMemo(()=>r||arguments.length==3?sw():void 0,[]),a=m.useRef(0),o=Om(),s=m.useMemo(()=>({ctrls:[],queue:[],flush(w,_){const x=zh(w,_);return a.current>0&&!s.queue.length&&!Object.keys(x).some(b=>!w.springs[b])?Wh(w,_):new Promise(b=>{rw(w,x),s.queue.push(()=>{b(Wh(w,_))}),o()})}}),[]),c=m.useRef([...s.ctrls]),l=[],u=Ph(e)||0;m.useMemo(()=>{We(c.current.slice(e,u),w=>{Nh(w,i),w.stop(!0)}),c.current.length=e,d(u,e)},[e]),m.useMemo(()=>{d(0,Math.min(u,e))},n);function d(w,_){for(let x=w;x<_;x++){const S=c.current[x]||(c.current[x]=new tw(null,s.flush)),b=r?r(x,S):t[x];b&&(l[x]=SR(b))}}const f=c.current.map((w,_)=>zh(w,l[_])),h=m.useContext(cc),g=Ph(h),p=h!==g&&G_(h);Di(()=>{a.current++,s.ctrls=c.current;const{queue:w}=s;w.length&&(s.queue=[],We(w,_=>_())),We(c.current,(_,x)=>{i==null||i.add(_),p&&_.start({default:h});const S=l[x];S&&(Z_(_,S.ref),_.ref?_.queue.push(S):_.start(S))})}),Mm(()=>()=>{We(s.ctrls,w=>w.stop(!0))});const v=f.map(w=>({...w}));return i?[v,i]:v}function Sr(e,t){const n=fe.fun(e),[[r],i]=$R(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}function ca(e,t,n){const r=fe.fun(t)&&t,{reset:i,sort:a,trail:o=0,expires:s=!0,exitBeforeEnter:c=!1,onDestroyed:l,ref:u,config:d}=r?r():t,f=m.useMemo(()=>r||arguments.length==3?sw():void 0,[]),h=wn(e),g=[],p=m.useRef(null),v=i?null:p.current;Di(()=>{p.current=g}),Mm(()=>(We(g,A=>{f==null||f.add(A.ctrl),A.ctrl.ref=f}),()=>{We(p.current,A=>{A.expired&&clearTimeout(A.expirationId),Nh(A.ctrl,f),A.ctrl.stop(!0)})}));const w=RR(h,r?r():t,v),_=i&&p.current||[];Di(()=>We(_,({ctrl:A,item:P,key:D})=>{Nh(A,f),On(l,P,D)}));const x=[];if(v&&We(v,(A,P)=>{A.expired?(clearTimeout(A.expirationId),_.push(A)):(P=x[P]=w.indexOf(A.key),~P&&(g[P]=A))}),We(h,(A,P)=>{g[P]||(g[P]={key:w[P],item:A,phase:"mount",ctrl:new tw},g[P].ctrl.item=A)}),x.length){let A=-1;const{leave:P}=r?r():t;We(x,(D,N)=>{const q=v[N];~D?(A=g.indexOf(q),g[A]={...q,item:h[D]}):P&&g.splice(++A,0,q)})}fe.fun(a)&&g.sort((A,P)=>a(A.item,P.item));let S=-o;const b=Om(),T=Uu(t),j=new Map,M=m.useRef(new Map),k=m.useRef(!1);We(g,(A,P)=>{const D=A.key,N=A.phase,q=r?r():t;let z,U;const G=On(q.delay||0,D);if(N=="mount")z=q.enter,U="enter";else{const J=w.indexOf(D)<0;if(N!="leave")if(J)z=q.leave,U="leave";else if(z=q.update)U="update";else return;else if(!J)z=q.enter,U="enter";else return}if(z=On(z,A.item,P),z=fe.obj(z)?Am(z):{to:z},!z.config){const J=d||T.config;z.config=On(J,A.item,P,U)}S+=o;const ne={...T,delay:G+S,ref:u,immediate:q.immediate,reset:!1,...z};if(U=="enter"&&fe.und(ne.from)){const J=r?r():t,Q=fe.und(J.initial)||v?J.from:J.initial;ne.from=On(Q,A.item,P)}const{onResolve:te}=ne;ne.onResolve=J=>{On(te,J);const Q=p.current,re=Q.find(F=>F.key===D);if(re&&!(J.cancelled&&re.phase!="update")&&re.ctrl.idle){const F=Q.every(I=>I.ctrl.idle);if(re.phase=="leave"){const I=On(s,re.item);if(I!==!1){const L=I===!0?0:I;if(re.expired=!0,!F&&L>0){L<=2147483647&&(re.expirationId=setTimeout(b,L));return}}}F&&Q.some(I=>I.expired)&&(M.current.delete(re),c&&(k.current=!0),b())}};const X=zh(A.ctrl,ne);U==="leave"&&c?M.current.set(A,{phase:U,springs:X,payload:ne}):j.set(A,{phase:U,springs:X,payload:ne})});const E=m.useContext(cc),C=Ph(E),O=E!==C&&G_(E);Di(()=>{O&&We(g,A=>{A.ctrl.start({default:E})})},[E]),We(j,(A,P)=>{if(M.current.size){const D=g.findIndex(N=>N.key===P.key);g.splice(D,1)}}),Di(()=>{We(M.current.size?M.current:j,({phase:A,payload:P},D)=>{const{ctrl:N}=D;D.phase=A,f==null||f.add(N),O&&A=="enter"&&N.start({default:E}),P&&(Z_(N,P.ref),(N.ref||f)&&!k.current?N.update(P):(N.start(P),k.current&&(k.current=!1)))})},i?void 0:n);const $=A=>ue.createElement(ue.Fragment,null,g.map((P,D)=>{const{springs:N}=j.get(P)||P.ctrl,q=A({...N},P.item,P,D);return q&&q.type?ue.createElement(q.type,{...q.props,key:fe.str(P.key)||fe.num(P.key)?P.key:P.ctrl.id,ref:q.ref}):q}));return f?[$,f]:$}var AR=1;function RR(e,{key:t,keys:n=t},r){if(n===null){const i=new Set;return e.map(a=>{const o=r&&r.find(s=>s.item===a&&s.phase!=="leave"&&!i.has(s));return o?(i.add(o),o.key):AR++})}return fe.und(n)?e:fe.fun(n)?e.map(n):wn(n)}var cw=class extends Pm{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Os(...t);const n=this._get(),r=Ih(n);$m(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Pr(t,n)||(fr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Gv(this._active)&&Tf(this)}_get(){const e=fe.arr(this.source)?this.source.map(En):wn(En(this.source));return this.calc(...e)}_start(){this.idle&&!Gv(this._active)&&(this.idle=!1,We(Fu(this),e=>{e.done=!1}),cr.skipAnimation?(He.batchedUpdates(()=>this.advance()),Tf(this)):Iu.start(this))}_attach(){let e=1;We(wn(this.source),t=>{Wn(t)&&co(t,this),Fh(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){We(wn(this.source),e=>{Wn(e)&&As(e,this)}),this._active.clear(),Tf(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=wn(this.source).reduce((t,n)=>Math.max(t,(Fh(n)?n.priority:0)+1),0))}};function jR(e){return e.idle!==!1}function Gv(e){return!e.size||Array.from(e).every(jR)}function Tf(e){e.idle||(e.idle=!0,We(Fu(e),t=>{t.done=!0}),$s(e,{type:"idle",parent:e}))}var vi=(e,...t)=>new cw(e,t);cr.assign({createStringInterpolator:W_,to:(e,t)=>new cw(e,t)});var lw=/^--/;function PR(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!lw.test(e)&&!(as.hasOwnProperty(e)&&as[e])?t+"px":(""+t).trim()}var Zv={};function IR(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(f=>n||e.hasAttribute(f)?f:Zv[f]||(Zv[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase())));a!==void 0&&(e.textContent=a);for(const f in i)if(i.hasOwnProperty(f)){const h=PR(f,i[f]);lw.test(f)?e.style.setProperty(f,h):e.style[f]=h}d.forEach((f,h)=>{e.setAttribute(f,u[h])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),c!==void 0&&e.setAttribute("viewBox",c)}var as={animationIterationCount:!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,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},DR=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),NR=["Webkit","Ms","Moz","O"];as=Object.keys(as).reduce((e,t)=>(NR.forEach(n=>e[DR(n,t)]=e[t]),e),as);var LR=/^(matrix|translate|scale|rotate|skew)/,FR=/^(translate)/,BR=/^(rotate|skew)/,Sf=(e,t)=>fe.num(e)&&e!==0?e+t:e,il=(e,t)=>fe.arr(e)?e.every(n=>il(n,t)):fe.num(e)?e===t:parseFloat(e)===t,UR=class extends Bu{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(o=>[`translate3d(${o.map(s=>Sf(s,"px")).join(",")})`,il(o,0)])),br(r,(o,s)=>{if(s==="transform")i.push([o||""]),a.push(c=>[c,c===""]);else if(LR.test(s)){if(delete r[s],fe.und(o))return;const c=FR.test(s)?"px":BR.test(s)?"deg":"";i.push(wn(o)),a.push(s==="rotate3d"?([l,u,d,f])=>[`rotate3d(${l},${u},${d},${Sf(f,c)})`,il(f,0)]:l=>[`${s}(${l.map(u=>Sf(u,c)).join(",")})`,il(l,s.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new WR(i,a)),super(r)}},WR=class extends F_{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return We(this.inputs,(n,r)=>{const i=En(n[0]),[a,o]=this.transforms[r](fe.arr(i)?i:n.map(En));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&We(this.inputs,t=>We(t,n=>Wn(n)&&co(n,this)))}observerRemoved(e){e==0&&We(this.inputs,t=>We(t,n=>Wn(n)&&As(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),$s(this,e)}},zR=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];cr.assign({batchedUpdates:oi.unstable_batchedUpdates,createStringInterpolator:W_,colors:DA});var HR=mR(zR,{applyAnimatedValues:IR,createAnimatedStyle:e=>new UR(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Ct=HR.animated;function ta(){return ta=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},ta.apply(this,arguments)}var VR={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},Kv=function(e,t){return"translate("+e+"px, "+t+"px)"},uw=m.memo(function(e){var t,n=e.position,r=e.anchor,i=e.children,a=Tt(),o=kn(),s=o.animate,c=o.config,l=g3(),u=l[0],d=l[1],f=m.useRef(!1),h=void 0,g=!1,p=d.width>0&&d.height>0,v=Math.round(n[0]),w=Math.round(n[1]);p&&(r==="top"?(v-=d.width/2,w-=d.height+14):r==="right"?(v+=14,w-=d.height/2):r==="bottom"?(v-=d.width/2,w+=14):r==="left"?(v-=d.width+14,w-=d.height/2):r==="center"&&(v-=d.width/2,w-=d.height/2),h={transform:Kv(v,w)},f.current||(g=!0),f.current=[v,w]);var _=Sr({to:h,config:c,immediate:!s||g}),x=ta({},VR,a.tooltip.wrapper,{transform:(t=_.transform)!=null?t:Kv(v,w),opacity:_.transform?1:0});return y.jsx(Ct.div,{ref:u,style:x,children:i})});uw.displayName="TooltipWrapper";var dw=m.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return y.jsx("span",{style:ta({display:"block",width:n,height:n,background:r},i===void 0?{}:i)})}),Im=m.memo(function(e){var t,n=e.id,r=e.value,i=e.format,a=e.enableChip,o=a!==void 0&&a,s=e.color,c=e.renderContent,l=Tt(),u=eo(i);if(typeof c=="function")t=c();else{var d=r;u!==void 0&&d!==void 0&&(d=u(d)),t=y.jsxs("div",{style:l.tooltip.basic,children:[o&&y.jsx(dw,{color:s,style:l.tooltip.chip}),d!==void 0?y.jsxs("span",{children:[n,": ",y.jsx("strong",{children:""+d})]}):n]})}return y.jsx("div",{style:l.tooltip.container,children:t})}),qR={width:"100%",borderCollapse:"collapse"},fw=m.memo(function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,a=e.renderContent,o=Tt();return i.length?(t=typeof a=="function"?a():y.jsxs("div",{children:[n&&n,y.jsx("table",{style:ta({},qR,o.tooltip.table),children:y.jsx("tbody",{children:i.map(function(s,c){return y.jsx("tr",{children:s.map(function(l,u){return y.jsx("td",{style:o.tooltip.tableCell,children:l},u)})},c)})})})]}),y.jsx("div",{style:o.tooltip.container,children:t})):null});fw.displayName="TableTooltip";var Hh=m.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,a=Tt(),o=kn(),s=o.animate,c=o.config,l=m.useMemo(function(){return ta({},a.crosshair.line,{pointerEvents:"none"})},[a.crosshair.line]),u=Sr({x1:t,x2:n,y1:r,y2:i,config:c,immediate:!s});return y.jsx(Ct.line,ta({},u,{fill:"none",style:l}))});Hh.displayName="CrosshairLine";var Vh=m.memo(function(e){var t,n,r=e.width,i=e.height,a=e.type,o=e.x,s=e.y;return a==="cross"?(t={x0:o,x1:o,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):a==="top-left"?(t={x0:o,x1:o,y0:0,y1:s},n={x0:0,x1:o,y0:s,y1:s}):a==="top"?t={x0:o,x1:o,y0:0,y1:s}:a==="top-right"?(t={x0:o,x1:o,y0:0,y1:s},n={x0:o,x1:r,y0:s,y1:s}):a==="right"?n={x0:o,x1:r,y0:s,y1:s}:a==="bottom-right"?(t={x0:o,x1:o,y0:s,y1:i},n={x0:o,x1:r,y0:s,y1:s}):a==="bottom"?t={x0:o,x1:o,y0:s,y1:i}:a==="bottom-left"?(t={x0:o,x1:o,y0:s,y1:i},n={x0:0,x1:o,y0:s,y1:s}):a==="left"?n={x0:0,x1:o,y0:s,y1:s}:a==="x"?t={x0:o,x1:o,y0:0,y1:i}:a==="y"&&(n={x0:0,x1:r,y0:s,y1:s}),y.jsxs(y.Fragment,{children:[t&&y.jsx(Hh,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&y.jsx(Hh,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});Vh.displayName="Crosshair";var hw=m.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),qh={isVisible:!1,position:[null,null],content:null,anchor:null},pw=m.createContext(qh),YR=function(e){var t=m.useState(qh),n=t[0],r=t[1],i=m.useCallback(function(s,c,l){var u=c[0],d=c[1];l===void 0&&(l="top"),r({isVisible:!0,position:[u,d],anchor:l,content:s})},[r]),a=m.useCallback(function(s,c,l){l===void 0&&(l="top");var u=e.current.getBoundingClientRect(),d=e.current.offsetWidth,f=d===u.width?1:d/u.width,h="touches"in c?c.touches[0]:c,g=h.clientX,p=h.clientY,v=(g-u.left)*f,w=(p-u.top)*f;l!=="left"&&l!=="right"||(l=v<u.width/2?"right":"left"),r({isVisible:!0,position:[v,w],anchor:l,content:s})},[e,r]),o=m.useCallback(function(){r(qh)},[r]);return{actions:m.useMemo(function(){return{showTooltipAt:i,showTooltipFromEvent:a,hideTooltip:o}},[i,a,o]),state:n}},la=function(){var e=m.useContext(hw);if(e===void 0)throw new Error("useTooltip must be used within a TooltipProvider");return e},GR=function(){var e=m.useContext(pw);if(e===void 0)throw new Error("useTooltipState must be used within a TooltipProvider");return e},ZR=function(e){return e.isVisible},KR=function(){var e=GR();return ZR(e)?y.jsx(uw,{position:e.position,anchor:e.anchor,children:e.content}):null},XR=function(e){var t=e.container,n=e.children,r=YR(t),i=r.actions,a=r.state;return y.jsx(hw.Provider,{value:i,children:y.jsx(pw.Provider,{value:a,children:n})})};function QR(){this.__data__=[],this.size=0}var JR=QR;function e9(e,t){return e===t||e!==e&&t!==t}var lc=e9,t9=lc;function n9(e,t){for(var n=e.length;n--;)if(t9(e[n][0],t))return n;return-1}var Wu=n9,r9=Wu,i9=Array.prototype,a9=i9.splice;function o9(e){var t=this.__data__,n=r9(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():a9.call(t,n,1),--this.size,!0}var s9=o9,c9=Wu;function l9(e){var t=this.__data__,n=c9(t,e);return n<0?void 0:t[n][1]}var u9=l9,d9=Wu;function f9(e){return d9(this.__data__,e)>-1}var h9=f9,p9=Wu;function m9(e,t){var n=this.__data__,r=p9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var g9=m9,v9=JR,y9=s9,b9=u9,x9=h9,_9=g9;function lo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lo.prototype.clear=v9;lo.prototype.delete=y9;lo.prototype.get=b9;lo.prototype.has=x9;lo.prototype.set=_9;var zu=lo,w9=zu;function C9(){this.__data__=new w9,this.size=0}var T9=C9;function S9(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var k9=S9;function E9(e){return this.__data__.get(e)}var O9=E9;function M9(e){return this.__data__.has(e)}var $9=M9,A9=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,mw=A9,R9=mw,j9=typeof self=="object"&&self&&self.Object===Object&&self,P9=R9||j9||Function("return this")(),kr=P9,I9=kr,D9=I9.Symbol,uo=D9,Xv=uo,gw=Object.prototype,N9=gw.hasOwnProperty,L9=gw.toString,Bo=Xv?Xv.toStringTag:void 0;function F9(e){var t=N9.call(e,Bo),n=e[Bo];try{e[Bo]=void 0;var r=!0}catch{}var i=L9.call(e);return r&&(t?e[Bo]=n:delete e[Bo]),i}var B9=F9,U9=Object.prototype,W9=U9.toString;function z9(e){return W9.call(e)}var H9=z9,Qv=uo,V9=B9,q9=H9,Y9="[object Null]",G9="[object Undefined]",Jv=Qv?Qv.toStringTag:void 0;function Z9(e){return e==null?e===void 0?G9:Y9:Jv&&Jv in Object(e)?V9(e):q9(e)}var Gr=Z9;function K9(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Er=K9,X9=Gr,Q9=Er,J9="[object AsyncFunction]",ej="[object Function]",tj="[object GeneratorFunction]",nj="[object Proxy]";function rj(e){if(!Q9(e))return!1;var t=X9(e);return t==ej||t==tj||t==J9||t==nj}var Hu=rj;const Dm=Ht(Hu);var ij=kr,aj=ij["__core-js_shared__"],oj=aj,kf=oj,e1=function(){var e=/[^.]+$/.exec(kf&&kf.keys&&kf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function sj(e){return!!e1&&e1 in e}var cj=sj,lj=Function.prototype,uj=lj.toString;function dj(e){if(e!=null){try{return uj.call(e)}catch{}try{return e+""}catch{}}return""}var vw=dj,fj=Hu,hj=cj,pj=Er,mj=vw,gj=/[\\^$.*+?()[\]{}|]/g,vj=/^\[object .+?Constructor\]$/,yj=Function.prototype,bj=Object.prototype,xj=yj.toString,_j=bj.hasOwnProperty,wj=RegExp("^"+xj.call(_j).replace(gj,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Cj(e){if(!pj(e)||hj(e))return!1;var t=fj(e)?wj:vj;return t.test(mj(e))}var Tj=Cj;function Sj(e,t){return e==null?void 0:e[t]}var kj=Sj,Ej=Tj,Oj=kj;function Mj(e,t){var n=Oj(e,t);return Ej(n)?n:void 0}var ua=Mj,$j=ua,Aj=kr,Rj=$j(Aj,"Map"),Nm=Rj,jj=ua,Pj=jj(Object,"create"),Vu=Pj,t1=Vu;function Ij(){this.__data__=t1?t1(null):{},this.size=0}var Dj=Ij;function Nj(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Lj=Nj,Fj=Vu,Bj="__lodash_hash_undefined__",Uj=Object.prototype,Wj=Uj.hasOwnProperty;function zj(e){var t=this.__data__;if(Fj){var n=t[e];return n===Bj?void 0:n}return Wj.call(t,e)?t[e]:void 0}var Hj=zj,Vj=Vu,qj=Object.prototype,Yj=qj.hasOwnProperty;function Gj(e){var t=this.__data__;return Vj?t[e]!==void 0:Yj.call(t,e)}var Zj=Gj,Kj=Vu,Xj="__lodash_hash_undefined__";function Qj(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Kj&&t===void 0?Xj:t,this}var Jj=Qj,eP=Dj,tP=Lj,nP=Hj,rP=Zj,iP=Jj;function fo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fo.prototype.clear=eP;fo.prototype.delete=tP;fo.prototype.get=nP;fo.prototype.has=rP;fo.prototype.set=iP;var aP=fo,n1=aP,oP=zu,sP=Nm;function cP(){this.size=0,this.__data__={hash:new n1,map:new(sP||oP),string:new n1}}var lP=cP;function uP(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var dP=uP,fP=dP;function hP(e,t){var n=e.__data__;return fP(t)?n[typeof t=="string"?"string":"hash"]:n.map}var qu=hP,pP=qu;function mP(e){var t=pP(this,e).delete(e);return this.size-=t?1:0,t}var gP=mP,vP=qu;function yP(e){return vP(this,e).get(e)}var bP=yP,xP=qu;function _P(e){return xP(this,e).has(e)}var wP=_P,CP=qu;function TP(e,t){var n=CP(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var SP=TP,kP=lP,EP=gP,OP=bP,MP=wP,$P=SP;function ho(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ho.prototype.clear=kP;ho.prototype.delete=EP;ho.prototype.get=OP;ho.prototype.has=MP;ho.prototype.set=$P;var Lm=ho,AP=zu,RP=Nm,jP=Lm,PP=200;function IP(e,t){var n=this.__data__;if(n instanceof AP){var r=n.__data__;if(!RP||r.length<PP-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new jP(r)}return n.set(e,t),this.size=n.size,this}var DP=IP,NP=zu,LP=T9,FP=k9,BP=O9,UP=$9,WP=DP;function po(e){var t=this.__data__=new NP(e);this.size=t.size}po.prototype.clear=LP;po.prototype.delete=FP;po.prototype.get=BP;po.prototype.has=UP;po.prototype.set=WP;var Yu=po,zP=ua,HP=function(){try{var e=zP(Object,"defineProperty");return e({},"",{}),e}catch{}}(),yw=HP,r1=yw;function VP(e,t,n){t=="__proto__"&&r1?r1(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Fm=VP,qP=Fm,YP=lc;function GP(e,t,n){(n!==void 0&&!YP(e[t],n)||n===void 0&&!(t in e))&&qP(e,t,n)}var bw=GP;function ZP(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var KP=ZP,XP=KP,QP=XP(),xw=QP,Nl={exports:{}};Nl.exports;(function(e,t){var n=kr,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function c(l,u){if(u)return l.slice();var d=l.length,f=s?s(d):new l.constructor(d);return l.copy(f),f}e.exports=c})(Nl,Nl.exports);var _w=Nl.exports,JP=kr,eI=JP.Uint8Array,ww=eI,i1=ww;function tI(e){var t=new e.constructor(e.byteLength);return new i1(t).set(new i1(e)),t}var Bm=tI,nI=Bm;function rI(e,t){var n=t?nI(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Cw=rI;function iI(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Tw=iI,aI=Er,a1=Object.create,oI=function(){function e(){}return function(t){if(!aI(t))return{};if(a1)return a1(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),sI=oI;function cI(e,t){return function(n){return e(t(n))}}var Sw=cI,lI=Sw,uI=lI(Object.getPrototypeOf,Object),Um=uI,dI=Object.prototype;function fI(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||dI;return e===n}var Wm=fI,hI=sI,pI=Um,mI=Wm;function gI(e){return typeof e.constructor=="function"&&!mI(e)?hI(pI(e)):{}}var kw=gI;function vI(e){return e!=null&&typeof e=="object"}var Qn=vI,yI=Gr,bI=Qn,xI="[object Arguments]";function _I(e){return bI(e)&&yI(e)==xI}var wI=_I,o1=wI,CI=Qn,Ew=Object.prototype,TI=Ew.hasOwnProperty,SI=Ew.propertyIsEnumerable,kI=o1(function(){return arguments}())?o1:function(e){return CI(e)&&TI.call(e,"callee")&&!SI.call(e,"callee")},Gu=kI,EI=Array.isArray,Pn=EI,OI=9007199254740991;function MI(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=OI}var zm=MI,$I=Hu,AI=zm;function RI(e){return e!=null&&AI(e.length)&&!$I(e)}var mo=RI,jI=mo,PI=Qn;function II(e){return PI(e)&&jI(e)}var Ow=II,Ll={exports:{}};function DI(){return!1}var NI=DI;Ll.exports;(function(e,t){var n=kr,r=NI,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,c=s?s.isBuffer:void 0,l=c||r;e.exports=l})(Ll,Ll.exports);var Zu=Ll.exports,LI=Gr,FI=Um,BI=Qn,UI="[object Object]",WI=Function.prototype,zI=Object.prototype,Mw=WI.toString,HI=zI.hasOwnProperty,VI=Mw.call(Object);function qI(e){if(!BI(e)||LI(e)!=UI)return!1;var t=FI(e);if(t===null)return!0;var n=HI.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Mw.call(n)==VI}var Hm=qI;const Vm=Ht(Hm);var YI=Gr,GI=zm,ZI=Qn,KI="[object Arguments]",XI="[object Array]",QI="[object Boolean]",JI="[object Date]",eD="[object Error]",tD="[object Function]",nD="[object Map]",rD="[object Number]",iD="[object Object]",aD="[object RegExp]",oD="[object Set]",sD="[object String]",cD="[object WeakMap]",lD="[object ArrayBuffer]",uD="[object DataView]",dD="[object Float32Array]",fD="[object Float64Array]",hD="[object Int8Array]",pD="[object Int16Array]",mD="[object Int32Array]",gD="[object Uint8Array]",vD="[object Uint8ClampedArray]",yD="[object Uint16Array]",bD="[object Uint32Array]",Ft={};Ft[dD]=Ft[fD]=Ft[hD]=Ft[pD]=Ft[mD]=Ft[gD]=Ft[vD]=Ft[yD]=Ft[bD]=!0;Ft[KI]=Ft[XI]=Ft[lD]=Ft[QI]=Ft[uD]=Ft[JI]=Ft[eD]=Ft[tD]=Ft[nD]=Ft[rD]=Ft[iD]=Ft[aD]=Ft[oD]=Ft[sD]=Ft[cD]=!1;function xD(e){return ZI(e)&&GI(e.length)&&!!Ft[YI(e)]}var _D=xD;function wD(e){return function(t){return e(t)}}var go=wD,Fl={exports:{}};Fl.exports;(function(e,t){var n=mw,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Fl,Fl.exports);var Ku=Fl.exports,CD=_D,TD=go,s1=Ku,c1=s1&&s1.isTypedArray,SD=c1?TD(c1):CD,qm=SD;function kD(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var $w=kD,ED=Fm,OD=lc,MD=Object.prototype,$D=MD.hasOwnProperty;function AD(e,t,n){var r=e[t];(!($D.call(e,t)&&OD(r,n))||n===void 0&&!(t in e))&&ED(e,t,n)}var Ym=AD,RD=Ym,jD=Fm;function PD(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?jD(n,s,c):RD(n,s,c)}return n}var vo=PD;function ID(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var DD=ID,ND=9007199254740991,LD=/^(?:0|[1-9]\d*)$/;function FD(e,t){var n=typeof e;return t=t??ND,!!t&&(n=="number"||n!="symbol"&&LD.test(e))&&e>-1&&e%1==0&&e<t}var Xu=FD,BD=DD,UD=Gu,WD=Pn,zD=Zu,HD=Xu,VD=qm,qD=Object.prototype,YD=qD.hasOwnProperty;function GD(e,t){var n=WD(e),r=!n&&UD(e),i=!n&&!r&&zD(e),a=!n&&!r&&!i&&VD(e),o=n||r||i||a,s=o?BD(e.length,String):[],c=s.length;for(var l in e)(t||YD.call(e,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||HD(l,c)))&&s.push(l);return s}var Aw=GD;function ZD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var KD=ZD,XD=Er,QD=Wm,JD=KD,eN=Object.prototype,tN=eN.hasOwnProperty;function nN(e){if(!XD(e))return JD(e);var t=QD(e),n=[];for(var r in e)r=="constructor"&&(t||!tN.call(e,r))||n.push(r);return n}var rN=nN,iN=Aw,aN=rN,oN=mo;function sN(e){return oN(e)?iN(e,!0):aN(e)}var uc=sN,cN=vo,lN=uc;function uN(e){return cN(e,lN(e))}var dN=uN,l1=bw,fN=_w,hN=Cw,pN=Tw,mN=kw,u1=Gu,d1=Pn,gN=Ow,vN=Zu,yN=Hu,bN=Er,xN=Hm,_N=qm,f1=$w,wN=dN;function CN(e,t,n,r,i,a,o){var s=f1(e,n),c=f1(t,n),l=o.get(c);if(l){l1(e,n,l);return}var u=a?a(s,c,n+"",e,t,o):void 0,d=u===void 0;if(d){var f=d1(c),h=!f&&vN(c),g=!f&&!h&&_N(c);u=c,f||h||g?d1(s)?u=s:gN(s)?u=pN(s):h?(d=!1,u=fN(c,!0)):g?(d=!1,u=hN(c,!0)):u=[]:xN(c)||u1(c)?(u=s,u1(s)?u=wN(s):(!bN(s)||yN(s))&&(u=mN(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),l1(e,n,u)}var TN=CN,SN=Yu,kN=bw,EN=xw,ON=TN,MN=Er,$N=uc,AN=$w;function Rw(e,t,n,r,i){e!==t&&EN(t,function(a,o){if(i||(i=new SN),MN(a))ON(e,t,o,n,Rw,r,i);else{var s=r?r(AN(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),kN(e,o,s)}},$N)}var RN=Rw;function jN(e){return e}var Qu=jN;function PN(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var IN=PN,DN=IN,h1=Math.max;function NN(e,t,n){return t=h1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=h1(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),DN(e,this,s)}}var jw=NN;function LN(e){return function(){return e}}var FN=LN,BN=FN,p1=yw,UN=Qu,WN=p1?function(e,t){return p1(e,"toString",{configurable:!0,enumerable:!1,value:BN(t),writable:!0})}:UN,zN=WN,HN=800,VN=16,qN=Date.now;function YN(e){var t=0,n=0;return function(){var r=qN(),i=VN-(r-n);if(n=r,i>0){if(++t>=HN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var GN=YN,ZN=zN,KN=GN,XN=KN(ZN),Pw=XN,QN=Qu,JN=jw,eL=Pw;function tL(e,t){return eL(JN(e,t,QN),e+"")}var Gm=tL,nL=lc,rL=mo,iL=Xu,aL=Er;function oL(e,t,n){if(!aL(n))return!1;var r=typeof t;return(r=="number"?rL(n)&&iL(t,n.length):r=="string"&&t in n)?nL(n[t],e):!1}var Iw=oL,sL=Gm,cL=Iw;function lL(e){return sL(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&cL(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var uL=lL,dL=RN,fL=uL,hL=fL(function(e,t,n){dL(e,t,n)}),pL=hL;const mL=Ht(pL);var gL=Gr,vL=Qn,yL="[object Symbol]";function bL(e){return typeof e=="symbol"||vL(e)&&gL(e)==yL}var Ju=bL,xL=Pn,_L=Ju,wL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,CL=/^\w*$/;function TL(e,t){if(xL(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||_L(e)?!0:CL.test(e)||!wL.test(e)||t!=null&&e in Object(t)}var Zm=TL,Dw=Lm,SL="Expected a function";function Km(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(SL);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Km.Cache||Dw),n}Km.Cache=Dw;var kL=Km,EL=kL,OL=500;function ML(e){var t=EL(e,function(r){return n.size===OL&&n.clear(),r}),n=t.cache;return t}var $L=ML,AL=$L,RL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jL=/\\(\\)?/g,PL=AL(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(RL,function(n,r,i,a){t.push(i?a.replace(jL,"$1"):r||n)}),t}),IL=PL;function DL(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var ed=DL,m1=uo,NL=ed,LL=Pn,FL=Ju,BL=1/0,g1=m1?m1.prototype:void 0,v1=g1?g1.toString:void 0;function Nw(e){if(typeof e=="string")return e;if(LL(e))return NL(e,Nw)+"";if(FL(e))return v1?v1.call(e):"";var t=e+"";return t=="0"&&1/e==-BL?"-0":t}var UL=Nw,WL=UL;function zL(e){return e==null?"":WL(e)}var Lw=zL,HL=Pn,VL=Zm,qL=IL,YL=Lw;function GL(e,t){return HL(e)?e:VL(e,t)?[e]:qL(YL(e))}var yo=GL,ZL=Ju,KL=1/0;function XL(e){if(typeof e=="string"||ZL(e))return e;var t=e+"";return t=="0"&&1/e==-KL?"-0":t}var bo=XL,QL=yo,JL=bo;function eF(e,t){t=QL(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[JL(t[n++])];return n&&n==r?e:void 0}var dc=eF,tF=dc;function nF(e,t,n){var r=e==null?void 0:tF(e,t);return r===void 0?n:r}var Fw=nF;const xr=Ht(Fw);var rF=Ym,iF=yo,aF=Xu,y1=Er,oF=bo;function sF(e,t,n,r){if(!y1(e))return e;t=iF(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=oF(t[i]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=y1(u)?u:aF(t[i+1])?[]:{})}rF(s,c,l),s=s[c]}return e}var Bw=sF,cF=Bw;function lF(e,t,n){return e==null?e:cF(e,t,n)}var uF=lF;const Qo=Ht(uF);function td(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function xo(){}var na=.7,Xa=1/na,Da="\\s*([+-]?\\d+)\\s*",Ns="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dF=/^#([0-9a-f]{3,8})$/,fF=new RegExp(`^rgb\\(${Da},${Da},${Da}\\)$`),hF=new RegExp(`^rgb\\(${gr},${gr},${gr}\\)$`),pF=new RegExp(`^rgba\\(${Da},${Da},${Da},${Ns}\\)$`),mF=new RegExp(`^rgba\\(${gr},${gr},${gr},${Ns}\\)$`),gF=new RegExp(`^hsl\\(${Ns},${gr},${gr}\\)$`),vF=new RegExp(`^hsla\\(${Ns},${gr},${gr},${Ns}\\)$`),b1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};td(xo,Ls,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:x1,formatHex:x1,formatHex8:yF,formatHsl:bF,formatRgb:_1,toString:_1});function x1(){return this.rgb().formatHex()}function yF(){return this.rgb().formatHex8()}function bF(){return Ww(this).formatHsl()}function _1(){return this.rgb().formatRgb()}function Ls(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=dF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?w1(t):n===3?new vn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=fF.exec(e))?new vn(t[1],t[2],t[3],1):(t=hF.exec(e))?new vn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pF.exec(e))?Nc(t[1],t[2],t[3],t[4]):(t=mF.exec(e))?Nc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=gF.exec(e))?S1(t[1],t[2]/100,t[3]/100,1):(t=vF.exec(e))?S1(t[1],t[2]/100,t[3]/100,t[4]):b1.hasOwnProperty(e)?w1(b1[e]):e==="transparent"?new vn(NaN,NaN,NaN,0):null}function w1(e){return new vn(e>>16&255,e>>8&255,e&255,1)}function Nc(e,t,n,r){return r<=0&&(e=t=n=NaN),new vn(e,t,n,r)}function Uw(e){return e instanceof xo||(e=Ls(e)),e?(e=e.rgb(),new vn(e.r,e.g,e.b,e.opacity)):new vn}function Qa(e,t,n,r){return arguments.length===1?Uw(e):new vn(e,t,n,r??1)}function vn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}td(vn,Qa,Xm(xo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?na:Math.pow(na,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vn(Vi(this.r),Vi(this.g),Vi(this.b),Bl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:C1,formatHex:C1,formatHex8:xF,formatRgb:T1,toString:T1}));function C1(){return`#${Ni(this.r)}${Ni(this.g)}${Ni(this.b)}`}function xF(){return`#${Ni(this.r)}${Ni(this.g)}${Ni(this.b)}${Ni((isNaN(this.opacity)?1:this.opacity)*255)}`}function T1(){const e=Bl(this.opacity);return`${e===1?"rgb(":"rgba("}${Vi(this.r)}, ${Vi(this.g)}, ${Vi(this.b)}${e===1?")":`, ${e})`}`}function Bl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ni(e){return e=Vi(e),(e<16?"0":"")+e.toString(16)}function S1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rr(e,t,n,r)}function Ww(e){if(e instanceof rr)return new rr(e.h,e.s,e.l,e.opacity);if(e instanceof xo||(e=Ls(e)),!e)return new rr;if(e instanceof rr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new rr(o,s,c,e.opacity)}function _F(e,t,n,r){return arguments.length===1?Ww(e):new rr(e,t,n,r??1)}function rr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}td(rr,_F,Xm(xo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?na:Math.pow(na,e),new rr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new vn(Ef(e>=240?e-240:e+120,i,r),Ef(e,i,r),Ef(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new rr(k1(this.h),Lc(this.s),Lc(this.l),Bl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Bl(this.opacity);return`${e===1?"hsl(":"hsla("}${k1(this.h)}, ${Lc(this.s)*100}%, ${Lc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function k1(e){return e=(e||0)%360,e<0?e+360:e}function Lc(e){return Math.max(0,Math.min(1,e||0))}function Ef(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const wF=Math.PI/180,CF=180/Math.PI;var zw=-.14861,Qm=1.78277,Jm=-.29227,nd=-.90649,Fs=1.97294,E1=Fs*nd,O1=Fs*Qm,M1=Qm*Jm-nd*zw;function TF(e){if(e instanceof qi)return new qi(e.h,e.s,e.l,e.opacity);e instanceof vn||(e=Uw(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(M1*r+E1*t-O1*n)/(M1+E1-O1),a=r-i,o=(Fs*(n-i)-Jm*a)/nd,s=Math.sqrt(o*o+a*a)/(Fs*i*(1-i)),c=s?Math.atan2(o,a)*CF-120:NaN;return new qi(c<0?c+360:c,s,i,e.opacity)}function _r(e,t,n,r){return arguments.length===1?TF(e):new qi(e,t,n,r??1)}function qi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}td(qi,_r,Xm(xo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new qi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?na:Math.pow(na,e),new qi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*wF,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new vn(255*(t+n*(zw*r+Qm*i)),255*(t+n*(Jm*r+nd*i)),255*(t+n*(Fs*r)),this.opacity)}}));function SF(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function kF(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return SF((n-r/t)*t,o,i,a,s)}}const rd=e=>()=>e;function Hw(e,t){return function(n){return e+n*t}}function EF(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function OF(e,t){var n=t-e;return n?Hw(e,n>180||n<-180?n-360*Math.round(n/360):n):rd(isNaN(e)?t:e)}function MF(e){return(e=+e)==1?Na:function(t,n){return n-t?EF(t,n,e):rd(isNaN(t)?n:t)}}function Na(e,t){var n=t-e;return n?Hw(e,n):rd(isNaN(e)?t:e)}const $1=function e(t){var n=MF(t);function r(i,a){var o=n((i=Qa(i)).r,(a=Qa(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=Na(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function $F(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Qa(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(c){return s.r=r(c),s.g=i(c),s.b=a(c),s+""}}}var AF=$F(kF);function RF(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function jF(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function PF(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=eg(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function IF(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ul(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function DF(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=eg(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Yh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Of=new RegExp(Yh.source,"g");function NF(e){return function(){return e}}function LF(e){return function(t){return e(t)+""}}function Vw(e,t){var n=Yh.lastIndex=Of.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(r=Yh.exec(e))&&(i=Of.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Ul(r,i)})),n=Of.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?LF(c[0].x):NF(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)s[(d=c[u]).i]=d.x(l);return s.join("")})}function eg(e,t){var n=typeof t,r;return t==null||n==="boolean"?rd(t):(n==="number"?Ul:n==="string"?(r=Ls(t))?(t=r,$1):Vw:t instanceof Ls?$1:t instanceof Date?IF:jF(t)?RF:Array.isArray(t)?PF:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?DF:Ul)(e,t)}function FF(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function qw(e){return function t(n){n=+n;function r(i,a){var o=e((i=_r(i)).h,(a=_r(a)).h),s=Na(i.s,a.s),c=Na(i.l,a.l),l=Na(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=c(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=t,r}(1)}qw(OF);var tg=qw(Na),BF=Gr,UF=Pn,WF=Qn,zF="[object String]";function HF(e){return typeof e=="string"||!UF(e)&&WF(e)&&BF(e)==zF}var VF=HF;const qF=Ht(VF);function YF(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Yw=YF;const Me=Ht(Yw);function al(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function GF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ng(e){let t,n,r;e.length!==2?(t=al,n=(s,c)=>al(e(s),c),r=(s,c)=>e(s)-c):(t=e===al||e===GF?e:ZF,n=e,r=e);function i(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(s[d],c)<0?l=d+1:u=d}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(s[d],c)<=0?l=d+1:u=d}while(l<u)}return l}function o(s,c,l=0,u=s.length){const d=i(s,c,l,u-1);return d>l&&r(s[d-1],c)>-r(s[d],c)?d-1:d}return{left:i,center:o,right:a}}function ZF(){return 0}function KF(e){return e===null?NaN:+e}const XF=ng(al),QF=XF.right;ng(KF).center;class A1 extends Map{constructor(t,n=tB){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(R1(this,t))}has(t){return super.has(R1(this,t))}set(t,n){return super.set(JF(this,t),n)}delete(t){return super.delete(eB(this,t))}}function R1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function JF({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function eB({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function tB(e){return e!==null&&typeof e=="object"?e.valueOf():e}const nB=Math.sqrt(50),rB=Math.sqrt(10),iB=Math.sqrt(2);function Wl(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=nB?10:a>=rB?5:a>=iB?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Wl(e,t,n*2):[s,c,l]}function Gh(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Wl(t,e,n):Wl(e,t,n);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function Zh(e,t,n){return t=+t,e=+e,n=+n,Wl(e,t,n)[2]}function Kh(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Zh(t,e,n):Zh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function aB(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function da(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const j1=Symbol("implicit");function Li(){var e=new A1,t=[],n=[],r=j1;function i(a){let o=e.get(a);if(o===void 0){if(r!==j1)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new A1;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Li(t,n).unknown(r)},da.apply(i,arguments),i}function rg(){var e=Li().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var f=t().length,h=i<r,g=h?i:r,p=h?r:i;a=(p-g)/Math.max(1,f-c+l*2),s&&(a=Math.floor(a)),g+=(p-g-a*(f-c))*u,o=a*(1-c),s&&(g=Math.round(g),o=Math.round(o));var v=aB(f).map(function(w){return g+a*w});return n(h?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(c=Math.min(1,l=+f),d()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),d()):c},e.paddingOuter=function(f){return arguments.length?(l=+f,d()):l},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return rg(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},da.apply(d(),arguments)}function Gw(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Gw(t())},e}function oB(){return Gw(rg.apply(null,arguments).paddingInner(1))}function sB(e){return function(){return e}}function cB(e){return+e}var P1=[0,1];function $a(e){return e}function Xh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sB(isNaN(t)?NaN:.5)}function lB(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function uB(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Xh(i,r),a=n(o,a)):(r=Xh(r,i),a=n(a,o)),function(s){return a(r(s))}}function dB(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Xh(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var c=QF(e,s,1,r)-1;return a[c](i[c](s))}}function id(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ig(){var e=P1,t=P1,n=eg,r,i,a,o=$a,s,c,l;function u(){var f=Math.min(e.length,t.length);return o!==$a&&(o=lB(e[0],e[f-1])),s=f>2?dB:uB,c=l=null,d}function d(f){return f==null||isNaN(f=+f)?a:(c||(c=s(e.map(r),t,n)))(r(o(f)))}return d.invert=function(f){return o(i((l||(l=s(t,e.map(r),Ul)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,cB),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=FF,u()},d.clamp=function(f){return arguments.length?(o=f?!0:$a,u()):o!==$a},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,h){return r=f,i=h,u()}}function Zw(){return ig()($a,$a)}function fB(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function zl(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ja(e){return e=zl(Math.abs(e)),e?e[1]:NaN}function hB(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function pB(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var mB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bs(e){if(!(t=mB.exec(e)))throw new Error("invalid format: "+e);var t;return new ag({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Bs.prototype=ag.prototype;function ag(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ag.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function gB(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Kw;function vB(e,t){var n=zl(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(Kw=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+zl(e,Math.max(0,t+a-1))[0]}function I1(e,t){var n=zl(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const D1={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:fB,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return I1(e*100,t)},r:I1,s:vB,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function N1(e){return e}var L1=Array.prototype.map,F1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function yB(e){var t=e.grouping===void 0||e.thousands===void 0?N1:hB(L1.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?N1:pB(L1.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(d){d=Bs(d);var f=d.fill,h=d.align,g=d.sign,p=d.symbol,v=d.zero,w=d.width,_=d.comma,x=d.precision,S=d.trim,b=d.type;b==="n"?(_=!0,b="g"):D1[b]||(x===void 0&&(x=12),S=!0,b="g"),(v||f==="0"&&h==="=")&&(v=!0,f="0",h="=");var T=p==="$"?n:p==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",j=p==="$"?r:/[%p]/.test(b)?o:"",M=D1[b],k=/[defgprs%]/.test(b);x=x===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(C){var O=T,$=j,A,P,D;if(b==="c")$=M(C)+$,C="";else{C=+C;var N=C<0||1/C<0;if(C=isNaN(C)?c:M(Math.abs(C),x),S&&(C=gB(C)),N&&+C==0&&g!=="+"&&(N=!1),O=(N?g==="("?g:s:g==="-"||g==="("?"":g)+O,$=(b==="s"?F1[8+Kw/3]:"")+$+(N&&g==="("?")":""),k){for(A=-1,P=C.length;++A<P;)if(D=C.charCodeAt(A),48>D||D>57){$=(D===46?i+C.slice(A+1):C.slice(A))+$,C=C.slice(0,A);break}}}_&&!v&&(C=t(C,1/0));var q=O.length+C.length+$.length,z=q<w?new Array(w-q+1).join(f):"";switch(_&&v&&(C=t(z+C,z.length?w-$.length:1/0),z=""),h){case"<":C=O+C+$+z;break;case"=":C=O+z+C+$;break;case"^":C=z.slice(0,q=z.length>>1)+O+C+$+z.slice(q);break;default:C=z+O+C+$;break}return a(C)}return E.toString=function(){return d+""},E}function u(d,f){var h=l((d=Bs(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Ja(f)/3)))*3,p=Math.pow(10,-g),v=F1[8+g/3];return function(w){return h(p*w)+v}}return{format:l,formatPrefix:u}}var Fc,fc,Xw;bB({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function bB(e){return Fc=yB(e),fc=Fc.format,Xw=Fc.formatPrefix,Fc}function xB(e){return Math.max(0,-Ja(Math.abs(e)))}function _B(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ja(t)/3)))*3-Ja(Math.abs(e)))}function wB(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ja(t)-Ja(e))+1}function CB(e,t,n,r){var i=Kh(e,t,n),a;switch(r=Bs(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=_B(i,o))&&(r.precision=a),Xw(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=wB(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=xB(i))&&(r.precision=a-(r.type==="%")*2);break}}return fc(r)}function Qw(e){var t=e.domain;return e.ticks=function(n){var r=t();return Gh(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return CB(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=Zh(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Jw(){var e=Zw();return e.copy=function(){return id(e,Jw())},da.apply(e,arguments),Qw(e)}function e4(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function B1(e){return Math.log(e)}function U1(e){return Math.exp(e)}function TB(e){return-Math.log(-e)}function SB(e){return-Math.exp(-e)}function kB(e){return isFinite(e)?+("1e"+e):e<0?0:e}function EB(e){return e===10?kB:e===Math.E?Math.exp:t=>Math.pow(e,t)}function OB(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function W1(e){return(t,n)=>-e(-t,n)}function MB(e){const t=e(B1,U1),n=t.domain;let r=10,i,a;function o(){return i=OB(r),a=EB(r),n()[0]<0?(i=W1(i),a=W1(a),e(TB,SB)):e(B1,U1),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const c=n();let l=c[0],u=c[c.length-1];const d=u<l;d&&([l,u]=[u,l]);let f=i(l),h=i(u),g,p;const v=s==null?10:+s;let w=[];if(!(r%1)&&h-f<v){if(f=Math.floor(f),h=Math.ceil(h),l>0){for(;f<=h;++f)for(g=1;g<r;++g)if(p=f<0?g/a(-f):g*a(f),!(p<l)){if(p>u)break;w.push(p)}}else for(;f<=h;++f)for(g=r-1;g>=1;--g)if(p=f>0?g/a(-f):g*a(f),!(p<l)){if(p>u)break;w.push(p)}w.length*2<v&&(w=Gh(l,u,v))}else w=Gh(f,h,Math.min(h-f,v)).map(a);return d?w.reverse():w},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Bs(c)).precision==null&&(c.trim=!0),c=fc(c)),s===1/0)return c;const l=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/a(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=l?c(u):""}},t.nice=()=>n(e4(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function t4(){const e=MB(ig()).domain([1,10]);return e.copy=()=>id(e,t4()).base(e.base()),da.apply(e,arguments),e}function z1(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function H1(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function $B(e){var t=1,n=e(z1(t),H1(t));return n.constant=function(r){return arguments.length?e(z1(t=+r),H1(t)):t},Qw(n)}function n4(){var e=$B(ig());return e.copy=function(){return id(e,n4()).constant(e.constant())},da.apply(e,arguments)}const Mf=new Date,$f=new Date;function nn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let l;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=a=>nn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Mf.setTime(+a),$f.setTime(+o),e(Mf),e($f),Math.floor(n(Mf,$f))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Hl=nn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Hl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?nn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Hl);Hl.range;const Lr=1e3,Vn=Lr*60,Fr=Vn*60,qr=Fr*24,og=qr*7,V1=qr*30,Af=qr*365,Fi=nn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getUTCSeconds());Fi.range;const sg=nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lr)},(e,t)=>{e.setTime(+e+t*Vn)},(e,t)=>(t-e)/Vn,e=>e.getMinutes());sg.range;const cg=nn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vn)},(e,t)=>(t-e)/Vn,e=>e.getUTCMinutes());cg.range;const lg=nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lr-e.getMinutes()*Vn)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getHours());lg.range;const ug=nn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCHours());ug.range;const dg=nn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vn)/qr,e=>e.getDate()-1);dg.range;const r4=nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qr,e=>e.getUTCDate()-1);r4.range;const i4=nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qr,e=>Math.floor(e/qr));i4.range;function fa(e){return nn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vn)/og)}const fg=fa(0),AB=fa(1),RB=fa(2),jB=fa(3),PB=fa(4),IB=fa(5),DB=fa(6);fg.range;AB.range;RB.range;jB.range;PB.range;IB.range;DB.range;function ha(e){return nn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/og)}const hg=ha(0),NB=ha(1),LB=ha(2),FB=ha(3),BB=ha(4),UB=ha(5),WB=ha(6);hg.range;NB.range;LB.range;FB.range;BB.range;UB.range;WB.range;const pg=nn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());pg.range;const mg=nn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());mg.range;const ad=nn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ad.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ad.range;const od=nn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());od.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});od.range;function a4(e,t,n,r,i,a){const o=[[Fi,1,Lr],[Fi,5,5*Lr],[Fi,15,15*Lr],[Fi,30,30*Lr],[a,1,Vn],[a,5,5*Vn],[a,15,15*Vn],[a,30,30*Vn],[i,1,Fr],[i,3,3*Fr],[i,6,6*Fr],[i,12,12*Fr],[r,1,qr],[r,2,2*qr],[n,1,og],[t,1,V1],[t,3,3*V1],[e,1,Af]];function s(l,u,d){const f=u<l;f&&([l,u]=[u,l]);const h=d&&typeof d.range=="function"?d:c(l,u,d),g=h?h.range(l,+u+1):[];return f?g.reverse():g}function c(l,u,d){const f=Math.abs(u-l)/d,h=ng(([,,v])=>v).right(o,f);if(h===o.length)return e.every(Kh(l/Af,u/Af,d));if(h===0)return Hl.every(Math.max(Kh(l,u,d),1));const[g,p]=o[f/o[h-1][2]<o[h][2]/f?h-1:h];return g.every(p)}return[s,c]}const[zB,HB]=a4(od,mg,hg,i4,ug,cg),[VB,qB]=a4(ad,pg,fg,dg,lg,sg);var Rf=new Date,jf=new Date;function en(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=function(a){return e(a=new Date(+a)),a},i.ceil=function(a){return e(a=new Date(a-1)),t(a,1),e(a),a},i.round=function(a){var o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=function(a,o){return t(a=new Date(+a),o==null?1:Math.floor(o)),a},i.range=function(a,o,s){var c=[],l;if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=function(a){return en(function(o){if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},function(o,s){if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););})},n&&(i.count=function(a,o){return Rf.setTime(+a),jf.setTime(+o),e(Rf),e(jf),Math.floor(n(Rf,jf))},i.every=function(a){return a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?function(o){return r(o)%a===0}:function(o){return i.count(0,o)%a===0}):i}),i}var Us=en(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});Us.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?en(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):Us};Us.range;var Vl=1e3,ra=6e4,ql=36e5,o4=864e5,s4=6048e5,Qh=en(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Vl)},function(e,t){return(t-e)/Vl},function(e){return e.getUTCSeconds()});Qh.range;var c4=en(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vl)},function(e,t){e.setTime(+e+t*ra)},function(e,t){return(t-e)/ra},function(e){return e.getMinutes()});c4.range;var l4=en(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vl-e.getMinutes()*ra)},function(e,t){e.setTime(+e+t*ql)},function(e,t){return(t-e)/ql},function(e){return e.getHours()});l4.range;var gg=en(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ra)/o4},function(e){return e.getDate()-1});gg.range;function pa(e){return en(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ra)/s4})}var Yl=pa(0),Ws=pa(1),u4=pa(2),d4=pa(3),ia=pa(4),f4=pa(5),h4=pa(6);Yl.range;Ws.range;u4.range;d4.range;ia.range;f4.range;h4.range;var p4=en(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});p4.range;var yi=en(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});yi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:en(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};yi.range;var m4=en(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*ra)},function(e,t){return(t-e)/ra},function(e){return e.getUTCMinutes()});m4.range;var g4=en(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*ql)},function(e,t){return(t-e)/ql},function(e){return e.getUTCHours()});g4.range;var vg=en(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/o4},function(e){return e.getUTCDate()-1});vg.range;function ma(e){return en(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/s4})}var Gl=ma(0),zs=ma(1),v4=ma(2),y4=ma(3),aa=ma(4),b4=ma(5),x4=ma(6);Gl.range;zs.range;v4.range;y4.range;aa.range;b4.range;x4.range;var _4=en(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});_4.range;var bi=en(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});bi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:en(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};bi.range;function Pf(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function If(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Uo(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function YB(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Wo(i),u=zo(i),d=Wo(a),f=zo(a),h=Wo(o),g=zo(o),p=Wo(s),v=zo(s),w=Wo(c),_=zo(c),x={a:N,A:q,b:z,B:U,c:null,d:X1,e:X1,f:gU,g:kU,G:OU,H:hU,I:pU,j:mU,L:w4,m:vU,M:yU,p:G,q:ne,Q:ey,s:ty,S:bU,u:xU,U:_U,V:wU,w:CU,W:TU,x:null,X:null,y:SU,Y:EU,Z:MU,"%":J1},S={a:te,A:X,b:J,B:Q,c:null,d:Q1,e:Q1,f:jU,g:zU,G:VU,H:$U,I:AU,j:RU,L:T4,m:PU,M:IU,p:re,q:F,Q:ey,s:ty,S:DU,u:NU,U:LU,V:FU,w:BU,W:UU,x:null,X:null,y:WU,Y:HU,Z:qU,"%":J1},b={a:E,A:C,b:O,B:$,c:A,d:Z1,e:Z1,f:lU,g:G1,G:Y1,H:K1,I:K1,j:aU,L:cU,m:iU,M:oU,p:k,q:rU,Q:dU,s:fU,S:sU,u:QB,U:JB,V:eU,w:XB,W:tU,x:P,X:D,y:G1,Y:Y1,Z:nU,"%":uU};x.x=T(n,x),x.X=T(r,x),x.c=T(t,x),S.x=T(n,S),S.X=T(r,S),S.c=T(t,S);function T(I,L){return function(H){var R=[],K=-1,Z=0,ee=I.length,pe,we,ve;for(H instanceof Date||(H=new Date(+H));++K<ee;)I.charCodeAt(K)===37&&(R.push(I.slice(Z,K)),(we=q1[pe=I.charAt(++K)])!=null?pe=I.charAt(++K):we=pe==="e"?" ":"0",(ve=L[pe])&&(pe=ve(H,we)),R.push(pe),Z=K+1);return R.push(I.slice(Z,K)),R.join("")}}function j(I,L){return function(H){var R=Uo(1900,void 0,1),K=M(R,I,H+="",0),Z,ee;if(K!=H.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(L&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(Z=If(Uo(R.y,0,1)),ee=Z.getUTCDay(),Z=ee>4||ee===0?zs.ceil(Z):zs(Z),Z=vg.offset(Z,(R.V-1)*7),R.y=Z.getUTCFullYear(),R.m=Z.getUTCMonth(),R.d=Z.getUTCDate()+(R.w+6)%7):(Z=Pf(Uo(R.y,0,1)),ee=Z.getDay(),Z=ee>4||ee===0?Ws.ceil(Z):Ws(Z),Z=gg.offset(Z,(R.V-1)*7),R.y=Z.getFullYear(),R.m=Z.getMonth(),R.d=Z.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ee="Z"in R?If(Uo(R.y,0,1)).getUTCDay():Pf(Uo(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ee+5)%7:R.w+R.U*7-(ee+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,If(R)):Pf(R)}}function M(I,L,H,R){for(var K=0,Z=L.length,ee=H.length,pe,we;K<Z;){if(R>=ee)return-1;if(pe=L.charCodeAt(K++),pe===37){if(pe=L.charAt(K++),we=b[pe in q1?L.charAt(K++):pe],!we||(R=we(I,H,R))<0)return-1}else if(pe!=H.charCodeAt(R++))return-1}return R}function k(I,L,H){var R=l.exec(L.slice(H));return R?(I.p=u.get(R[0].toLowerCase()),H+R[0].length):-1}function E(I,L,H){var R=h.exec(L.slice(H));return R?(I.w=g.get(R[0].toLowerCase()),H+R[0].length):-1}function C(I,L,H){var R=d.exec(L.slice(H));return R?(I.w=f.get(R[0].toLowerCase()),H+R[0].length):-1}function O(I,L,H){var R=w.exec(L.slice(H));return R?(I.m=_.get(R[0].toLowerCase()),H+R[0].length):-1}function $(I,L,H){var R=p.exec(L.slice(H));return R?(I.m=v.get(R[0].toLowerCase()),H+R[0].length):-1}function A(I,L,H){return M(I,t,L,H)}function P(I,L,H){return M(I,n,L,H)}function D(I,L,H){return M(I,r,L,H)}function N(I){return o[I.getDay()]}function q(I){return a[I.getDay()]}function z(I){return c[I.getMonth()]}function U(I){return s[I.getMonth()]}function G(I){return i[+(I.getHours()>=12)]}function ne(I){return 1+~~(I.getMonth()/3)}function te(I){return o[I.getUTCDay()]}function X(I){return a[I.getUTCDay()]}function J(I){return c[I.getUTCMonth()]}function Q(I){return s[I.getUTCMonth()]}function re(I){return i[+(I.getUTCHours()>=12)]}function F(I){return 1+~~(I.getUTCMonth()/3)}return{format:function(I){var L=T(I+="",x);return L.toString=function(){return I},L},parse:function(I){var L=j(I+="",!1);return L.toString=function(){return I},L},utcFormat:function(I){var L=T(I+="",S);return L.toString=function(){return I},L},utcParse:function(I){var L=j(I+="",!0);return L.toString=function(){return I},L}}}var q1={"-":"",_:" ",0:"0"},cn=/^\s*\d+/,GB=/^%/,ZB=/[\\^$*+?|[\]().{}]/g;function ht(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function KB(e){return e.replace(ZB,"\\$&")}function Wo(e){return new RegExp("^(?:"+e.map(KB).join("|")+")","i")}function zo(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function XB(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function QB(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function JB(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function eU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Y1(e,t,n){var r=cn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function G1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nU(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function rU(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function iU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Z1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function aU(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function K1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function oU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function sU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cU(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function lU(e,t,n){var r=cn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function uU(e,t,n){var r=GB.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dU(e,t,n){var r=cn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function fU(e,t,n){var r=cn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function X1(e,t){return ht(e.getDate(),t,2)}function hU(e,t){return ht(e.getHours(),t,2)}function pU(e,t){return ht(e.getHours()%12||12,t,2)}function mU(e,t){return ht(1+gg.count(yi(e),e),t,3)}function w4(e,t){return ht(e.getMilliseconds(),t,3)}function gU(e,t){return w4(e,t)+"000"}function vU(e,t){return ht(e.getMonth()+1,t,2)}function yU(e,t){return ht(e.getMinutes(),t,2)}function bU(e,t){return ht(e.getSeconds(),t,2)}function xU(e){var t=e.getDay();return t===0?7:t}function _U(e,t){return ht(Yl.count(yi(e)-1,e),t,2)}function C4(e){var t=e.getDay();return t>=4||t===0?ia(e):ia.ceil(e)}function wU(e,t){return e=C4(e),ht(ia.count(yi(e),e)+(yi(e).getDay()===4),t,2)}function CU(e){return e.getDay()}function TU(e,t){return ht(Ws.count(yi(e)-1,e),t,2)}function SU(e,t){return ht(e.getFullYear()%100,t,2)}function kU(e,t){return e=C4(e),ht(e.getFullYear()%100,t,2)}function EU(e,t){return ht(e.getFullYear()%1e4,t,4)}function OU(e,t){var n=e.getDay();return e=n>=4||n===0?ia(e):ia.ceil(e),ht(e.getFullYear()%1e4,t,4)}function MU(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ht(t/60|0,"0",2)+ht(t%60,"0",2)}function Q1(e,t){return ht(e.getUTCDate(),t,2)}function $U(e,t){return ht(e.getUTCHours(),t,2)}function AU(e,t){return ht(e.getUTCHours()%12||12,t,2)}function RU(e,t){return ht(1+vg.count(bi(e),e),t,3)}function T4(e,t){return ht(e.getUTCMilliseconds(),t,3)}function jU(e,t){return T4(e,t)+"000"}function PU(e,t){return ht(e.getUTCMonth()+1,t,2)}function IU(e,t){return ht(e.getUTCMinutes(),t,2)}function DU(e,t){return ht(e.getUTCSeconds(),t,2)}function NU(e){var t=e.getUTCDay();return t===0?7:t}function LU(e,t){return ht(Gl.count(bi(e)-1,e),t,2)}function S4(e){var t=e.getUTCDay();return t>=4||t===0?aa(e):aa.ceil(e)}function FU(e,t){return e=S4(e),ht(aa.count(bi(e),e)+(bi(e).getUTCDay()===4),t,2)}function BU(e){return e.getUTCDay()}function UU(e,t){return ht(zs.count(bi(e)-1,e),t,2)}function WU(e,t){return ht(e.getUTCFullYear()%100,t,2)}function zU(e,t){return e=S4(e),ht(e.getUTCFullYear()%100,t,2)}function HU(e,t){return ht(e.getUTCFullYear()%1e4,t,4)}function VU(e,t){var n=e.getUTCDay();return e=n>=4||n===0?aa(e):aa.ceil(e),ht(e.getUTCFullYear()%1e4,t,4)}function qU(){return"+0000"}function J1(){return"%"}function ey(e){return+e}function ty(e){return Math.floor(+e/1e3)}var Ca,sd,k4,E4,O4;YU({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function YU(e){return Ca=YB(e),sd=Ca.format,k4=Ca.parse,E4=Ca.utcFormat,O4=Ca.utcParse,Ca}function GU(e){return new Date(e)}function ZU(e){return e instanceof Date?+e:+new Date(+e)}function yg(e,t,n,r,i,a,o,s,c,l){var u=Zw(),d=u.invert,f=u.domain,h=l(".%L"),g=l(":%S"),p=l("%I:%M"),v=l("%I %p"),w=l("%a %d"),_=l("%b %d"),x=l("%B"),S=l("%Y");function b(T){return(c(T)<T?h:s(T)<T?g:o(T)<T?p:a(T)<T?v:r(T)<T?i(T)<T?w:_:n(T)<T?x:S)(T)}return u.invert=function(T){return new Date(d(T))},u.domain=function(T){return arguments.length?f(Array.from(T,ZU)):f().map(GU)},u.ticks=function(T){var j=f();return e(j[0],j[j.length-1],T??10)},u.tickFormat=function(T,j){return j==null?b:l(j)},u.nice=function(T){var j=f();return(!T||typeof T.range!="function")&&(T=t(j[0],j[j.length-1],T??10)),T?f(e4(j,T)):u},u.copy=function(){return id(u,yg(e,t,n,r,i,a,o,s,c,l))},u}function KU(){return da.apply(yg(VB,qB,ad,pg,fg,dg,lg,sg,Fi,sd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function XU(){return da.apply(yg(zB,HB,od,mg,hg,r4,ug,cg,Fi,E4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Je(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const M4=Je("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),$4=Je("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),A4=Je("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),R4=Je("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),j4=Je("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),P4=Je("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),I4=Je("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),D4=Je("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bg=Je("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),QU=Je("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),At=e=>AF(e[e.length-1]);var cd=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Je);const JU=At(cd);var ld=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Je);const eW=At(ld);var ud=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Je);const tW=At(ud);var dd=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Je);const nW=At(dd);var fd=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Je);const rW=At(fd);var hd=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Je);const iW=At(hd);var pd=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Je);const aW=At(pd);var md=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Je);const oW=At(md);var gd=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Je);const sW=At(gd);var vd=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Je);const cW=At(vd);var yd=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Je);const lW=At(yd);var bd=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Je);const uW=At(bd);var xd=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Je);const dW=At(xd);var _d=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Je);const fW=At(_d);var wd=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Je);const hW=At(wd);var Cd=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Je);const pW=At(Cd);var Td=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Je);const mW=At(Td);var Sd=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Je);const gW=At(Sd);var kd=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Je);const vW=At(kd);var Ed=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Je);const yW=At(Ed);var Od=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Je);const bW=At(Od);var Md=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Je);const xW=At(Md);var $d=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Je);const _W=At($d);var Ad=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Je);const wW=At(Ad);var Rd=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Je);const CW=At(Rd);var jd=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Je);const TW=At(jd);var Pd=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Je);const SW=At(Pd);function kW(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const EW=tg(_r(300,.5,0),_r(-240,.5,1));var OW=tg(_r(-100,.75,.35),_r(80,1.5,.8)),MW=tg(_r(260,.75,.35),_r(80,1.5,.8)),Bc=_r();function $W(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Bc.h=360*e-100,Bc.s=1.5-1.5*t,Bc.l=.8-.9*t,Bc+""}var Uc=Qa(),AW=Math.PI/3,RW=Math.PI*2/3;function jW(e){var t;return e=(.5-e)*Math.PI,Uc.r=255*(t=Math.sin(e))*t,Uc.g=255*(t=Math.sin(e+AW))*t,Uc.b=255*(t=Math.sin(e+RW))*t,Uc+""}function PW(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Id(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const IW=Id(Je("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var DW=Id(Je("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),NW=Id(Je("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),LW=Id(Je("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),FW="__lodash_hash_undefined__";function BW(e){return this.__data__.set(e,FW),this}var UW=BW;function WW(e){return this.__data__.has(e)}var zW=WW,HW=Lm,VW=UW,qW=zW;function Zl(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new HW;++t<n;)this.add(e[t])}Zl.prototype.add=Zl.prototype.push=VW;Zl.prototype.has=qW;var xg=Zl;function YW(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var GW=YW;function ZW(e){return e!==e}var KW=ZW;function XW(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var QW=XW,JW=GW,ez=KW,tz=QW;function nz(e,t,n){return t===t?tz(e,t,n):JW(e,ez,n)}var rz=nz,iz=rz;function az(e,t){var n=e==null?0:e.length;return!!n&&iz(e,t,0)>-1}var N4=az;function oz(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var L4=oz;function sz(e,t){return e.has(t)}var _g=sz,cz=xg,lz=N4,uz=L4,dz=ed,fz=go,hz=_g,pz=200;function mz(e,t,n,r){var i=-1,a=lz,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=dz(t,fz(n))),r?(a=uz,o=!1):t.length>=pz&&(a=hz,o=!1,t=new cz(t));e:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue e;c.push(u)}else a(t,d,r)||c.push(u)}return c}var gz=mz,vz=gz,yz=Gm,bz=Ow,xz=yz(function(e,t){return bz(e)?vz(e,t):[]}),_z=xz;const F4=Ht(_z);function it(e){return function(){return e}}const ny=Math.abs,hn=Math.atan2,Ei=Math.cos,wz=Math.max,Df=Math.min,ur=Math.sin,Aa=Math.sqrt,mn=1e-12,Hs=Math.PI,Kl=Hs/2,ol=2*Hs;function Cz(e){return e>1?0:e<-1?Hs:Math.acos(e)}function ry(e){return e>=1?Kl:e<=-1?-Kl:Math.asin(e)}const Jh=Math.PI,ep=2*Jh,Ai=1e-6,Tz=ep-Ai;function B4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Sz(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return B4;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let kz=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?B4:Sz(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=r-t,l=i-n,u=o-t,d=s-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>Ai)if(!(Math.abs(d*c-l*u)>Ai)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,g=i-s,p=c*c+l*l,v=h*h+g*g,w=Math.sqrt(p),_=Math.sqrt(f),x=a*Math.tan((Jh-Math.acos((p+f-v)/(2*w*_)))/2),S=x/_,b=x/w;Math.abs(S-1)>Ai&&this._append`L${t+S*u},${n+S*d}`,this._append`A${a},${a},0,0,${+(d*h>u*g)},${this._x1=t+b*c},${this._y1=n+b*l}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=t+s,u=n+c,d=1^o,f=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Ai||Math.abs(this._y1-u)>Ai)&&this._append`L${l},${u}`,r&&(f<0&&(f=f%ep+ep),f>Tz?this._append`A${r},${r},0,1,${d},${t-s},${n-c}A${r},${r},0,1,${d},${this._x1=l},${this._y1=u}`:f>Ai&&this._append`A${r},${r},0,${+(f>=Jh)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function wg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new kz(t)}function Ez(e){return e.innerRadius}function Oz(e){return e.outerRadius}function Mz(e){return e.startAngle}function $z(e){return e.endAngle}function Az(e){return e&&e.padAngle}function Rz(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<mn))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function Wc(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Aa(s*s+c*c),u=l*c,d=-l*s,f=e+u,h=t+d,g=n+u,p=r+d,v=(f+g)/2,w=(h+p)/2,_=g-f,x=p-h,S=_*_+x*x,b=i-a,T=f*p-g*h,j=(x<0?-1:1)*Aa(wz(0,b*b*S-T*T)),M=(T*x-_*j)/S,k=(-T*_-x*j)/S,E=(T*x+_*j)/S,C=(-T*_+x*j)/S,O=M-v,$=k-w,A=E-v,P=C-w;return O*O+$*$>A*A+P*P&&(M=E,k=C),{cx:M,cy:k,x01:-u,y01:-d,x11:M*(i/b-1),y11:k*(i/b-1)}}function jz(){var e=Ez,t=Oz,n=it(0),r=null,i=Mz,a=$z,o=Az,s=null,c=wg(l);function l(){var u,d,f=+e.apply(this,arguments),h=+t.apply(this,arguments),g=i.apply(this,arguments)-Kl,p=a.apply(this,arguments)-Kl,v=ny(p-g),w=p>g;if(s||(s=u=c()),h<f&&(d=h,h=f,f=d),!(h>mn))s.moveTo(0,0);else if(v>ol-mn)s.moveTo(h*Ei(g),h*ur(g)),s.arc(0,0,h,g,p,!w),f>mn&&(s.moveTo(f*Ei(p),f*ur(p)),s.arc(0,0,f,p,g,w));else{var _=g,x=p,S=g,b=p,T=v,j=v,M=o.apply(this,arguments)/2,k=M>mn&&(r?+r.apply(this,arguments):Aa(f*f+h*h)),E=Df(ny(h-f)/2,+n.apply(this,arguments)),C=E,O=E,$,A;if(k>mn){var P=ry(k/f*ur(M)),D=ry(k/h*ur(M));(T-=P*2)>mn?(P*=w?1:-1,S+=P,b-=P):(T=0,S=b=(g+p)/2),(j-=D*2)>mn?(D*=w?1:-1,_+=D,x-=D):(j=0,_=x=(g+p)/2)}var N=h*Ei(_),q=h*ur(_),z=f*Ei(b),U=f*ur(b);if(E>mn){var G=h*Ei(x),ne=h*ur(x),te=f*Ei(S),X=f*ur(S),J;if(v<Hs)if(J=Rz(N,q,te,X,G,ne,z,U)){var Q=N-J[0],re=q-J[1],F=G-J[0],I=ne-J[1],L=1/ur(Cz((Q*F+re*I)/(Aa(Q*Q+re*re)*Aa(F*F+I*I)))/2),H=Aa(J[0]*J[0]+J[1]*J[1]);C=Df(E,(f-H)/(L-1)),O=Df(E,(h-H)/(L+1))}else C=O=0}j>mn?O>mn?($=Wc(te,X,N,q,h,O,w),A=Wc(G,ne,z,U,h,O,w),s.moveTo($.cx+$.x01,$.cy+$.y01),O<E?s.arc($.cx,$.cy,O,hn($.y01,$.x01),hn(A.y01,A.x01),!w):(s.arc($.cx,$.cy,O,hn($.y01,$.x01),hn($.y11,$.x11),!w),s.arc(0,0,h,hn($.cy+$.y11,$.cx+$.x11),hn(A.cy+A.y11,A.cx+A.x11),!w),s.arc(A.cx,A.cy,O,hn(A.y11,A.x11),hn(A.y01,A.x01),!w))):(s.moveTo(N,q),s.arc(0,0,h,_,x,!w)):s.moveTo(N,q),!(f>mn)||!(T>mn)?s.lineTo(z,U):C>mn?($=Wc(z,U,G,ne,f,-C,w),A=Wc(N,q,te,X,f,-C,w),s.lineTo($.cx+$.x01,$.cy+$.y01),C<E?s.arc($.cx,$.cy,C,hn($.y01,$.x01),hn(A.y01,A.x01),!w):(s.arc($.cx,$.cy,C,hn($.y01,$.x01),hn($.y11,$.x11),!w),s.arc(0,0,f,hn($.cy+$.y11,$.cx+$.x11),hn(A.cy+A.y11,A.cx+A.x11),w),s.arc(A.cx,A.cy,C,hn(A.y11,A.x11),hn(A.y01,A.x01),!w))):s.arc(0,0,f,b,S,w)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Hs/2;return[Ei(d)*u,ur(d)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:it(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:it(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:it(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:it(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:it(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:it(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:it(+u),l):o},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function Dd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function U4(e){this._context=e}U4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Cg(e){return new U4(e)}function W4(e){return e[0]}function z4(e){return e[1]}function Tg(e,t){var n=it(!0),r=null,i=Cg,a=null,o=wg(s);e=typeof e=="function"?e:e===void 0?W4:it(e),t=typeof t=="function"?t:t===void 0?z4:it(t);function s(c){var l,u=(c=Dd(c)).length,d,f=!1,h;for(r==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&n(d=c[l],l,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(d,l,c),+t(d,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:it(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:it(+c),s):t},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:it(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function Pz(e,t,n){var r=null,i=it(!0),a=null,o=Cg,s=null,c=wg(l);e=typeof e=="function"?e:e===void 0?W4:it(+e),t=typeof t=="function"?t:it(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?z4:it(+n);function l(d){var f,h,g,p=(d=Dd(d)).length,v,w=!1,_,x=new Array(p),S=new Array(p);for(a==null&&(s=o(_=c())),f=0;f<=p;++f){if(!(f<p&&i(v=d[f],f,d))===w)if(w=!w)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=h;--g)s.point(x[g],S[g]);s.lineEnd(),s.areaEnd()}w&&(x[f]=+e(v,f,d),S[f]=+t(v,f,d),s.point(r?+r(v,f,d):x[f],n?+n(v,f,d):S[f]))}if(_)return s=null,_+""||null}function u(){return Tg().defined(i).curve(o).context(a)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:it(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:it(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:it(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:it(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:it(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:it(+d),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:it(!!d),l):i},l.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),l):o},l.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),l):a},l}function Iz(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Dz(e){return e}function Nz(){var e=Dz,t=Iz,n=null,r=it(0),i=it(ol),a=it(0);function o(s){var c,l=(s=Dd(s)).length,u,d,f=0,h=new Array(l),g=new Array(l),p=+r.apply(this,arguments),v=Math.min(ol,Math.max(-ol,i.apply(this,arguments)-p)),w,_=Math.min(Math.abs(v)/l,a.apply(this,arguments)),x=_*(v<0?-1:1),S;for(c=0;c<l;++c)(S=g[h[c]=c]=+e(s[c],c,s))>0&&(f+=S);for(t!=null?h.sort(function(b,T){return t(g[b],g[T])}):n!=null&&h.sort(function(b,T){return n(s[b],s[T])}),c=0,d=f?(v-l*x)/f:0;c<l;++c,p=w)u=h[c],S=g[u],w=p+(S>0?S*d:0)+x,g[u]={data:s[u],index:c,value:S,startAngle:p,endAngle:w,padAngle:_};return g}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:it(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,n=null,o):t},o.sort=function(s){return arguments.length?(n=s,t=null,o):n},o.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:it(+s),o):r},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:it(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:it(+s),o):a},o}function xi(){}function Xl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Nd(e){this._context=e}Nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Xl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lz(e){return new Nd(e)}function H4(e){this._context=e}H4.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fz(e){return new H4(e)}function V4(e){this._context=e}V4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Bz(e){return new V4(e)}function q4(e,t){this._basis=new Nd(e),this._beta=t}q4.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Uz=function e(t){function n(r){return t===1?new Nd(r):new q4(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Ql(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Sg(e,t){this._context=e,this._k=(1-t)/6}Sg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ql(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ql(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wz=function e(t){function n(r){return new Sg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function kg(e,t){this._context=e,this._k=(1-t)/6}kg.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ql(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zz=function e(t){function n(r){return new kg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Eg(e,t){this._context=e,this._k=(1-t)/6}Eg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ql(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hz=function e(t){function n(r){return new Eg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Og(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>mn){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>mn){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Y4(e,t){this._context=e,this._alpha=t}Y4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Og(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Vz=function e(t){function n(r){return t?new Y4(r,t):new Sg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function G4(e,t){this._context=e,this._alpha=t}G4.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Og(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qz=function e(t){function n(r){return t?new G4(r,t):new kg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Z4(e,t){this._context=e,this._alpha=t}Z4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Og(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Yz=function e(t){function n(r){return t?new Z4(r,t):new Eg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function K4(e){this._context=e}K4.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Gz(e){return new K4(e)}function iy(e){return e<0?-1:1}function ay(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(iy(a)+iy(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function oy(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Nf(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Jl(e){this._context=e}Jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Nf(this,this._t0,oy(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Nf(this,oy(this,n=ay(this,e,t)),n);break;default:Nf(this,this._t0,n=ay(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function X4(e){this._context=new Q4(e)}(X4.prototype=Object.create(Jl.prototype)).point=function(e,t){Jl.prototype.point.call(this,t,e)};function Q4(e){this._context=e}Q4.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Zz(e){return new Jl(e)}function Kz(e){return new X4(e)}function J4(e){this._context=e}J4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=sy(e),i=sy(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function sy(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Xz(e){return new J4(e)}function Ld(e,t){this._context=e,this._t=t}Ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Qz(e){return new Ld(e,.5)}function Jz(e){return new Ld(e,0)}function eH(e){return new Ld(e,1)}function cy(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ly(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function tH(e,t){return e[t]}function nH(e){const t=[];return t.key=e,t}function rH(){var e=it([]),t=ly,n=cy,r=tH;function i(a){var o=Array.from(e.apply(this,arguments),nH),s,c=o.length,l=-1,u;for(const d of a)for(s=0,++l;s<c;++s)(o[s][l]=[0,+r(d,o[s].key,l,a)]).data=d;for(s=0,u=Dd(t(o));s<c;++s)o[u[s]].index=s;return n(o,u),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:it(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:it(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?ly:typeof a=="function"?a:it(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??cy,i):n},i}function iH(e,t){if((c=e.length)>0)for(var n,r=0,i,a,o,s,c,l=e[t[0]].length;r<l;++r)for(o=s=0,n=0;n<c;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}var aH=dc,oH=Bw,sH=yo;function cH(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=aH(e,o);n(s,o)&&oH(a,sH(o,e),s)}return a}var lH=cH;function uH(e,t){return e!=null&&t in Object(e)}var dH=uH,fH=yo,hH=Gu,pH=Pn,mH=Xu,gH=zm,vH=bo;function yH(e,t,n){t=fH(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=vH(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&gH(i)&&mH(o,i)&&(pH(e)||hH(e)))}var bH=yH,xH=dH,_H=bH;function wH(e,t){return e!=null&&_H(e,t,xH)}var e3=wH,CH=lH,TH=e3;function SH(e,t){return CH(e,t,function(n,r){return TH(e,r)})}var kH=SH;function EH(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Mg=EH,uy=uo,OH=Gu,MH=Pn,dy=uy?uy.isConcatSpreadable:void 0;function $H(e){return MH(e)||OH(e)||!!(dy&&e&&e[dy])}var AH=$H,RH=Mg,jH=AH;function t3(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=jH),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?t3(s,t-1,n,r,i):RH(i,s):r||(i[i.length]=s)}return i}var n3=t3,PH=n3;function IH(e){var t=e==null?0:e.length;return t?PH(e,1):[]}var DH=IH,NH=DH,LH=jw,FH=Pw;function BH(e){return FH(LH(e,void 0,NH),e+"")}var r3=BH,UH=kH,WH=r3,zH=WH(function(e,t){return e==null?{}:UH(e,t)}),HH=zH;const VH=Ht(HH);function qH(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var YH=qH,GH=xg,ZH=YH,KH=_g,XH=1,QH=2;function JH(e,t,n,r,i,a){var o=n&XH,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,h=n&QH?new GH:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var g=e[d],p=t[d];if(r)var v=o?r(p,g,d,t,e,a):r(g,p,d,e,t,a);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!ZH(t,function(w,_){if(!KH(h,_)&&(g===w||i(g,w,n,r,a)))return h.push(_)})){f=!1;break}}else if(!(g===p||i(g,p,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var i3=JH;function eV(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var tV=eV;function nV(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var $g=nV,fy=uo,hy=ww,rV=lc,iV=i3,aV=tV,oV=$g,sV=1,cV=2,lV="[object Boolean]",uV="[object Date]",dV="[object Error]",fV="[object Map]",hV="[object Number]",pV="[object RegExp]",mV="[object Set]",gV="[object String]",vV="[object Symbol]",yV="[object ArrayBuffer]",bV="[object DataView]",py=fy?fy.prototype:void 0,Lf=py?py.valueOf:void 0;function xV(e,t,n,r,i,a,o){switch(n){case bV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case yV:return!(e.byteLength!=t.byteLength||!a(new hy(e),new hy(t)));case lV:case uV:case hV:return rV(+e,+t);case dV:return e.name==t.name&&e.message==t.message;case pV:case gV:return e==t+"";case fV:var s=aV;case mV:var c=r&sV;if(s||(s=oV),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=cV,o.set(e,t);var u=iV(s(e),s(t),r,i,a,o);return o.delete(e),u;case vV:if(Lf)return Lf.call(e)==Lf.call(t)}return!1}var _V=xV,wV=Mg,CV=Pn;function TV(e,t,n){var r=t(e);return CV(e)?r:wV(r,n(e))}var a3=TV;function SV(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var o3=SV;function kV(){return[]}var s3=kV,EV=o3,OV=s3,MV=Object.prototype,$V=MV.propertyIsEnumerable,my=Object.getOwnPropertySymbols,AV=my?function(e){return e==null?[]:(e=Object(e),EV(my(e),function(t){return $V.call(e,t)}))}:OV,Ag=AV,RV=Sw,jV=RV(Object.keys,Object),PV=jV,IV=Wm,DV=PV,NV=Object.prototype,LV=NV.hasOwnProperty;function FV(e){if(!IV(e))return DV(e);var t=[];for(var n in Object(e))LV.call(e,n)&&n!="constructor"&&t.push(n);return t}var BV=FV,UV=Aw,WV=BV,zV=mo;function HV(e){return zV(e)?UV(e):WV(e)}var hc=HV,VV=a3,qV=Ag,YV=hc;function GV(e){return VV(e,YV,qV)}var c3=GV,gy=c3,ZV=1,KV=Object.prototype,XV=KV.hasOwnProperty;function QV(e,t,n,r,i,a){var o=n&ZV,s=gy(e),c=s.length,l=gy(t),u=l.length;if(c!=u&&!o)return!1;for(var d=c;d--;){var f=s[d];if(!(o?f in t:XV.call(t,f)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var p=!0;a.set(e,t),a.set(t,e);for(var v=o;++d<c;){f=s[d];var w=e[f],_=t[f];if(r)var x=o?r(_,w,f,t,e,a):r(w,_,f,e,t,a);if(!(x===void 0?w===_||i(w,_,n,r,a):x)){p=!1;break}v||(v=f=="constructor")}if(p&&!v){var S=e.constructor,b=t.constructor;S!=b&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof b=="function"&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p}var JV=QV,eq=ua,tq=kr,nq=eq(tq,"DataView"),rq=nq,iq=ua,aq=kr,oq=iq(aq,"Promise"),sq=oq,cq=ua,lq=kr,uq=cq(lq,"Set"),l3=uq,dq=ua,fq=kr,hq=dq(fq,"WeakMap"),pq=hq,tp=rq,np=Nm,rp=sq,ip=l3,ap=pq,u3=Gr,_o=vw,vy="[object Map]",mq="[object Object]",yy="[object Promise]",by="[object Set]",xy="[object WeakMap]",_y="[object DataView]",gq=_o(tp),vq=_o(np),yq=_o(rp),bq=_o(ip),xq=_o(ap),Ri=u3;(tp&&Ri(new tp(new ArrayBuffer(1)))!=_y||np&&Ri(new np)!=vy||rp&&Ri(rp.resolve())!=yy||ip&&Ri(new ip)!=by||ap&&Ri(new ap)!=xy)&&(Ri=function(e){var t=u3(e),n=t==mq?e.constructor:void 0,r=n?_o(n):"";if(r)switch(r){case gq:return _y;case vq:return vy;case yq:return yy;case bq:return by;case xq:return xy}return t});var Fd=Ri,Ff=Yu,_q=i3,wq=_V,Cq=JV,wy=Fd,Cy=Pn,Ty=Zu,Tq=qm,Sq=1,Sy="[object Arguments]",ky="[object Array]",zc="[object Object]",kq=Object.prototype,Ey=kq.hasOwnProperty;function Eq(e,t,n,r,i,a){var o=Cy(e),s=Cy(t),c=o?ky:wy(e),l=s?ky:wy(t);c=c==Sy?zc:c,l=l==Sy?zc:l;var u=c==zc,d=l==zc,f=c==l;if(f&&Ty(e)){if(!Ty(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new Ff),o||Tq(e)?_q(e,t,n,r,i,a):wq(e,t,c,n,r,i,a);if(!(n&Sq)){var h=u&&Ey.call(e,"__wrapped__"),g=d&&Ey.call(t,"__wrapped__");if(h||g){var p=h?e.value():e,v=g?t.value():t;return a||(a=new Ff),i(p,v,n,r,a)}}return f?(a||(a=new Ff),Cq(e,t,n,r,i,a)):!1}var Oq=Eq,Mq=Oq,Oy=Qn;function d3(e,t,n,r,i){return e===t?!0:e==null||t==null||!Oy(e)&&!Oy(t)?e!==e&&t!==t:Mq(e,t,n,r,d3,i)}var Rg=d3,$q=Rg;function Aq(e,t){return $q(e,t)}var Rq=Aq;const jq=Ht(Rq);var Pq={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function qn(){return qn=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},qn.apply(this,arguments)}function op(e,t){return op=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},op(e,t)}function Bd(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Iq=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],Dq=function(e,t){return qn({},t,e)},Nq=function(e,t){var n=mL({},e,t);return Iq.forEach(function(r){Qo(n,r,Dq(xr(n,r),n.text))}),n},f3=m.createContext(),h3=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,a=i===void 0?"default":i,o=m.useMemo(function(){var s=qF(a)?Rm[a]:a;return{animate:r,config:s}},[r,a]);return y.jsx(f3.Provider,{value:o,children:t})},My={animate:V.bool,motionConfig:V.oneOfType([V.oneOf(Object.keys(Rm)),V.shape({mass:V.number,tension:V.number,friction:V.number,clamp:V.bool,precision:V.number,velocity:V.number,duration:V.number,easing:V.func})])};h3.propTypes={children:V.node.isRequired,animate:My.animate,config:My.motionConfig};var kn=function(){return m.useContext(f3)},jg=function(e){var t=kn(),n=t.animate,r=t.config,i=function(s){var c=m.useRef();return m.useEffect(function(){c.current=s},[s]),c.current}(e),a=m.useMemo(function(){return Vw(i,e)},[i,e]),o=Sr({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return vi(o,a)},Lq={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:Me(cd),PRGn:Me(ld),PiYG:Me(ud),PuOr:Me(dd),RdBu:Me(fd),RdGy:Me(hd),RdYlBu:Me(pd),RdYlGn:Me(md),spectral:Me(gd),blues:Me(Md),greens:Me($d),greys:Me(Ad),oranges:Me(Pd),purples:Me(Rd),reds:Me(jd),BuGn:Me(vd),BuPu:Me(yd),GnBu:Me(bd),OrRd:Me(xd),PuBuGn:Me(_d),PuBu:Me(wd),PuRd:Me(Cd),RdPu:Me(Td),YlGnBu:Me(Sd),YlGn:Me(kd),YlOrBr:Me(Ed),YlOrRd:Me(Od)},Fq=Object.keys(Lq);Me(cd),Me(ld),Me(ud),Me(dd),Me(fd),Me(hd),Me(pd),Me(md),Me(gd),Me(Md),Me($d),Me(Ad),Me(Pd),Me(Rd),Me(jd),Me(vd),Me(yd),Me(bd),Me(xd),Me(_d),Me(wd),Me(Cd),Me(Td),Me(Sd),Me(kd),Me(Ed),Me(Od);V.oneOfType([V.oneOf(Fq),V.func,V.arrayOf(V.string)]);var sp={basis:Lz,basisClosed:Fz,basisOpen:Bz,bundle:Uz,cardinal:Wz,cardinalClosed:zz,cardinalOpen:Hz,catmullRom:Vz,catmullRomClosed:qz,catmullRomOpen:Yz,linear:Cg,linearClosed:Gz,monotoneX:Zz,monotoneY:Kz,natural:Xz,step:Qz,stepAfter:eH,stepBefore:Jz},Pg=Object.keys(sp);Pg.filter(function(e){return e.endsWith("Closed")});F4(Pg,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");F4(Pg,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");var p3=function(e){if(!sp[e])throw new TypeError("'"+e+"', is not a valid curve interpolator identifier.");return sp[e]};V.shape({top:V.number,right:V.number,bottom:V.number,left:V.number}).isRequired;var Bq=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];V.oneOf(Bq);Li(bg);var m3={top:0,right:0,bottom:0,left:0},pc=function(e,t,n){return n===void 0&&(n={}),m.useMemo(function(){var r=qn({},m3,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},g3=function(){var e=m.useRef(null),t=m.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],i=m.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(a){var o=a[0];return r(o.contentRect)})})[0];return m.useEffect(function(){return e.current&&i!==null&&i.observe(e.current),function(){i!==null&&i.disconnect()}},[]),[e,n]},Uq=function(e){return m.useMemo(function(){return Nq(Pq,e)},[e])},Wq=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?sd(e.slice("5")):fc(e):function(t){return""+t}},eo=function(e){return m.useMemo(function(){return Wq(e)},[e])},v3=m.createContext(),zq={},y3=function(e){var t=e.theme,n=t===void 0?zq:t,r=e.children,i=Uq(n);return y.jsx(v3.Provider,{value:i,children:r})};y3.propTypes={children:V.node.isRequired,theme:V.object};var Tt=function(){return m.useContext(v3)},Hq=["outlineWidth","outlineColor","outlineOpacity"],Ig=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,Bd(e,Hq)},b3=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?m.cloneElement(r,{},t):t};b3.propTypes={children:V.node.isRequired,condition:V.bool.isRequired,wrapper:V.element.isRequired};var Vq={position:"relative"},mc=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,a=e.isInteractive,o=a===void 0||a,s=e.animate,c=e.motionConfig,l=m.useRef(null);return y.jsx(y3,{theme:n,children:y.jsx(h3,{animate:s,config:c,children:y.jsx(XR,{container:l,children:y.jsxs(b3,{condition:i,wrapper:y.jsx("div",{style:Vq,ref:l}),children:[t,o&&y.jsx(KR,{})]})})})})};mc.propTypes={children:V.element.isRequired,isInteractive:V.bool,renderWrapper:V.bool,theme:V.object,animate:V.bool,motionConfig:V.string};V.func.isRequired,V.bool,V.bool,V.object.isRequired,V.bool.isRequired,V.string;var wo=function(e){var t=e.children,n=g3(),r=n[0],i=n[1],a=i.width>0&&i.height>0;return y.jsx("div",{ref:r,style:{width:"100%",height:"100%"},children:a&&t({width:i.width,height:i.height})})};wo.propTypes={children:V.func.isRequired};var qq=["id","colors"],x3=function(e){var t=e.id,n=e.colors,r=Bd(e,qq);return y.jsx("linearGradient",qn({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(i){var a=i.offset,o=i.color,s=i.opacity;return y.jsx("stop",{offset:a+"%",stopColor:o,stopOpacity:s!==void 0?s:1},a)})}))};x3.propTypes={id:V.string.isRequired,colors:V.arrayOf(V.shape({offset:V.number.isRequired,color:V.string.isRequired,opacity:V.number})).isRequired,gradientTransform:V.string};var _3={linearGradient:x3},Ho={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},cp=m.memo(function(e){var t=e.id,n=e.background,r=n===void 0?Ho.background:n,i=e.color,a=i===void 0?Ho.color:i,o=e.size,s=o===void 0?Ho.size:o,c=e.padding,l=c===void 0?Ho.padding:c,u=e.stagger,d=u===void 0?Ho.stagger:u,f=s+l,h=s/2,g=l/2;return d===!0&&(f=2*s+2*l),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:r}),y.jsx("circle",{cx:g+h,cy:g+h,r:h,fill:a}),d&&y.jsx("circle",{cx:1.5*l+s+h,cy:1.5*l+s+h,r:h,fill:a})]})});cp.displayName="PatternDots",cp.propTypes={id:V.string.isRequired,color:V.string.isRequired,background:V.string.isRequired,size:V.number.isRequired,padding:V.number.isRequired,stagger:V.bool.isRequired};var Yn=function(e){return e*Math.PI/180},Ud=function(e){return 180*e/Math.PI},Yq=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},Yi=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},Gq=function(e){var t=e%360;return t<0&&(t+=360),t},Zq={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},Vo={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},lp=m.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?Vo.spacing:n,i=e.rotation,a=i===void 0?Vo.rotation:i,o=e.background,s=o===void 0?Vo.background:o,c=e.color,l=c===void 0?Vo.color:c,u=e.lineWidth,d=u===void 0?Vo.lineWidth:u,f=Math.round(a)%360,h=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var g,p=h,v=h;return f===0?g=`
|
|
255
|
+
`}return Le.substring(0,Le.length-1)},P.renderTo2dContext=function(F,I){I=I||2;for(var L=P.getModuleCount(),H=0;H<L;H++)for(var R=0;R<L;R++)F.fillStyle=P.isDark(H,R)?"black":"white",F.fillRect(H*I,R*I,I,I)},P};r.stringToBytesFuncs={default:function(b){for(var T=[],j=0;j<b.length;j+=1){var M=b.charCodeAt(j);T.push(M&255)}return T}},r.stringToBytes=r.stringToBytesFuncs.default,r.createStringToBytes=function(b,T){var j=function(){for(var k=_(b),E=function(){var z=k.read();if(z==-1)throw"eof";return z},C=0,O={};;){var $=k.read();if($==-1)break;var A=E(),P=E(),D=E(),N=String.fromCharCode($<<8|A),q=P<<8|D;O[N]=q,C+=1}if(C!=T)throw C+" != "+T;return O}(),M=63;return function(k){for(var E=[],C=0;C<k.length;C+=1){var O=k.charCodeAt(C);if(O<128)E.push(O);else{var $=j[k.charAt(C)];typeof $=="number"?($&255)==$?E.push($):(E.push($>>>8),E.push($&255)):E.push(M)}}return E}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},a={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var b=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],T=1335,j=7973,M=21522,k={},E=function(C){for(var O=0;C!=0;)O+=1,C>>>=1;return O};return k.getBCHTypeInfo=function(C){for(var O=C<<10;E(O)-E(T)>=0;)O^=T<<E(O)-E(T);return(C<<10|O)^M},k.getBCHTypeNumber=function(C){for(var O=C<<12;E(O)-E(j)>=0;)O^=j<<E(O)-E(j);return C<<12|O},k.getPatternPosition=function(C){return b[C-1]},k.getMaskFunction=function(C){switch(C){case o.PATTERN000:return function(O,$){return(O+$)%2==0};case o.PATTERN001:return function(O,$){return O%2==0};case o.PATTERN010:return function(O,$){return $%3==0};case o.PATTERN011:return function(O,$){return(O+$)%3==0};case o.PATTERN100:return function(O,$){return(Math.floor(O/2)+Math.floor($/3))%2==0};case o.PATTERN101:return function(O,$){return O*$%2+O*$%3==0};case o.PATTERN110:return function(O,$){return(O*$%2+O*$%3)%2==0};case o.PATTERN111:return function(O,$){return(O*$%3+(O+$)%2)%2==0};default:throw"bad maskPattern:"+C}},k.getErrorCorrectPolynomial=function(C){for(var O=l([1],0),$=0;$<C;$+=1)O=O.multiply(l([1,c.gexp($)],0));return O},k.getLengthInBits=function(C,O){if(1<=O&&O<10)switch(C){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+C}else if(O<27)switch(C){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+C}else if(O<41)switch(C){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+C}else throw"type:"+O},k.getLostPoint=function(C){for(var O=C.getModuleCount(),$=0,A=0;A<O;A+=1)for(var P=0;P<O;P+=1){for(var D=0,N=C.isDark(A,P),q=-1;q<=1;q+=1)if(!(A+q<0||O<=A+q))for(var z=-1;z<=1;z+=1)P+z<0||O<=P+z||q==0&&z==0||N==C.isDark(A+q,P+z)&&(D+=1);D>5&&($+=3+D-5)}for(var A=0;A<O-1;A+=1)for(var P=0;P<O-1;P+=1){var U=0;C.isDark(A,P)&&(U+=1),C.isDark(A+1,P)&&(U+=1),C.isDark(A,P+1)&&(U+=1),C.isDark(A+1,P+1)&&(U+=1),(U==0||U==4)&&($+=3)}for(var A=0;A<O;A+=1)for(var P=0;P<O-6;P+=1)C.isDark(A,P)&&!C.isDark(A,P+1)&&C.isDark(A,P+2)&&C.isDark(A,P+3)&&C.isDark(A,P+4)&&!C.isDark(A,P+5)&&C.isDark(A,P+6)&&($+=40);for(var P=0;P<O;P+=1)for(var A=0;A<O-6;A+=1)C.isDark(A,P)&&!C.isDark(A+1,P)&&C.isDark(A+2,P)&&C.isDark(A+3,P)&&C.isDark(A+4,P)&&!C.isDark(A+5,P)&&C.isDark(A+6,P)&&($+=40);for(var G=0,P=0;P<O;P+=1)for(var A=0;A<O;A+=1)C.isDark(A,P)&&(G+=1);var ne=Math.abs(100*G/O/O-50)/5;return $+=ne*10,$},k}(),c=function(){for(var b=new Array(256),T=new Array(256),j=0;j<8;j+=1)b[j]=1<<j;for(var j=8;j<256;j+=1)b[j]=b[j-4]^b[j-5]^b[j-6]^b[j-8];for(var j=0;j<255;j+=1)T[b[j]]=j;var M={};return M.glog=function(k){if(k<1)throw"glog("+k+")";return T[k]},M.gexp=function(k){for(;k<0;)k+=255;for(;k>=256;)k-=255;return b[k]},M}();function l(b,T){if(typeof b.length>"u")throw b.length+"/"+T;var j=function(){for(var k=0;k<b.length&&b[k]==0;)k+=1;for(var E=new Array(b.length-k+T),C=0;C<b.length-k;C+=1)E[C]=b[C+k];return E}(),M={};return M.getAt=function(k){return j[k]},M.getLength=function(){return j.length},M.multiply=function(k){for(var E=new Array(M.getLength()+k.getLength()-1),C=0;C<M.getLength();C+=1)for(var O=0;O<k.getLength();O+=1)E[C+O]^=c.gexp(c.glog(M.getAt(C))+c.glog(k.getAt(O)));return l(E,0)},M.mod=function(k){if(M.getLength()-k.getLength()<0)return M;for(var E=c.glog(M.getAt(0))-c.glog(k.getAt(0)),C=new Array(M.getLength()),O=0;O<M.getLength();O+=1)C[O]=M.getAt(O);for(var O=0;O<k.getLength();O+=1)C[O]^=c.gexp(c.glog(k.getAt(O))+E);return l(C,0).mod(k)},M}var u=function(){var b=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],T=function(k,E){var C={};return C.totalCount=k,C.dataCount=E,C},j={},M=function(k,E){switch(E){case a.L:return b[(k-1)*4+0];case a.M:return b[(k-1)*4+1];case a.Q:return b[(k-1)*4+2];case a.H:return b[(k-1)*4+3];default:return}};return j.getRSBlocks=function(k,E){var C=M(k,E);if(typeof C>"u")throw"bad rs block @ typeNumber:"+k+"/errorCorrectionLevel:"+E;for(var O=C.length/3,$=[],A=0;A<O;A+=1)for(var P=C[A*3+0],D=C[A*3+1],N=C[A*3+2],q=0;q<P;q+=1)$.push(T(D,N));return $},j}(),d=function(){var b=[],T=0,j={};return j.getBuffer=function(){return b},j.getAt=function(M){var k=Math.floor(M/8);return(b[k]>>>7-M%8&1)==1},j.put=function(M,k){for(var E=0;E<k;E+=1)j.putBit((M>>>k-E-1&1)==1)},j.getLengthInBits=function(){return T},j.putBit=function(M){var k=Math.floor(T/8);b.length<=k&&b.push(0),M&&(b[k]|=128>>>T%8),T+=1},j},f=function(b){var T=i.MODE_NUMBER,j=b,M={};M.getMode=function(){return T},M.getLength=function(C){return j.length},M.write=function(C){for(var O=j,$=0;$+2<O.length;)C.put(k(O.substring($,$+3)),10),$+=3;$<O.length&&(O.length-$==1?C.put(k(O.substring($,$+1)),4):O.length-$==2&&C.put(k(O.substring($,$+2)),7))};var k=function(C){for(var O=0,$=0;$<C.length;$+=1)O=O*10+E(C.charAt($));return O},E=function(C){if("0"<=C&&C<="9")return C.charCodeAt(0)-48;throw"illegal char :"+C};return M},h=function(b){var T=i.MODE_ALPHA_NUM,j=b,M={};M.getMode=function(){return T},M.getLength=function(E){return j.length},M.write=function(E){for(var C=j,O=0;O+1<C.length;)E.put(k(C.charAt(O))*45+k(C.charAt(O+1)),11),O+=2;O<C.length&&E.put(k(C.charAt(O)),6)};var k=function(E){if("0"<=E&&E<="9")return E.charCodeAt(0)-48;if("A"<=E&&E<="Z")return E.charCodeAt(0)-65+10;switch(E){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+E}};return M},g=function(b){var T=i.MODE_8BIT_BYTE,j=r.stringToBytes(b),M={};return M.getMode=function(){return T},M.getLength=function(k){return j.length},M.write=function(k){for(var E=0;E<j.length;E+=1)k.put(j[E],8)},M},p=function(b){var T=i.MODE_KANJI,j=r.stringToBytesFuncs.SJIS;if(!j)throw"sjis not supported.";(function(E,C){var O=j(E);if(O.length!=2||(O[0]<<8|O[1])!=C)throw"sjis not supported."})("友",38726);var M=j(b),k={};return k.getMode=function(){return T},k.getLength=function(E){return~~(M.length/2)},k.write=function(E){for(var C=M,O=0;O+1<C.length;){var $=(255&C[O])<<8|255&C[O+1];if(33088<=$&&$<=40956)$-=33088;else if(57408<=$&&$<=60351)$-=49472;else throw"illegal char at "+(O+1)+"/"+$;$=($>>>8&255)*192+($&255),E.put($,13),O+=2}if(O<C.length)throw"illegal char at "+(O+1)},k},v=function(){var b=[],T={};return T.writeByte=function(j){b.push(j&255)},T.writeShort=function(j){T.writeByte(j),T.writeByte(j>>>8)},T.writeBytes=function(j,M,k){M=M||0,k=k||j.length;for(var E=0;E<k;E+=1)T.writeByte(j[E+M])},T.writeString=function(j){for(var M=0;M<j.length;M+=1)T.writeByte(j.charCodeAt(M))},T.toByteArray=function(){return b},T.toString=function(){var j="";j+="[";for(var M=0;M<b.length;M+=1)M>0&&(j+=","),j+=b[M];return j+="]",j},T},w=function(){var b=0,T=0,j=0,M="",k={},E=function(O){M+=String.fromCharCode(C(O&63))},C=function(O){if(!(O<0)){if(O<26)return 65+O;if(O<52)return 97+(O-26);if(O<62)return 48+(O-52);if(O==62)return 43;if(O==63)return 47}throw"n:"+O};return k.writeByte=function(O){for(b=b<<8|O&255,T+=8,j+=1;T>=6;)E(b>>>T-6),T-=6},k.flush=function(){if(T>0&&(E(b<<6-T),b=0,T=0),j%3!=0)for(var O=3-j%3,$=0;$<O;$+=1)M+="="},k.toString=function(){return M},k},_=function(b){var T=b,j=0,M=0,k=0,E={};E.read=function(){for(;k<8;){if(j>=T.length){if(k==0)return-1;throw"unexpected end of file./"+k}var O=T.charAt(j);if(j+=1,O=="=")return k=0,-1;if(O.match(/^\s$/))continue;M=M<<6|C(O.charCodeAt(0)),k+=6}var $=M>>>k-8&255;return k-=8,$};var C=function(O){if(65<=O&&O<=90)return O-65;if(97<=O&&O<=122)return O-97+26;if(48<=O&&O<=57)return O-48+52;if(O==43)return 62;if(O==47)return 63;throw"c:"+O};return E},x=function(b,T){var j=b,M=T,k=new Array(b*T),E={};E.setPixel=function(A,P,D){k[P*j+A]=D},E.write=function(A){A.writeString("GIF87a"),A.writeShort(j),A.writeShort(M),A.writeByte(128),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(0),A.writeByte(255),A.writeByte(255),A.writeByte(255),A.writeString(","),A.writeShort(0),A.writeShort(0),A.writeShort(j),A.writeShort(M),A.writeByte(0);var P=2,D=O(P);A.writeByte(P);for(var N=0;D.length-N>255;)A.writeByte(255),A.writeBytes(D,N,255),N+=255;A.writeByte(D.length-N),A.writeBytes(D,N,D.length-N),A.writeByte(0),A.writeString(";")};var C=function(A){var P=A,D=0,N=0,q={};return q.write=function(z,U){if(z>>>U)throw"length over";for(;D+U>=8;)P.writeByte(255&(z<<D|N)),U-=8-D,z>>>=8-D,N=0,D=0;N=z<<D|N,D=D+U},q.flush=function(){D>0&&P.writeByte(N)},q},O=function(A){for(var P=1<<A,D=(1<<A)+1,N=A+1,q=$(),z=0;z<P;z+=1)q.add(String.fromCharCode(z));q.add(String.fromCharCode(P)),q.add(String.fromCharCode(D));var U=v(),G=C(U);G.write(P,N);var ne=0,te=String.fromCharCode(k[ne]);for(ne+=1;ne<k.length;){var X=String.fromCharCode(k[ne]);ne+=1,q.contains(te+X)?te=te+X:(G.write(q.indexOf(te),N),q.size()<4095&&(q.size()==1<<N&&(N+=1),q.add(te+X)),te=X)}return G.write(q.indexOf(te),N),G.write(D,N),G.flush(),U.toByteArray()},$=function(){var A={},P=0,D={};return D.add=function(N){if(D.contains(N))throw"dup key:"+N;A[N]=P,P+=1},D.size=function(){return P},D.indexOf=function(N){return A[N]},D.contains=function(N){return typeof A[N]<"u"},D};return E},S=function(b,T,j){for(var M=x(b,T),k=0;k<T;k+=1)for(var E=0;E<b;E+=1)M.setPixel(E,k,j(E,k));var C=v();M.write(C);for(var O=w(),$=C.toByteArray(),A=0;A<$.length;A+=1)O.writeByte($[A]);return O.flush(),"data:image/gif;base64,"+O};return r}();(function(){n.stringToBytesFuncs["UTF-8"]=function(r){function i(a){for(var o=[],s=0;s<a.length;s++){var c=a.charCodeAt(s);c<128?o.push(c):c<2048?o.push(192|c>>6,128|c&63):c<55296||c>=57344?o.push(224|c>>12,128|c>>6&63,128|c&63):(s++,c=65536+((c&1023)<<10|a.charCodeAt(s)&1023),o.push(240|c>>18,128|c>>12&63,128|c>>6&63,128|c&63))}return o}return i(r)}})(),function(r){e.exports=r()}(function(){return n})})(E_);var vA=E_.exports,yA=Hn&&Hn.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$h=Hn&&Hn.__assign||function(){return $h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},$h.apply(this,arguments)};Object.defineProperty(ym,"__esModule",{value:!0});exports.QRCode_1=ym.QRCode=void 0;var bA=gA,xA=vA,bf=m,_A=function(e){yA(t,e);function t(n){var r=e.call(this,n)||this;return r.canvasRef=bf.createRef(),r}return t.prototype.download=function(n,r){if(this.canvasRef.current){var i=void 0;switch(n){case"jpg":i="image/jpeg";break;case"webp":i="image/webp";break;case"png":default:i="image/png";break}var a=this.canvasRef.current.toDataURL(i,1),o=document.createElement("a");o.download=r??"react-qrcode-logo",o.href=a,o.click()}},t.prototype.utf16to8=function(n){var r="",i,a,o=n.length;for(i=0;i<o;i++)a=n.charCodeAt(i),a>=1&&a<=127?r+=n.charAt(i):a>2047?(r+=String.fromCharCode(224|a>>12&15),r+=String.fromCharCode(128|a>>6&63),r+=String.fromCharCode(128|a>>0&63)):(r+=String.fromCharCode(192|a>>6&31),r+=String.fromCharCode(128|a>>0&63));return r},t.prototype.drawRoundedSquare=function(n,r,i,a,o,s,c,l){l.lineWidth=n,l.fillStyle=o,l.strokeStyle=o,i+=n/2,r+=n/2,a-=n,Array.isArray(s)||(s=[s,s,s,s]),s=s.map(function(g){return g=Math.min(g,a/2),g<0?0:g});var u=s[0]||0,d=s[1]||0,f=s[2]||0,h=s[3]||0;l.beginPath(),l.moveTo(r+u,i),l.lineTo(r+a-d,i),d&&l.quadraticCurveTo(r+a,i,r+a,i+d),l.lineTo(r+a,i+a-f),f&&l.quadraticCurveTo(r+a,i+a,r+a-f,i+a),l.lineTo(r+h,i+a),h&&l.quadraticCurveTo(r,i+a,r,i+a-h),l.lineTo(r,i+u),u&&l.quadraticCurveTo(r,i,r+u,i),l.closePath(),l.stroke(),c&&l.fill()},t.prototype.drawPositioningPattern=function(n,r,i,a,o,s,c){c===void 0&&(c=[0,0,0,0]);var l=Math.ceil(r),u,d;typeof c!="number"&&!Array.isArray(c)?(u=c.outer||0,d=c.inner||0):(u=c,d=u);var f,h;typeof s!="string"?(f=s.outer,h=s.inner):(f=s,h=s);var g=a*r+i,p=o*r+i,v=r*7;this.drawRoundedSquare(l,p,g,v,f,u,!1,n),v=r*3,g+=r*2,p+=r*2,this.drawRoundedSquare(l,p,g,v,h,d,!0,n)},t.prototype.isInPositioninZone=function(n,r,i){return i.some(function(a){return r>=a.row&&r<=a.row+7&&n>=a.col&&n<=a.col+7})},t.prototype.transformPixelLengthIntoNumberOfCells=function(n,r){return n/r},t.prototype.isCoordinateInImage=function(n,r,i,a,o,s,c,l){if(l){var u=2,d=this.transformPixelLengthIntoNumberOfCells(o,c),f=this.transformPixelLengthIntoNumberOfCells(s,c),h=this.transformPixelLengthIntoNumberOfCells(i,c)-1,g=this.transformPixelLengthIntoNumberOfCells(a,c)-1;return r>=d-u&&r<=d+h+u&&n>=f-u&&n<=f+g+u}else return!1},t.prototype.shouldComponentUpdate=function(n){return!bA(this.props,n)},t.prototype.componentDidMount=function(){this.update()},t.prototype.componentDidUpdate=function(){this.update()},t.prototype.update=function(){var n,r=this.props,i=r.value,a=r.ecLevel,o=r.enableCORS,s=r.bgColor,c=r.fgColor,l=r.logoImage,u=r.logoOpacity,d=r.logoOnLoad,f=r.removeQrCodeBehindLogo,h=r.qrStyle,g=r.eyeRadius,p=r.eyeColor,v=r.logoPaddingStyle,w=+this.props.size,_=+this.props.quietZone,x=this.props.logoWidth?+this.props.logoWidth:0,S=this.props.logoHeight?+this.props.logoHeight:0,b=this.props.logoPadding?+this.props.logoPadding:0,T=xA(0,a);T.addData(this.utf16to8(i)),T.make();var j=(n=this.canvasRef)===null||n===void 0?void 0:n.current,M=j.getContext("2d"),k=w+2*_,E=T.getModuleCount(),C=w/E,O=window.devicePixelRatio||1;j.height=j.width=k*O,M.scale(O,O),M.fillStyle=s,M.fillRect(0,0,k,k);var $=_,A=[{row:0,col:0},{row:0,col:E-7},{row:E-7,col:0}];if(M.strokeStyle=c,h==="dots"){M.fillStyle=c;for(var P=C/2,D=0;D<E;D++)for(var N=0;N<E;N++)T.isDark(D,N)&&!this.isInPositioninZone(D,N,A)&&(M.beginPath(),M.arc(Math.round(N*C)+P+$,Math.round(D*C)+P+$,P/100*75,0,2*Math.PI,!1),M.closePath(),M.fill())}else if(h==="fluid"){for(var P=Math.ceil(C/2),D=0;D<E;D++)for(var N=0;N<E;N++)if(T.isDark(D,N)&&!this.isInPositioninZone(D,N,A)){var q=[!1,!1,!1,!1];D>0&&!T.isDark(D-1,N)&&N>0&&!T.isDark(D,N-1)&&(q[0]=!0),D>0&&!T.isDark(D-1,N)&&N<E-1&&!T.isDark(D,N+1)&&(q[1]=!0),D<E-1&&!T.isDark(D+1,N)&&N<E-1&&!T.isDark(D,N+1)&&(q[2]=!0),D<E-1&&!T.isDark(D+1,N)&&N>0&&!T.isDark(D,N-1)&&(q[3]=!0);var z=Math.ceil((N+1)*C)-Math.floor(N*C),U=Math.ceil((D+1)*C)-Math.floor(D*C);M.fillStyle=c,M.beginPath(),M.arc(Math.round(N*C)+P+$,Math.round(D*C)+P+$,P,0,2*Math.PI,!1),M.closePath(),M.fill(),q[0]||M.fillRect(Math.round(N*C)+$,Math.round(D*C)+$,z/2,U/2),q[1]||M.fillRect(Math.round(N*C)+$+Math.floor(z/2),Math.round(D*C)+$,z/2,U/2),q[2]||M.fillRect(Math.round(N*C)+$+Math.floor(z/2),Math.round(D*C)+$+Math.floor(U/2),z/2,U/2),q[3]||M.fillRect(Math.round(N*C)+$,Math.round(D*C)+$+Math.floor(U/2),z/2,U/2)}}else for(var D=0;D<E;D++)for(var N=0;N<E;N++)if(T.isDark(D,N)&&!this.isInPositioninZone(D,N,A)){M.fillStyle=c;var z=Math.ceil((N+1)*C)-Math.floor(N*C),U=Math.ceil((D+1)*C)-Math.floor(D*C);M.fillRect(Math.round(N*C)+$,Math.round(D*C)+$,z,U)}for(var G=0;G<3;G++){var ne=A[G],D=ne.row,N=ne.col,te=g,X=void 0;Array.isArray(te)&&(te=te[G]),typeof te=="number"&&(te=[te,te,te,te]),p?Array.isArray(p)?X=p[G]:X=p:X=c,this.drawPositioningPattern(M,C,$,D,N,X,te)}if(l){var J=new Image;o&&(J.crossOrigin="Anonymous"),J.onload=function(Q){M.save();var re=x||w*.2,F=S||re,I=(w-re)/2,L=(w-F)/2;if(f||b){M.beginPath(),M.strokeStyle=s,M.fillStyle=s;var H=re+2*b,R=F+2*b,K=I+$-b,Z=L+$-b;if(v==="circle"){var ee=K+H/2,pe=Z+R/2;M.ellipse(ee,pe,H/2,R/2,0,0,2*Math.PI),M.stroke(),M.fill()}else M.fillRect(K,Z,H,R)}M.globalAlpha=u,M.drawImage(J,I+$,L+$,re,F),M.restore(),d&&d(Q)},J.src=l}},t.prototype.render=function(){var n,r=+this.props.size+2*+this.props.quietZone;return bf.createElement("canvas",{id:(n=this.props.id)!==null&&n!==void 0?n:"react-qrcode-logo",height:r,width:r,style:$h({height:r+"px",width:r+"px"},this.props.style),ref:this.canvasRef})},t.defaultProps={value:"https://reactjs.org/",ecLevel:"M",enableCORS:!1,size:150,quietZone:10,bgColor:"#FFFFFF",fgColor:"#000000",logoOpacity:1,qrStyle:"squares",eyeRadius:[0,0,0],logoPaddingStyle:"square"},t}(bf.Component);exports.QRCode_1=ym.QRCode=_A;const O_=({value:e,MiniDetailComponent:t,children:n,miniDetailPlacement:r})=>!e||!t?n:y.jsx(t,{id:e.toString(),placement:r,children:n}),M_=({InputContainer:e=ju,value:t,options:n,onChange:r,label:i,withoutLabel:a,isNumber:o,size:s,hidden:c,disabled:l,noSortOptions:u,className:d,suffixIdToName:f,noEmptyOption:h,appendCurrentSelectionWithName:g,dropdownWidth:p,hint:v,addNewOptionPath:w,refreshOptions:_,MiniDetailComponent:x,miniDetailPlacement:S,selectedItemNavigateTo:b,noRemoveButton:T})=>{const{texts:{customSelect:j}}=m.useContext(Kt),[M,k]=m.useState(!1),[E,C]=m.useState(""),O=m.useCallback(z=>{C(z)},[]),$=m.useMemo(()=>n.find(z=>z.id===t)??null,[n,t]),A=m.useCallback(z=>{var U;return z===null?"":!z.name||z.name.length===0?((U=z.id)==null?void 0:U.toString())??"":f?`${z.name} (${z.id})`:z.name},[f]),P=m.useMemo(()=>{const z=n?[...n]:[];return g!==void 0&&t!==void 0&&t!==null&&(z.some(U=>U.id===t)||z.push({id:t,name:g})),z.map(U=>({id:U.id,name:A(U)})).filter(U=>em(U.name,E)).sort((U,G)=>u?0:(U.name??"").localeCompare(G.name??""))},[n,u,E,A,g,t]),D=m.useCallback(z=>{var U;r&&r((z==null?void 0:z.id)===void 0||(z==null?void 0:z.id)===null?null:o?Number(z.id):(U=z.id)==null?void 0:U.toString())},[r,o]),N=m.useCallback(z=>{k(!1),D(z)},[D]),q=m.useRef(null);return y.jsx(y.Fragment,{children:y.jsxs(e,{withoutLabel:a,label:i??"",hidden:c,inputContainerClassName:oe({"luminus-dropdown-select-open":M}),className:d,hint:v,disabled:l,children:[y.jsx(S_,{currentSelection:$,selectedItemNavigateTo:b,children:y.jsx(O_,{value:t,MiniDetailComponent:x,miniDetailPlacement:S,children:y.jsxs(Tr.Select,{ref:q,size:s,value:t??"",onMouseDown:z=>{z.currentTarget.focus(),z.preventDefault()},onClick:()=>{!l&&k(!0)},onChange:()=>{},className:oe("w-100",{"luminus-dropdown-picker-disabled":l}),hidden:c,children:[h&&!(t==null||t==="")?void 0:y.jsx("option",{value:""}),t!=null&&y.jsx("option",{value:t,children:A($)})]})})}),q.current&&y.jsx(p_,{show:M,onCancel:()=>k(!1),items:P,currentSelection:$??null,onSelectionChange:N,onSearchQueryChange:O,texts:j,disabled:l,inputRef:q,autoHideSearch:!0,allItemsLength:n.length,itemsNameWidth:p,addNewOptionPath:w,refreshOptions:_,noRemoveButton:T})]})})};function wA(e){return rt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function CA(e){return rt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function TA(e){return rt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function SA(e){return rt({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z"},child:[]}]})(e)}const kA=m.forwardRef(({onClick:e,text:t},n)=>y.jsx("div",{ref:n,onClick:r=>{r.preventDefault(),e(r)},role:"button",className:"middle-div",children:y.jsxs("div",{className:"d-flex flex-column align-items-center",children:[y.jsx("div",{className:"mt-",children:"…"}),y.jsx("div",{className:"mt-1 middle-letter",children:t})]})}));var bm=oc(),He=e=>ac(e,bm),xm=oc();He.write=e=>ac(e,xm);var Pu=oc();He.onStart=e=>ac(e,Pu);var _m=oc();He.onFrame=e=>ac(e,_m);var wm=oc();He.onFinish=e=>ac(e,wm);var Pa=[];He.setTimeout=(e,t)=>{const n=He.now()+t,r=()=>{const a=Pa.findIndex(o=>o.cancel==r);~a&&Pa.splice(a,1),ci-=~a?1:0},i={time:n,handler:e,cancel:r};return Pa.splice($_(n),0,i),ci+=1,A_(),i};var $_=e=>~(~Pa.findIndex(t=>t.time>e)||~Pa.length);He.cancel=e=>{Pu.delete(e),_m.delete(e),wm.delete(e),bm.delete(e),xm.delete(e)};He.sync=e=>{Ah=!0,He.batchedUpdates(e),Ah=!1};He.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,He.onStart(n)}return r.handler=e,r.cancel=()=>{Pu.delete(n),t=null},r};var Cm=typeof window<"u"?window.requestAnimationFrame:()=>{};He.use=e=>Cm=e;He.now=typeof performance<"u"?()=>performance.now():Date.now;He.batchedUpdates=e=>e();He.catch=console.error;He.frameLoop="always";He.advance=()=>{He.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):j_()};var si=-1,ci=0,Ah=!1;function ac(e,t){Ah?(t.delete(e),e(0)):(t.add(e),A_())}function A_(){si<0&&(si=0,He.frameLoop!=="demand"&&Cm(R_))}function EA(){si=-1}function R_(){~si&&(Cm(R_),He.batchedUpdates(j_))}function j_(){const e=si;si=He.now();const t=$_(si);if(t&&(P_(Pa.splice(0,t),n=>n.handler()),ci-=t),!ci){EA();return}Pu.flush(),bm.flush(e?Math.min(64,si-e):16.667),_m.flush(),xm.flush(),wm.flush()}function oc(){let e=new Set,t=e;return{add(n){ci+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ci-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ci-=t.size,P_(t,r=>r(n)&&e.add(r)),ci+=e.size,t=e)}}}function P_(e,t){e.forEach(n=>{try{t(n)}catch(r){He.catch(r)}})}var OA=Object.defineProperty,MA=(e,t)=>{for(var n in t)OA(e,n,{get:t[n],enumerable:!0})},cr={};MA(cr,{assign:()=>AA,colors:()=>ui,createStringInterpolator:()=>Sm,skipAnimation:()=>D_,to:()=>I_,willAdvance:()=>km});function Rh(){}var $A=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),fe={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Pr(e,t){if(fe.arr(e)){if(!fe.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var We=(e,t)=>e.forEach(t);function br(e,t,n){if(fe.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var wn=e=>fe.und(e)?[]:fe.arr(e)?e:[e];function ns(e,t){if(e.size){const n=Array.from(e);e.clear(),We(n,t)}}var Xo=(e,...t)=>ns(e,n=>n(...t)),Tm=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Sm,I_,ui=null,D_=!1,km=Rh,AA=e=>{e.to&&(I_=e.to),e.now&&(He.now=e.now),e.colors!==void 0&&(ui=e.colors),e.skipAnimation!=null&&(D_=e.skipAnimation),e.createStringInterpolator&&(Sm=e.createStringInterpolator),e.requestAnimationFrame&&He.use(e.requestAnimationFrame),e.batchedUpdates&&(He.batchedUpdates=e.batchedUpdates),e.willAdvance&&(km=e.willAdvance),e.frameLoop&&(He.frameLoop=e.frameLoop)},rs=new Set,zn=[],xf=[],Rl=0,Iu={get idle(){return!rs.size&&!zn.length},start(e){Rl>e.priority?(rs.add(e),He.onStart(RA)):(N_(e),He(jh))},advance:jh,sort(e){if(Rl)He.onFrame(()=>Iu.sort(e));else{const t=zn.indexOf(e);~t&&(zn.splice(t,1),L_(e))}},clear(){zn=[],rs.clear()}};function RA(){rs.forEach(N_),rs.clear(),He(jh)}function N_(e){zn.includes(e)||L_(e)}function L_(e){zn.splice(jA(zn,t=>t.priority>e.priority),0,e)}function jh(e){const t=xf;for(let n=0;n<zn.length;n++){const r=zn[n];Rl=r.priority,r.idle||(km(r),r.advance(e),r.idle||t.push(r))}return Rl=0,xf=zn,xf.length=0,zn=t,zn.length>0}function jA(e,t){const n=e.findIndex(t);return n<0?e.length:n}var PA=(e,t,n)=>Math.min(Math.max(n,e),t),IA={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},ar="[-+]?\\d*\\.?\\d+",jl=ar+"%";function Du(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var DA=new RegExp("rgb"+Du(ar,ar,ar)),NA=new RegExp("rgba"+Du(ar,ar,ar,ar)),LA=new RegExp("hsl"+Du(ar,jl,jl)),FA=new RegExp("hsla"+Du(ar,jl,jl,ar)),BA=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,UA=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,WA=/^#([0-9a-fA-F]{6})$/,zA=/^#([0-9a-fA-F]{8})$/;function HA(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=WA.exec(e))?parseInt(t[1]+"ff",16)>>>0:ui&&ui[e]!==void 0?ui[e]:(t=DA.exec(e))?(wa(t[1])<<24|wa(t[2])<<16|wa(t[3])<<8|255)>>>0:(t=NA.exec(e))?(wa(t[1])<<24|wa(t[2])<<16|wa(t[3])<<8|$v(t[4]))>>>0:(t=BA.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=zA.exec(e))?parseInt(t[1],16)>>>0:(t=UA.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=LA.exec(e))?(Ov(Mv(t[1]),Pc(t[2]),Pc(t[3]))|255)>>>0:(t=FA.exec(e))?(Ov(Mv(t[1]),Pc(t[2]),Pc(t[3]))|$v(t[4]))>>>0:null}function _f(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ov(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=_f(i,r,e+1/3),o=_f(i,r,e),s=_f(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(o*255)<<16|Math.round(s*255)<<8}function wa(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Mv(e){return(parseFloat(e)%360+360)%360/360}function $v(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Pc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Av(e){let t=HA(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var Os=(e,t,n)=>{if(fe.fun(e))return e;if(fe.arr(e))return Os({range:e,output:t,extrapolate:n});if(fe.str(e.output[0]))return Sm(e);const r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",c=r.easing||(l=>l);return l=>{const u=qA(l,a);return VA(l,a[u],a[u+1],i[u],i[u+1],c,o,s,r.map)}};function VA(e,t,n,r,i,a,o,s,c){let l=c?c(e):e;if(l<t){if(o==="identity")return l;o==="clamp"&&(l=t)}if(l>n){if(s==="identity")return l;s==="clamp"&&(l=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?l=-l:n===1/0?l=l-t:l=(l-t)/(n-t),l=a(l),r===-1/0?l=-l:i===1/0?l=l+r:l=l*(i-r)+r,l)}function qA(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var YA=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return PA(0,1,i/e)},Pl=1.70158,Ic=Pl*1.525,Rv=Pl+1,jv=2*Math.PI/3,Pv=2*Math.PI/4.5,Dc=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,GA={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Rv*e*e*e-Pl*e*e,easeOutBack:e=>1+Rv*Math.pow(e-1,3)+Pl*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Ic+1)*2*e-Ic)/2:(Math.pow(2*e-2,2)*((Ic+1)*(e*2-2)+Ic)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*jv),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*jv)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Pv))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Pv)/2+1,easeInBounce:e=>1-Dc(1-e),easeOutBounce:Dc,easeInOutBounce:e=>e<.5?(1-Dc(1-2*e))/2:(1+Dc(2*e-1))/2,steps:YA},Ms=Symbol.for("FluidValue.get"),Ka=Symbol.for("FluidValue.observers"),Wn=e=>!!(e&&e[Ms]),En=e=>e&&e[Ms]?e[Ms]():e,Iv=e=>e[Ka]||null;function ZA(e,t){e.eventObserved?e.eventObserved(t):e(t)}function $s(e,t){const n=e[Ka];n&&n.forEach(r=>{ZA(r,t)})}var F_=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");KA(this,e)}},KA=(e,t)=>B_(e,Ms,t);function co(e,t){if(e[Ms]){let n=e[Ka];n||B_(e,Ka,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function As(e,t){const n=e[Ka];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Ka]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var B_=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),rl=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,XA=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Dv=new RegExp(`(${rl.source})(%|[a-z]+)`,"i"),QA=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Nu=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,U_=e=>{const[t,n]=JA(e);if(!t||Tm())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&Nu.test(n))return U_(n);if(n)return n}return e},JA=e=>{const t=Nu.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},wf,eR=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,W_=e=>{wf||(wf=ui?new RegExp(`(${Object.keys(ui).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>En(a).replace(Nu,U_).replace(XA,Av).replace(wf,Av)),n=t.map(a=>a.match(rl).map(Number)),i=n[0].map((a,o)=>n.map(s=>{if(!(o in s))throw Error('The arity of each "output" value must be equal');return s[o]})).map(a=>Os({...e,output:a}));return a=>{var c;const o=!Dv.test(t[0])&&((c=t.find(l=>Dv.test(l)))==null?void 0:c.replace(rl,""));let s=0;return t[0].replace(rl,()=>`${i[s++](a)}${o||""}`).replace(QA,eR)}},Em="react-spring: ",z_=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Em}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},tR=z_(console.warn);function nR(){tR(`${Em}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var rR=z_(console.warn);function iR(){rR(`${Em}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Lu(e){return fe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Tm()&&Nu.test(e)||e in(ui||{}))}var Di=Tm()?m.useEffect:m.useLayoutEffect,aR=()=>{const e=m.useRef(!1);return Di(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Om(){const e=m.useState()[1],t=aR();return()=>{t.current&&e(Math.random())}}function oR(e,t){const[n]=m.useState(()=>({inputs:t,result:e()})),r=m.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&sR(t,a.inputs)||(a={inputs:t,result:e()}):a=n,m.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function sR(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var Mm=e=>m.useEffect(e,cR),cR=[];function Ph(e){const t=m.useRef();return m.useEffect(()=>{t.current=e}),t.current}var Rs=Symbol.for("Animated:node"),lR=e=>!!e&&e[Rs]===e,fr=e=>e&&e[Rs],$m=(e,t)=>$A(e,Rs,t),Fu=e=>e&&e[Rs]&&e[Rs].getPayload(),H_=class{constructor(){$m(this,this)}getPayload(){return this.payload||[]}},sc=class extends H_{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,fe.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new sc(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return fe.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,fe.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},js=class extends sc{constructor(e){super(0),this._string=null,this._toString=Os({output:[e,e]})}static create(e){return new js(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(fe.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Os({output:[this.getValue(),e]})),this._value=0,super.reset()}},Il={dependencies:null},Bu=class extends H_{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return br(this.source,(n,r)=>{lR(n)?t[r]=n.getValue(e):Wn(n)?t[r]=En(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&We(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return br(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Il.dependencies&&Wn(e)&&Il.dependencies.add(e);const t=Fu(e);t&&We(t,n=>this.add(n))}},V_=class extends Bu{constructor(e){super(e)}static create(e){return new V_(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(uR)),!0)}};function uR(e){return(Lu(e)?js:sc).create(e)}function Ih(e){const t=fr(e);return t?t.constructor:fe.arr(e)?V_:Lu(e)?js:sc}var Nv=(e,t)=>{const n=!fe.fun(e)||e.prototype&&e.prototype.isReactComponent;return m.forwardRef((r,i)=>{const a=m.useRef(null),o=n&&m.useCallback(g=>{a.current=hR(i,g)},[i]),[s,c]=fR(r,t),l=Om(),u=()=>{const g=a.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,s.getValue(!0)):!1)===!1&&l()},d=new dR(u,c),f=m.useRef();Di(()=>(f.current=d,We(c,g=>co(g,d)),()=>{f.current&&(We(f.current.deps,g=>As(g,f.current)),He.cancel(f.current.update))})),m.useEffect(u,[]),Mm(()=>()=>{const g=f.current;We(g.deps,p=>As(p,g))});const h=t.getComponentProps(s.getValue());return ue.createElement(e,{...h,ref:o})})},dR=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&He.write(this.update)}};function fR(e,t){const n=new Set;return Il.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Bu(e),Il.dependencies=null,[e,n]}function hR(e,t){return e&&(fe.fun(e)?e(t):e.current=t),t}var Lv=Symbol.for("AnimatedComponent"),pR=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Bu(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=o=>{const s=Fv(o)||"Anonymous";return fe.str(o)?o=a[o]||(a[o]=Nv(o,i)):o=o[Lv]||(o[Lv]=Nv(o,i)),o.displayName=`Animated(${s})`,o};return br(e,(o,s)=>{fe.arr(e)&&(s=Fv(o)),a[s]=a(o)}),{animated:a}},Fv=e=>fe.str(e)?e:e&&fe.str(e.displayName)?e.displayName:fe.fun(e)&&e.name||null;function On(e,...t){return fe.fun(e)?e(...t):e}var is=(e,t)=>e===!0||!!(t&&e&&(fe.fun(e)?e(t):wn(e).includes(t))),q_=(e,t)=>fe.obj(e)?t&&e[t]:e,Y_=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,mR=e=>e,Uu=(e,t=mR)=>{let n=gR;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);fe.und(a)||(r[i]=a)}return r},gR=["config","onProps","onStart","onChange","onPause","onResume","onRest"],vR={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function yR(e){const t={};let n=0;if(br(e,(r,i)=>{vR[i]||(t[i]=r,n++)}),n)return t}function Am(e){const t=yR(e);if(t){const n={to:t};return br(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Ps(e){return e=En(e),fe.arr(e)?e.map(Ps):Lu(e)?cr.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function G_(e){for(const t in e)return!0;return!1}function Dh(e){return fe.fun(e)||fe.arr(e)&&fe.obj(e[0])}function Nh(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Z_(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var Rm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Lh={...Rm.default,mass:1,damping:1,easing:GA.linear,clamp:!1},bR=class{constructor(){this.velocity=0,Object.assign(this,Lh)}};function xR(e,t,n){n&&(n={...n},Bv(n,t),t={...n,...t}),Bv(e,t),Object.assign(e,t);for(const o in Lh)e[o]==null&&(e[o]=Lh[o]);let{frequency:r,damping:i}=e;const{mass:a}=e;return fe.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function Bv(e,t){if(!fe.und(t.decay))e.duration=void 0;else{const n=!fe.und(t.tension)||!fe.und(t.friction);(n||!fe.und(t.frequency)||!fe.und(t.damping)||!fe.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var Uv=[],_R=class{constructor(){this.changed=!1,this.values=Uv,this.toValues=null,this.fromValues=Uv,this.config=new bR,this.immediate=!1}};function K_(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((o,s)=>{let c,l,u=is(n.cancel??(r==null?void 0:r.cancel),t);if(u)h();else{fe.und(n.pause)||(i.paused=is(n.pause,t));let g=r==null?void 0:r.pause;g!==!0&&(g=i.paused||is(g,t)),c=On(n.delay||0,t),g?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(l),l.cancel(),c=l.time-He.now()}function f(){c>0&&!cr.skipAnimation?(i.delayed=!0,l=He.setTimeout(h,c),i.pauseQueue.add(d),i.timeouts.add(l)):h()}function h(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(l),e<=(i.cancelId||0)&&(u=!0);try{a.start({...n,callId:e,cancel:u},o)}catch(g){s(g)}}})}var jm=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Ia(e.get()):t.every(n=>n.noop)?X_(e.get()):nr(e.get(),t.every(n=>n.finished)),X_=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),nr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Ia=e=>({value:e,cancelled:!0,finished:!1});function Q_(e,t,n,r){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:c}=n;return!a&&e===s&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const l=Uu(t,(v,w)=>w==="onRest"?void 0:v);let u,d;const f=new Promise((v,w)=>(u=v,d=w)),h=v=>{const w=i<=(n.cancelId||0)&&Ia(r)||i!==n.asyncId&&nr(r,!1);if(w)throw v.result=w,d(v),v},g=(v,w)=>{const _=new Wv,x=new zv;return(async()=>{if(cr.skipAnimation)throw Is(n),x.result=nr(r,!1),d(x),x;h(_);const S=fe.obj(v)?{...v}:{...w,to:v};S.parentId=i,br(l,(T,j)=>{fe.und(S[j])&&(S[j]=T)});const b=await r.start(S);return h(_),n.paused&&await new Promise(T=>{n.resumeQueue.add(T)}),b})()};let p;if(cr.skipAnimation)return Is(n),nr(r,!1);try{let v;fe.arr(e)?v=(async w=>{for(const _ of w)await g(_)})(e):v=Promise.resolve(e(g,r.stop.bind(r))),await Promise.all([v.then(u),f]),p=nr(r.get(),!0,!1)}catch(v){if(v instanceof Wv)p=v.result;else if(v instanceof zv)p=v.result;else throw v}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?c:void 0)}return fe.fun(o)&&He.batchedUpdates(()=>{o(p,r,r.item)}),p})()}function Is(e,t){ns(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var Wv=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},zv=class extends Error{constructor(){super("SkipAnimationSignal")}},Fh=e=>e instanceof Pm,wR=1,Pm=class extends F_{constructor(){super(...arguments),this.id=wR++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=fr(this);return e&&e.getValue()}to(...e){return cr.to(this,e)}interpolate(...e){return nR(),cr.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){$s(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Iu.sort(this),$s(this,{type:"priority",parent:this,priority:e})}},ea=Symbol.for("SpringPhase"),J_=1,Bh=2,Uh=4,Cf=e=>(e[ea]&J_)>0,ei=e=>(e[ea]&Bh)>0,No=e=>(e[ea]&Uh)>0,Hv=(e,t)=>t?e[ea]|=Bh|J_:e[ea]&=~Bh,Vv=(e,t)=>t?e[ea]|=Uh:e[ea]&=~Uh,CR=class extends Pm{constructor(e,t){if(super(),this.animation=new _R,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!fe.und(e)||!fe.und(t)){const n=fe.obj(e)?{...e}:{...t,from:e};fe.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ei(this)||this._state.asyncTo)||No(this)}get goal(){return En(this.animation.to)}get velocity(){const e=fr(this);return e instanceof sc?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Cf(this)}get isAnimating(){return ei(this)}get isPaused(){return No(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,o=Fu(r.to);!o&&Wn(r.to)&&(i=wn(En(r.to))),r.values.forEach((l,u)=>{if(l.done)return;const d=l.constructor==js?1:o?o[u].lastPosition:i[u];let f=r.immediate,h=d;if(!f){if(h=l.lastPosition,a.tension<=0){l.done=!0;return}let g=l.elapsedTime+=e;const p=r.fromValues[u],v=l.v0!=null?l.v0:l.v0=fe.arr(a.velocity)?a.velocity[u]:a.velocity;let w;const _=a.precision||(p==d?.005:Math.min(1,Math.abs(d-p)*.001));if(fe.und(a.duration))if(a.decay){const x=a.decay===!0?.998:a.decay,S=Math.exp(-(1-x)*g);h=p+v/(1-x)*(1-S),f=Math.abs(l.lastPosition-h)<=_,w=v*S}else{w=l.lastVelocity==null?v:l.lastVelocity;const x=a.restVelocity||_/10,S=a.clamp?0:a.bounce,b=!fe.und(S),T=p==d?l.v0>0:p<d;let j,M=!1;const k=1,E=Math.ceil(e/k);for(let C=0;C<E&&(j=Math.abs(w)>x,!(!j&&(f=Math.abs(d-h)<=_,f)));++C){b&&(M=h==d||h>d==T,M&&(w=-w*S,h=d));const O=-a.tension*1e-6*(h-d),$=-a.friction*.001*w,A=(O+$)/a.mass;w=w+A*k,h=h+w*k}}else{let x=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,l.durationProgress>0&&(l.elapsedTime=a.duration*l.durationProgress,g=l.elapsedTime+=e)),x=(a.progress||0)+g/this._memoizedDuration,x=x>1?1:x<0?0:x,l.durationProgress=x),h=p+a.easing(x)*(d-p),w=(h-l.lastPosition)/e,f=x==1}l.lastVelocity=w,Number.isNaN(h)&&(console.warn("Got NaN while animating:",this),f=!0)}o&&!o[u].done&&(f=!1),f?l.done=!0:t=!1,l.setValue(h,a.round)&&(n=!0)});const s=fr(this),c=s.getValue();if(t){const l=En(r.to);(c!==l||n)&&!a.decay?(s.setValue(l),this._onChange(l)):n&&a.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return He.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ei(this)){const{to:e,config:t}=this.animation;He.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return fe.und(e)?(n=this.queue||[],this.queue=[]):n=[fe.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>jm(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Is(this._state,e&&this._lastCallId),He.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=fe.obj(n)?n[t]:n,(n==null||Dh(n))&&(n=void 0),r=fe.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Cf(this)||(e.reverse&&([n,r]=[r,n]),r=En(r),fe.und(r)?fr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,Uu(e,(o,s)=>/^on/.test(s)?q_(o,n):o)),Yv(this,e,"onProps"),Fo(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return K_(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{No(this)||(Vv(this,!0),Xo(a.pauseQueue),Fo(this,"onPause",nr(this,Lo(this,this.animation.to)),this))},resume:()=>{No(this)&&(Vv(this,!1),ei(this)&&this._resume(),Xo(a.resumeQueue),Fo(this,"onResume",nr(this,Lo(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(o=>{if(e.loop&&o.finished&&!(t&&o.noop)){const s=ew(e);if(s)return this._update(s,!0)}return o})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Ia(this));const r=!fe.und(e.to),i=!fe.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Ia(this));const{key:a,defaultProps:o,animation:s}=this,{to:c,from:l}=s;let{to:u=c,from:d=l}=e;i&&!r&&(!t.default||fe.und(u))&&(u=d),t.reverse&&([u,d]=[d,u]);const f=!Pr(d,l);f&&(s.from=d),d=En(d);const h=!Pr(u,c);h&&this._focus(u);const g=Dh(t.to),{config:p}=s,{decay:v,velocity:w}=p;(r||i)&&(p.velocity=0),t.config&&!g&&xR(p,On(t.config,a),t.config!==o.config?On(o.config,a):void 0);let _=fr(this);if(!_||fe.und(u))return n(nr(this,!0));const x=fe.und(t.reset)?i&&!t.default:!fe.und(d)&&is(t.reset,a),S=x?d:this.get(),b=Ps(u),T=fe.num(b)||fe.arr(b)||Lu(b),j=!g&&(!T||is(o.immediate||t.immediate,a));if(h){const C=Ih(u);if(C!==_.constructor)if(j)_=this._set(b);else throw Error(`Cannot animate between ${_.constructor.name} and ${C.name}, as the "to" prop suggests`)}const M=_.constructor;let k=Wn(u),E=!1;if(!k){const C=x||!Cf(this)&&f;(h||C)&&(E=Pr(Ps(S),b),k=!E),(!Pr(s.immediate,j)&&!j||!Pr(p.decay,v)||!Pr(p.velocity,w))&&(k=!0)}if(E&&ei(this)&&(s.changed&&!x?k=!0:k||this._stop(c)),!g&&((k||Wn(c))&&(s.values=_.getPayload(),s.toValues=Wn(u)?null:M==js?[1]:wn(b)),s.immediate!=j&&(s.immediate=j,!j&&!x&&this._set(c)),k)){const{onRest:C}=s;We(SR,$=>Yv(this,t,$));const O=nr(this,Lo(this,c));Xo(this._pendingCalls,O),this._pendingCalls.add(n),s.changed&&He.batchedUpdates(()=>{var $;s.changed=!x,C==null||C(O,this),x?On(o.onRest,O):($=s.onStart)==null||$.call(s,O,this)})}x&&this._set(S),g?n(Q_(t.to,t,this._state,this)):k?this._start():ei(this)&&!h?this._pendingCalls.add(n):n(X_(S))}_focus(e){const t=this.animation;e!==t.to&&(Iv(this)&&this._detach(),t.to=e,Iv(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Wn(t)&&(co(t,this),Fh(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Wn(e)&&As(e,this)}_set(e,t=!0){const n=En(e);if(!fe.und(n)){const r=fr(this);if(!r||!Pr(n,r.getValue())){const i=Ih(n);!r||r.constructor!=i?$m(this,i.create(n)):r.setValue(n),r&&He.batchedUpdates(()=>{this._onChange(n,t)})}}return fr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Fo(this,"onStart",nr(this,Lo(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),On(this.animation.onChange,e,this)),On(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;fr(this).reset(En(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ei(this)||(Hv(this,!0),No(this)||this._resume())}_resume(){cr.skipAnimation?this.finish():Iu.start(this)}_stop(e,t){if(ei(this)){Hv(this,!1);const n=this.animation;We(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),$s(this,{type:"idle",parent:this});const r=t?Ia(this.get()):nr(this.get(),Lo(this,e??n.to));Xo(this._pendingCalls,r),n.changed&&(n.changed=!1,Fo(this,"onRest",r,this))}}};function Lo(e,t){const n=Ps(t),r=Ps(e.get());return Pr(r,n)}function ew(e,t=e.loop,n=e.to){const r=On(t);if(r){const i=r!==!0&&Am(r),a=(i||e).reverse,o=!i||i.reset;return Ds({...e,loop:t,default:!1,pause:void 0,to:!a||Dh(n)?n:void 0,from:o?e.from:void 0,reset:o,...i})}}function Ds(e){const{to:t,from:n}=e=Am(e),r=new Set;return fe.obj(t)&&qv(t,r),fe.obj(n)&&qv(n,r),e.keys=r.size?Array.from(r):null,e}function TR(e){const t=Ds(e);return fe.und(t.default)&&(t.default=Uu(t)),t}function qv(e,t){br(e,(n,r)=>n!=null&&t.add(r))}var SR=["onStart","onRest","onChange","onPause","onResume"];function Yv(e,t,n){e.animation[n]=t[n]!==Y_(t,n)?q_(t[n],e.key):void 0}function Fo(e,t,...n){var r,i,a,o;(i=(r=e.animation)[t])==null||i.call(r,...n),(o=(a=e.defaultProps)[t])==null||o.call(a,...n)}var kR=["onStart","onChange","onRest"],ER=1,tw=class{constructor(e,t){this.id=ER++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];fe.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ds(e)),this}start(e){let{queue:t}=this;return e?t=wn(e).map(Ds):this.queue=[],this._flush?this._flush(this,t):(ow(this,t),Wh(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;We(wn(t),r=>n[r].stop(!!e))}else Is(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(fe.und(e))this.start({pause:!0});else{const t=this.springs;We(wn(e),n=>t[n].pause())}return this}resume(e){if(fe.und(e))this.start({pause:!1});else{const t=this.springs;We(wn(e),n=>t[n].resume())}return this}each(e){br(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,ns(e,([s,c])=>{c.value=this.get(),s(c,this,this._item)}));const a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&ns(t,([s,c])=>{c.value=o,s(c,this,this._item)}),a&&(this._started=!1,ns(n,([s,c])=>{c.value=o,s(c,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;He.onFrame(this._onFrame)}};function Wh(e,t){return Promise.all(t.map(n=>nw(e,n))).then(n=>jm(e,n))}async function nw(e,t,n){const{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:c}=t,l=fe.obj(t.default)&&t.default;o&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const u=fe.arr(i)||fe.fun(i)?i:void 0;u?(t.to=void 0,t.onRest=void 0,l&&(l.onRest=void 0)):We(kR,p=>{const v=t[p];if(fe.fun(v)){const w=e._events[p];t[p]=({finished:_,cancelled:x})=>{const S=w.get(v);S?(_||(S.finished=!1),x&&(S.cancelled=!0)):w.set(v,{value:null,finished:_||!1,cancelled:x||!1})},l&&(l[p]=t[p])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,Xo(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(p=>e.springs[p].start(t)),h=t.cancel===!0||Y_(t,"cancel")===!0;(u||h&&d.asyncId)&&f.push(K_(++e._lastAsyncId,{props:t,state:d,actions:{pause:Rh,resume:Rh,start(p,v){h?(Is(d,e._lastAsyncId),v(Ia(e))):(p.onRest=s,v(Q_(u,p,d,e)))}}})),d.paused&&await new Promise(p=>{d.resumeQueue.add(p)});const g=jm(e,await Promise.all(f));if(o&&g.finished&&!(n&&g.noop)){const p=ew(t,o,i);if(p)return ow(e,[p]),nw(e,p,!0)}return c&&He.batchedUpdates(()=>c(g,e,e.item)),g}function zh(e,t){const n={...e.springs};return t&&We(wn(t),r=>{fe.und(r.keys)&&(r=Ds(r)),fe.obj(r.to)||(r={...r,to:void 0}),aw(n,r,i=>iw(i))}),rw(e,n),n}function rw(e,t){br(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,co(n,e))})}function iw(e,t){const n=new CR;return n.key=e,t&&co(n,t),n}function aw(e,t,n){t.keys&&We(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function ow(e,t){We(t,n=>{aw(e.springs,n,r=>iw(r,e))})}var cc=({children:e,...t})=>{const n=m.useContext(Dl),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=oR(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=Dl;return ue.createElement(a,{value:t},e)},Dl=OR(cc,{});cc.Provider=Dl.Provider;cc.Consumer=Dl.Consumer;function OR(e,t){return Object.assign(e,ue.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var sw=()=>{const e=[],t=function(r){iR();const i=[];return We(e,(a,o)=>{if(fe.und(r))i.push(a.start());else{const s=n(r,a,o);s&&i.push(a.start(s))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return We(e,r=>r.pause(...arguments)),this},t.resume=function(){return We(e,r=>r.resume(...arguments)),this},t.set=function(r){We(e,(i,a)=>{const o=fe.fun(r)?r(a,i):r;o&&i.set(o)})},t.start=function(r){const i=[];return We(e,(a,o)=>{if(fe.und(r))i.push(a.start());else{const s=this._getProps(r,a,o);s&&i.push(a.start(s))}}),i},t.stop=function(){return We(e,r=>r.stop(...arguments)),this},t.update=function(r){return We(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return fe.fun(r)?r(a,i):r};return t._getProps=n,t};function MR(e,t,n){const r=fe.fun(t)&&t;r&&!n&&(n=[]);const i=m.useMemo(()=>r||arguments.length==3?sw():void 0,[]),a=m.useRef(0),o=Om(),s=m.useMemo(()=>({ctrls:[],queue:[],flush(w,_){const x=zh(w,_);return a.current>0&&!s.queue.length&&!Object.keys(x).some(b=>!w.springs[b])?Wh(w,_):new Promise(b=>{rw(w,x),s.queue.push(()=>{b(Wh(w,_))}),o()})}}),[]),c=m.useRef([...s.ctrls]),l=[],u=Ph(e)||0;m.useMemo(()=>{We(c.current.slice(e,u),w=>{Nh(w,i),w.stop(!0)}),c.current.length=e,d(u,e)},[e]),m.useMemo(()=>{d(0,Math.min(u,e))},n);function d(w,_){for(let x=w;x<_;x++){const S=c.current[x]||(c.current[x]=new tw(null,s.flush)),b=r?r(x,S):t[x];b&&(l[x]=TR(b))}}const f=c.current.map((w,_)=>zh(w,l[_])),h=m.useContext(cc),g=Ph(h),p=h!==g&&G_(h);Di(()=>{a.current++,s.ctrls=c.current;const{queue:w}=s;w.length&&(s.queue=[],We(w,_=>_())),We(c.current,(_,x)=>{i==null||i.add(_),p&&_.start({default:h});const S=l[x];S&&(Z_(_,S.ref),_.ref?_.queue.push(S):_.start(S))})}),Mm(()=>()=>{We(s.ctrls,w=>w.stop(!0))});const v=f.map(w=>({...w}));return i?[v,i]:v}function Sr(e,t){const n=fe.fun(e),[[r],i]=MR(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}function ca(e,t,n){const r=fe.fun(t)&&t,{reset:i,sort:a,trail:o=0,expires:s=!0,exitBeforeEnter:c=!1,onDestroyed:l,ref:u,config:d}=r?r():t,f=m.useMemo(()=>r||arguments.length==3?sw():void 0,[]),h=wn(e),g=[],p=m.useRef(null),v=i?null:p.current;Di(()=>{p.current=g}),Mm(()=>(We(g,A=>{f==null||f.add(A.ctrl),A.ctrl.ref=f}),()=>{We(p.current,A=>{A.expired&&clearTimeout(A.expirationId),Nh(A.ctrl,f),A.ctrl.stop(!0)})}));const w=AR(h,r?r():t,v),_=i&&p.current||[];Di(()=>We(_,({ctrl:A,item:P,key:D})=>{Nh(A,f),On(l,P,D)}));const x=[];if(v&&We(v,(A,P)=>{A.expired?(clearTimeout(A.expirationId),_.push(A)):(P=x[P]=w.indexOf(A.key),~P&&(g[P]=A))}),We(h,(A,P)=>{g[P]||(g[P]={key:w[P],item:A,phase:"mount",ctrl:new tw},g[P].ctrl.item=A)}),x.length){let A=-1;const{leave:P}=r?r():t;We(x,(D,N)=>{const q=v[N];~D?(A=g.indexOf(q),g[A]={...q,item:h[D]}):P&&g.splice(++A,0,q)})}fe.fun(a)&&g.sort((A,P)=>a(A.item,P.item));let S=-o;const b=Om(),T=Uu(t),j=new Map,M=m.useRef(new Map),k=m.useRef(!1);We(g,(A,P)=>{const D=A.key,N=A.phase,q=r?r():t;let z,U;const G=On(q.delay||0,D);if(N=="mount")z=q.enter,U="enter";else{const J=w.indexOf(D)<0;if(N!="leave")if(J)z=q.leave,U="leave";else if(z=q.update)U="update";else return;else if(!J)z=q.enter,U="enter";else return}if(z=On(z,A.item,P),z=fe.obj(z)?Am(z):{to:z},!z.config){const J=d||T.config;z.config=On(J,A.item,P,U)}S+=o;const ne={...T,delay:G+S,ref:u,immediate:q.immediate,reset:!1,...z};if(U=="enter"&&fe.und(ne.from)){const J=r?r():t,Q=fe.und(J.initial)||v?J.from:J.initial;ne.from=On(Q,A.item,P)}const{onResolve:te}=ne;ne.onResolve=J=>{On(te,J);const Q=p.current,re=Q.find(F=>F.key===D);if(re&&!(J.cancelled&&re.phase!="update")&&re.ctrl.idle){const F=Q.every(I=>I.ctrl.idle);if(re.phase=="leave"){const I=On(s,re.item);if(I!==!1){const L=I===!0?0:I;if(re.expired=!0,!F&&L>0){L<=2147483647&&(re.expirationId=setTimeout(b,L));return}}}F&&Q.some(I=>I.expired)&&(M.current.delete(re),c&&(k.current=!0),b())}};const X=zh(A.ctrl,ne);U==="leave"&&c?M.current.set(A,{phase:U,springs:X,payload:ne}):j.set(A,{phase:U,springs:X,payload:ne})});const E=m.useContext(cc),C=Ph(E),O=E!==C&&G_(E);Di(()=>{O&&We(g,A=>{A.ctrl.start({default:E})})},[E]),We(j,(A,P)=>{if(M.current.size){const D=g.findIndex(N=>N.key===P.key);g.splice(D,1)}}),Di(()=>{We(M.current.size?M.current:j,({phase:A,payload:P},D)=>{const{ctrl:N}=D;D.phase=A,f==null||f.add(N),O&&A=="enter"&&N.start({default:E}),P&&(Z_(N,P.ref),(N.ref||f)&&!k.current?N.update(P):(N.start(P),k.current&&(k.current=!1)))})},i?void 0:n);const $=A=>ue.createElement(ue.Fragment,null,g.map((P,D)=>{const{springs:N}=j.get(P)||P.ctrl,q=A({...N},P.item,P,D);return q&&q.type?ue.createElement(q.type,{...q.props,key:fe.str(P.key)||fe.num(P.key)?P.key:P.ctrl.id,ref:q.ref}):q}));return f?[$,f]:$}var $R=1;function AR(e,{key:t,keys:n=t},r){if(n===null){const i=new Set;return e.map(a=>{const o=r&&r.find(s=>s.item===a&&s.phase!=="leave"&&!i.has(s));return o?(i.add(o),o.key):$R++})}return fe.und(n)?e:fe.fun(n)?e.map(n):wn(n)}var cw=class extends Pm{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Os(...t);const n=this._get(),r=Ih(n);$m(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Pr(t,n)||(fr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Gv(this._active)&&Tf(this)}_get(){const e=fe.arr(this.source)?this.source.map(En):wn(En(this.source));return this.calc(...e)}_start(){this.idle&&!Gv(this._active)&&(this.idle=!1,We(Fu(this),e=>{e.done=!1}),cr.skipAnimation?(He.batchedUpdates(()=>this.advance()),Tf(this)):Iu.start(this))}_attach(){let e=1;We(wn(this.source),t=>{Wn(t)&&co(t,this),Fh(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){We(wn(this.source),e=>{Wn(e)&&As(e,this)}),this._active.clear(),Tf(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=wn(this.source).reduce((t,n)=>Math.max(t,(Fh(n)?n.priority:0)+1),0))}};function RR(e){return e.idle!==!1}function Gv(e){return!e.size||Array.from(e).every(RR)}function Tf(e){e.idle||(e.idle=!0,We(Fu(e),t=>{t.done=!0}),$s(e,{type:"idle",parent:e}))}var vi=(e,...t)=>new cw(e,t);cr.assign({createStringInterpolator:W_,to:(e,t)=>new cw(e,t)});var lw=/^--/;function jR(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!lw.test(e)&&!(as.hasOwnProperty(e)&&as[e])?t+"px":(""+t).trim()}var Zv={};function PR(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:a,scrollTop:o,scrollLeft:s,viewBox:c,...l}=t,u=Object.values(l),d=Object.keys(l).map(f=>n||e.hasAttribute(f)?f:Zv[f]||(Zv[f]=f.replace(/([A-Z])/g,h=>"-"+h.toLowerCase())));a!==void 0&&(e.textContent=a);for(const f in i)if(i.hasOwnProperty(f)){const h=jR(f,i[f]);lw.test(f)?e.style.setProperty(f,h):e.style[f]=h}d.forEach((f,h)=>{e.setAttribute(f,u[h])}),r!==void 0&&(e.className=r),o!==void 0&&(e.scrollTop=o),s!==void 0&&(e.scrollLeft=s),c!==void 0&&e.setAttribute("viewBox",c)}var as={animationIterationCount:!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,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},IR=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),DR=["Webkit","Ms","Moz","O"];as=Object.keys(as).reduce((e,t)=>(DR.forEach(n=>e[IR(n,t)]=e[t]),e),as);var NR=/^(matrix|translate|scale|rotate|skew)/,LR=/^(translate)/,FR=/^(rotate|skew)/,Sf=(e,t)=>fe.num(e)&&e!==0?e+t:e,il=(e,t)=>fe.arr(e)?e.every(n=>il(n,t)):fe.num(e)?e===t:parseFloat(e)===t,BR=class extends Bu{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(o=>[`translate3d(${o.map(s=>Sf(s,"px")).join(",")})`,il(o,0)])),br(r,(o,s)=>{if(s==="transform")i.push([o||""]),a.push(c=>[c,c===""]);else if(NR.test(s)){if(delete r[s],fe.und(o))return;const c=LR.test(s)?"px":FR.test(s)?"deg":"";i.push(wn(o)),a.push(s==="rotate3d"?([l,u,d,f])=>[`rotate3d(${l},${u},${d},${Sf(f,c)})`,il(f,0)]:l=>[`${s}(${l.map(u=>Sf(u,c)).join(",")})`,il(l,s.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new UR(i,a)),super(r)}},UR=class extends F_{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return We(this.inputs,(n,r)=>{const i=En(n[0]),[a,o]=this.transforms[r](fe.arr(i)?i:n.map(En));e+=" "+a,t=t&&o}),t?"none":e}observerAdded(e){e==1&&We(this.inputs,t=>We(t,n=>Wn(n)&&co(n,this)))}observerRemoved(e){e==0&&We(this.inputs,t=>We(t,n=>Wn(n)&&As(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),$s(this,e)}},WR=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];cr.assign({batchedUpdates:oi.unstable_batchedUpdates,createStringInterpolator:W_,colors:IA});var zR=pR(WR,{applyAnimatedValues:PR,createAnimatedStyle:e=>new BR(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Ct=zR.animated;function ta(){return ta=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},ta.apply(this,arguments)}var HR={pointerEvents:"none",position:"absolute",zIndex:10,top:0,left:0},Kv=function(e,t){return"translate("+e+"px, "+t+"px)"},uw=m.memo(function(e){var t,n=e.position,r=e.anchor,i=e.children,a=Tt(),o=kn(),s=o.animate,c=o.config,l=g3(),u=l[0],d=l[1],f=m.useRef(!1),h=void 0,g=!1,p=d.width>0&&d.height>0,v=Math.round(n[0]),w=Math.round(n[1]);p&&(r==="top"?(v-=d.width/2,w-=d.height+14):r==="right"?(v+=14,w-=d.height/2):r==="bottom"?(v-=d.width/2,w+=14):r==="left"?(v-=d.width+14,w-=d.height/2):r==="center"&&(v-=d.width/2,w-=d.height/2),h={transform:Kv(v,w)},f.current||(g=!0),f.current=[v,w]);var _=Sr({to:h,config:c,immediate:!s||g}),x=ta({},HR,a.tooltip.wrapper,{transform:(t=_.transform)!=null?t:Kv(v,w),opacity:_.transform?1:0});return y.jsx(Ct.div,{ref:u,style:x,children:i})});uw.displayName="TooltipWrapper";var dw=m.memo(function(e){var t=e.size,n=t===void 0?12:t,r=e.color,i=e.style;return y.jsx("span",{style:ta({display:"block",width:n,height:n,background:r},i===void 0?{}:i)})}),Im=m.memo(function(e){var t,n=e.id,r=e.value,i=e.format,a=e.enableChip,o=a!==void 0&&a,s=e.color,c=e.renderContent,l=Tt(),u=eo(i);if(typeof c=="function")t=c();else{var d=r;u!==void 0&&d!==void 0&&(d=u(d)),t=y.jsxs("div",{style:l.tooltip.basic,children:[o&&y.jsx(dw,{color:s,style:l.tooltip.chip}),d!==void 0?y.jsxs("span",{children:[n,": ",y.jsx("strong",{children:""+d})]}):n]})}return y.jsx("div",{style:l.tooltip.container,children:t})}),VR={width:"100%",borderCollapse:"collapse"},fw=m.memo(function(e){var t,n=e.title,r=e.rows,i=r===void 0?[]:r,a=e.renderContent,o=Tt();return i.length?(t=typeof a=="function"?a():y.jsxs("div",{children:[n&&n,y.jsx("table",{style:ta({},VR,o.tooltip.table),children:y.jsx("tbody",{children:i.map(function(s,c){return y.jsx("tr",{children:s.map(function(l,u){return y.jsx("td",{style:o.tooltip.tableCell,children:l},u)})},c)})})})]}),y.jsx("div",{style:o.tooltip.container,children:t})):null});fw.displayName="TableTooltip";var Hh=m.memo(function(e){var t=e.x0,n=e.x1,r=e.y0,i=e.y1,a=Tt(),o=kn(),s=o.animate,c=o.config,l=m.useMemo(function(){return ta({},a.crosshair.line,{pointerEvents:"none"})},[a.crosshair.line]),u=Sr({x1:t,x2:n,y1:r,y2:i,config:c,immediate:!s});return y.jsx(Ct.line,ta({},u,{fill:"none",style:l}))});Hh.displayName="CrosshairLine";var Vh=m.memo(function(e){var t,n,r=e.width,i=e.height,a=e.type,o=e.x,s=e.y;return a==="cross"?(t={x0:o,x1:o,y0:0,y1:i},n={x0:0,x1:r,y0:s,y1:s}):a==="top-left"?(t={x0:o,x1:o,y0:0,y1:s},n={x0:0,x1:o,y0:s,y1:s}):a==="top"?t={x0:o,x1:o,y0:0,y1:s}:a==="top-right"?(t={x0:o,x1:o,y0:0,y1:s},n={x0:o,x1:r,y0:s,y1:s}):a==="right"?n={x0:o,x1:r,y0:s,y1:s}:a==="bottom-right"?(t={x0:o,x1:o,y0:s,y1:i},n={x0:o,x1:r,y0:s,y1:s}):a==="bottom"?t={x0:o,x1:o,y0:s,y1:i}:a==="bottom-left"?(t={x0:o,x1:o,y0:s,y1:i},n={x0:0,x1:o,y0:s,y1:s}):a==="left"?n={x0:0,x1:o,y0:s,y1:s}:a==="x"?t={x0:o,x1:o,y0:0,y1:i}:a==="y"&&(n={x0:0,x1:r,y0:s,y1:s}),y.jsxs(y.Fragment,{children:[t&&y.jsx(Hh,{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}),n&&y.jsx(Hh,{x0:n.x0,x1:n.x1,y0:n.y0,y1:n.y1})]})});Vh.displayName="Crosshair";var hw=m.createContext({showTooltipAt:function(){},showTooltipFromEvent:function(){},hideTooltip:function(){}}),qh={isVisible:!1,position:[null,null],content:null,anchor:null},pw=m.createContext(qh),qR=function(e){var t=m.useState(qh),n=t[0],r=t[1],i=m.useCallback(function(s,c,l){var u=c[0],d=c[1];l===void 0&&(l="top"),r({isVisible:!0,position:[u,d],anchor:l,content:s})},[r]),a=m.useCallback(function(s,c,l){l===void 0&&(l="top");var u=e.current.getBoundingClientRect(),d=e.current.offsetWidth,f=d===u.width?1:d/u.width,h="touches"in c?c.touches[0]:c,g=h.clientX,p=h.clientY,v=(g-u.left)*f,w=(p-u.top)*f;l!=="left"&&l!=="right"||(l=v<u.width/2?"right":"left"),r({isVisible:!0,position:[v,w],anchor:l,content:s})},[e,r]),o=m.useCallback(function(){r(qh)},[r]);return{actions:m.useMemo(function(){return{showTooltipAt:i,showTooltipFromEvent:a,hideTooltip:o}},[i,a,o]),state:n}},la=function(){var e=m.useContext(hw);if(e===void 0)throw new Error("useTooltip must be used within a TooltipProvider");return e},YR=function(){var e=m.useContext(pw);if(e===void 0)throw new Error("useTooltipState must be used within a TooltipProvider");return e},GR=function(e){return e.isVisible},ZR=function(){var e=YR();return GR(e)?y.jsx(uw,{position:e.position,anchor:e.anchor,children:e.content}):null},KR=function(e){var t=e.container,n=e.children,r=qR(t),i=r.actions,a=r.state;return y.jsx(hw.Provider,{value:i,children:y.jsx(pw.Provider,{value:a,children:n})})};function XR(){this.__data__=[],this.size=0}var QR=XR;function JR(e,t){return e===t||e!==e&&t!==t}var lc=JR,e9=lc;function t9(e,t){for(var n=e.length;n--;)if(e9(e[n][0],t))return n;return-1}var Wu=t9,n9=Wu,r9=Array.prototype,i9=r9.splice;function a9(e){var t=this.__data__,n=n9(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():i9.call(t,n,1),--this.size,!0}var o9=a9,s9=Wu;function c9(e){var t=this.__data__,n=s9(t,e);return n<0?void 0:t[n][1]}var l9=c9,u9=Wu;function d9(e){return u9(this.__data__,e)>-1}var f9=d9,h9=Wu;function p9(e,t){var n=this.__data__,r=h9(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var m9=p9,g9=QR,v9=o9,y9=l9,b9=f9,x9=m9;function lo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lo.prototype.clear=g9;lo.prototype.delete=v9;lo.prototype.get=y9;lo.prototype.has=b9;lo.prototype.set=x9;var zu=lo,_9=zu;function w9(){this.__data__=new _9,this.size=0}var C9=w9;function T9(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var S9=T9;function k9(e){return this.__data__.get(e)}var E9=k9;function O9(e){return this.__data__.has(e)}var M9=O9,$9=typeof Hn=="object"&&Hn&&Hn.Object===Object&&Hn,mw=$9,A9=mw,R9=typeof self=="object"&&self&&self.Object===Object&&self,j9=A9||R9||Function("return this")(),kr=j9,P9=kr,I9=P9.Symbol,uo=I9,Xv=uo,gw=Object.prototype,D9=gw.hasOwnProperty,N9=gw.toString,Bo=Xv?Xv.toStringTag:void 0;function L9(e){var t=D9.call(e,Bo),n=e[Bo];try{e[Bo]=void 0;var r=!0}catch{}var i=N9.call(e);return r&&(t?e[Bo]=n:delete e[Bo]),i}var F9=L9,B9=Object.prototype,U9=B9.toString;function W9(e){return U9.call(e)}var z9=W9,Qv=uo,H9=F9,V9=z9,q9="[object Null]",Y9="[object Undefined]",Jv=Qv?Qv.toStringTag:void 0;function G9(e){return e==null?e===void 0?Y9:q9:Jv&&Jv in Object(e)?H9(e):V9(e)}var Gr=G9;function Z9(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Er=Z9,K9=Gr,X9=Er,Q9="[object AsyncFunction]",J9="[object Function]",ej="[object GeneratorFunction]",tj="[object Proxy]";function nj(e){if(!X9(e))return!1;var t=K9(e);return t==J9||t==ej||t==Q9||t==tj}var Hu=nj;const Dm=Ht(Hu);var rj=kr,ij=rj["__core-js_shared__"],aj=ij,kf=aj,e1=function(){var e=/[^.]+$/.exec(kf&&kf.keys&&kf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function oj(e){return!!e1&&e1 in e}var sj=oj,cj=Function.prototype,lj=cj.toString;function uj(e){if(e!=null){try{return lj.call(e)}catch{}try{return e+""}catch{}}return""}var vw=uj,dj=Hu,fj=sj,hj=Er,pj=vw,mj=/[\\^$.*+?()[\]{}|]/g,gj=/^\[object .+?Constructor\]$/,vj=Function.prototype,yj=Object.prototype,bj=vj.toString,xj=yj.hasOwnProperty,_j=RegExp("^"+bj.call(xj).replace(mj,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wj(e){if(!hj(e)||fj(e))return!1;var t=dj(e)?_j:gj;return t.test(pj(e))}var Cj=wj;function Tj(e,t){return e==null?void 0:e[t]}var Sj=Tj,kj=Cj,Ej=Sj;function Oj(e,t){var n=Ej(e,t);return kj(n)?n:void 0}var ua=Oj,Mj=ua,$j=kr,Aj=Mj($j,"Map"),Nm=Aj,Rj=ua,jj=Rj(Object,"create"),Vu=jj,t1=Vu;function Pj(){this.__data__=t1?t1(null):{},this.size=0}var Ij=Pj;function Dj(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Nj=Dj,Lj=Vu,Fj="__lodash_hash_undefined__",Bj=Object.prototype,Uj=Bj.hasOwnProperty;function Wj(e){var t=this.__data__;if(Lj){var n=t[e];return n===Fj?void 0:n}return Uj.call(t,e)?t[e]:void 0}var zj=Wj,Hj=Vu,Vj=Object.prototype,qj=Vj.hasOwnProperty;function Yj(e){var t=this.__data__;return Hj?t[e]!==void 0:qj.call(t,e)}var Gj=Yj,Zj=Vu,Kj="__lodash_hash_undefined__";function Xj(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Zj&&t===void 0?Kj:t,this}var Qj=Xj,Jj=Ij,eP=Nj,tP=zj,nP=Gj,rP=Qj;function fo(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}fo.prototype.clear=Jj;fo.prototype.delete=eP;fo.prototype.get=tP;fo.prototype.has=nP;fo.prototype.set=rP;var iP=fo,n1=iP,aP=zu,oP=Nm;function sP(){this.size=0,this.__data__={hash:new n1,map:new(oP||aP),string:new n1}}var cP=sP;function lP(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var uP=lP,dP=uP;function fP(e,t){var n=e.__data__;return dP(t)?n[typeof t=="string"?"string":"hash"]:n.map}var qu=fP,hP=qu;function pP(e){var t=hP(this,e).delete(e);return this.size-=t?1:0,t}var mP=pP,gP=qu;function vP(e){return gP(this,e).get(e)}var yP=vP,bP=qu;function xP(e){return bP(this,e).has(e)}var _P=xP,wP=qu;function CP(e,t){var n=wP(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var TP=CP,SP=cP,kP=mP,EP=yP,OP=_P,MP=TP;function ho(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ho.prototype.clear=SP;ho.prototype.delete=kP;ho.prototype.get=EP;ho.prototype.has=OP;ho.prototype.set=MP;var Lm=ho,$P=zu,AP=Nm,RP=Lm,jP=200;function PP(e,t){var n=this.__data__;if(n instanceof $P){var r=n.__data__;if(!AP||r.length<jP-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new RP(r)}return n.set(e,t),this.size=n.size,this}var IP=PP,DP=zu,NP=C9,LP=S9,FP=E9,BP=M9,UP=IP;function po(e){var t=this.__data__=new DP(e);this.size=t.size}po.prototype.clear=NP;po.prototype.delete=LP;po.prototype.get=FP;po.prototype.has=BP;po.prototype.set=UP;var Yu=po,WP=ua,zP=function(){try{var e=WP(Object,"defineProperty");return e({},"",{}),e}catch{}}(),yw=zP,r1=yw;function HP(e,t,n){t=="__proto__"&&r1?r1(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Fm=HP,VP=Fm,qP=lc;function YP(e,t,n){(n!==void 0&&!qP(e[t],n)||n===void 0&&!(t in e))&&VP(e,t,n)}var bw=YP;function GP(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}var ZP=GP,KP=ZP,XP=KP(),xw=XP,Nl={exports:{}};Nl.exports;(function(e,t){var n=kr,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function c(l,u){if(u)return l.slice();var d=l.length,f=s?s(d):new l.constructor(d);return l.copy(f),f}e.exports=c})(Nl,Nl.exports);var _w=Nl.exports,QP=kr,JP=QP.Uint8Array,ww=JP,i1=ww;function eI(e){var t=new e.constructor(e.byteLength);return new i1(t).set(new i1(e)),t}var Bm=eI,tI=Bm;function nI(e,t){var n=t?tI(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Cw=nI;function rI(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var Tw=rI,iI=Er,a1=Object.create,aI=function(){function e(){}return function(t){if(!iI(t))return{};if(a1)return a1(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),oI=aI;function sI(e,t){return function(n){return e(t(n))}}var Sw=sI,cI=Sw,lI=cI(Object.getPrototypeOf,Object),Um=lI,uI=Object.prototype;function dI(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||uI;return e===n}var Wm=dI,fI=oI,hI=Um,pI=Wm;function mI(e){return typeof e.constructor=="function"&&!pI(e)?fI(hI(e)):{}}var kw=mI;function gI(e){return e!=null&&typeof e=="object"}var Qn=gI,vI=Gr,yI=Qn,bI="[object Arguments]";function xI(e){return yI(e)&&vI(e)==bI}var _I=xI,o1=_I,wI=Qn,Ew=Object.prototype,CI=Ew.hasOwnProperty,TI=Ew.propertyIsEnumerable,SI=o1(function(){return arguments}())?o1:function(e){return wI(e)&&CI.call(e,"callee")&&!TI.call(e,"callee")},Gu=SI,kI=Array.isArray,Pn=kI,EI=9007199254740991;function OI(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=EI}var zm=OI,MI=Hu,$I=zm;function AI(e){return e!=null&&$I(e.length)&&!MI(e)}var mo=AI,RI=mo,jI=Qn;function PI(e){return jI(e)&&RI(e)}var Ow=PI,Ll={exports:{}};function II(){return!1}var DI=II;Ll.exports;(function(e,t){var n=kr,r=DI,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,c=s?s.isBuffer:void 0,l=c||r;e.exports=l})(Ll,Ll.exports);var Zu=Ll.exports,NI=Gr,LI=Um,FI=Qn,BI="[object Object]",UI=Function.prototype,WI=Object.prototype,Mw=UI.toString,zI=WI.hasOwnProperty,HI=Mw.call(Object);function VI(e){if(!FI(e)||NI(e)!=BI)return!1;var t=LI(e);if(t===null)return!0;var n=zI.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Mw.call(n)==HI}var Hm=VI;const Vm=Ht(Hm);var qI=Gr,YI=zm,GI=Qn,ZI="[object Arguments]",KI="[object Array]",XI="[object Boolean]",QI="[object Date]",JI="[object Error]",eD="[object Function]",tD="[object Map]",nD="[object Number]",rD="[object Object]",iD="[object RegExp]",aD="[object Set]",oD="[object String]",sD="[object WeakMap]",cD="[object ArrayBuffer]",lD="[object DataView]",uD="[object Float32Array]",dD="[object Float64Array]",fD="[object Int8Array]",hD="[object Int16Array]",pD="[object Int32Array]",mD="[object Uint8Array]",gD="[object Uint8ClampedArray]",vD="[object Uint16Array]",yD="[object Uint32Array]",Ft={};Ft[uD]=Ft[dD]=Ft[fD]=Ft[hD]=Ft[pD]=Ft[mD]=Ft[gD]=Ft[vD]=Ft[yD]=!0;Ft[ZI]=Ft[KI]=Ft[cD]=Ft[XI]=Ft[lD]=Ft[QI]=Ft[JI]=Ft[eD]=Ft[tD]=Ft[nD]=Ft[rD]=Ft[iD]=Ft[aD]=Ft[oD]=Ft[sD]=!1;function bD(e){return GI(e)&&YI(e.length)&&!!Ft[qI(e)]}var xD=bD;function _D(e){return function(t){return e(t)}}var go=_D,Fl={exports:{}};Fl.exports;(function(e,t){var n=mw,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(Fl,Fl.exports);var Ku=Fl.exports,wD=xD,CD=go,s1=Ku,c1=s1&&s1.isTypedArray,TD=c1?CD(c1):wD,qm=TD;function SD(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var $w=SD,kD=Fm,ED=lc,OD=Object.prototype,MD=OD.hasOwnProperty;function $D(e,t,n){var r=e[t];(!(MD.call(e,t)&&ED(r,n))||n===void 0&&!(t in e))&&kD(e,t,n)}var Ym=$D,AD=Ym,RD=Fm;function jD(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):void 0;c===void 0&&(c=e[s]),i?RD(n,s,c):AD(n,s,c)}return n}var vo=jD;function PD(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var ID=PD,DD=9007199254740991,ND=/^(?:0|[1-9]\d*)$/;function LD(e,t){var n=typeof e;return t=t??DD,!!t&&(n=="number"||n!="symbol"&&ND.test(e))&&e>-1&&e%1==0&&e<t}var Xu=LD,FD=ID,BD=Gu,UD=Pn,WD=Zu,zD=Xu,HD=qm,VD=Object.prototype,qD=VD.hasOwnProperty;function YD(e,t){var n=UD(e),r=!n&&BD(e),i=!n&&!r&&WD(e),a=!n&&!r&&!i&&HD(e),o=n||r||i||a,s=o?FD(e.length,String):[],c=s.length;for(var l in e)(t||qD.call(e,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||zD(l,c)))&&s.push(l);return s}var Aw=YD;function GD(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var ZD=GD,KD=Er,XD=Wm,QD=ZD,JD=Object.prototype,eN=JD.hasOwnProperty;function tN(e){if(!KD(e))return QD(e);var t=XD(e),n=[];for(var r in e)r=="constructor"&&(t||!eN.call(e,r))||n.push(r);return n}var nN=tN,rN=Aw,iN=nN,aN=mo;function oN(e){return aN(e)?rN(e,!0):iN(e)}var uc=oN,sN=vo,cN=uc;function lN(e){return sN(e,cN(e))}var uN=lN,l1=bw,dN=_w,fN=Cw,hN=Tw,pN=kw,u1=Gu,d1=Pn,mN=Ow,gN=Zu,vN=Hu,yN=Er,bN=Hm,xN=qm,f1=$w,_N=uN;function wN(e,t,n,r,i,a,o){var s=f1(e,n),c=f1(t,n),l=o.get(c);if(l){l1(e,n,l);return}var u=a?a(s,c,n+"",e,t,o):void 0,d=u===void 0;if(d){var f=d1(c),h=!f&&gN(c),g=!f&&!h&&xN(c);u=c,f||h||g?d1(s)?u=s:mN(s)?u=hN(s):h?(d=!1,u=dN(c,!0)):g?(d=!1,u=fN(c,!0)):u=[]:bN(c)||u1(c)?(u=s,u1(s)?u=_N(s):(!yN(s)||vN(s))&&(u=pN(c))):d=!1}d&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),l1(e,n,u)}var CN=wN,TN=Yu,SN=bw,kN=xw,EN=CN,ON=Er,MN=uc,$N=$w;function Rw(e,t,n,r,i){e!==t&&kN(t,function(a,o){if(i||(i=new TN),ON(a))EN(e,t,o,n,Rw,r,i);else{var s=r?r($N(e,o),a,o+"",e,t,i):void 0;s===void 0&&(s=a),SN(e,o,s)}},MN)}var AN=Rw;function RN(e){return e}var Qu=RN;function jN(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var PN=jN,IN=PN,h1=Math.max;function DN(e,t,n){return t=h1(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=h1(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),IN(e,this,s)}}var jw=DN;function NN(e){return function(){return e}}var LN=NN,FN=LN,p1=yw,BN=Qu,UN=p1?function(e,t){return p1(e,"toString",{configurable:!0,enumerable:!1,value:FN(t),writable:!0})}:BN,WN=UN,zN=800,HN=16,VN=Date.now;function qN(e){var t=0,n=0;return function(){var r=VN(),i=HN-(r-n);if(n=r,i>0){if(++t>=zN)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var YN=qN,GN=WN,ZN=YN,KN=ZN(GN),Pw=KN,XN=Qu,QN=jw,JN=Pw;function eL(e,t){return JN(QN(e,t,XN),e+"")}var Gm=eL,tL=lc,nL=mo,rL=Xu,iL=Er;function aL(e,t,n){if(!iL(n))return!1;var r=typeof t;return(r=="number"?nL(n)&&rL(t,n.length):r=="string"&&t in n)?tL(n[t],e):!1}var Iw=aL,oL=Gm,sL=Iw;function cL(e){return oL(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&sL(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var lL=cL,uL=AN,dL=lL,fL=dL(function(e,t,n){uL(e,t,n)}),hL=fL;const pL=Ht(hL);var mL=Gr,gL=Qn,vL="[object Symbol]";function yL(e){return typeof e=="symbol"||gL(e)&&mL(e)==vL}var Ju=yL,bL=Pn,xL=Ju,_L=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wL=/^\w*$/;function CL(e,t){if(bL(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||xL(e)?!0:wL.test(e)||!_L.test(e)||t!=null&&e in Object(t)}var Zm=CL,Dw=Lm,TL="Expected a function";function Km(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(TL);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Km.Cache||Dw),n}Km.Cache=Dw;var SL=Km,kL=SL,EL=500;function OL(e){var t=kL(e,function(r){return n.size===EL&&n.clear(),r}),n=t.cache;return t}var ML=OL,$L=ML,AL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,RL=/\\(\\)?/g,jL=$L(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(AL,function(n,r,i,a){t.push(i?a.replace(RL,"$1"):r||n)}),t}),PL=jL;function IL(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var ed=IL,m1=uo,DL=ed,NL=Pn,LL=Ju,FL=1/0,g1=m1?m1.prototype:void 0,v1=g1?g1.toString:void 0;function Nw(e){if(typeof e=="string")return e;if(NL(e))return DL(e,Nw)+"";if(LL(e))return v1?v1.call(e):"";var t=e+"";return t=="0"&&1/e==-FL?"-0":t}var BL=Nw,UL=BL;function WL(e){return e==null?"":UL(e)}var Lw=WL,zL=Pn,HL=Zm,VL=PL,qL=Lw;function YL(e,t){return zL(e)?e:HL(e,t)?[e]:VL(qL(e))}var yo=YL,GL=Ju,ZL=1/0;function KL(e){if(typeof e=="string"||GL(e))return e;var t=e+"";return t=="0"&&1/e==-ZL?"-0":t}var bo=KL,XL=yo,QL=bo;function JL(e,t){t=XL(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[QL(t[n++])];return n&&n==r?e:void 0}var dc=JL,eF=dc;function tF(e,t,n){var r=e==null?void 0:eF(e,t);return r===void 0?n:r}var Fw=tF;const xr=Ht(Fw);var nF=Ym,rF=yo,iF=Xu,y1=Er,aF=bo;function oF(e,t,n,r){if(!y1(e))return e;t=rF(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=aF(t[i]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var u=s[c];l=r?r(u,c,s):void 0,l===void 0&&(l=y1(u)?u:iF(t[i+1])?[]:{})}nF(s,c,l),s=s[c]}return e}var Bw=oF,sF=Bw;function cF(e,t,n){return e==null?e:sF(e,t,n)}var lF=cF;const Qo=Ht(lF);function td(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Xm(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function xo(){}var na=.7,Xa=1/na,Da="\\s*([+-]?\\d+)\\s*",Ns="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uF=/^#([0-9a-f]{3,8})$/,dF=new RegExp(`^rgb\\(${Da},${Da},${Da}\\)$`),fF=new RegExp(`^rgb\\(${gr},${gr},${gr}\\)$`),hF=new RegExp(`^rgba\\(${Da},${Da},${Da},${Ns}\\)$`),pF=new RegExp(`^rgba\\(${gr},${gr},${gr},${Ns}\\)$`),mF=new RegExp(`^hsl\\(${Ns},${gr},${gr}\\)$`),gF=new RegExp(`^hsla\\(${Ns},${gr},${gr},${Ns}\\)$`),b1={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};td(xo,Ls,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:x1,formatHex:x1,formatHex8:vF,formatHsl:yF,formatRgb:_1,toString:_1});function x1(){return this.rgb().formatHex()}function vF(){return this.rgb().formatHex8()}function yF(){return Ww(this).formatHsl()}function _1(){return this.rgb().formatRgb()}function Ls(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=uF.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?w1(t):n===3?new vn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=dF.exec(e))?new vn(t[1],t[2],t[3],1):(t=fF.exec(e))?new vn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=hF.exec(e))?Nc(t[1],t[2],t[3],t[4]):(t=pF.exec(e))?Nc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mF.exec(e))?S1(t[1],t[2]/100,t[3]/100,1):(t=gF.exec(e))?S1(t[1],t[2]/100,t[3]/100,t[4]):b1.hasOwnProperty(e)?w1(b1[e]):e==="transparent"?new vn(NaN,NaN,NaN,0):null}function w1(e){return new vn(e>>16&255,e>>8&255,e&255,1)}function Nc(e,t,n,r){return r<=0&&(e=t=n=NaN),new vn(e,t,n,r)}function Uw(e){return e instanceof xo||(e=Ls(e)),e?(e=e.rgb(),new vn(e.r,e.g,e.b,e.opacity)):new vn}function Qa(e,t,n,r){return arguments.length===1?Uw(e):new vn(e,t,n,r??1)}function vn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}td(vn,Qa,Xm(xo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?na:Math.pow(na,e),new vn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new vn(Vi(this.r),Vi(this.g),Vi(this.b),Bl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:C1,formatHex:C1,formatHex8:bF,formatRgb:T1,toString:T1}));function C1(){return`#${Ni(this.r)}${Ni(this.g)}${Ni(this.b)}`}function bF(){return`#${Ni(this.r)}${Ni(this.g)}${Ni(this.b)}${Ni((isNaN(this.opacity)?1:this.opacity)*255)}`}function T1(){const e=Bl(this.opacity);return`${e===1?"rgb(":"rgba("}${Vi(this.r)}, ${Vi(this.g)}, ${Vi(this.b)}${e===1?")":`, ${e})`}`}function Bl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ni(e){return e=Vi(e),(e<16?"0":"")+e.toString(16)}function S1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rr(e,t,n,r)}function Ww(e){if(e instanceof rr)return new rr(e.h,e.s,e.l,e.opacity);if(e instanceof xo||(e=Ls(e)),!e)return new rr;if(e instanceof rr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new rr(o,s,c,e.opacity)}function xF(e,t,n,r){return arguments.length===1?Ww(e):new rr(e,t,n,r??1)}function rr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}td(rr,xF,Xm(xo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?na:Math.pow(na,e),new rr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new vn(Ef(e>=240?e-240:e+120,i,r),Ef(e,i,r),Ef(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new rr(k1(this.h),Lc(this.s),Lc(this.l),Bl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Bl(this.opacity);return`${e===1?"hsl(":"hsla("}${k1(this.h)}, ${Lc(this.s)*100}%, ${Lc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function k1(e){return e=(e||0)%360,e<0?e+360:e}function Lc(e){return Math.max(0,Math.min(1,e||0))}function Ef(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const _F=Math.PI/180,wF=180/Math.PI;var zw=-.14861,Qm=1.78277,Jm=-.29227,nd=-.90649,Fs=1.97294,E1=Fs*nd,O1=Fs*Qm,M1=Qm*Jm-nd*zw;function CF(e){if(e instanceof qi)return new qi(e.h,e.s,e.l,e.opacity);e instanceof vn||(e=Uw(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(M1*r+E1*t-O1*n)/(M1+E1-O1),a=r-i,o=(Fs*(n-i)-Jm*a)/nd,s=Math.sqrt(o*o+a*a)/(Fs*i*(1-i)),c=s?Math.atan2(o,a)*wF-120:NaN;return new qi(c<0?c+360:c,s,i,e.opacity)}function _r(e,t,n,r){return arguments.length===1?CF(e):new qi(e,t,n,r??1)}function qi(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}td(qi,_r,Xm(xo,{brighter(e){return e=e==null?Xa:Math.pow(Xa,e),new qi(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?na:Math.pow(na,e),new qi(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*_F,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new vn(255*(t+n*(zw*r+Qm*i)),255*(t+n*(Jm*r+nd*i)),255*(t+n*(Fs*r)),this.opacity)}}));function TF(e,t,n,r,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*n+(1+3*e+3*a-3*o)*r+o*i)/6}function SF(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],o=r>0?e[r-1]:2*i-a,s=r<t-1?e[r+2]:2*a-i;return TF((n-r/t)*t,o,i,a,s)}}const rd=e=>()=>e;function Hw(e,t){return function(n){return e+n*t}}function kF(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function EF(e,t){var n=t-e;return n?Hw(e,n>180||n<-180?n-360*Math.round(n/360):n):rd(isNaN(e)?t:e)}function OF(e){return(e=+e)==1?Na:function(t,n){return n-t?kF(t,n,e):rd(isNaN(t)?n:t)}}function Na(e,t){var n=t-e;return n?Hw(e,n):rd(isNaN(e)?t:e)}const $1=function e(t){var n=OF(t);function r(i,a){var o=n((i=Qa(i)).r,(a=Qa(a)).r),s=n(i.g,a.g),c=n(i.b,a.b),l=Na(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=c(u),i.opacity=l(u),i+""}}return r.gamma=e,r}(1);function MF(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o,s;for(o=0;o<n;++o)s=Qa(t[o]),r[o]=s.r||0,i[o]=s.g||0,a[o]=s.b||0;return r=e(r),i=e(i),a=e(a),s.opacity=1,function(c){return s.r=r(c),s.g=i(c),s.b=a(c),s+""}}}var $F=MF(SF);function AF(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function RF(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function jF(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=eg(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(s){for(o=0;o<r;++o)a[o]=i[o](s);return a}}function PF(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ul(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function IF(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=eg(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var Yh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Of=new RegExp(Yh.source,"g");function DF(e){return function(){return e}}function NF(e){return function(t){return e(t)+""}}function Vw(e,t){var n=Yh.lastIndex=Of.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e=e+"",t=t+"";(r=Yh.exec(e))&&(i=Of.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Ul(r,i)})),n=Of.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?NF(c[0].x):DF(t):(t=c.length,function(l){for(var u=0,d;u<t;++u)s[(d=c[u]).i]=d.x(l);return s.join("")})}function eg(e,t){var n=typeof t,r;return t==null||n==="boolean"?rd(t):(n==="number"?Ul:n==="string"?(r=Ls(t))?(t=r,$1):Vw:t instanceof Ls?$1:t instanceof Date?PF:RF(t)?AF:Array.isArray(t)?jF:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?IF:Ul)(e,t)}function LF(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function qw(e){return function t(n){n=+n;function r(i,a){var o=e((i=_r(i)).h,(a=_r(a)).h),s=Na(i.s,a.s),c=Na(i.l,a.l),l=Na(i.opacity,a.opacity);return function(u){return i.h=o(u),i.s=s(u),i.l=c(Math.pow(u,n)),i.opacity=l(u),i+""}}return r.gamma=t,r}(1)}qw(EF);var tg=qw(Na),FF=Gr,BF=Pn,UF=Qn,WF="[object String]";function zF(e){return typeof e=="string"||!BF(e)&&UF(e)&&FF(e)==WF}var HF=zF;const VF=Ht(HF);function qF(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Yw=qF;const Me=Ht(Yw);function al(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function YF(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ng(e){let t,n,r;e.length!==2?(t=al,n=(s,c)=>al(e(s),c),r=(s,c)=>e(s)-c):(t=e===al||e===YF?e:GF,n=e,r=e);function i(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(s[d],c)<0?l=d+1:u=d}while(l<u)}return l}function a(s,c,l=0,u=s.length){if(l<u){if(t(c,c)!==0)return u;do{const d=l+u>>>1;n(s[d],c)<=0?l=d+1:u=d}while(l<u)}return l}function o(s,c,l=0,u=s.length){const d=i(s,c,l,u-1);return d>l&&r(s[d-1],c)>-r(s[d],c)?d-1:d}return{left:i,center:o,right:a}}function GF(){return 0}function ZF(e){return e===null?NaN:+e}const KF=ng(al),XF=KF.right;ng(ZF).center;class A1 extends Map{constructor(t,n=eB){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(R1(this,t))}has(t){return super.has(R1(this,t))}set(t,n){return super.set(QF(this,t),n)}delete(t){return super.delete(JF(this,t))}}function R1({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function QF({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function JF({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function eB(e){return e!==null&&typeof e=="object"?e.valueOf():e}const tB=Math.sqrt(50),nB=Math.sqrt(10),rB=Math.sqrt(2);function Wl(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=tB?10:a>=nB?5:a>=rB?2:1;let s,c,l;return i<0?(l=Math.pow(10,-i)/o,s=Math.round(e*l),c=Math.round(t*l),s/l<e&&++s,c/l>t&&--c,l=-l):(l=Math.pow(10,i)*o,s=Math.round(e/l),c=Math.round(t/l),s*l<e&&++s,c*l>t&&--c),c<s&&.5<=n&&n<2?Wl(e,t,n*2):[s,c,l]}function Gh(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Wl(t,e,n):Wl(e,t,n);if(!(a>=i))return[];const s=a-i+1,c=new Array(s);if(r)if(o<0)for(let l=0;l<s;++l)c[l]=(a-l)/-o;else for(let l=0;l<s;++l)c[l]=(a-l)*o;else if(o<0)for(let l=0;l<s;++l)c[l]=(i+l)/-o;else for(let l=0;l<s;++l)c[l]=(i+l)*o;return c}function Zh(e,t,n){return t=+t,e=+e,n=+n,Wl(e,t,n)[2]}function Kh(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Zh(t,e,n):Zh(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function iB(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function da(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}const j1=Symbol("implicit");function Li(){var e=new A1,t=[],n=[],r=j1;function i(a){let o=e.get(a);if(o===void 0){if(r!==j1)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new A1;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Li(t,n).unknown(r)},da.apply(i,arguments),i}function rg(){var e=Li().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,c=0,l=0,u=.5;delete e.unknown;function d(){var f=t().length,h=i<r,g=h?i:r,p=h?r:i;a=(p-g)/Math.max(1,f-c+l*2),s&&(a=Math.floor(a)),g+=(p-g-a*(f-c))*u,o=a*(1-c),s&&(g=Math.round(g),o=Math.round(o));var v=iB(f).map(function(w){return g+a*w});return n(h?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(c=Math.min(1,l=+f),d()):c},e.paddingInner=function(f){return arguments.length?(c=Math.min(1,f),d()):c},e.paddingOuter=function(f){return arguments.length?(l=+f,d()):l},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return rg(t(),[r,i]).round(s).paddingInner(c).paddingOuter(l).align(u)},da.apply(d(),arguments)}function Gw(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Gw(t())},e}function aB(){return Gw(rg.apply(null,arguments).paddingInner(1))}function oB(e){return function(){return e}}function sB(e){return+e}var P1=[0,1];function $a(e){return e}function Xh(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:oB(isNaN(t)?NaN:.5)}function cB(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function lB(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=Xh(i,r),a=n(o,a)):(r=Xh(r,i),a=n(a,o)),function(s){return a(r(s))}}function uB(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=Xh(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(s){var c=XF(e,s,1,r)-1;return a[c](i[c](s))}}function id(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ig(){var e=P1,t=P1,n=eg,r,i,a,o=$a,s,c,l;function u(){var f=Math.min(e.length,t.length);return o!==$a&&(o=cB(e[0],e[f-1])),s=f>2?uB:lB,c=l=null,d}function d(f){return f==null||isNaN(f=+f)?a:(c||(c=s(e.map(r),t,n)))(r(o(f)))}return d.invert=function(f){return o(i((l||(l=s(t,e.map(r),Ul)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,sB),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=LF,u()},d.clamp=function(f){return arguments.length?(o=f?!0:$a,u()):o!==$a},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,h){return r=f,i=h,u()}}function Zw(){return ig()($a,$a)}function dB(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function zl(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ja(e){return e=zl(Math.abs(e)),e?e[1]:NaN}function fB(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function hB(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var pB=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bs(e){if(!(t=pB.exec(e)))throw new Error("invalid format: "+e);var t;return new ag({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Bs.prototype=ag.prototype;function ag(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}ag.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function mB(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Kw;function gB(e,t){var n=zl(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(Kw=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+zl(e,Math.max(0,t+a-1))[0]}function I1(e,t){var n=zl(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const D1={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:dB,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return I1(e*100,t)},r:I1,s:gB,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function N1(e){return e}var L1=Array.prototype.map,F1=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vB(e){var t=e.grouping===void 0||e.thousands===void 0?N1:fB(L1.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?N1:hB(L1.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function l(d){d=Bs(d);var f=d.fill,h=d.align,g=d.sign,p=d.symbol,v=d.zero,w=d.width,_=d.comma,x=d.precision,S=d.trim,b=d.type;b==="n"?(_=!0,b="g"):D1[b]||(x===void 0&&(x=12),S=!0,b="g"),(v||f==="0"&&h==="=")&&(v=!0,f="0",h="=");var T=p==="$"?n:p==="#"&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",j=p==="$"?r:/[%p]/.test(b)?o:"",M=D1[b],k=/[defgprs%]/.test(b);x=x===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function E(C){var O=T,$=j,A,P,D;if(b==="c")$=M(C)+$,C="";else{C=+C;var N=C<0||1/C<0;if(C=isNaN(C)?c:M(Math.abs(C),x),S&&(C=mB(C)),N&&+C==0&&g!=="+"&&(N=!1),O=(N?g==="("?g:s:g==="-"||g==="("?"":g)+O,$=(b==="s"?F1[8+Kw/3]:"")+$+(N&&g==="("?")":""),k){for(A=-1,P=C.length;++A<P;)if(D=C.charCodeAt(A),48>D||D>57){$=(D===46?i+C.slice(A+1):C.slice(A))+$,C=C.slice(0,A);break}}}_&&!v&&(C=t(C,1/0));var q=O.length+C.length+$.length,z=q<w?new Array(w-q+1).join(f):"";switch(_&&v&&(C=t(z+C,z.length?w-$.length:1/0),z=""),h){case"<":C=O+C+$+z;break;case"=":C=O+z+C+$;break;case"^":C=z.slice(0,q=z.length>>1)+O+C+$+z.slice(q);break;default:C=z+O+C+$;break}return a(C)}return E.toString=function(){return d+""},E}function u(d,f){var h=l((d=Bs(d),d.type="f",d)),g=Math.max(-8,Math.min(8,Math.floor(Ja(f)/3)))*3,p=Math.pow(10,-g),v=F1[8+g/3];return function(w){return h(p*w)+v}}return{format:l,formatPrefix:u}}var Fc,fc,Xw;yB({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function yB(e){return Fc=vB(e),fc=Fc.format,Xw=Fc.formatPrefix,Fc}function bB(e){return Math.max(0,-Ja(Math.abs(e)))}function xB(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ja(t)/3)))*3-Ja(Math.abs(e)))}function _B(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ja(t)-Ja(e))+1}function wB(e,t,n,r){var i=Kh(e,t,n),a;switch(r=Bs(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=xB(i,o))&&(r.precision=a),Xw(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=_B(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=bB(i))&&(r.precision=a-(r.type==="%")*2);break}}return fc(r)}function Qw(e){var t=e.domain;return e.ticks=function(n){var r=t();return Gh(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return wB(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s<o&&(l=o,o=s,s=l,l=i,i=a,a=l);u-- >0;){if(l=Zh(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function Jw(){var e=Zw();return e.copy=function(){return id(e,Jw())},da.apply(e,arguments),Qw(e)}function e4(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function B1(e){return Math.log(e)}function U1(e){return Math.exp(e)}function CB(e){return-Math.log(-e)}function TB(e){return-Math.exp(-e)}function SB(e){return isFinite(e)?+("1e"+e):e<0?0:e}function kB(e){return e===10?SB:e===Math.E?Math.exp:t=>Math.pow(e,t)}function EB(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function W1(e){return(t,n)=>-e(-t,n)}function OB(e){const t=e(B1,U1),n=t.domain;let r=10,i,a;function o(){return i=EB(r),a=kB(r),n()[0]<0?(i=W1(i),a=W1(a),e(CB,TB)):e(B1,U1),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const c=n();let l=c[0],u=c[c.length-1];const d=u<l;d&&([l,u]=[u,l]);let f=i(l),h=i(u),g,p;const v=s==null?10:+s;let w=[];if(!(r%1)&&h-f<v){if(f=Math.floor(f),h=Math.ceil(h),l>0){for(;f<=h;++f)for(g=1;g<r;++g)if(p=f<0?g/a(-f):g*a(f),!(p<l)){if(p>u)break;w.push(p)}}else for(;f<=h;++f)for(g=r-1;g>=1;--g)if(p=f>0?g/a(-f):g*a(f),!(p<l)){if(p>u)break;w.push(p)}w.length*2<v&&(w=Gh(l,u,v))}else w=Gh(f,h,Math.min(h-f,v)).map(a);return d?w.reverse():w},t.tickFormat=(s,c)=>{if(s==null&&(s=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Bs(c)).precision==null&&(c.trim=!0),c=fc(c)),s===1/0)return c;const l=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/a(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=l?c(u):""}},t.nice=()=>n(e4(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function t4(){const e=OB(ig()).domain([1,10]);return e.copy=()=>id(e,t4()).base(e.base()),da.apply(e,arguments),e}function z1(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function H1(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function MB(e){var t=1,n=e(z1(t),H1(t));return n.constant=function(r){return arguments.length?e(z1(t=+r),H1(t)):t},Qw(n)}function n4(){var e=MB(ig());return e.copy=function(){return id(e,n4()).constant(e.constant())},da.apply(e,arguments)}const Mf=new Date,$f=new Date;function nn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const c=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;let l;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=a=>nn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Mf.setTime(+a),$f.setTime(+o),e(Mf),e($f),Math.floor(n(Mf,$f))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Hl=nn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Hl.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?nn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Hl);Hl.range;const Lr=1e3,Vn=Lr*60,Fr=Vn*60,qr=Fr*24,og=qr*7,V1=qr*30,Af=qr*365,Fi=nn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Lr)},(e,t)=>(t-e)/Lr,e=>e.getUTCSeconds());Fi.range;const sg=nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lr)},(e,t)=>{e.setTime(+e+t*Vn)},(e,t)=>(t-e)/Vn,e=>e.getMinutes());sg.range;const cg=nn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vn)},(e,t)=>(t-e)/Vn,e=>e.getUTCMinutes());cg.range;const lg=nn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Lr-e.getMinutes()*Vn)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getHours());lg.range;const ug=nn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Fr)},(e,t)=>(t-e)/Fr,e=>e.getUTCHours());ug.range;const dg=nn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vn)/qr,e=>e.getDate()-1);dg.range;const r4=nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qr,e=>e.getUTCDate()-1);r4.range;const i4=nn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/qr,e=>Math.floor(e/qr));i4.range;function fa(e){return nn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Vn)/og)}const fg=fa(0),$B=fa(1),AB=fa(2),RB=fa(3),jB=fa(4),PB=fa(5),IB=fa(6);fg.range;$B.range;AB.range;RB.range;jB.range;PB.range;IB.range;function ha(e){return nn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/og)}const hg=ha(0),DB=ha(1),NB=ha(2),LB=ha(3),FB=ha(4),BB=ha(5),UB=ha(6);hg.range;DB.range;NB.range;LB.range;FB.range;BB.range;UB.range;const pg=nn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());pg.range;const mg=nn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());mg.range;const ad=nn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ad.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ad.range;const od=nn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());od.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:nn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});od.range;function a4(e,t,n,r,i,a){const o=[[Fi,1,Lr],[Fi,5,5*Lr],[Fi,15,15*Lr],[Fi,30,30*Lr],[a,1,Vn],[a,5,5*Vn],[a,15,15*Vn],[a,30,30*Vn],[i,1,Fr],[i,3,3*Fr],[i,6,6*Fr],[i,12,12*Fr],[r,1,qr],[r,2,2*qr],[n,1,og],[t,1,V1],[t,3,3*V1],[e,1,Af]];function s(l,u,d){const f=u<l;f&&([l,u]=[u,l]);const h=d&&typeof d.range=="function"?d:c(l,u,d),g=h?h.range(l,+u+1):[];return f?g.reverse():g}function c(l,u,d){const f=Math.abs(u-l)/d,h=ng(([,,v])=>v).right(o,f);if(h===o.length)return e.every(Kh(l/Af,u/Af,d));if(h===0)return Hl.every(Math.max(Kh(l,u,d),1));const[g,p]=o[f/o[h-1][2]<o[h][2]/f?h-1:h];return g.every(p)}return[s,c]}const[WB,zB]=a4(od,mg,hg,i4,ug,cg),[HB,VB]=a4(ad,pg,fg,dg,lg,sg);var Rf=new Date,jf=new Date;function en(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=function(a){return e(a=new Date(+a)),a},i.ceil=function(a){return e(a=new Date(a-1)),t(a,1),e(a),a},i.round=function(a){var o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=function(a,o){return t(a=new Date(+a),o==null?1:Math.floor(o)),a},i.range=function(a,o,s){var c=[],l;if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return c;do c.push(l=new Date(+a)),t(a,s),e(a);while(l<a&&a<o);return c},i.filter=function(a){return en(function(o){if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},function(o,s){if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););})},n&&(i.count=function(a,o){return Rf.setTime(+a),jf.setTime(+o),e(Rf),e(jf),Math.floor(n(Rf,jf))},i.every=function(a){return a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?function(o){return r(o)%a===0}:function(o){return i.count(0,o)%a===0}):i}),i}var Us=en(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});Us.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?en(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):Us};Us.range;var Vl=1e3,ra=6e4,ql=36e5,o4=864e5,s4=6048e5,Qh=en(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*Vl)},function(e,t){return(t-e)/Vl},function(e){return e.getUTCSeconds()});Qh.range;var c4=en(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vl)},function(e,t){e.setTime(+e+t*ra)},function(e,t){return(t-e)/ra},function(e){return e.getMinutes()});c4.range;var l4=en(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*Vl-e.getMinutes()*ra)},function(e,t){e.setTime(+e+t*ql)},function(e,t){return(t-e)/ql},function(e){return e.getHours()});l4.range;var gg=en(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ra)/o4},function(e){return e.getDate()-1});gg.range;function pa(e){return en(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n*7)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ra)/s4})}var Yl=pa(0),Ws=pa(1),u4=pa(2),d4=pa(3),ia=pa(4),f4=pa(5),h4=pa(6);Yl.range;Ws.range;u4.range;d4.range;ia.range;f4.range;h4.range;var p4=en(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()});p4.range;var yi=en(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});yi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:en(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)})};yi.range;var m4=en(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*ra)},function(e,t){return(t-e)/ra},function(e){return e.getUTCMinutes()});m4.range;var g4=en(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*ql)},function(e,t){return(t-e)/ql},function(e){return e.getUTCHours()});g4.range;var vg=en(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/o4},function(e){return e.getUTCDate()-1});vg.range;function ma(e){return en(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n*7)},function(t,n){return(n-t)/s4})}var Gl=ma(0),zs=ma(1),v4=ma(2),y4=ma(3),aa=ma(4),b4=ma(5),x4=ma(6);Gl.range;zs.range;v4.range;y4.range;aa.range;b4.range;x4.range;var _4=en(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()});_4.range;var bi=en(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});bi.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:en(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)})};bi.range;function Pf(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function If(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Uo(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function qB(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,c=e.shortMonths,l=Wo(i),u=zo(i),d=Wo(a),f=zo(a),h=Wo(o),g=zo(o),p=Wo(s),v=zo(s),w=Wo(c),_=zo(c),x={a:N,A:q,b:z,B:U,c:null,d:X1,e:X1,f:mU,g:SU,G:EU,H:fU,I:hU,j:pU,L:w4,m:gU,M:vU,p:G,q:ne,Q:ey,s:ty,S:yU,u:bU,U:xU,V:_U,w:wU,W:CU,x:null,X:null,y:TU,Y:kU,Z:OU,"%":J1},S={a:te,A:X,b:J,B:Q,c:null,d:Q1,e:Q1,f:RU,g:WU,G:HU,H:MU,I:$U,j:AU,L:T4,m:jU,M:PU,p:re,q:F,Q:ey,s:ty,S:IU,u:DU,U:NU,V:LU,w:FU,W:BU,x:null,X:null,y:UU,Y:zU,Z:VU,"%":J1},b={a:E,A:C,b:O,B:$,c:A,d:Z1,e:Z1,f:cU,g:G1,G:Y1,H:K1,I:K1,j:iU,L:sU,m:rU,M:aU,p:k,q:nU,Q:uU,s:dU,S:oU,u:XB,U:QB,V:JB,w:KB,W:eU,x:P,X:D,y:G1,Y:Y1,Z:tU,"%":lU};x.x=T(n,x),x.X=T(r,x),x.c=T(t,x),S.x=T(n,S),S.X=T(r,S),S.c=T(t,S);function T(I,L){return function(H){var R=[],K=-1,Z=0,ee=I.length,pe,we,ve;for(H instanceof Date||(H=new Date(+H));++K<ee;)I.charCodeAt(K)===37&&(R.push(I.slice(Z,K)),(we=q1[pe=I.charAt(++K)])!=null?pe=I.charAt(++K):we=pe==="e"?" ":"0",(ve=L[pe])&&(pe=ve(H,we)),R.push(pe),Z=K+1);return R.push(I.slice(Z,K)),R.join("")}}function j(I,L){return function(H){var R=Uo(1900,void 0,1),K=M(R,I,H+="",0),Z,ee;if(K!=H.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(L&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(Z=If(Uo(R.y,0,1)),ee=Z.getUTCDay(),Z=ee>4||ee===0?zs.ceil(Z):zs(Z),Z=vg.offset(Z,(R.V-1)*7),R.y=Z.getUTCFullYear(),R.m=Z.getUTCMonth(),R.d=Z.getUTCDate()+(R.w+6)%7):(Z=Pf(Uo(R.y,0,1)),ee=Z.getDay(),Z=ee>4||ee===0?Ws.ceil(Z):Ws(Z),Z=gg.offset(Z,(R.V-1)*7),R.y=Z.getFullYear(),R.m=Z.getMonth(),R.d=Z.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ee="Z"in R?If(Uo(R.y,0,1)).getUTCDay():Pf(Uo(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ee+5)%7:R.w+R.U*7-(ee+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,If(R)):Pf(R)}}function M(I,L,H,R){for(var K=0,Z=L.length,ee=H.length,pe,we;K<Z;){if(R>=ee)return-1;if(pe=L.charCodeAt(K++),pe===37){if(pe=L.charAt(K++),we=b[pe in q1?L.charAt(K++):pe],!we||(R=we(I,H,R))<0)return-1}else if(pe!=H.charCodeAt(R++))return-1}return R}function k(I,L,H){var R=l.exec(L.slice(H));return R?(I.p=u.get(R[0].toLowerCase()),H+R[0].length):-1}function E(I,L,H){var R=h.exec(L.slice(H));return R?(I.w=g.get(R[0].toLowerCase()),H+R[0].length):-1}function C(I,L,H){var R=d.exec(L.slice(H));return R?(I.w=f.get(R[0].toLowerCase()),H+R[0].length):-1}function O(I,L,H){var R=w.exec(L.slice(H));return R?(I.m=_.get(R[0].toLowerCase()),H+R[0].length):-1}function $(I,L,H){var R=p.exec(L.slice(H));return R?(I.m=v.get(R[0].toLowerCase()),H+R[0].length):-1}function A(I,L,H){return M(I,t,L,H)}function P(I,L,H){return M(I,n,L,H)}function D(I,L,H){return M(I,r,L,H)}function N(I){return o[I.getDay()]}function q(I){return a[I.getDay()]}function z(I){return c[I.getMonth()]}function U(I){return s[I.getMonth()]}function G(I){return i[+(I.getHours()>=12)]}function ne(I){return 1+~~(I.getMonth()/3)}function te(I){return o[I.getUTCDay()]}function X(I){return a[I.getUTCDay()]}function J(I){return c[I.getUTCMonth()]}function Q(I){return s[I.getUTCMonth()]}function re(I){return i[+(I.getUTCHours()>=12)]}function F(I){return 1+~~(I.getUTCMonth()/3)}return{format:function(I){var L=T(I+="",x);return L.toString=function(){return I},L},parse:function(I){var L=j(I+="",!1);return L.toString=function(){return I},L},utcFormat:function(I){var L=T(I+="",S);return L.toString=function(){return I},L},utcParse:function(I){var L=j(I+="",!0);return L.toString=function(){return I},L}}}var q1={"-":"",_:" ",0:"0"},cn=/^\s*\d+/,YB=/^%/,GB=/[\\^$*+?|[\]().{}]/g;function ht(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function ZB(e){return e.replace(GB,"\\$&")}function Wo(e){return new RegExp("^(?:"+e.map(ZB).join("|")+")","i")}function zo(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function KB(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function XB(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function QB(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function JB(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function eU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Y1(e,t,n){var r=cn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function G1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function tU(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function nU(e,t,n){var r=cn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function rU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Z1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function iU(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function K1(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function aU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function oU(e,t,n){var r=cn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function sU(e,t,n){var r=cn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function cU(e,t,n){var r=cn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function lU(e,t,n){var r=YB.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function uU(e,t,n){var r=cn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function dU(e,t,n){var r=cn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function X1(e,t){return ht(e.getDate(),t,2)}function fU(e,t){return ht(e.getHours(),t,2)}function hU(e,t){return ht(e.getHours()%12||12,t,2)}function pU(e,t){return ht(1+gg.count(yi(e),e),t,3)}function w4(e,t){return ht(e.getMilliseconds(),t,3)}function mU(e,t){return w4(e,t)+"000"}function gU(e,t){return ht(e.getMonth()+1,t,2)}function vU(e,t){return ht(e.getMinutes(),t,2)}function yU(e,t){return ht(e.getSeconds(),t,2)}function bU(e){var t=e.getDay();return t===0?7:t}function xU(e,t){return ht(Yl.count(yi(e)-1,e),t,2)}function C4(e){var t=e.getDay();return t>=4||t===0?ia(e):ia.ceil(e)}function _U(e,t){return e=C4(e),ht(ia.count(yi(e),e)+(yi(e).getDay()===4),t,2)}function wU(e){return e.getDay()}function CU(e,t){return ht(Ws.count(yi(e)-1,e),t,2)}function TU(e,t){return ht(e.getFullYear()%100,t,2)}function SU(e,t){return e=C4(e),ht(e.getFullYear()%100,t,2)}function kU(e,t){return ht(e.getFullYear()%1e4,t,4)}function EU(e,t){var n=e.getDay();return e=n>=4||n===0?ia(e):ia.ceil(e),ht(e.getFullYear()%1e4,t,4)}function OU(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ht(t/60|0,"0",2)+ht(t%60,"0",2)}function Q1(e,t){return ht(e.getUTCDate(),t,2)}function MU(e,t){return ht(e.getUTCHours(),t,2)}function $U(e,t){return ht(e.getUTCHours()%12||12,t,2)}function AU(e,t){return ht(1+vg.count(bi(e),e),t,3)}function T4(e,t){return ht(e.getUTCMilliseconds(),t,3)}function RU(e,t){return T4(e,t)+"000"}function jU(e,t){return ht(e.getUTCMonth()+1,t,2)}function PU(e,t){return ht(e.getUTCMinutes(),t,2)}function IU(e,t){return ht(e.getUTCSeconds(),t,2)}function DU(e){var t=e.getUTCDay();return t===0?7:t}function NU(e,t){return ht(Gl.count(bi(e)-1,e),t,2)}function S4(e){var t=e.getUTCDay();return t>=4||t===0?aa(e):aa.ceil(e)}function LU(e,t){return e=S4(e),ht(aa.count(bi(e),e)+(bi(e).getUTCDay()===4),t,2)}function FU(e){return e.getUTCDay()}function BU(e,t){return ht(zs.count(bi(e)-1,e),t,2)}function UU(e,t){return ht(e.getUTCFullYear()%100,t,2)}function WU(e,t){return e=S4(e),ht(e.getUTCFullYear()%100,t,2)}function zU(e,t){return ht(e.getUTCFullYear()%1e4,t,4)}function HU(e,t){var n=e.getUTCDay();return e=n>=4||n===0?aa(e):aa.ceil(e),ht(e.getUTCFullYear()%1e4,t,4)}function VU(){return"+0000"}function J1(){return"%"}function ey(e){return+e}function ty(e){return Math.floor(+e/1e3)}var Ca,sd,k4,E4,O4;qU({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function qU(e){return Ca=qB(e),sd=Ca.format,k4=Ca.parse,E4=Ca.utcFormat,O4=Ca.utcParse,Ca}function YU(e){return new Date(e)}function GU(e){return e instanceof Date?+e:+new Date(+e)}function yg(e,t,n,r,i,a,o,s,c,l){var u=Zw(),d=u.invert,f=u.domain,h=l(".%L"),g=l(":%S"),p=l("%I:%M"),v=l("%I %p"),w=l("%a %d"),_=l("%b %d"),x=l("%B"),S=l("%Y");function b(T){return(c(T)<T?h:s(T)<T?g:o(T)<T?p:a(T)<T?v:r(T)<T?i(T)<T?w:_:n(T)<T?x:S)(T)}return u.invert=function(T){return new Date(d(T))},u.domain=function(T){return arguments.length?f(Array.from(T,GU)):f().map(YU)},u.ticks=function(T){var j=f();return e(j[0],j[j.length-1],T??10)},u.tickFormat=function(T,j){return j==null?b:l(j)},u.nice=function(T){var j=f();return(!T||typeof T.range!="function")&&(T=t(j[0],j[j.length-1],T??10)),T?f(e4(j,T)):u},u.copy=function(){return id(u,yg(e,t,n,r,i,a,o,s,c,l))},u}function ZU(){return da.apply(yg(HB,VB,ad,pg,fg,dg,lg,sg,Fi,sd).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function KU(){return da.apply(yg(WB,zB,od,mg,hg,r4,ug,cg,Fi,E4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Je(e){for(var t=e.length/6|0,n=new Array(t),r=0;r<t;)n[r]="#"+e.slice(r*6,++r*6);return n}const M4=Je("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),$4=Je("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),A4=Je("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),R4=Je("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),j4=Je("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),P4=Je("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),I4=Je("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),D4=Je("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),bg=Je("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),XU=Je("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),At=e=>$F(e[e.length-1]);var cd=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Je);const QU=At(cd);var ld=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Je);const JU=At(ld);var ud=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Je);const eW=At(ud);var dd=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Je);const tW=At(dd);var fd=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Je);const nW=At(fd);var hd=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Je);const rW=At(hd);var pd=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Je);const iW=At(pd);var md=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Je);const aW=At(md);var gd=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Je);const oW=At(gd);var vd=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Je);const sW=At(vd);var yd=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Je);const cW=At(yd);var bd=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Je);const lW=At(bd);var xd=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Je);const uW=At(xd);var _d=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Je);const dW=At(_d);var wd=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Je);const fW=At(wd);var Cd=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Je);const hW=At(Cd);var Td=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Je);const pW=At(Td);var Sd=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Je);const mW=At(Sd);var kd=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Je);const gW=At(kd);var Ed=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Je);const vW=At(Ed);var Od=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Je);const yW=At(Od);var Md=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Je);const bW=At(Md);var $d=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Je);const xW=At($d);var Ad=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Je);const _W=At(Ad);var Rd=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Je);const wW=At(Rd);var jd=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Je);const CW=At(jd);var Pd=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Je);const TW=At(Pd);function SW(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}const kW=tg(_r(300,.5,0),_r(-240,.5,1));var EW=tg(_r(-100,.75,.35),_r(80,1.5,.8)),OW=tg(_r(260,.75,.35),_r(80,1.5,.8)),Bc=_r();function MW(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return Bc.h=360*e-100,Bc.s=1.5-1.5*t,Bc.l=.8-.9*t,Bc+""}var Uc=Qa(),$W=Math.PI/3,AW=Math.PI*2/3;function RW(e){var t;return e=(.5-e)*Math.PI,Uc.r=255*(t=Math.sin(e))*t,Uc.g=255*(t=Math.sin(e+$W))*t,Uc.b=255*(t=Math.sin(e+AW))*t,Uc+""}function jW(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function Id(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}const PW=Id(Je("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var IW=Id(Je("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),DW=Id(Je("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),NW=Id(Je("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),LW="__lodash_hash_undefined__";function FW(e){return this.__data__.set(e,LW),this}var BW=FW;function UW(e){return this.__data__.has(e)}var WW=UW,zW=Lm,HW=BW,VW=WW;function Zl(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new zW;++t<n;)this.add(e[t])}Zl.prototype.add=Zl.prototype.push=HW;Zl.prototype.has=VW;var xg=Zl;function qW(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var YW=qW;function GW(e){return e!==e}var ZW=GW;function KW(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var XW=KW,QW=YW,JW=ZW,ez=XW;function tz(e,t,n){return t===t?ez(e,t,n):QW(e,JW,n)}var nz=tz,rz=nz;function iz(e,t){var n=e==null?0:e.length;return!!n&&rz(e,t,0)>-1}var N4=iz;function az(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var L4=az;function oz(e,t){return e.has(t)}var _g=oz,sz=xg,cz=N4,lz=L4,uz=ed,dz=go,fz=_g,hz=200;function pz(e,t,n,r){var i=-1,a=cz,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=uz(t,dz(n))),r?(a=lz,o=!1):t.length>=hz&&(a=fz,o=!1,t=new sz(t));e:for(;++i<s;){var u=e[i],d=n==null?u:n(u);if(u=r||u!==0?u:0,o&&d===d){for(var f=l;f--;)if(t[f]===d)continue e;c.push(u)}else a(t,d,r)||c.push(u)}return c}var mz=pz,gz=mz,vz=Gm,yz=Ow,bz=vz(function(e,t){return yz(e)?gz(e,t):[]}),xz=bz;const F4=Ht(xz);function it(e){return function(){return e}}const ny=Math.abs,hn=Math.atan2,Ei=Math.cos,_z=Math.max,Df=Math.min,ur=Math.sin,Aa=Math.sqrt,mn=1e-12,Hs=Math.PI,Kl=Hs/2,ol=2*Hs;function wz(e){return e>1?0:e<-1?Hs:Math.acos(e)}function ry(e){return e>=1?Kl:e<=-1?-Kl:Math.asin(e)}const Jh=Math.PI,ep=2*Jh,Ai=1e-6,Cz=ep-Ai;function B4(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Tz(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return B4;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}let Sz=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?B4:Tz(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,c=r-t,l=i-n,u=o-t,d=s-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>Ai)if(!(Math.abs(d*c-l*u)>Ai)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-o,g=i-s,p=c*c+l*l,v=h*h+g*g,w=Math.sqrt(p),_=Math.sqrt(f),x=a*Math.tan((Jh-Math.acos((p+f-v)/(2*w*_)))/2),S=x/_,b=x/w;Math.abs(S-1)>Ai&&this._append`L${t+S*u},${n+S*d}`,this._append`A${a},${a},0,0,${+(d*h>u*g)},${this._x1=t+b*c},${this._y1=n+b*l}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),c=r*Math.sin(i),l=t+s,u=n+c,d=1^o,f=o?i-a:a-i;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>Ai||Math.abs(this._y1-u)>Ai)&&this._append`L${l},${u}`,r&&(f<0&&(f=f%ep+ep),f>Cz?this._append`A${r},${r},0,1,${d},${t-s},${n-c}A${r},${r},0,1,${d},${this._x1=l},${this._y1=u}`:f>Ai&&this._append`A${r},${r},0,${+(f>=Jh)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};function wg(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new Sz(t)}function kz(e){return e.innerRadius}function Ez(e){return e.outerRadius}function Oz(e){return e.startAngle}function Mz(e){return e.endAngle}function $z(e){return e&&e.padAngle}function Az(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<mn))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function Wc(e,t,n,r,i,a,o){var s=e-n,c=t-r,l=(o?a:-a)/Aa(s*s+c*c),u=l*c,d=-l*s,f=e+u,h=t+d,g=n+u,p=r+d,v=(f+g)/2,w=(h+p)/2,_=g-f,x=p-h,S=_*_+x*x,b=i-a,T=f*p-g*h,j=(x<0?-1:1)*Aa(_z(0,b*b*S-T*T)),M=(T*x-_*j)/S,k=(-T*_-x*j)/S,E=(T*x+_*j)/S,C=(-T*_+x*j)/S,O=M-v,$=k-w,A=E-v,P=C-w;return O*O+$*$>A*A+P*P&&(M=E,k=C),{cx:M,cy:k,x01:-u,y01:-d,x11:M*(i/b-1),y11:k*(i/b-1)}}function Rz(){var e=kz,t=Ez,n=it(0),r=null,i=Oz,a=Mz,o=$z,s=null,c=wg(l);function l(){var u,d,f=+e.apply(this,arguments),h=+t.apply(this,arguments),g=i.apply(this,arguments)-Kl,p=a.apply(this,arguments)-Kl,v=ny(p-g),w=p>g;if(s||(s=u=c()),h<f&&(d=h,h=f,f=d),!(h>mn))s.moveTo(0,0);else if(v>ol-mn)s.moveTo(h*Ei(g),h*ur(g)),s.arc(0,0,h,g,p,!w),f>mn&&(s.moveTo(f*Ei(p),f*ur(p)),s.arc(0,0,f,p,g,w));else{var _=g,x=p,S=g,b=p,T=v,j=v,M=o.apply(this,arguments)/2,k=M>mn&&(r?+r.apply(this,arguments):Aa(f*f+h*h)),E=Df(ny(h-f)/2,+n.apply(this,arguments)),C=E,O=E,$,A;if(k>mn){var P=ry(k/f*ur(M)),D=ry(k/h*ur(M));(T-=P*2)>mn?(P*=w?1:-1,S+=P,b-=P):(T=0,S=b=(g+p)/2),(j-=D*2)>mn?(D*=w?1:-1,_+=D,x-=D):(j=0,_=x=(g+p)/2)}var N=h*Ei(_),q=h*ur(_),z=f*Ei(b),U=f*ur(b);if(E>mn){var G=h*Ei(x),ne=h*ur(x),te=f*Ei(S),X=f*ur(S),J;if(v<Hs)if(J=Az(N,q,te,X,G,ne,z,U)){var Q=N-J[0],re=q-J[1],F=G-J[0],I=ne-J[1],L=1/ur(wz((Q*F+re*I)/(Aa(Q*Q+re*re)*Aa(F*F+I*I)))/2),H=Aa(J[0]*J[0]+J[1]*J[1]);C=Df(E,(f-H)/(L-1)),O=Df(E,(h-H)/(L+1))}else C=O=0}j>mn?O>mn?($=Wc(te,X,N,q,h,O,w),A=Wc(G,ne,z,U,h,O,w),s.moveTo($.cx+$.x01,$.cy+$.y01),O<E?s.arc($.cx,$.cy,O,hn($.y01,$.x01),hn(A.y01,A.x01),!w):(s.arc($.cx,$.cy,O,hn($.y01,$.x01),hn($.y11,$.x11),!w),s.arc(0,0,h,hn($.cy+$.y11,$.cx+$.x11),hn(A.cy+A.y11,A.cx+A.x11),!w),s.arc(A.cx,A.cy,O,hn(A.y11,A.x11),hn(A.y01,A.x01),!w))):(s.moveTo(N,q),s.arc(0,0,h,_,x,!w)):s.moveTo(N,q),!(f>mn)||!(T>mn)?s.lineTo(z,U):C>mn?($=Wc(z,U,G,ne,f,-C,w),A=Wc(N,q,te,X,f,-C,w),s.lineTo($.cx+$.x01,$.cy+$.y01),C<E?s.arc($.cx,$.cy,C,hn($.y01,$.x01),hn(A.y01,A.x01),!w):(s.arc($.cx,$.cy,C,hn($.y01,$.x01),hn($.y11,$.x11),!w),s.arc(0,0,f,hn($.cy+$.y11,$.cx+$.x11),hn(A.cy+A.y11,A.cx+A.x11),w),s.arc(A.cx,A.cy,C,hn(A.y11,A.x11),hn(A.y01,A.x01),!w))):s.arc(0,0,f,b,S,w)}if(s.closePath(),u)return s=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Hs/2;return[Ei(d)*u,ur(d)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:it(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:it(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:it(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:it(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:it(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:it(+u),l):a},l.padAngle=function(u){return arguments.length?(o=typeof u=="function"?u:it(+u),l):o},l.context=function(u){return arguments.length?(s=u??null,l):s},l}function Dd(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function U4(e){this._context=e}U4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Cg(e){return new U4(e)}function W4(e){return e[0]}function z4(e){return e[1]}function Tg(e,t){var n=it(!0),r=null,i=Cg,a=null,o=wg(s);e=typeof e=="function"?e:e===void 0?W4:it(e),t=typeof t=="function"?t:t===void 0?z4:it(t);function s(c){var l,u=(c=Dd(c)).length,d,f=!1,h;for(r==null&&(a=i(h=o())),l=0;l<=u;++l)!(l<u&&n(d=c[l],l,c))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(d,l,c),+t(d,l,c));if(h)return a=null,h+""||null}return s.x=function(c){return arguments.length?(e=typeof c=="function"?c:it(+c),s):e},s.y=function(c){return arguments.length?(t=typeof c=="function"?c:it(+c),s):t},s.defined=function(c){return arguments.length?(n=typeof c=="function"?c:it(!!c),s):n},s.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),s):i},s.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),s):r},s}function jz(e,t,n){var r=null,i=it(!0),a=null,o=Cg,s=null,c=wg(l);e=typeof e=="function"?e:e===void 0?W4:it(+e),t=typeof t=="function"?t:it(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?z4:it(+n);function l(d){var f,h,g,p=(d=Dd(d)).length,v,w=!1,_,x=new Array(p),S=new Array(p);for(a==null&&(s=o(_=c())),f=0;f<=p;++f){if(!(f<p&&i(v=d[f],f,d))===w)if(w=!w)h=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=h;--g)s.point(x[g],S[g]);s.lineEnd(),s.areaEnd()}w&&(x[f]=+e(v,f,d),S[f]=+t(v,f,d),s.point(r?+r(v,f,d):x[f],n?+n(v,f,d):S[f]))}if(_)return s=null,_+""||null}function u(){return Tg().defined(i).curve(o).context(a)}return l.x=function(d){return arguments.length?(e=typeof d=="function"?d:it(+d),r=null,l):e},l.x0=function(d){return arguments.length?(e=typeof d=="function"?d:it(+d),l):e},l.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:it(+d),l):r},l.y=function(d){return arguments.length?(t=typeof d=="function"?d:it(+d),n=null,l):t},l.y0=function(d){return arguments.length?(t=typeof d=="function"?d:it(+d),l):t},l.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:it(+d),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(d){return arguments.length?(i=typeof d=="function"?d:it(!!d),l):i},l.curve=function(d){return arguments.length?(o=d,a!=null&&(s=o(a)),l):o},l.context=function(d){return arguments.length?(d==null?a=s=null:s=o(a=d),l):a},l}function Pz(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Iz(e){return e}function Dz(){var e=Iz,t=Pz,n=null,r=it(0),i=it(ol),a=it(0);function o(s){var c,l=(s=Dd(s)).length,u,d,f=0,h=new Array(l),g=new Array(l),p=+r.apply(this,arguments),v=Math.min(ol,Math.max(-ol,i.apply(this,arguments)-p)),w,_=Math.min(Math.abs(v)/l,a.apply(this,arguments)),x=_*(v<0?-1:1),S;for(c=0;c<l;++c)(S=g[h[c]=c]=+e(s[c],c,s))>0&&(f+=S);for(t!=null?h.sort(function(b,T){return t(g[b],g[T])}):n!=null&&h.sort(function(b,T){return n(s[b],s[T])}),c=0,d=f?(v-l*x)/f:0;c<l;++c,p=w)u=h[c],S=g[u],w=p+(S>0?S*d:0)+x,g[u]={data:s[u],index:c,value:S,startAngle:p,endAngle:w,padAngle:_};return g}return o.value=function(s){return arguments.length?(e=typeof s=="function"?s:it(+s),o):e},o.sortValues=function(s){return arguments.length?(t=s,n=null,o):t},o.sort=function(s){return arguments.length?(n=s,t=null,o):n},o.startAngle=function(s){return arguments.length?(r=typeof s=="function"?s:it(+s),o):r},o.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:it(+s),o):i},o.padAngle=function(s){return arguments.length?(a=typeof s=="function"?s:it(+s),o):a},o}function xi(){}function Xl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Nd(e){this._context=e}Nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Xl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Nz(e){return new Nd(e)}function H4(e){this._context=e}H4.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Lz(e){return new H4(e)}function V4(e){this._context=e}V4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Xl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Fz(e){return new V4(e)}function q4(e,t){this._basis=new Nd(e),this._beta=t}q4.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Bz=function e(t){function n(r){return t===1?new Nd(r):new q4(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function Ql(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Sg(e,t){this._context=e,this._k=(1-t)/6}Sg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ql(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Ql(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Uz=function e(t){function n(r){return new Sg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function kg(e,t){this._context=e,this._k=(1-t)/6}kg.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Ql(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Wz=function e(t){function n(r){return new kg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Eg(e,t){this._context=e,this._k=(1-t)/6}Eg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ql(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const zz=function e(t){function n(r){return new Eg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function Og(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>mn){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>mn){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Y4(e,t){this._context=e,this._alpha=t}Y4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Og(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Hz=function e(t){function n(r){return t?new Y4(r,t):new Sg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function G4(e,t){this._context=e,this._alpha=t}G4.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Og(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Vz=function e(t){function n(r){return t?new G4(r,t):new kg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function Z4(e,t){this._context=e,this._alpha=t}Z4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Og(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const qz=function e(t){function n(r){return t?new Z4(r,t):new Eg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function K4(e){this._context=e}K4.prototype={areaStart:xi,areaEnd:xi,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Yz(e){return new K4(e)}function iy(e){return e<0?-1:1}function ay(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(iy(a)+iy(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function oy(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Nf(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function Jl(e){this._context=e}Jl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Nf(this,this._t0,oy(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Nf(this,oy(this,n=ay(this,e,t)),n);break;default:Nf(this,this._t0,n=ay(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function X4(e){this._context=new Q4(e)}(X4.prototype=Object.create(Jl.prototype)).point=function(e,t){Jl.prototype.point.call(this,t,e)};function Q4(e){this._context=e}Q4.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Gz(e){return new Jl(e)}function Zz(e){return new X4(e)}function J4(e){this._context=e}J4.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=sy(e),i=sy(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function sy(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Kz(e){return new J4(e)}function Ld(e,t){this._context=e,this._t=t}Ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Xz(e){return new Ld(e,.5)}function Qz(e){return new Ld(e,0)}function Jz(e){return new Ld(e,1)}function cy(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function ly(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function eH(e,t){return e[t]}function tH(e){const t=[];return t.key=e,t}function nH(){var e=it([]),t=ly,n=cy,r=eH;function i(a){var o=Array.from(e.apply(this,arguments),tH),s,c=o.length,l=-1,u;for(const d of a)for(s=0,++l;s<c;++s)(o[s][l]=[0,+r(d,o[s].key,l,a)]).data=d;for(s=0,u=Dd(t(o));s<c;++s)o[u[s]].index=s;return n(o,u),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:it(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:it(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?ly:typeof a=="function"?a:it(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??cy,i):n},i}function rH(e,t){if((c=e.length)>0)for(var n,r=0,i,a,o,s,c,l=e[t[0]].length;r<l;++r)for(o=s=0,n=0;n<c;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=o,i[1]=o+=a):a<0?(i[1]=s,i[0]=s+=a):(i[0]=0,i[1]=a)}var iH=dc,aH=Bw,oH=yo;function sH(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=iH(e,o);n(s,o)&&aH(a,oH(o,e),s)}return a}var cH=sH;function lH(e,t){return e!=null&&t in Object(e)}var uH=lH,dH=yo,fH=Gu,hH=Pn,pH=Xu,mH=zm,gH=bo;function vH(e,t,n){t=dH(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=gH(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&mH(i)&&pH(o,i)&&(hH(e)||fH(e)))}var yH=vH,bH=uH,xH=yH;function _H(e,t){return e!=null&&xH(e,t,bH)}var e3=_H,wH=cH,CH=e3;function TH(e,t){return wH(e,t,function(n,r){return CH(e,r)})}var SH=TH;function kH(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Mg=kH,uy=uo,EH=Gu,OH=Pn,dy=uy?uy.isConcatSpreadable:void 0;function MH(e){return OH(e)||EH(e)||!!(dy&&e&&e[dy])}var $H=MH,AH=Mg,RH=$H;function t3(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=RH),i||(i=[]);++a<o;){var s=e[a];t>0&&n(s)?t>1?t3(s,t-1,n,r,i):AH(i,s):r||(i[i.length]=s)}return i}var n3=t3,jH=n3;function PH(e){var t=e==null?0:e.length;return t?jH(e,1):[]}var IH=PH,DH=IH,NH=jw,LH=Pw;function FH(e){return LH(NH(e,void 0,DH),e+"")}var r3=FH,BH=SH,UH=r3,WH=UH(function(e,t){return e==null?{}:BH(e,t)}),zH=WH;const HH=Ht(zH);function VH(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var qH=VH,YH=xg,GH=qH,ZH=_g,KH=1,XH=2;function QH(e,t,n,r,i,a){var o=n&KH,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,h=n&XH?new YH:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var g=e[d],p=t[d];if(r)var v=o?r(p,g,d,t,e,a):r(g,p,d,e,t,a);if(v!==void 0){if(v)continue;f=!1;break}if(h){if(!GH(t,function(w,_){if(!ZH(h,_)&&(g===w||i(g,w,n,r,a)))return h.push(_)})){f=!1;break}}else if(!(g===p||i(g,p,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var i3=QH;function JH(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}var eV=JH;function tV(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var $g=tV,fy=uo,hy=ww,nV=lc,rV=i3,iV=eV,aV=$g,oV=1,sV=2,cV="[object Boolean]",lV="[object Date]",uV="[object Error]",dV="[object Map]",fV="[object Number]",hV="[object RegExp]",pV="[object Set]",mV="[object String]",gV="[object Symbol]",vV="[object ArrayBuffer]",yV="[object DataView]",py=fy?fy.prototype:void 0,Lf=py?py.valueOf:void 0;function bV(e,t,n,r,i,a,o){switch(n){case yV:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vV:return!(e.byteLength!=t.byteLength||!a(new hy(e),new hy(t)));case cV:case lV:case fV:return nV(+e,+t);case uV:return e.name==t.name&&e.message==t.message;case hV:case mV:return e==t+"";case dV:var s=iV;case pV:var c=r&oV;if(s||(s=aV),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=sV,o.set(e,t);var u=rV(s(e),s(t),r,i,a,o);return o.delete(e),u;case gV:if(Lf)return Lf.call(e)==Lf.call(t)}return!1}var xV=bV,_V=Mg,wV=Pn;function CV(e,t,n){var r=t(e);return wV(e)?r:_V(r,n(e))}var a3=CV;function TV(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var o3=TV;function SV(){return[]}var s3=SV,kV=o3,EV=s3,OV=Object.prototype,MV=OV.propertyIsEnumerable,my=Object.getOwnPropertySymbols,$V=my?function(e){return e==null?[]:(e=Object(e),kV(my(e),function(t){return MV.call(e,t)}))}:EV,Ag=$V,AV=Sw,RV=AV(Object.keys,Object),jV=RV,PV=Wm,IV=jV,DV=Object.prototype,NV=DV.hasOwnProperty;function LV(e){if(!PV(e))return IV(e);var t=[];for(var n in Object(e))NV.call(e,n)&&n!="constructor"&&t.push(n);return t}var FV=LV,BV=Aw,UV=FV,WV=mo;function zV(e){return WV(e)?BV(e):UV(e)}var hc=zV,HV=a3,VV=Ag,qV=hc;function YV(e){return HV(e,qV,VV)}var c3=YV,gy=c3,GV=1,ZV=Object.prototype,KV=ZV.hasOwnProperty;function XV(e,t,n,r,i,a){var o=n&GV,s=gy(e),c=s.length,l=gy(t),u=l.length;if(c!=u&&!o)return!1;for(var d=c;d--;){var f=s[d];if(!(o?f in t:KV.call(t,f)))return!1}var h=a.get(e),g=a.get(t);if(h&&g)return h==t&&g==e;var p=!0;a.set(e,t),a.set(t,e);for(var v=o;++d<c;){f=s[d];var w=e[f],_=t[f];if(r)var x=o?r(_,w,f,t,e,a):r(w,_,f,e,t,a);if(!(x===void 0?w===_||i(w,_,n,r,a):x)){p=!1;break}v||(v=f=="constructor")}if(p&&!v){var S=e.constructor,b=t.constructor;S!=b&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof b=="function"&&b instanceof b)&&(p=!1)}return a.delete(e),a.delete(t),p}var QV=XV,JV=ua,eq=kr,tq=JV(eq,"DataView"),nq=tq,rq=ua,iq=kr,aq=rq(iq,"Promise"),oq=aq,sq=ua,cq=kr,lq=sq(cq,"Set"),l3=lq,uq=ua,dq=kr,fq=uq(dq,"WeakMap"),hq=fq,tp=nq,np=Nm,rp=oq,ip=l3,ap=hq,u3=Gr,_o=vw,vy="[object Map]",pq="[object Object]",yy="[object Promise]",by="[object Set]",xy="[object WeakMap]",_y="[object DataView]",mq=_o(tp),gq=_o(np),vq=_o(rp),yq=_o(ip),bq=_o(ap),Ri=u3;(tp&&Ri(new tp(new ArrayBuffer(1)))!=_y||np&&Ri(new np)!=vy||rp&&Ri(rp.resolve())!=yy||ip&&Ri(new ip)!=by||ap&&Ri(new ap)!=xy)&&(Ri=function(e){var t=u3(e),n=t==pq?e.constructor:void 0,r=n?_o(n):"";if(r)switch(r){case mq:return _y;case gq:return vy;case vq:return yy;case yq:return by;case bq:return xy}return t});var Fd=Ri,Ff=Yu,xq=i3,_q=xV,wq=QV,wy=Fd,Cy=Pn,Ty=Zu,Cq=qm,Tq=1,Sy="[object Arguments]",ky="[object Array]",zc="[object Object]",Sq=Object.prototype,Ey=Sq.hasOwnProperty;function kq(e,t,n,r,i,a){var o=Cy(e),s=Cy(t),c=o?ky:wy(e),l=s?ky:wy(t);c=c==Sy?zc:c,l=l==Sy?zc:l;var u=c==zc,d=l==zc,f=c==l;if(f&&Ty(e)){if(!Ty(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new Ff),o||Cq(e)?xq(e,t,n,r,i,a):_q(e,t,c,n,r,i,a);if(!(n&Tq)){var h=u&&Ey.call(e,"__wrapped__"),g=d&&Ey.call(t,"__wrapped__");if(h||g){var p=h?e.value():e,v=g?t.value():t;return a||(a=new Ff),i(p,v,n,r,a)}}return f?(a||(a=new Ff),wq(e,t,n,r,i,a)):!1}var Eq=kq,Oq=Eq,Oy=Qn;function d3(e,t,n,r,i){return e===t?!0:e==null||t==null||!Oy(e)&&!Oy(t)?e!==e&&t!==t:Oq(e,t,n,r,d3,i)}var Rg=d3,Mq=Rg;function $q(e,t){return Mq(e,t)}var Aq=$q;const Rq=Ht(Aq);var jq={background:"transparent",text:{fontFamily:"sans-serif",fontSize:11,fill:"#333333",outlineWidth:0,outlineColor:"transparent",outlineOpacity:1},axis:{domain:{line:{stroke:"transparent",strokeWidth:1}},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{}},legend:{text:{fontSize:12}}},grid:{line:{stroke:"#dddddd",strokeWidth:1}},legends:{hidden:{symbol:{fill:"#333333",opacity:.6},text:{fill:"#333333",opacity:.6}},text:{},ticks:{line:{stroke:"#777777",strokeWidth:1},text:{fontSize:10}},title:{text:{}}},labels:{text:{}},markers:{lineColor:"#000000",lineStrokeWidth:1,text:{}},dots:{text:{}},tooltip:{container:{background:"white",color:"inherit",fontSize:"inherit",borderRadius:"2px",boxShadow:"0 1px 2px rgba(0, 0, 0, 0.25)",padding:"5px 9px"},basic:{whiteSpace:"pre",display:"flex",alignItems:"center"},chip:{marginRight:7},table:{},tableCell:{padding:"3px 5px"},tableCellValue:{fontWeight:"bold"}},crosshair:{line:{stroke:"#000000",strokeWidth:1,strokeOpacity:.75,strokeDasharray:"6 6"}},annotations:{text:{fontSize:13,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},link:{stroke:"#000000",strokeWidth:1,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},outline:{fill:"none",stroke:"#000000",strokeWidth:2,outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1},symbol:{fill:"#000000",outlineWidth:2,outlineColor:"#ffffff",outlineOpacity:1}}};function qn(){return qn=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},qn.apply(this,arguments)}function op(e,t){return op=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},op(e,t)}function Bd(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Pq=["axis.ticks.text","axis.legend.text","legends.title.text","legends.text","legends.ticks.text","legends.title.text","labels.text","dots.text","markers.text","annotations.text"],Iq=function(e,t){return qn({},t,e)},Dq=function(e,t){var n=pL({},e,t);return Pq.forEach(function(r){Qo(n,r,Iq(xr(n,r),n.text))}),n},f3=m.createContext(),h3=function(e){var t=e.children,n=e.animate,r=n===void 0||n,i=e.config,a=i===void 0?"default":i,o=m.useMemo(function(){var s=VF(a)?Rm[a]:a;return{animate:r,config:s}},[r,a]);return y.jsx(f3.Provider,{value:o,children:t})},My={animate:V.bool,motionConfig:V.oneOfType([V.oneOf(Object.keys(Rm)),V.shape({mass:V.number,tension:V.number,friction:V.number,clamp:V.bool,precision:V.number,velocity:V.number,duration:V.number,easing:V.func})])};h3.propTypes={children:V.node.isRequired,animate:My.animate,config:My.motionConfig};var kn=function(){return m.useContext(f3)},jg=function(e){var t=kn(),n=t.animate,r=t.config,i=function(s){var c=m.useRef();return m.useEffect(function(){c.current=s},[s]),c.current}(e),a=m.useMemo(function(){return Vw(i,e)},[i,e]),o=Sr({from:{value:0},to:{value:1},reset:!0,config:r,immediate:!n}).value;return vi(o,a)},Nq={nivo:["#d76445","#f47560","#e8c1a0","#97e3d5","#61cdbb","#00b0a7"],BrBG:Me(cd),PRGn:Me(ld),PiYG:Me(ud),PuOr:Me(dd),RdBu:Me(fd),RdGy:Me(hd),RdYlBu:Me(pd),RdYlGn:Me(md),spectral:Me(gd),blues:Me(Md),greens:Me($d),greys:Me(Ad),oranges:Me(Pd),purples:Me(Rd),reds:Me(jd),BuGn:Me(vd),BuPu:Me(yd),GnBu:Me(bd),OrRd:Me(xd),PuBuGn:Me(_d),PuBu:Me(wd),PuRd:Me(Cd),RdPu:Me(Td),YlGnBu:Me(Sd),YlGn:Me(kd),YlOrBr:Me(Ed),YlOrRd:Me(Od)},Lq=Object.keys(Nq);Me(cd),Me(ld),Me(ud),Me(dd),Me(fd),Me(hd),Me(pd),Me(md),Me(gd),Me(Md),Me($d),Me(Ad),Me(Pd),Me(Rd),Me(jd),Me(vd),Me(yd),Me(bd),Me(xd),Me(_d),Me(wd),Me(Cd),Me(Td),Me(Sd),Me(kd),Me(Ed),Me(Od);V.oneOfType([V.oneOf(Lq),V.func,V.arrayOf(V.string)]);var sp={basis:Nz,basisClosed:Lz,basisOpen:Fz,bundle:Bz,cardinal:Uz,cardinalClosed:Wz,cardinalOpen:zz,catmullRom:Hz,catmullRomClosed:Vz,catmullRomOpen:qz,linear:Cg,linearClosed:Yz,monotoneX:Gz,monotoneY:Zz,natural:Kz,step:Xz,stepAfter:Jz,stepBefore:Qz},Pg=Object.keys(sp);Pg.filter(function(e){return e.endsWith("Closed")});F4(Pg,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");F4(Pg,"bundle","basisClosed","basisOpen","cardinalClosed","cardinalOpen","catmullRomClosed","catmullRomOpen","linearClosed");var p3=function(e){if(!sp[e])throw new TypeError("'"+e+"', is not a valid curve interpolator identifier.");return sp[e]};V.shape({top:V.number,right:V.number,bottom:V.number,left:V.number}).isRequired;var Fq=["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"];V.oneOf(Fq);Li(bg);var m3={top:0,right:0,bottom:0,left:0},pc=function(e,t,n){return n===void 0&&(n={}),m.useMemo(function(){var r=qn({},m3,n);return{margin:r,innerWidth:e-r.left-r.right,innerHeight:t-r.top-r.bottom,outerWidth:e,outerHeight:t}},[e,t,n.top,n.right,n.bottom,n.left])},g3=function(){var e=m.useRef(null),t=m.useState({left:0,top:0,width:0,height:0}),n=t[0],r=t[1],i=m.useState(function(){return typeof ResizeObserver>"u"?null:new ResizeObserver(function(a){var o=a[0];return r(o.contentRect)})})[0];return m.useEffect(function(){return e.current&&i!==null&&i.observe(e.current),function(){i!==null&&i.disconnect()}},[]),[e,n]},Bq=function(e){return m.useMemo(function(){return Dq(jq,e)},[e])},Uq=function(e){return typeof e=="function"?e:typeof e=="string"?e.indexOf("time:")===0?sd(e.slice("5")):fc(e):function(t){return""+t}},eo=function(e){return m.useMemo(function(){return Uq(e)},[e])},v3=m.createContext(),Wq={},y3=function(e){var t=e.theme,n=t===void 0?Wq:t,r=e.children,i=Bq(n);return y.jsx(v3.Provider,{value:i,children:r})};y3.propTypes={children:V.node.isRequired,theme:V.object};var Tt=function(){return m.useContext(v3)},zq=["outlineWidth","outlineColor","outlineOpacity"],Ig=function(e){return e.outlineWidth,e.outlineColor,e.outlineOpacity,Bd(e,zq)},b3=function(e){var t=e.children,n=e.condition,r=e.wrapper;return n?m.cloneElement(r,{},t):t};b3.propTypes={children:V.node.isRequired,condition:V.bool.isRequired,wrapper:V.element.isRequired};var Hq={position:"relative"},mc=function(e){var t=e.children,n=e.theme,r=e.renderWrapper,i=r===void 0||r,a=e.isInteractive,o=a===void 0||a,s=e.animate,c=e.motionConfig,l=m.useRef(null);return y.jsx(y3,{theme:n,children:y.jsx(h3,{animate:s,config:c,children:y.jsx(KR,{container:l,children:y.jsxs(b3,{condition:i,wrapper:y.jsx("div",{style:Hq,ref:l}),children:[t,o&&y.jsx(ZR,{})]})})})})};mc.propTypes={children:V.element.isRequired,isInteractive:V.bool,renderWrapper:V.bool,theme:V.object,animate:V.bool,motionConfig:V.string};V.func.isRequired,V.bool,V.bool,V.object.isRequired,V.bool.isRequired,V.string;var wo=function(e){var t=e.children,n=g3(),r=n[0],i=n[1],a=i.width>0&&i.height>0;return y.jsx("div",{ref:r,style:{width:"100%",height:"100%"},children:a&&t({width:i.width,height:i.height})})};wo.propTypes={children:V.func.isRequired};var Vq=["id","colors"],x3=function(e){var t=e.id,n=e.colors,r=Bd(e,Vq);return y.jsx("linearGradient",qn({id:t,x1:0,x2:0,y1:0,y2:1},r,{children:n.map(function(i){var a=i.offset,o=i.color,s=i.opacity;return y.jsx("stop",{offset:a+"%",stopColor:o,stopOpacity:s!==void 0?s:1},a)})}))};x3.propTypes={id:V.string.isRequired,colors:V.arrayOf(V.shape({offset:V.number.isRequired,color:V.string.isRequired,opacity:V.number})).isRequired,gradientTransform:V.string};var _3={linearGradient:x3},Ho={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},cp=m.memo(function(e){var t=e.id,n=e.background,r=n===void 0?Ho.background:n,i=e.color,a=i===void 0?Ho.color:i,o=e.size,s=o===void 0?Ho.size:o,c=e.padding,l=c===void 0?Ho.padding:c,u=e.stagger,d=u===void 0?Ho.stagger:u,f=s+l,h=s/2,g=l/2;return d===!0&&(f=2*s+2*l),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:r}),y.jsx("circle",{cx:g+h,cy:g+h,r:h,fill:a}),d&&y.jsx("circle",{cx:1.5*l+s+h,cy:1.5*l+s+h,r:h,fill:a})]})});cp.displayName="PatternDots",cp.propTypes={id:V.string.isRequired,color:V.string.isRequired,background:V.string.isRequired,size:V.number.isRequired,padding:V.number.isRequired,stagger:V.bool.isRequired};var Yn=function(e){return e*Math.PI/180},Ud=function(e){return 180*e/Math.PI},qq=function(e){return e.startAngle+(e.endAngle-e.startAngle)/2},Yi=function(e,t){return{x:Math.cos(e)*t,y:Math.sin(e)*t}},Yq=function(e){var t=e%360;return t<0&&(t+=360),t},Gq={svg:{align:{left:"start",center:"middle",right:"end",start:"start",middle:"middle",end:"end"},baseline:{top:"text-before-edge",center:"central",bottom:"alphabetic"}},canvas:{align:{left:"left",center:"center",right:"right",start:"left",middle:"center",end:"right"},baseline:{top:"top",center:"middle",bottom:"bottom"}}},Vo={spacing:5,rotation:0,background:"#000000",color:"#ffffff",lineWidth:2},lp=m.memo(function(e){var t=e.id,n=e.spacing,r=n===void 0?Vo.spacing:n,i=e.rotation,a=i===void 0?Vo.rotation:i,o=e.background,s=o===void 0?Vo.background:o,c=e.color,l=c===void 0?Vo.color:c,u=e.lineWidth,d=u===void 0?Vo.lineWidth:u,f=Math.round(a)%360,h=Math.abs(r);f>180?f-=360:f>90?f-=180:f<-180?f+=360:f<-90&&(f+=180);var g,p=h,v=h;return f===0?g=`
|
|
256
256
|
M 0 0 L `+p+` 0
|
|
257
257
|
M 0 `+v+" L "+p+" "+v+`
|
|
258
258
|
`:f===90?g=`
|
|
@@ -266,16 +266,16 @@ to {
|
|
|
266
266
|
M `+-p+" "+v+" L "+p+" "+-v+`
|
|
267
267
|
M `+-p+" "+2*v+" L "+2*p+" "+-v+`
|
|
268
268
|
M 0 `+2*v+" L "+2*p+` 0
|
|
269
|
-
`),y.jsxs("pattern",{id:t,width:p,height:v,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:p,height:v,fill:s,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),y.jsx("path",{d:g,strokeWidth:d,stroke:l,strokeLinecap:"square"})]})});lp.displayName="PatternLines",lp.propTypes={id:V.string.isRequired,spacing:V.number.isRequired,rotation:V.number.isRequired,background:V.string.isRequired,color:V.string.isRequired,lineWidth:V.number.isRequired};var qo={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},up=m.memo(function(e){var t=e.id,n=e.color,r=n===void 0?qo.color:n,i=e.background,a=i===void 0?qo.background:i,o=e.size,s=o===void 0?qo.size:o,c=e.padding,l=c===void 0?qo.padding:c,u=e.stagger,d=u===void 0?qo.stagger:u,f=s+l,h=l/2;return d===!0&&(f=2*s+2*l),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:a}),y.jsx("rect",{x:h,y:h,width:s,height:s,fill:r}),d&&y.jsx("rect",{x:1.5*l+s,y:1.5*l+s,width:s,height:s,fill:r})]})});up.displayName="PatternSquares",up.propTypes={id:V.string.isRequired,color:V.string.isRequired,background:V.string.isRequired,size:V.number.isRequired,padding:V.number.isRequired,stagger:V.bool.isRequired};var w3={patternDots:cp,patternLines:lp,patternSquares:up},
|
|
270
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var R3={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:M4,accent:$4,dark2:A4,paired:R4,pastel1:j4,pastel2:P4,set1:I4,set2:D4,set3:bg,tableau10:QU},cY=Object.keys(R3),j3={brown_blueGreen:cd,purpleRed_green:ld,pink_yellowGreen:ud,purple_orange:dd,red_blue:fd,red_grey:hd,red_yellow_blue:pd,red_yellow_green:md,spectral:gd},lY=Object.keys(j3),uY={brown_blueGreen:JU,purpleRed_green:eW,pink_yellowGreen:tW,purple_orange:nW,red_blue:rW,red_grey:iW,red_yellow_blue:aW,red_yellow_green:oW,spectral:sW},P3={blues:Md,greens:$d,greys:Ad,oranges:Pd,purples:Rd,reds:jd,blue_green:vd,blue_purple:yd,green_blue:bd,orange_red:xd,purple_blue_green:_d,purple_blue:wd,purple_red:Cd,red_purple:Td,yellow_green_blue:Sd,yellow_green:kd,yellow_orange_brown:Ed,yellow_orange_red:Od},dY=Object.keys(P3),fY={blues:xW,greens:_W,greys:wW,oranges:SW,purples:CW,reds:TW,turbo:PW,viridis:IW,inferno:NW,magma:DW,plasma:LW,cividis:kW,warm:OW,cool:MW,cubehelixDefault:EW,blue_green:cW,blue_purple:lW,green_blue:uW,orange_red:dW,purple_blue_green:fW,purple_blue:hW,purple_red:pW,red_purple:mW,yellow_green_blue:gW,yellow_green:vW,yellow_orange_brown:yW,yellow_orange_red:bW},Bf=eu({},R3,j3,P3),hY=function(e){return cY.includes(e)},pY=function(e){return lY.includes(e)},mY=function(e){return dY.includes(e)},gY={rainbow:$W,sinebow:jW};eu({},uY,fY,gY);var vY=function(e,t){if(typeof e=="function")return e;if(Vm(e)){if(function(c){return c.theme!==void 0}(e)){if(t===void 0)throw new Error("Unable to use color from theme as no theme was provided");var n=xr(t,e.theme);if(n===void 0)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(c){return c.from!==void 0}(e)){var r=function(c){return xr(c,e.from)};if(Array.isArray(e.modifiers)){for(var i,a=[],o=function(){var c=i.value,l=c[0],u=c[1];if(l==="brighter")a.push(function(d){return d.brighter(u)});else if(l==="darker")a.push(function(d){return d.darker(u)});else{if(l!=="opacity")throw new Error("Invalid color modifier: '"+l+"', must be one of: 'brighter', 'darker', 'opacity'");a.push(function(d){return d.opacity=u,d})}},s=sY(e.modifiers);!(i=s()).done;)o();return a.length===0?r:function(c){return a.reduce(function(l,u){return u(l)},Qa(r(c))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}},wr=function(e,t){return m.useMemo(function(){return vY(e,t)},[e,t])};V.oneOfType([V.string,V.func,V.shape({theme:V.string.isRequired}),V.shape({from:V.string.isRequired,modifiers:V.arrayOf(V.array)})]);var yY=function(e,t){if(typeof e=="function")return e;var n=typeof t=="function"?t:function(d){return xr(d,t)};if(Array.isArray(e)){var r=Li(e),i=function(d){return r(n(d))};return i.scale=r,i}if(Vm(e)){if(function(d){return d.datum!==void 0}(e))return function(d){return xr(d,e.datum)};if(function(d){return d.scheme!==void 0}(e)){if(hY(e.scheme)){var a=Li(Bf[e.scheme]),o=function(d){return a(n(d))};return o.scale=a,o}if(pY(e.scheme)){if(e.size!==void 0&&(e.size<3||e.size>11))throw new Error("Invalid size '"+e.size+"' for diverging color scheme '"+e.scheme+"', must be between 3~11");var s=Li(Bf[e.scheme][e.size||11]),c=function(d){return s(n(d))};return c.scale=s,c}if(mY(e.scheme)){if(e.size!==void 0&&(e.size<3||e.size>9))throw new Error("Invalid size '"+e.size+"' for sequential color scheme '"+e.scheme+"', must be between 3~9");var l=Li(Bf[e.scheme][e.size||9]),u=function(d){return l(n(d))};return u.scale=l,u}}throw new Error("Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property")}return function(){return e}},Ng=function(e,t){return m.useMemo(function(){return yY(e,t)},[e,t])};function Pt(){return Pt=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},Pt.apply(this,arguments)}var bY={pointerEvents:"none"},xY=function(e){var t=e.label,n=e.style,r=Tt();return y.jsx(Ct.g,{transform:n.transform,opacity:n.progress,style:bY,children:y.jsx(Ct.text,{textAnchor:"middle",dominantBaseline:"central",style:Pt({},r.labels.text,{fill:n.textColor}),children:t})})},I3=function(e){var t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t},_Y=function(e,t){return e.filter(function(n){return Math.abs(Ud(n.arc.endAngle-n.arc.startAngle))>=t})},wY={startAngle:{enter:function(e){return Pt({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return Pt({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return Pt({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return Pt({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return Pt({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return Pt({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return Pt({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return Pt({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return Pt({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return Pt({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return Pt({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return Pt({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return Pt({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return Pt({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return Pt({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return Pt({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},D3=function(e,t){return m.useMemo(function(){var n=wY[e];return{enter:function(r){return Pt({progress:0},n.enter(r.arc),t?t.enter(r):{})},update:function(r){return Pt({progress:1},n.update(r.arc),t?t.update(r):{})},leave:function(r){return Pt({progress:0},n.leave(r.arc),t?t.leave(r):{})}}},[e,t])},CY=function(e,t){var n=Yq(e)-Math.PI/2,r=e.innerRadius+(e.outerRadius-e.innerRadius)*t;return Yi(n,r)},TY=function(e){return function(t,n,r,i){return vi([t,n,r,i],function(a,o,s,c){var l=CY({startAngle:a,endAngle:o,innerRadius:s,outerRadius:c},e);return"translate("+l.x+","+l.y+")"})}},SY=function(e,t,n,r){t===void 0&&(t=.5),n===void 0&&(n="innerRadius");var i=kn(),a=i.animate,o=i.config,s=D3(n,r);return{transition:ca(e,{keys:function(c){return c.id},initial:s.update,from:s.enter,enter:s.update,update:s.update,leave:s.leave,config:o,immediate:!a}),interpolate:TY(t)}},kY=function(e){var t=e.center,n=e.data,r=e.transitionMode,i=e.label,a=e.radiusOffset,o=e.skipAngle,s=e.textColor,c=e.component,l=c===void 0?xY:c,u=Gi(i),d=Tt(),f=wr(s,d),h=m.useMemo(function(){return n.filter(function(_){return Math.abs(Ud(_.arc.endAngle-_.arc.startAngle))>=o})},[n,o]),g=SY(h,a,r),p=g.transition,v=g.interpolate,w=l;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:p(function(_,x){return m.createElement(w,{key:x.id,datum:x,label:u(x),style:Pt({},_,{transform:v(_.startAngle,_.endAngle,_.innerRadius,_.outerRadius),textColor:f(x)})})})})},EY=function(e){var t=e.label,n=e.style,r=Tt();return y.jsxs(Ct.g,{opacity:n.opacity,children:[y.jsx(Ct.path,{fill:"none",stroke:n.linkColor,strokeWidth:n.thickness,d:n.path}),y.jsx(Ct.text,{transform:n.textPosition,textAnchor:n.textAnchor,dominantBaseline:"central",style:Pt({},r.labels.text,{fill:n.textColor}),children:t})]})},OY=function(e){var t=I3(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2);return t<Math.PI/2||t>1.5*Math.PI?"start":"end"},N3=function(e,t,n,r){var i,a,o=I3(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2),s=Yi(o,e.outerRadius+t),c=Yi(o,e.outerRadius+t+n);return o<Math.PI/2||o>1.5*Math.PI?(i="after",a={x:c.x+r,y:c.y}):(i="before",a={x:c.x-r,y:c.y}),{side:i,points:[s,c,a]}},MY=Tg().x(function(e){return e.x}).y(function(e){return e.y}),$Y=function(e,t,n,r,i,a,o){return vi([e,t,n,r,i,a,o],function(s,c,l,u,d,f,h){var g=N3({startAngle:s,endAngle:c,innerRadius:l,outerRadius:u},d,f,h).points;return MY(g)})},AY=function(e,t,n,r){return vi([e,t,n,r],function(i,a,o,s){return OY({startAngle:i,endAngle:a,innerRadius:o,outerRadius:s})})},RY=function(e,t,n,r,i,a,o,s){return vi([e,t,n,r,i,a,o,s],function(c,l,u,d,f,h,g,p){var v=N3({startAngle:c,endAngle:l,innerRadius:u,outerRadius:d},f,h,g),w=v.points,_=v.side,x=w[2];return _==="before"?x.x-=p:x.x+=p,"translate("+x.x+","+x.y+")"})},jY=function(e){var t=e.data,n=e.offset,r=n===void 0?0:n,i=e.diagonalLength,a=e.straightLength,o=e.skipAngle,s=o===void 0?0:o,c=e.textOffset,l=e.linkColor,u=e.textColor,d=kn(),f=d.animate,h=d.config,g=Tt(),p=wr(l,g),v=wr(u,g),w=function(x,S){return m.useMemo(function(){return _Y(x,S)},[x,S])}(t,s),_=function(x){var S=x.offset,b=x.diagonalLength,T=x.straightLength,j=x.textOffset,M=x.getLinkColor,k=x.getTextColor;return m.useMemo(function(){return{enter:function(E){return{startAngle:E.arc.startAngle,endAngle:E.arc.endAngle,innerRadius:E.arc.innerRadius,outerRadius:E.arc.outerRadius,offset:S,diagonalLength:0,straightLength:0,textOffset:j,linkColor:M(E),textColor:k(E),opacity:0}},update:function(E){return{startAngle:E.arc.startAngle,endAngle:E.arc.endAngle,innerRadius:E.arc.innerRadius,outerRadius:E.arc.outerRadius,offset:S,diagonalLength:b,straightLength:T,textOffset:j,linkColor:M(E),textColor:k(E),opacity:1}},leave:function(E){return{startAngle:E.arc.startAngle,endAngle:E.arc.endAngle,innerRadius:E.arc.innerRadius,outerRadius:E.arc.outerRadius,offset:S,diagonalLength:0,straightLength:0,textOffset:j,linkColor:M(E),textColor:k(E),opacity:0}}}},[b,T,j,M,k,S])}({offset:r,diagonalLength:i,straightLength:a,textOffset:c,getLinkColor:p,getTextColor:v});return{transition:ca(w,{keys:function(x){return x.id},initial:_.update,from:_.enter,enter:_.update,update:_.update,leave:_.leave,config:h,immediate:!f}),interpolateLink:$Y,interpolateTextAnchor:AY,interpolateTextPosition:RY}},PY=function(e){var t=e.center,n=e.data,r=e.label,i=e.skipAngle,a=e.offset,o=e.diagonalLength,s=e.straightLength,c=e.strokeWidth,l=e.textOffset,u=e.textColor,d=e.linkColor,f=e.component,h=f===void 0?EY:f,g=Gi(r),p=jY({data:n,skipAngle:i,offset:a,diagonalLength:o,straightLength:s,textOffset:l,linkColor:d,textColor:u}),v=p.transition,w=p.interpolateLink,_=p.interpolateTextAnchor,x=p.interpolateTextPosition,S=h;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(b,T){return m.createElement(S,{key:T.id,datum:T,label:g(T),style:Pt({},b,{thickness:c,path:w(b.startAngle,b.endAngle,b.innerRadius,b.outerRadius,b.offset,b.diagonalLength,b.straightLength),textAnchor:_(b.startAngle,b.endAngle,b.innerRadius,b.outerRadius),textPosition:x(b.startAngle,b.endAngle,b.innerRadius,b.outerRadius,b.offset,b.diagonalLength,b.straightLength,b.textOffset)})})})})},IY=function(e){var t=e.datum,n=e.style,r=e.onClick,i=e.onMouseEnter,a=e.onMouseMove,o=e.onMouseLeave,s=m.useCallback(function(d){return r==null?void 0:r(t,d)},[r,t]),c=m.useCallback(function(d){return i==null?void 0:i(t,d)},[i,t]),l=m.useCallback(function(d){return a==null?void 0:a(t,d)},[a,t]),u=m.useCallback(function(d){return o==null?void 0:o(t,d)},[o,t]);return y.jsx(Ct.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?s:void 0,onMouseEnter:i?c:void 0,onMouseMove:a?l:void 0,onMouseLeave:o?u:void 0})},DY=function(e,t,n,r,i){return vi([e,t,n,r],function(a,o,s,c){return i({startAngle:a,endAngle:o,innerRadius:Math.max(0,s),outerRadius:Math.max(0,c)})})},NY=function(e,t,n){t===void 0&&(t="innerRadius");var r=kn(),i=r.animate,a=r.config,o=D3(t,n);return{transition:ca(e,{keys:function(s){return s.id},initial:o.update,from:o.enter,enter:o.update,update:o.update,leave:o.leave,config:a,immediate:!i}),interpolate:DY}},LY=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,a=e.borderColor,o=e.onClick,s=e.onMouseEnter,c=e.onMouseMove,l=e.onMouseLeave,u=e.transitionMode,d=e.component,f=d===void 0?IY:d,h=Tt(),g=wr(a,h),p=NY(n,u,{enter:function(x){return{opacity:0,color:x.color,borderColor:g(x)}},update:function(x){return{opacity:1,color:x.color,borderColor:g(x)}},leave:function(x){return{opacity:0,color:x.color,borderColor:g(x)}}}),v=p.transition,w=p.interpolate,_=f;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(x,S){return m.createElement(_,{key:S.id,datum:S,style:Pt({},x,{borderWidth:i,path:w(x.startAngle,x.endAngle,x.innerRadius,x.outerRadius,r)}),onClick:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l})})})},FY=function(e,t,n,r,i,a){a===void 0&&(a=!0);var o=[],s=Yi(Yn(r),n);o.push([s.x,s.y]);var c=Yi(Yn(i),n);o.push([c.x,c.y]);for(var l=Math.round(Math.min(r,i));l<=Math.round(Math.max(r,i));l++)if(l%90==0){var u=Yi(Yn(l),n);o.push([u.x,u.y])}o=o.map(function(v){var w=v[0],_=v[1];return[e+w,t+_]}),a&&o.push([e,t]);var d=o.map(function(v){return v[0]}),f=o.map(function(v){return v[1]}),h=Math.min.apply(Math,d),g=Math.max.apply(Math,d),p=Math.min.apply(Math,f);return{points:o,x:h,y:p,width:g-h,height:Math.max.apply(Math,f)-p}},BY=function(e){var t=e===void 0?{}:e,n=t.cornerRadius,r=n===void 0?0:n,i=t.padAngle,a=i===void 0?0:i;return m.useMemo(function(){return jz().innerRadius(function(o){return o.innerRadius}).outerRadius(function(o){return o.outerRadius}).cornerRadius(r).padAngle(a)},[r,a])},UY=function(e){var t=e.x,n=e.y,r=e.size,i=e.fill,a=e.opacity,o=a===void 0?1:a,s=e.borderWidth,c=s===void 0?0:s,l=e.borderColor;return y.jsx("circle",{r:r/2,cx:t+r/2,cy:n+r/2,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?"transparent":l,style:{pointerEvents:"none"}})},WY=function(e){var t=e.x,n=e.y,r=e.size,i=e.fill,a=e.opacity,o=a===void 0?1:a,s=e.borderWidth,c=s===void 0?0:s,l=e.borderColor;return y.jsx("g",{transform:"translate("+t+","+n+")",children:y.jsx("path",{d:`
|
|
269
|
+
`),y.jsxs("pattern",{id:t,width:p,height:v,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:p,height:v,fill:s,stroke:"rgba(255, 0, 0, 0.1)",strokeWidth:0}),y.jsx("path",{d:g,strokeWidth:d,stroke:l,strokeLinecap:"square"})]})});lp.displayName="PatternLines",lp.propTypes={id:V.string.isRequired,spacing:V.number.isRequired,rotation:V.number.isRequired,background:V.string.isRequired,color:V.string.isRequired,lineWidth:V.number.isRequired};var qo={color:"#000000",background:"#ffffff",size:4,padding:4,stagger:!1},up=m.memo(function(e){var t=e.id,n=e.color,r=n===void 0?qo.color:n,i=e.background,a=i===void 0?qo.background:i,o=e.size,s=o===void 0?qo.size:o,c=e.padding,l=c===void 0?qo.padding:c,u=e.stagger,d=u===void 0?qo.stagger:u,f=s+l,h=l/2;return d===!0&&(f=2*s+2*l),y.jsxs("pattern",{id:t,width:f,height:f,patternUnits:"userSpaceOnUse",children:[y.jsx("rect",{width:f,height:f,fill:a}),y.jsx("rect",{x:h,y:h,width:s,height:s,fill:r}),d&&y.jsx("rect",{x:1.5*l+s,y:1.5*l+s,width:s,height:s,fill:r})]})});up.displayName="PatternSquares",up.propTypes={id:V.string.isRequired,color:V.string.isRequired,background:V.string.isRequired,size:V.number.isRequired,padding:V.number.isRequired,stagger:V.bool.isRequired};var w3={patternDots:cp,patternLines:lp,patternSquares:up},Zq=["type"],dp=qn({},_3,w3),C3=function(e){var t=e.defs;return!t||t.length<1?null:y.jsx("defs",{"aria-hidden":!0,children:t.map(function(n){var r=n.type,i=Bd(n,Zq);return dp[r]?m.createElement(dp[r],qn({key:i.id},i)):null})})};C3.propTypes={defs:V.arrayOf(V.shape({type:V.oneOf(Object.keys(dp)).isRequired,id:V.string.isRequired}))};var Kq=m.memo(C3),Wd=function(e){var t=e.width,n=e.height,r=e.margin,i=e.defs,a=e.children,o=e.role,s=e.ariaLabel,c=e.ariaLabelledBy,l=e.ariaDescribedBy,u=e.isFocusable,d=Tt();return y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:n,role:o,"aria-label":s,"aria-labelledby":c,"aria-describedby":l,focusable:u,tabIndex:u?0:void 0,children:[y.jsx(Kq,{defs:i}),y.jsx("rect",{width:t,height:n,fill:d.background}),y.jsx("g",{transform:"translate("+r.left+","+r.top+")",children:a})]})};Wd.propTypes={width:V.number.isRequired,height:V.number.isRequired,margin:V.shape({top:V.number.isRequired,left:V.number.isRequired}).isRequired,defs:V.array,children:V.oneOfType([V.arrayOf(V.node),V.node]).isRequired,role:V.string,isFocusable:V.bool,ariaLabel:V.string,ariaLabelledBy:V.string,ariaDescribedBy:V.string};var T3=function(e){var t=e.size,n=e.color,r=e.borderWidth,i=e.borderColor;return y.jsx("circle",{r:t/2,fill:n,stroke:i,strokeWidth:r,style:{pointerEvents:"none"}})};T3.propTypes={size:V.number.isRequired,color:V.string.isRequired,borderWidth:V.number.isRequired,borderColor:V.string.isRequired};var Xq=m.memo(T3),S3=function(e){var t=e.x,n=e.y,r=e.symbol,i=r===void 0?Xq:r,a=e.size,o=e.datum,s=e.color,c=e.borderWidth,l=e.borderColor,u=e.label,d=e.labelTextAnchor,f=d===void 0?"middle":d,h=e.labelYOffset,g=h===void 0?-12:h,p=Tt(),v=kn(),w=v.animate,_=v.config,x=Sr({transform:"translate("+t+", "+n+")",config:_,immediate:!w});return y.jsxs(Ct.g,{transform:x.transform,style:{pointerEvents:"none"},children:[m.createElement(i,{size:a,color:s,datum:o,borderWidth:c,borderColor:l}),u&&y.jsx("text",{textAnchor:f,y:g,style:Ig(p.dots.text),children:u})]})};S3.propTypes={x:V.number.isRequired,y:V.number.isRequired,datum:V.object.isRequired,size:V.number.isRequired,color:V.string.isRequired,borderWidth:V.number.isRequired,borderColor:V.string.isRequired,symbol:V.oneOfType([V.func,V.object]),label:V.oneOfType([V.string,V.number]),labelTextAnchor:V.oneOf(["start","middle","end"]),labelYOffset:V.number};var Qq=m.memo(S3),k3=function(e){var t=e.width,n=e.height,r=e.axis,i=e.scale,a=e.value,o=e.lineStyle,s=e.textStyle,c=e.legend,l=e.legendPosition,u=l===void 0?"top-right":l,d=e.legendOffsetX,f=d===void 0?14:d,h=e.legendOffsetY,g=h===void 0?14:h,p=e.legendOrientation,v=p===void 0?"horizontal":p,w=Tt(),_=0,x=0,S=0,b=0;r==="y"?(S=i(a),x=t):(_=i(a),b=n);var T=null;if(c){var j=function(M){var k=M.axis,E=M.width,C=M.height,O=M.position,$=M.offsetX,A=M.offsetY,P=M.orientation,D=0,N=0,q=P==="vertical"?-90:0,z="start";if(k==="x")switch(O){case"top-left":D=-$,N=A,z="end";break;case"top":N=-A,z=P==="horizontal"?"middle":"start";break;case"top-right":D=$,N=A,z=P==="horizontal"?"start":"end";break;case"right":D=$,N=C/2,z=P==="horizontal"?"start":"middle";break;case"bottom-right":D=$,N=C-A,z="start";break;case"bottom":N=C+A,z=P==="horizontal"?"middle":"end";break;case"bottom-left":N=C-A,D=-$,z=P==="horizontal"?"end":"start";break;case"left":D=-$,N=C/2,z=P==="horizontal"?"end":"middle"}else switch(O){case"top-left":D=$,N=-A,z="start";break;case"top":D=E/2,N=-A,z=P==="horizontal"?"middle":"start";break;case"top-right":D=E-$,N=-A,z=P==="horizontal"?"end":"start";break;case"right":D=E+$,z=P==="horizontal"?"start":"middle";break;case"bottom-right":D=E-$,N=A,z="end";break;case"bottom":D=E/2,N=A,z=P==="horizontal"?"middle":"end";break;case"bottom-left":D=$,N=A,z=P==="horizontal"?"start":"end";break;case"left":D=-$,z=P==="horizontal"?"end":"middle"}return{x:D,y:N,rotation:q,textAnchor:z}}({axis:r,width:t,height:n,position:u,offsetX:f,offsetY:g,orientation:v});T=y.jsx("text",{transform:"translate("+j.x+", "+j.y+") rotate("+j.rotation+")",textAnchor:j.textAnchor,dominantBaseline:"central",style:s,children:c})}return y.jsxs("g",{transform:"translate("+_+", "+S+")",children:[y.jsx("line",{x1:0,x2:x,y1:0,y2:b,stroke:w.markers.lineColor,strokeWidth:w.markers.lineStrokeWidth,style:o}),T]})};k3.propTypes={width:V.number.isRequired,height:V.number.isRequired,axis:V.oneOf(["x","y"]).isRequired,scale:V.func.isRequired,value:V.oneOfType([V.number,V.string,V.instanceOf(Date)]).isRequired,lineStyle:V.object,textStyle:V.object,legend:V.string,legendPosition:V.oneOf(["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"]),legendOffsetX:V.number.isRequired,legendOffsetY:V.number.isRequired,legendOrientation:V.oneOf(["horizontal","vertical"]).isRequired};var Jq=m.memo(k3),E3=function(e){var t=e.markers,n=e.width,r=e.height,i=e.xScale,a=e.yScale;return t&&t.length!==0?t.map(function(o,s){return y.jsx(Jq,qn({},o,{width:n,height:r,scale:o.axis==="y"?a:i}),s)}):null};E3.propTypes={width:V.number.isRequired,height:V.number.isRequired,xScale:V.func.isRequired,yScale:V.func.isRequired,markers:V.arrayOf(V.shape({axis:V.oneOf(["x","y"]).isRequired,value:V.oneOfType([V.number,V.string,V.instanceOf(Date)]).isRequired,lineStyle:V.object,textStyle:V.object}))};var O3=m.memo(E3),eY=["theme","renderWrapper","animate","motionConfig"],M3=function(e){return function(t){var n,r;function i(){return t.apply(this,arguments)||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,op(n,r),i.prototype.render=function(){var a=this.props,o=a.theme,s=a.renderWrapper,c=a.animate,l=a.motionConfig,u=Bd(a,eY);return y.jsx(mc,{theme:o,renderWrapper:s,isInteractive:u.isInteractive,animate:c,motionConfig:l,children:y.jsx(e,qn({},u))})},i}(m.Component)},tY=function(e,t){var n=Dm(e)?e:function(r){return xr(r,e)};return n},$3=function(e){return Dm(e)?e:function(t){return xr(t,e)}},Gi=function(e){return m.useMemo(function(){return $3(e)},[e])},nY=function(e,t,n,r){var i=n-e,a=r-t;return i*=i,a*=a,Math.sqrt(i+a)},A3=function(e,t,n,r,i,a){return e<=i&&i<=e+n&&t<=a&&a<=t+r},os=function(e,t){var n,r="touches"in t?t.touches[0]:t,i=r.clientX,a=r.clientY,o=e.getBoundingClientRect(),s=(n=e.getBBox!==void 0?e.getBBox():{width:e.offsetWidth||0,height:e.offsetHeight||0}).width===o.width?1:n.width/o.width;return[(i-o.left)*s,(a-o.top)*s]},rY=Object.keys(_3),iY=Object.keys(w3),aY=function(e,t,n){if(e==="*")return!0;if(Dm(e))return e(t);if(Vm(e)){var r=n?xr(t,n):t;return Rq(HH(r,Object.keys(e)),e)}return!1},Dg=function(e,t,n,r){var i=r===void 0?{}:r,a=i.dataKey,o=i.colorKey,s=o===void 0?"color":o,c=i.targetKey,l=c===void 0?"fill":c,u=[],d={};return e.length&&t.length&&(u=[].concat(e),t.forEach(function(f){for(var h=function(){var p=n[g],v=p.id,w=p.match;if(aY(w,f,a)){var _=e.find(function(E){return E.id===v});if(_){if(iY.includes(_.type))if(_.background==="inherit"||_.color==="inherit"){var x=xr(f,s),S=_.background,b=_.color,T=v;_.background==="inherit"&&(T=T+".bg."+x,S=x),_.color==="inherit"&&(T=T+".fg."+x,b=x),Qo(f,l,"url(#"+T+")"),d[T]||(u.push(qn({},_,{id:T,background:S,color:b})),d[T]=1)}else Qo(f,l,"url(#"+v+")");else if(rY.includes(_.type))if(_.colors.map(function(E){return E.color}).includes("inherit")){var j=xr(f,s),M=v,k=qn({},_,{colors:_.colors.map(function(E,C){return E.color!=="inherit"?E:(M=M+"."+C+"."+j,qn({},E,{color:E.color==="inherit"?j:E.color}))})});k.id=M,Qo(f,l,"url(#"+M+")"),d[M]||(u.push(k),d[M]=1)}else Qo(f,l,"url(#"+v+")")}return"break"}},g=0;g<n.length&&h()!=="break";g++);})),u};function eu(){return eu=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},eu.apply(this,arguments)}function $y(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 oY(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(i,a){if(i){if(typeof i=="string")return $y(i,a);var o=Object.prototype.toString.call(i).slice(8,-1);return o==="Object"&&i.constructor&&(o=i.constructor.name),o==="Map"||o==="Set"?Array.from(i):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?$y(i,a):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
270
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var R3={nivo:["#e8c1a0","#f47560","#f1e15b","#e8a838","#61cdbb","#97e3d5"],category10:M4,accent:$4,dark2:A4,paired:R4,pastel1:j4,pastel2:P4,set1:I4,set2:D4,set3:bg,tableau10:XU},sY=Object.keys(R3),j3={brown_blueGreen:cd,purpleRed_green:ld,pink_yellowGreen:ud,purple_orange:dd,red_blue:fd,red_grey:hd,red_yellow_blue:pd,red_yellow_green:md,spectral:gd},cY=Object.keys(j3),lY={brown_blueGreen:QU,purpleRed_green:JU,pink_yellowGreen:eW,purple_orange:tW,red_blue:nW,red_grey:rW,red_yellow_blue:iW,red_yellow_green:aW,spectral:oW},P3={blues:Md,greens:$d,greys:Ad,oranges:Pd,purples:Rd,reds:jd,blue_green:vd,blue_purple:yd,green_blue:bd,orange_red:xd,purple_blue_green:_d,purple_blue:wd,purple_red:Cd,red_purple:Td,yellow_green_blue:Sd,yellow_green:kd,yellow_orange_brown:Ed,yellow_orange_red:Od},uY=Object.keys(P3),dY={blues:bW,greens:xW,greys:_W,oranges:TW,purples:wW,reds:CW,turbo:jW,viridis:PW,inferno:DW,magma:IW,plasma:NW,cividis:SW,warm:EW,cool:OW,cubehelixDefault:kW,blue_green:sW,blue_purple:cW,green_blue:lW,orange_red:uW,purple_blue_green:dW,purple_blue:fW,purple_red:hW,red_purple:pW,yellow_green_blue:mW,yellow_green:gW,yellow_orange_brown:vW,yellow_orange_red:yW},Bf=eu({},R3,j3,P3),fY=function(e){return sY.includes(e)},hY=function(e){return cY.includes(e)},pY=function(e){return uY.includes(e)},mY={rainbow:MW,sinebow:RW};eu({},lY,dY,mY);var gY=function(e,t){if(typeof e=="function")return e;if(Vm(e)){if(function(c){return c.theme!==void 0}(e)){if(t===void 0)throw new Error("Unable to use color from theme as no theme was provided");var n=xr(t,e.theme);if(n===void 0)throw new Error("Color from theme is undefined at path: '"+e.theme+"'");return function(){return n}}if(function(c){return c.from!==void 0}(e)){var r=function(c){return xr(c,e.from)};if(Array.isArray(e.modifiers)){for(var i,a=[],o=function(){var c=i.value,l=c[0],u=c[1];if(l==="brighter")a.push(function(d){return d.brighter(u)});else if(l==="darker")a.push(function(d){return d.darker(u)});else{if(l!=="opacity")throw new Error("Invalid color modifier: '"+l+"', must be one of: 'brighter', 'darker', 'opacity'");a.push(function(d){return d.opacity=u,d})}},s=oY(e.modifiers);!(i=s()).done;)o();return a.length===0?r:function(c){return a.reduce(function(l,u){return u(l)},Qa(r(c))).toString()}}return r}throw new Error("Invalid color spec, you should either specify 'theme' or 'from' when using a config object")}return function(){return e}},wr=function(e,t){return m.useMemo(function(){return gY(e,t)},[e,t])};V.oneOfType([V.string,V.func,V.shape({theme:V.string.isRequired}),V.shape({from:V.string.isRequired,modifiers:V.arrayOf(V.array)})]);var vY=function(e,t){if(typeof e=="function")return e;var n=typeof t=="function"?t:function(d){return xr(d,t)};if(Array.isArray(e)){var r=Li(e),i=function(d){return r(n(d))};return i.scale=r,i}if(Vm(e)){if(function(d){return d.datum!==void 0}(e))return function(d){return xr(d,e.datum)};if(function(d){return d.scheme!==void 0}(e)){if(fY(e.scheme)){var a=Li(Bf[e.scheme]),o=function(d){return a(n(d))};return o.scale=a,o}if(hY(e.scheme)){if(e.size!==void 0&&(e.size<3||e.size>11))throw new Error("Invalid size '"+e.size+"' for diverging color scheme '"+e.scheme+"', must be between 3~11");var s=Li(Bf[e.scheme][e.size||11]),c=function(d){return s(n(d))};return c.scale=s,c}if(pY(e.scheme)){if(e.size!==void 0&&(e.size<3||e.size>9))throw new Error("Invalid size '"+e.size+"' for sequential color scheme '"+e.scheme+"', must be between 3~9");var l=Li(Bf[e.scheme][e.size||9]),u=function(d){return l(n(d))};return u.scale=l,u}}throw new Error("Invalid colors, when using an object, you should either pass a 'datum' or a 'scheme' property")}return function(){return e}},Ng=function(e,t){return m.useMemo(function(){return vY(e,t)},[e,t])};function Pt(){return Pt=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},Pt.apply(this,arguments)}var yY={pointerEvents:"none"},bY=function(e){var t=e.label,n=e.style,r=Tt();return y.jsx(Ct.g,{transform:n.transform,opacity:n.progress,style:yY,children:y.jsx(Ct.text,{textAnchor:"middle",dominantBaseline:"central",style:Pt({},r.labels.text,{fill:n.textColor}),children:t})})},I3=function(e){var t=e%(2*Math.PI);return t<0&&(t+=2*Math.PI),t},xY=function(e,t){return e.filter(function(n){return Math.abs(Ud(n.arc.endAngle-n.arc.startAngle))>=t})},_Y={startAngle:{enter:function(e){return Pt({},e,{endAngle:e.startAngle})},update:function(e){return e},leave:function(e){return Pt({},e,{startAngle:e.endAngle})}},middleAngle:{enter:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return Pt({},e,{startAngle:t,endAngle:t})},update:function(e){return e},leave:function(e){var t=e.startAngle+(e.endAngle-e.startAngle)/2;return Pt({},e,{startAngle:t,endAngle:t})}},endAngle:{enter:function(e){return Pt({},e,{startAngle:e.endAngle})},update:function(e){return e},leave:function(e){return Pt({},e,{endAngle:e.startAngle})}},innerRadius:{enter:function(e){return Pt({},e,{outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return Pt({},e,{innerRadius:e.outerRadius})}},centerRadius:{enter:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return Pt({},e,{innerRadius:t,outerRadius:t})},update:function(e){return e},leave:function(e){var t=e.innerRadius+(e.outerRadius-e.innerRadius)/2;return Pt({},e,{innerRadius:t,outerRadius:t})}},outerRadius:{enter:function(e){return Pt({},e,{innerRadius:e.outerRadius})},update:function(e){return e},leave:function(e){return Pt({},e,{outerRadius:e.innerRadius})}},pushIn:{enter:function(e){return Pt({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})},update:function(e){return e},leave:function(e){return Pt({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})}},pushOut:{enter:function(e){return Pt({},e,{innerRadius:e.outerRadius,outerRadius:e.outerRadius+e.outerRadius-e.innerRadius})},update:function(e){return e},leave:function(e){return Pt({},e,{innerRadius:e.innerRadius-e.outerRadius+e.innerRadius,outerRadius:e.innerRadius})}}},D3=function(e,t){return m.useMemo(function(){var n=_Y[e];return{enter:function(r){return Pt({progress:0},n.enter(r.arc),t?t.enter(r):{})},update:function(r){return Pt({progress:1},n.update(r.arc),t?t.update(r):{})},leave:function(r){return Pt({progress:0},n.leave(r.arc),t?t.leave(r):{})}}},[e,t])},wY=function(e,t){var n=qq(e)-Math.PI/2,r=e.innerRadius+(e.outerRadius-e.innerRadius)*t;return Yi(n,r)},CY=function(e){return function(t,n,r,i){return vi([t,n,r,i],function(a,o,s,c){var l=wY({startAngle:a,endAngle:o,innerRadius:s,outerRadius:c},e);return"translate("+l.x+","+l.y+")"})}},TY=function(e,t,n,r){t===void 0&&(t=.5),n===void 0&&(n="innerRadius");var i=kn(),a=i.animate,o=i.config,s=D3(n,r);return{transition:ca(e,{keys:function(c){return c.id},initial:s.update,from:s.enter,enter:s.update,update:s.update,leave:s.leave,config:o,immediate:!a}),interpolate:CY(t)}},SY=function(e){var t=e.center,n=e.data,r=e.transitionMode,i=e.label,a=e.radiusOffset,o=e.skipAngle,s=e.textColor,c=e.component,l=c===void 0?bY:c,u=Gi(i),d=Tt(),f=wr(s,d),h=m.useMemo(function(){return n.filter(function(_){return Math.abs(Ud(_.arc.endAngle-_.arc.startAngle))>=o})},[n,o]),g=TY(h,a,r),p=g.transition,v=g.interpolate,w=l;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:p(function(_,x){return m.createElement(w,{key:x.id,datum:x,label:u(x),style:Pt({},_,{transform:v(_.startAngle,_.endAngle,_.innerRadius,_.outerRadius),textColor:f(x)})})})})},kY=function(e){var t=e.label,n=e.style,r=Tt();return y.jsxs(Ct.g,{opacity:n.opacity,children:[y.jsx(Ct.path,{fill:"none",stroke:n.linkColor,strokeWidth:n.thickness,d:n.path}),y.jsx(Ct.text,{transform:n.textPosition,textAnchor:n.textAnchor,dominantBaseline:"central",style:Pt({},r.labels.text,{fill:n.textColor}),children:t})]})},EY=function(e){var t=I3(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2);return t<Math.PI/2||t>1.5*Math.PI?"start":"end"},N3=function(e,t,n,r){var i,a,o=I3(e.startAngle+(e.endAngle-e.startAngle)/2-Math.PI/2),s=Yi(o,e.outerRadius+t),c=Yi(o,e.outerRadius+t+n);return o<Math.PI/2||o>1.5*Math.PI?(i="after",a={x:c.x+r,y:c.y}):(i="before",a={x:c.x-r,y:c.y}),{side:i,points:[s,c,a]}},OY=Tg().x(function(e){return e.x}).y(function(e){return e.y}),MY=function(e,t,n,r,i,a,o){return vi([e,t,n,r,i,a,o],function(s,c,l,u,d,f,h){var g=N3({startAngle:s,endAngle:c,innerRadius:l,outerRadius:u},d,f,h).points;return OY(g)})},$Y=function(e,t,n,r){return vi([e,t,n,r],function(i,a,o,s){return EY({startAngle:i,endAngle:a,innerRadius:o,outerRadius:s})})},AY=function(e,t,n,r,i,a,o,s){return vi([e,t,n,r,i,a,o,s],function(c,l,u,d,f,h,g,p){var v=N3({startAngle:c,endAngle:l,innerRadius:u,outerRadius:d},f,h,g),w=v.points,_=v.side,x=w[2];return _==="before"?x.x-=p:x.x+=p,"translate("+x.x+","+x.y+")"})},RY=function(e){var t=e.data,n=e.offset,r=n===void 0?0:n,i=e.diagonalLength,a=e.straightLength,o=e.skipAngle,s=o===void 0?0:o,c=e.textOffset,l=e.linkColor,u=e.textColor,d=kn(),f=d.animate,h=d.config,g=Tt(),p=wr(l,g),v=wr(u,g),w=function(x,S){return m.useMemo(function(){return xY(x,S)},[x,S])}(t,s),_=function(x){var S=x.offset,b=x.diagonalLength,T=x.straightLength,j=x.textOffset,M=x.getLinkColor,k=x.getTextColor;return m.useMemo(function(){return{enter:function(E){return{startAngle:E.arc.startAngle,endAngle:E.arc.endAngle,innerRadius:E.arc.innerRadius,outerRadius:E.arc.outerRadius,offset:S,diagonalLength:0,straightLength:0,textOffset:j,linkColor:M(E),textColor:k(E),opacity:0}},update:function(E){return{startAngle:E.arc.startAngle,endAngle:E.arc.endAngle,innerRadius:E.arc.innerRadius,outerRadius:E.arc.outerRadius,offset:S,diagonalLength:b,straightLength:T,textOffset:j,linkColor:M(E),textColor:k(E),opacity:1}},leave:function(E){return{startAngle:E.arc.startAngle,endAngle:E.arc.endAngle,innerRadius:E.arc.innerRadius,outerRadius:E.arc.outerRadius,offset:S,diagonalLength:0,straightLength:0,textOffset:j,linkColor:M(E),textColor:k(E),opacity:0}}}},[b,T,j,M,k,S])}({offset:r,diagonalLength:i,straightLength:a,textOffset:c,getLinkColor:p,getTextColor:v});return{transition:ca(w,{keys:function(x){return x.id},initial:_.update,from:_.enter,enter:_.update,update:_.update,leave:_.leave,config:h,immediate:!f}),interpolateLink:MY,interpolateTextAnchor:$Y,interpolateTextPosition:AY}},jY=function(e){var t=e.center,n=e.data,r=e.label,i=e.skipAngle,a=e.offset,o=e.diagonalLength,s=e.straightLength,c=e.strokeWidth,l=e.textOffset,u=e.textColor,d=e.linkColor,f=e.component,h=f===void 0?kY:f,g=Gi(r),p=RY({data:n,skipAngle:i,offset:a,diagonalLength:o,straightLength:s,textOffset:l,linkColor:d,textColor:u}),v=p.transition,w=p.interpolateLink,_=p.interpolateTextAnchor,x=p.interpolateTextPosition,S=h;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(b,T){return m.createElement(S,{key:T.id,datum:T,label:g(T),style:Pt({},b,{thickness:c,path:w(b.startAngle,b.endAngle,b.innerRadius,b.outerRadius,b.offset,b.diagonalLength,b.straightLength),textAnchor:_(b.startAngle,b.endAngle,b.innerRadius,b.outerRadius),textPosition:x(b.startAngle,b.endAngle,b.innerRadius,b.outerRadius,b.offset,b.diagonalLength,b.straightLength,b.textOffset)})})})})},PY=function(e){var t=e.datum,n=e.style,r=e.onClick,i=e.onMouseEnter,a=e.onMouseMove,o=e.onMouseLeave,s=m.useCallback(function(d){return r==null?void 0:r(t,d)},[r,t]),c=m.useCallback(function(d){return i==null?void 0:i(t,d)},[i,t]),l=m.useCallback(function(d){return a==null?void 0:a(t,d)},[a,t]),u=m.useCallback(function(d){return o==null?void 0:o(t,d)},[o,t]);return y.jsx(Ct.path,{d:n.path,opacity:n.opacity,fill:t.fill||n.color,stroke:n.borderColor,strokeWidth:n.borderWidth,onClick:r?s:void 0,onMouseEnter:i?c:void 0,onMouseMove:a?l:void 0,onMouseLeave:o?u:void 0})},IY=function(e,t,n,r,i){return vi([e,t,n,r],function(a,o,s,c){return i({startAngle:a,endAngle:o,innerRadius:Math.max(0,s),outerRadius:Math.max(0,c)})})},DY=function(e,t,n){t===void 0&&(t="innerRadius");var r=kn(),i=r.animate,a=r.config,o=D3(t,n);return{transition:ca(e,{keys:function(s){return s.id},initial:o.update,from:o.enter,enter:o.update,update:o.update,leave:o.leave,config:a,immediate:!i}),interpolate:IY}},NY=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,a=e.borderColor,o=e.onClick,s=e.onMouseEnter,c=e.onMouseMove,l=e.onMouseLeave,u=e.transitionMode,d=e.component,f=d===void 0?PY:d,h=Tt(),g=wr(a,h),p=DY(n,u,{enter:function(x){return{opacity:0,color:x.color,borderColor:g(x)}},update:function(x){return{opacity:1,color:x.color,borderColor:g(x)}},leave:function(x){return{opacity:0,color:x.color,borderColor:g(x)}}}),v=p.transition,w=p.interpolate,_=f;return y.jsx("g",{transform:"translate("+t[0]+","+t[1]+")",children:v(function(x,S){return m.createElement(_,{key:S.id,datum:S,style:Pt({},x,{borderWidth:i,path:w(x.startAngle,x.endAngle,x.innerRadius,x.outerRadius,r)}),onClick:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:l})})})},LY=function(e,t,n,r,i,a){a===void 0&&(a=!0);var o=[],s=Yi(Yn(r),n);o.push([s.x,s.y]);var c=Yi(Yn(i),n);o.push([c.x,c.y]);for(var l=Math.round(Math.min(r,i));l<=Math.round(Math.max(r,i));l++)if(l%90==0){var u=Yi(Yn(l),n);o.push([u.x,u.y])}o=o.map(function(v){var w=v[0],_=v[1];return[e+w,t+_]}),a&&o.push([e,t]);var d=o.map(function(v){return v[0]}),f=o.map(function(v){return v[1]}),h=Math.min.apply(Math,d),g=Math.max.apply(Math,d),p=Math.min.apply(Math,f);return{points:o,x:h,y:p,width:g-h,height:Math.max.apply(Math,f)-p}},FY=function(e){var t=e===void 0?{}:e,n=t.cornerRadius,r=n===void 0?0:n,i=t.padAngle,a=i===void 0?0:i;return m.useMemo(function(){return Rz().innerRadius(function(o){return o.innerRadius}).outerRadius(function(o){return o.outerRadius}).cornerRadius(r).padAngle(a)},[r,a])},BY=function(e){var t=e.x,n=e.y,r=e.size,i=e.fill,a=e.opacity,o=a===void 0?1:a,s=e.borderWidth,c=s===void 0?0:s,l=e.borderColor;return y.jsx("circle",{r:r/2,cx:t+r/2,cy:n+r/2,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?"transparent":l,style:{pointerEvents:"none"}})},UY=function(e){var t=e.x,n=e.y,r=e.size,i=e.fill,a=e.opacity,o=a===void 0?1:a,s=e.borderWidth,c=s===void 0?0:s,l=e.borderColor;return y.jsx("g",{transform:"translate("+t+","+n+")",children:y.jsx("path",{d:`
|
|
271
271
|
M`+r/2+` 0
|
|
272
272
|
L`+.8*r+" "+r/2+`
|
|
273
273
|
L`+r/2+" "+r+`
|
|
274
274
|
L`+.2*r+" "+r/2+`
|
|
275
275
|
L`+r/2+` 0
|
|
276
|
-
`,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?"transparent":l,style:{pointerEvents:"none"}})})},
|
|
276
|
+
`,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?"transparent":l,style:{pointerEvents:"none"}})})},WY=function(e){var t=e.x,n=e.y,r=e.size,i=e.fill,a=e.opacity,o=a===void 0?1:a,s=e.borderWidth,c=s===void 0?0:s,l=e.borderColor;return y.jsx("rect",{x:t,y:n,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?"transparent":l,width:r,height:r,style:{pointerEvents:"none"}})},zY=function(e){var t=e.x,n=e.y,r=e.size,i=e.fill,a=e.opacity,o=a===void 0?1:a,s=e.borderWidth,c=s===void 0?0:s,l=e.borderColor;return y.jsx("g",{transform:"translate("+t+","+n+")",children:y.jsx("path",{d:`
|
|
277
277
|
M`+r/2+` 0
|
|
278
278
|
L`+r+" "+r+`
|
|
279
279
|
L0 `+r+`
|
|
280
280
|
L`+r/2+` 0
|
|
281
|
-
`,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?"transparent":l,style:{pointerEvents:"none"}})})};function Bi(){return Bi=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},Bi.apply(this,arguments)}var VY={top:0,right:0,bottom:0,left:0},Lg=function(e){var t,n=e.direction,r=e.itemsSpacing,i=e.padding,a=e.itemCount,o=e.itemWidth,s=e.itemHeight;if(typeof i!="number"&&(typeof(t=i)!="object"||Array.isArray(t)||t===null))throw new Error("Invalid property padding, must be one of: number, object");var c=typeof i=="number"?{top:i,right:i,bottom:i,left:i}:Bi({},VY,i),l=c.left+c.right,u=c.top+c.bottom,d=o+l,f=s+u,h=(a-1)*r;return n==="row"?d=o*a+h+l:n==="column"&&(f=s*a+h+u),{width:d,height:f,padding:c}},L3=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,a=e.containerHeight,o=e.width,s=e.height,c=n,l=r;switch(t){case"top":c+=(i-o)/2;break;case"top-right":c+=i-o;break;case"right":c+=i-o,l+=(a-s)/2;break;case"bottom-right":c+=i-o,l+=a-s;break;case"bottom":c+=(i-o)/2,l+=a-s;break;case"bottom-left":l+=a-s;break;case"left":l+=(a-s)/2;break;case"center":c+=(i-o)/2,l+=(a-s)/2}return{x:c,y:l}},F3=function(e){var t,n,r,i,a,o,s=e.direction,c=e.justify,l=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case"left-to-right":t=0,n=(f-l)/2,i=f/2,o="central",c?(r=d,a="end"):(r=l+u,a="start");break;case"right-to-left":t=d-l,n=(f-l)/2,i=f/2,o="central",c?(r=0,a="start"):(r=d-l-u,a="end");break;case"top-to-bottom":t=(d-l)/2,n=0,r=d/2,a="middle",c?(i=f,o="alphabetic"):(i=l+u,o="text-before-edge");break;case"bottom-to-top":t=(d-l)/2,n=f-l,r=d/2,a="middle",c?(i=0,o="text-before-edge"):(i=f-l-u,o="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:i,labelAnchor:a,labelAlignment:o}},qY={circle:UY,diamond:WY,square:zY,triangle:HY},YY=function(e){var t,n,r,i,a,o,s,c,l,u,d,f=e.x,h=e.y,g=e.width,p=e.height,v=e.data,w=e.direction,_=w===void 0?"left-to-right":w,x=e.justify,S=x!==void 0&&x,b=e.textColor,T=e.background,j=T===void 0?"transparent":T,M=e.opacity,k=M===void 0?1:M,E=e.symbolShape,C=E===void 0?"square":E,O=e.symbolSize,$=O===void 0?16:O,A=e.symbolSpacing,P=A===void 0?8:A,D=e.symbolBorderWidth,N=D===void 0?0:D,q=e.symbolBorderColor,z=q===void 0?"transparent":q,U=e.onClick,G=e.onMouseEnter,ne=e.onMouseLeave,te=e.toggleSerie,X=e.effects,J=m.useState({}),Q=J[0],re=J[1],F=Tt(),I=m.useCallback(function(Re){if(X){var Ve=X.filter(function(ze){return ze.on==="hover"}).reduce(function(ze,ut){return Bi({},ze,ut.style)},{});re(Ve)}G==null||G(v,Re)},[G,v,X]),L=m.useCallback(function(Re){if(X){var Ve=X.filter(function(ze){return ze.on!=="hover"}).reduce(function(ze,ut){return Bi({},ze,ut.style)},{});re(Ve)}ne==null||ne(v,Re)},[ne,v,X]),H=F3({direction:_,justify:S,symbolSize:(t=Q.symbolSize)!=null?t:$,symbolSpacing:P,width:g,height:p}),R=H.symbolX,K=H.symbolY,Z=H.labelX,ee=H.labelY,pe=H.labelAnchor,we=H.labelAlignment,ve=[U,G,ne,te].some(function(Re){return Re!==void 0}),Le=typeof C=="function"?C:qY[C];return y.jsxs("g",{transform:"translate("+f+","+h+")",style:{opacity:(n=Q.itemOpacity)!=null?n:k},children:[y.jsx("rect",{width:g,height:p,fill:(r=Q.itemBackground)!=null?r:j,style:{cursor:ve?"pointer":"auto"},onClick:function(Re){U==null||U(v,Re),te==null||te(v.id)},onMouseEnter:I,onMouseLeave:L}),ue.createElement(Le,Bi({id:v.id,x:R,y:K,size:(i=Q.symbolSize)!=null?i:$,fill:(a=(o=v.fill)!=null?o:v.color)!=null?a:"black",borderWidth:(s=Q.symbolBorderWidth)!=null?s:N,borderColor:(c=Q.symbolBorderColor)!=null?c:z},v.hidden?F.legends.hidden.symbol:void 0)),y.jsx("text",{textAnchor:pe,style:Bi({},Ig(F.legends.text),{fill:(l=(u=(d=Q.itemTextColor)!=null?d:b)!=null?u:F.legends.text.fill)!=null?l:"black",dominantBaseline:we,pointerEvents:"none",userSelect:"none"},v.hidden?F.legends.hidden.text:void 0),x:Z,y:ee,children:v.label})]})},GY=function(e){var t=e.data,n=e.x,r=e.y,i=e.direction,a=e.padding,o=a===void 0?0:a,s=e.justify,c=e.effects,l=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=d===void 0?"left-to-right":d,h=e.itemsSpacing,g=h===void 0?0:h,p=e.itemTextColor,v=e.itemBackground,w=v===void 0?"transparent":v,_=e.itemOpacity,x=_===void 0?1:_,S=e.symbolShape,b=e.symbolSize,T=e.symbolSpacing,j=e.symbolBorderWidth,M=e.symbolBorderColor,k=e.onClick,E=e.onMouseEnter,C=e.onMouseLeave,O=e.toggleSerie,$=Lg({itemCount:t.length,itemWidth:l,itemHeight:u,itemsSpacing:g,direction:i,padding:o}).padding,A=i==="row"?l+g:0,P=i==="column"?u+g:0;return y.jsx("g",{transform:"translate("+n+","+r+")",children:t.map(function(D,N){return y.jsx(YY,{data:D,x:N*A+$.left,y:N*P+$.top,width:l,height:u,direction:f,justify:s,effects:c,textColor:p,background:w,opacity:x,symbolShape:S,symbolSize:b,symbolSpacing:T,symbolBorderWidth:j,symbolBorderColor:M,onClick:k,onMouseEnter:E,onMouseLeave:C,toggleSerie:O},N)})})},Fg=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,i=e.translateX,a=i===void 0?0:i,o=e.translateY,s=o===void 0?0:o,c=e.anchor,l=e.direction,u=e.padding,d=u===void 0?0:u,f=e.justify,h=e.itemsSpacing,g=h===void 0?0:h,p=e.itemWidth,v=e.itemHeight,w=e.itemDirection,_=e.itemTextColor,x=e.itemBackground,S=e.itemOpacity,b=e.symbolShape,T=e.symbolSize,j=e.symbolSpacing,M=e.symbolBorderWidth,k=e.symbolBorderColor,E=e.onClick,C=e.onMouseEnter,O=e.onMouseLeave,$=e.toggleSerie,A=e.effects,P=Lg({itemCount:t.length,itemsSpacing:g,itemWidth:p,itemHeight:v,direction:l,padding:d}),D=P.width,N=P.height,q=L3({anchor:c,translateX:a,translateY:s,containerWidth:n,containerHeight:r,width:D,height:N}),z=q.x,U=q.y;return y.jsx(GY,{data:t,x:z,y:U,direction:l,padding:d,justify:f,effects:A,itemsSpacing:g,itemWidth:p,itemHeight:v,itemDirection:w,itemTextColor:_,itemBackground:x,itemOpacity:S,symbolShape:b,symbolSize:T,symbolSpacing:j,symbolBorderWidth:M,symbolBorderColor:k,onClick:E,onMouseEnter:C,onMouseLeave:O,toggleSerie:typeof $=="boolean"?void 0:$})},ZY={start:"left",middle:"center",end:"right"},B3=function(e,t){var n=t.data,r=t.containerWidth,i=t.containerHeight,a=t.translateX,o=a===void 0?0:a,s=t.translateY,c=s===void 0?0:s,l=t.anchor,u=t.direction,d=t.padding,f=d===void 0?0:d,h=t.justify,g=h!==void 0&&h,p=t.itemsSpacing,v=p===void 0?0:p,w=t.itemWidth,_=t.itemHeight,x=t.itemDirection,S=x===void 0?"left-to-right":x,b=t.itemTextColor,T=t.symbolSize,j=T===void 0?16:T,M=t.symbolSpacing,k=M===void 0?8:M,E=t.theme,C=Lg({itemCount:n.length,itemWidth:w,itemHeight:_,itemsSpacing:v,direction:u,padding:f}),O=C.width,$=C.height,A=C.padding,P=L3({anchor:l,translateX:o,translateY:c,containerWidth:r,containerHeight:i,width:O,height:$}),D=P.x,N=P.y,q=u==="row"?w+v:0,z=u==="column"?_+v:0;e.save(),e.translate(D,N),e.font=E.legends.text.fontSize+"px "+(E.legends.text.fontFamily||"sans-serif"),n.forEach(function(U,G){var ne,te,X=G*q+A.left,J=G*z+A.top,Q=F3({direction:S,justify:g,symbolSize:j,symbolSpacing:k,width:w,height:_}),re=Q.symbolX,F=Q.symbolY,I=Q.labelX,L=Q.labelY,H=Q.labelAnchor,R=Q.labelAlignment;e.fillStyle=(ne=U.color)!=null?ne:"black",e.fillRect(X+re,J+F,j,j),e.textAlign=ZY[H],R==="central"&&(e.textBaseline="middle"),e.fillStyle=(te=b??E.legends.text.fill)!=null?te:"black",e.fillText(String(U.label),X+I,J+L)}),e.restore()};function _i(){return _i=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},_i.apply(this,arguments)}function U3(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Ay,KY=function(e){var t=e.width,n=e.height,r=e.legends,i=e.data,a=e.toggleSerie;return y.jsx(y.Fragment,{children:r.map(function(o,s){var c;return y.jsx(Fg,_i({},o,{containerWidth:t,containerHeight:n,data:(c=o.data)!=null?c:i,toggleSerie:o.toggleSerie?a:void 0}),s)})})},Ie={id:"id",value:"value",sortByValue:!1,innerRadius:0,padAngle:0,cornerRadius:0,layers:["arcs","arcLinkLabels","arcLabels","legends"],startAngle:0,endAngle:360,fit:!0,activeInnerRadiusOffset:0,activeOuterRadiusOffset:0,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",1]]},enableArcLabels:!0,arcLabel:"formattedValue",arcLabelsSkipAngle:0,arcLabelsRadiusOffset:.5,arcLabelsTextColor:{theme:"labels.text.fill"},enableArcLinkLabels:!0,arcLinkLabel:"id",arcLinkLabelsSkipAngle:0,arcLinkLabelsOffset:0,arcLinkLabelsDiagonalLength:16,arcLinkLabelsStraightLength:24,arcLinkLabelsThickness:1,arcLinkLabelsTextOffset:6,arcLinkLabelsTextColor:{theme:"labels.text.fill"},arcLinkLabelsColor:{theme:"axis.ticks.line.stroke"},colors:{scheme:"nivo"},defs:[],fill:[],isInteractive:!0,animate:!0,motionConfig:"gentle",transitionMode:"innerRadius",tooltip:function(e){var t=e.datum;return y.jsx(Im,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})},legends:[],role:"img",pixelRatio:typeof window<"u"&&(Ay=window.devicePixelRatio)!=null?Ay:1},XY=["points"],QY=function(e){var t=e.data,n=e.id,r=n===void 0?Ie.id:n,i=e.value,a=i===void 0?Ie.value:i,o=e.valueFormat,s=e.colors,c=s===void 0?Ie.colors:s,l=Gi(r),u=Gi(a),d=eo(o),f=Ng(c,"id");return m.useMemo(function(){return t.map(function(h){var g,p=l(h),v=u(h),w={id:p,label:(g=h.label)!=null?g:p,hidden:!1,value:v,formattedValue:d(v),data:h};return _i({},w,{color:f(w)})})},[t,l,u,d,f])},JY=function(e){var t=e.data,n=e.startAngle,r=e.endAngle,i=e.innerRadius,a=e.outerRadius,o=e.padAngle,s=e.sortByValue,c=e.activeId,l=e.activeInnerRadiusOffset,u=e.activeOuterRadiusOffset,d=e.hiddenIds,f=e.forwardLegendData,h=m.useMemo(function(){var w=Nz().value(function(_){return _.value}).startAngle(Yn(n)).endAngle(Yn(r)).padAngle(Yn(o));return s||w.sortValues(null),w},[n,r,o,s]),g=m.useMemo(function(){var w=t.filter(function(_){return!d.includes(_.id)});return{dataWithArc:h(w).map(function(_){var x=Math.abs(_.endAngle-_.startAngle);return _i({},_.data,{arc:{index:_.index,startAngle:_.startAngle,endAngle:_.endAngle,innerRadius:c===_.data.id?i-l:i,outerRadius:c===_.data.id?a+u:a,thickness:a-i,padAngle:_.padAngle,angle:x,angleDeg:Ud(x)}})}),legendData:t.map(function(_){return{id:_.id,label:_.label,color:_.color,hidden:d.includes(_.id),data:_}})}},[h,t,d,c,i,l,a,u]),p=g.legendData,v=m.useRef(f);return m.useEffect(function(){typeof v.current=="function"&&v.current(p)},[v,p]),g},eG=function(e){var t=e.activeId,n=e.onActiveIdChange,r=e.defaultActiveId,i=t!==void 0,a=m.useState(i||r===void 0?null:r),o=a[0],s=a[1];return{activeId:i?t:o,setActiveId:m.useCallback(function(c){n&&n(c),i||s(c)},[i,n,s])}},tG=function(e){var t=e.data,n=e.width,r=e.height,i=e.innerRadius,a=i===void 0?Ie.innerRadius:i,o=e.startAngle,s=o===void 0?Ie.startAngle:o,c=e.endAngle,l=c===void 0?Ie.endAngle:c,u=e.padAngle,d=u===void 0?Ie.padAngle:u,f=e.sortByValue,h=f===void 0?Ie.sortByValue:f,g=e.cornerRadius,p=g===void 0?Ie.cornerRadius:g,v=e.fit,w=v===void 0?Ie.fit:v,_=e.activeInnerRadiusOffset,x=_===void 0?Ie.activeInnerRadiusOffset:_,S=e.activeOuterRadiusOffset,b=S===void 0?Ie.activeOuterRadiusOffset:S,T=e.activeId,j=e.onActiveIdChange,M=e.defaultActiveId,k=e.forwardLegendData,E=eG({activeId:T,onActiveIdChange:j,defaultActiveId:M}),C=E.activeId,O=E.setActiveId,$=m.useState([]),A=$[0],P=$[1],D=m.useMemo(function(){var z,U=Math.min(n,r)/2,G=U*Math.min(a,1),ne=n/2,te=r/2;if(w){var X=FY(ne,te,U,s-90,l-90),J=X.points,Q=U3(X,XY),re=Math.min(n/Q.width,r/Q.height),F={width:Q.width*re,height:Q.height*re};F.x=(n-F.width)/2,F.y=(r-F.height)/2,ne=(ne-Q.x)/Q.width*Q.width*re+F.x,te=(te-Q.y)/Q.height*Q.height*re+F.y,z={box:Q,ratio:re,points:J},U*=re,G*=re}return{centerX:ne,centerY:te,radius:U,innerRadius:G,debug:z}},[n,r,a,s,l,w]),N=JY({data:t,startAngle:s,endAngle:l,innerRadius:D.innerRadius,outerRadius:D.radius,padAngle:d,sortByValue:h,activeId:C,activeInnerRadiusOffset:x,activeOuterRadiusOffset:b,hiddenIds:A,forwardLegendData:k}),q=m.useCallback(function(z){P(function(U){return U.indexOf(z)>-1?U.filter(function(G){return G!==z}):[].concat(U,[z])})},[]);return _i({arcGenerator:BY({cornerRadius:p,padAngle:Yn(d)}),activeId:C,setActiveId:O,toggleSerie:q},N,D)},nG=function(e){var t=e.dataWithArc,n=e.arcGenerator,r=e.centerX,i=e.centerY,a=e.radius,o=e.innerRadius;return m.useMemo(function(){return{dataWithArc:t,arcGenerator:n,centerX:r,centerY:i,radius:a,innerRadius:o}},[t,n,r,i,a,o])},rG=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,a=e.borderColor,o=e.isInteractive,s=e.onClick,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.setActiveId,f=e.tooltip,h=e.transitionMode,g=la(),p=g.showTooltipFromEvent,v=g.hideTooltip,w=m.useMemo(function(){if(o)return function(b,T){s==null||s(b,T)}},[o,s]),_=m.useMemo(function(){if(o)return function(b,T){p(m.createElement(f,{datum:b}),T),d(b.id),c==null||c(b,T)}},[o,p,d,c,f]),x=m.useMemo(function(){if(o)return function(b,T){p(m.createElement(f,{datum:b}),T),l==null||l(b,T)}},[o,p,l,f]),S=m.useMemo(function(){if(o)return function(b,T){v(),d(null),u==null||u(b,T)}},[o,v,d,u]);return y.jsx(LY,{center:t,data:n,arcGenerator:r,borderWidth:i,borderColor:a,transitionMode:h,onClick:w,onMouseEnter:_,onMouseMove:x,onMouseLeave:S})},iG=["isInteractive","animate","motionConfig","theme","renderWrapper"],aG=function(e){var t=e.data,n=e.id,r=n===void 0?Ie.id:n,i=e.value,a=i===void 0?Ie.value:i,o=e.valueFormat,s=e.sortByValue,c=s===void 0?Ie.sortByValue:s,l=e.layers,u=l===void 0?Ie.layers:l,d=e.startAngle,f=d===void 0?Ie.startAngle:d,h=e.endAngle,g=h===void 0?Ie.endAngle:h,p=e.padAngle,v=p===void 0?Ie.padAngle:p,w=e.fit,_=w===void 0?Ie.fit:w,x=e.innerRadius,S=x===void 0?Ie.innerRadius:x,b=e.cornerRadius,T=b===void 0?Ie.cornerRadius:b,j=e.activeInnerRadiusOffset,M=j===void 0?Ie.activeInnerRadiusOffset:j,k=e.activeOuterRadiusOffset,E=k===void 0?Ie.activeOuterRadiusOffset:k,C=e.width,O=e.height,$=e.margin,A=e.colors,P=A===void 0?Ie.colors:A,D=e.borderWidth,N=D===void 0?Ie.borderWidth:D,q=e.borderColor,z=q===void 0?Ie.borderColor:q,U=e.enableArcLabels,G=U===void 0?Ie.enableArcLabels:U,ne=e.arcLabel,te=ne===void 0?Ie.arcLabel:ne,X=e.arcLabelsSkipAngle,J=X===void 0?Ie.arcLabelsSkipAngle:X,Q=e.arcLabelsTextColor,re=Q===void 0?Ie.arcLabelsTextColor:Q,F=e.arcLabelsRadiusOffset,I=F===void 0?Ie.arcLabelsRadiusOffset:F,L=e.arcLabelsComponent,H=e.enableArcLinkLabels,R=H===void 0?Ie.enableArcLinkLabels:H,K=e.arcLinkLabel,Z=K===void 0?Ie.arcLinkLabel:K,ee=e.arcLinkLabelsSkipAngle,pe=ee===void 0?Ie.arcLinkLabelsSkipAngle:ee,we=e.arcLinkLabelsOffset,ve=we===void 0?Ie.arcLinkLabelsOffset:we,Le=e.arcLinkLabelsDiagonalLength,Re=Le===void 0?Ie.arcLinkLabelsDiagonalLength:Le,Ve=e.arcLinkLabelsStraightLength,ze=Ve===void 0?Ie.arcLinkLabelsStraightLength:Ve,ut=e.arcLinkLabelsThickness,at=ut===void 0?Ie.arcLinkLabelsThickness:ut,de=e.arcLinkLabelsTextOffset,me=de===void 0?Ie.arcLinkLabelsTextOffset:de,ke=e.arcLinkLabelsTextColor,tt=ke===void 0?Ie.arcLinkLabelsTextColor:ke,Et=e.arcLinkLabelsColor,qe=Et===void 0?Ie.arcLinkLabelsColor:Et,ot=e.arcLinkLabelComponent,pt=e.defs,It=pt===void 0?Ie.defs:pt,st=e.fill,dt=st===void 0?Ie.fill:st,mt=e.isInteractive,Wt=mt===void 0?Ie.isInteractive:mt,De=e.onClick,Ae=e.onMouseEnter,Ye=e.onMouseMove,ct=e.onMouseLeave,gt=e.tooltip,St=gt===void 0?Ie.tooltip:gt,Vt=e.activeId,Rt=e.onActiveIdChange,Dt=e.defaultActiveId,qt=e.transitionMode,vt=qt===void 0?Ie.transitionMode:qt,Yt=e.legends,rn=Yt===void 0?Ie.legends:Yt,Jt=e.forwardLegendData,ye=e.role,Ee=ye===void 0?Ie.role:ye,je=pc(C,O,$),Ge=je.outerWidth,Ue=je.outerHeight,ft=je.margin,W=je.innerWidth,ce=je.innerHeight,ae=QY({data:t,id:r,value:a,valueFormat:o,colors:P}),se=tG({data:ae,width:W,height:ce,fit:_,innerRadius:S,startAngle:f,endAngle:g,padAngle:v,sortByValue:c,cornerRadius:T,activeInnerRadiusOffset:M,activeOuterRadiusOffset:E,activeId:Vt,onActiveIdChange:Rt,defaultActiveId:Dt,forwardLegendData:Jt}),be=se.dataWithArc,Oe=se.legendData,xe=se.arcGenerator,Se=se.centerX,Ne=se.centerY,Pe=se.radius,Xe=se.innerRadius,zt=se.setActiveId,Ot=se.toggleSerie,Xt=Dg(It,be,dt),ge={arcs:null,arcLinkLabels:null,arcLabels:null,legends:null};u.includes("arcs")&&(ge.arcs=y.jsx(rG,{center:[Se,Ne],data:be,arcGenerator:xe,borderWidth:N,borderColor:z,isInteractive:Wt,onClick:De,onMouseEnter:Ae,onMouseMove:Ye,onMouseLeave:ct,setActiveId:zt,tooltip:St,transitionMode:vt},"arcs")),R&&u.includes("arcLinkLabels")&&(ge.arcLinkLabels=y.jsx(PY,{center:[Se,Ne],data:be,label:Z,skipAngle:pe,offset:ve,diagonalLength:Re,straightLength:ze,strokeWidth:at,textOffset:me,textColor:tt,linkColor:qe,component:ot},"arcLinkLabels")),G&&u.includes("arcLabels")&&(ge.arcLabels=y.jsx(kY,{center:[Se,Ne],data:be,label:te,radiusOffset:I,skipAngle:J,textColor:re,transitionMode:vt,component:L},"arcLabels")),rn.length>0&&u.includes("legends")&&(ge.legends=y.jsx(KY,{width:W,height:ce,data:Oe,legends:rn,toggleSerie:Ot},"legends"));var ln=nG({dataWithArc:be,arcGenerator:xe,centerX:Se,centerY:Ne,radius:Pe,innerRadius:Xe});return y.jsx(Wd,{width:Ge,height:Ue,margin:ft,defs:Xt,role:Ee,children:u.map(function(Mt,Jn){return ge[Mt]!==void 0?ge[Mt]:typeof Mt=="function"?y.jsx(m.Fragment,{children:m.createElement(Mt,ln)},Jn):null})})},oG=function(e){var t=e.isInteractive,n=t===void 0?Ie.isInteractive:t,r=e.animate,i=r===void 0?Ie.animate:r,a=e.motionConfig,o=a===void 0?Ie.motionConfig:a,s=e.theme,c=e.renderWrapper,l=U3(e,iG);return y.jsx(mc,{animate:i,isInteractive:n,motionConfig:o,renderWrapper:c,theme:s,children:y.jsx(aG,_i({isInteractive:n},l))})},sG=function(e){return y.jsx(wo,{children:function(t){var n=t.width,r=t.height;return y.jsx(oG,_i({width:n,height:r},e))}})};function cG(){}var lG=cG,Uf=l3,uG=lG,dG=$g,fG=1/0,hG=Uf&&1/dG(new Uf([,-0]))[1]==fG?function(e){return new Uf(e)}:uG,pG=hG,mG=xg,gG=N4,vG=L4,yG=_g,bG=pG,xG=$g,_G=200;function wG(e,t,n){var r=-1,i=gG,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=vG;else if(a>=_G){var l=t?null:bG(e);if(l)return xG(l);o=!1,i=yG,c=new mG}else c=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var W3=wG,CG=W3;function TG(e){return e&&e.length?CG(e):[]}var SG=TG;const Ry=Ht(SG);var kG=Yu,EG=Rg,OG=1,MG=2;function $G(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new kG;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?EG(u,l,OG|MG,r,d):f))return!1}}return!0}var AG=$G,RG=Er;function jG(e){return e===e&&!RG(e)}var z3=jG,PG=z3,IG=hc;function DG(e){for(var t=IG(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,PG(i)]}return t}var NG=DG;function LG(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var H3=LG,FG=AG,BG=NG,UG=H3;function WG(e){var t=BG(e);return t.length==1&&t[0][2]?UG(t[0][0],t[0][1]):function(n){return n===e||FG(n,e,t)}}var zG=WG,HG=Rg,VG=Fw,qG=e3,YG=Zm,GG=z3,ZG=H3,KG=bo,XG=1,QG=2;function JG(e,t){return YG(e)&&GG(t)?ZG(KG(e),t):function(n){var r=VG(n,e);return r===void 0&&r===t?qG(n,e):HG(t,r,XG|QG)}}var eZ=JG;function tZ(e){return function(t){return t==null?void 0:t[e]}}var nZ=tZ,rZ=dc;function iZ(e){return function(t){return rZ(t,e)}}var aZ=iZ,oZ=nZ,sZ=aZ,cZ=Zm,lZ=bo;function uZ(e){return cZ(e)?oZ(lZ(e)):sZ(e)}var dZ=uZ,fZ=zG,hZ=eZ,pZ=Qu,mZ=Pn,gZ=dZ;function vZ(e){return typeof e=="function"?e:e==null?pZ:typeof e=="object"?mZ(e)?hZ(e[0],e[1]):fZ(e):gZ(e)}var Bg=vZ,yZ=Bg,bZ=W3;function xZ(e,t){return e&&e.length?bZ(e,yZ(t)):[]}var _Z=xZ;const fp=Ht(_Z);var wZ=xw,CZ=hc;function TZ(e,t){return e&&wZ(e,t,CZ)}var SZ=TZ,kZ=mo;function EZ(e,t){return function(n,r){if(n==null)return n;if(!kZ(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var OZ=EZ,MZ=SZ,$Z=OZ,AZ=$Z(MZ),V3=AZ,RZ=V3,jZ=mo;function PZ(e,t){var n=-1,r=jZ(e)?Array(e.length):[];return RZ(e,function(i,a,o){r[++n]=t(i,a,o)}),r}var IZ=PZ;function DZ(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var NZ=DZ,jy=Ju;function LZ(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=jy(e),o=t!==void 0,s=t===null,c=t===t,l=jy(t);if(!s&&!l&&!a&&e>t||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}var FZ=LZ,BZ=FZ;function UZ(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=BZ(i[r],a[r]);if(c){if(r>=s)return c;var l=n[r];return c*(l=="desc"?-1:1)}}return e.index-t.index}var WZ=UZ,Wf=ed,zZ=dc,HZ=Bg,VZ=IZ,qZ=NZ,YZ=go,GZ=WZ,ZZ=Qu,KZ=Pn;function XZ(e,t,n){t.length?t=Wf(t,function(a){return KZ(a)?function(o){return zZ(o,a.length===1?a[0]:a)}:a}):t=[ZZ];var r=-1;t=Wf(t,YZ(HZ));var i=VZ(e,function(a,o,s){var c=Wf(t,function(l){return l(a)});return{criteria:c,index:++r,value:a}});return qZ(i,function(a,o){return GZ(a,o,n)})}var QZ=XZ,JZ=n3,eK=QZ,tK=Gm,Py=Iw,nK=tK(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Py(e,t[0],t[1])?t=[]:n>2&&Py(t[0],t[1],t[2])&&(t=[t[0]]),eK(e,JZ(t,1),[])}),rK=nK;const iK=Ht(rK);var aK=Gr,oK=Qn,sK="[object Date]";function cK(e){return oK(e)&&aK(e)==sK}var lK=cK,uK=lK,dK=go,Iy=Ku,Dy=Iy&&Iy.isDate,fK=Dy?dK(Dy):uK,hK=fK;const pK=Ht(hK);function ji(){return ji=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},ji.apply(this,arguments)}var Ta=[function(e){return e.setMilliseconds(0)},function(e){return e.setSeconds(0)},function(e){return e.setMinutes(0)},function(e){return e.setHours(0)},function(e){return e.setDate(1)},function(e){return e.setMonth(0)}],mK={millisecond:[],second:Ta.slice(0,1),minute:Ta.slice(0,2),hour:Ta.slice(0,3),day:Ta.slice(0,4),month:Ta.slice(0,5),year:Ta.slice(0,6)},gK=function(e){return function(t){return mK[e].forEach(function(n){n(t)}),t}},q3=function(e){var t=e.format,n=t===void 0?"native":t,r=e.precision,i=r===void 0?"millisecond":r,a=e.useUTC,o=a===void 0||a,s=gK(i);return function(c){if(c===void 0)return c;if(n==="native"||c instanceof Date)return s(c);var l=o?O4(n):k4(n);return s(l(c))}},vK=function(e,t,n,r){var i,a,o,s,c=e.min,l=c===void 0?0:c,u=e.max,d=u===void 0?"auto":u,f=e.stacked,h=f!==void 0&&f,g=e.reverse,p=g!==void 0&&g,v=e.clamp,w=v!==void 0&&v,_=e.nice,x=_!==void 0&&_;l==="auto"?i=h===!0?(a=t.minStacked)!=null?a:0:t.min:i=l,d==="auto"?o=h===!0?(s=t.maxStacked)!=null?s:0:t.max:o=d;var S=Jw().rangeRound(r==="x"?[0,n]:[n,0]).domain(p?[o,i]:[i,o]).clamp(w);return x===!0?S.nice():typeof x=="number"&&S.nice(x),yK(S,h)},yK=function(e,t){t===void 0&&(t=!1);var n=e;return n.type="linear",n.stacked=t,n},bK=function(e,t,n){var r=oB().range([0,n]).domain(t.all);return r.type="point",r},xK=function(e,t,n,r){var i=e.round,a=i===void 0||i,o=rg().range(r==="x"?[0,n]:[n,0]).domain(t.all).round(a);return _K(o)},_K=function(e){var t=e;return t.type="band",t},wK=function(e,t,n){var r,i,a=e.format,o=a===void 0?"native":a,s=e.precision,c=s===void 0?"millisecond":s,l=e.min,u=l===void 0?"auto":l,d=e.max,f=d===void 0?"auto":d,h=e.useUTC,g=h===void 0||h,p=e.nice,v=p!==void 0&&p,w=q3({format:o,precision:c,useUTC:g});r=u==="auto"?w(t.min):o!=="native"?w(u):u,i=f==="auto"?w(t.max):o!=="native"?w(f):f;var _=g?XU():KU();_.range([0,n]),r&&i&&_.domain([r,i]),v===!0?_.nice():typeof v!="object"&&typeof v!="number"||_.nice(v);var x=_;return x.type="time",x.useUTC=g,x},CK=function(e,t,n,r){var i,a=e.base,o=a===void 0?10:a,s=e.min,c=s===void 0?"auto":s,l=e.max,u=l===void 0?"auto":l;if(t.all.some(function(p){return p===0}))throw new Error("a log scale domain must not include or cross zero");var d,f,h=!1;if(t.all.filter(function(p){return p!=null}).forEach(function(p){h||(i===void 0?i=Math.sign(p):Math.sign(p)!==i&&(h=!0))}),h)throw new Error("a log scale domain must be strictly-positive or strictly-negative");d=c==="auto"?t.min:c,f=u==="auto"?t.max:u;var g=t4().domain([d,f]).rangeRound(r==="x"?[0,n]:[n,0]).base(o).nice();return g.type="log",g},TK=function(e,t,n,r){var i,a,o=e.constant,s=o===void 0?1:o,c=e.min,l=c===void 0?"auto":c,u=e.max,d=u===void 0?"auto":u,f=e.reverse,h=f!==void 0&&f;i=l==="auto"?t.min:l,a=d==="auto"?t.max:d;var g=n4().constant(s).rangeRound(r==="x"?[0,n]:[n,0]).nice();h===!0?g.domain([a,i]):g.domain([i,a]);var p=g;return p.type="symlog",p},SK=function(e){return e==="x"?"y":"x"},kK=function(e,t){return e===t},EK=function(e,t){return e.getTime()===t.getTime()};function Vs(e,t,n,r){switch(e.type){case"linear":return vK(e,t,n,r);case"point":return bK(e,t,n);case"band":return xK(e,t,n,r);case"time":return wK(e,t,n);case"log":return CK(e,t,n,r);case"symlog":return TK(e,t,n,r);default:throw new Error("invalid scale spec")}}var Ny=function(e,t,n){var r;if("stacked"in n&&n.stacked){var i=e.data[t==="x"?"xStacked":"yStacked"];return i==null?null:n(i)}return(r=n(e.data[t]))!=null?r:null},OK=function(e,t,n,r,i){var a=e.map(function(u){return function(d){return ji({},d,{data:d.data.map(function(f){return{data:ji({},f)}})})}(u)}),o=MK(a,t,n);"stacked"in t&&t.stacked===!0&&$K(o,a),"stacked"in n&&n.stacked===!0&&AK(o,a);var s=Vs(t,o.x,r,"x"),c=Vs(n,o.y,i,"y"),l=a.map(function(u){return ji({},u,{data:u.data.map(function(d){return ji({},d,{position:{x:Ny(d,"x",s),y:Ny(d,"y",c)}})})})});return ji({},o,{series:l,xScale:s,yScale:c})},MK=function(e,t,n){return{x:Ly(e,"x",t),y:Ly(e,"y",n)}},Ly=function(e,t,n,r){var i={},a=i.getValue,o=a===void 0?function(g){return g.data[t]}:a,s=i.setValue,c=s===void 0?function(g,p){g.data[t]=p}:s;if(n.type==="linear")e.forEach(function(g){g.data.forEach(function(p){var v=o(p);v&&c(p,parseFloat(String(v)))})});else if(n.type==="time"&&n.format!=="native"){var l=q3(n);e.forEach(function(g){g.data.forEach(function(p){var v=o(p);v&&c(p,l(v))})})}var u=[];switch(e.forEach(function(g){g.data.forEach(function(p){u.push(o(p))})}),n.type){case"linear":var d=iK(Ry(u).filter(function(g){return g!==null}),function(g){return g});return{all:d,min:Math.min.apply(Math,d),max:Math.max.apply(Math,d)};case"time":var f=fp(u,function(g){return g.getTime()}).slice(0).sort(function(g,p){return p.getTime()-g.getTime()}).reverse();return{all:f,min:f[0],max:Me(f)};default:var h=Ry(u);return{all:h,min:h[0],max:Me(h)}}},Y3=function(e,t,n){var r=SK(e),i=[];t[r].all.forEach(function(a){var o=pK(a)?EK:kK,s=[];n.forEach(function(c){var l=c.data.find(function(h){return o(h.data[r],a)}),u=null,d=null;if(l!==void 0){if((u=l.data[e])!==null){var f=Me(s);f===void 0?d=u:f!==null&&(d=f+u)}l.data[e==="x"?"xStacked":"yStacked"]=d}s.push(d),d!==null&&i.push(d)})}),t[e].minStacked=Math.min.apply(Math,i),t[e].maxStacked=Math.max.apply(Math,i)},$K=function(e,t){return Y3("x",e,t)},AK=function(e,t){return Y3("y",e,t)},G3=function(e){var t=e.bandwidth();if(t===0)return e;var n=t/2;return e.round()&&(n=Math.round(n)),function(r){var i;return((i=e(r))!=null?i:0)+n}},Z3={millisecond:[Us,Us],second:[Qh,Qh],minute:[c4,m4],hour:[l4,g4],day:[en(function(e){return e.setHours(0,0,0,0)},function(e,t){return e.setDate(e.getDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)}),en(function(e){return e.setUTCHours(0,0,0,0)},function(e,t){return e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)})],week:[Yl,Gl],sunday:[Yl,Gl],monday:[Ws,zs],tuesday:[u4,v4],wednesday:[d4,y4],thursday:[ia,aa],friday:[f4,b4],saturday:[h4,x4],month:[p4,_4],year:[yi,bi]},RK=Object.keys(Z3),jK=new RegExp("^every\\s*(\\d+)?\\s*("+RK.join("|")+")s?$","i"),K3=function(e,t){if(Array.isArray(t))return t;if(typeof t=="string"&&"useUTC"in e){var n=t.match(jK);if(n){var r=n[1],i=n[2],a=Z3[i][e.useUTC?1:0];if(i==="day"){var o,s,c=e.domain(),l=c[0],u=c[1],d=new Date(u);return d.setDate(d.getDate()+1),(o=(s=a.every(Number(r??1)))==null?void 0:s.range(l,d))!=null?o:[]}if(r===void 0)return e.ticks(a);var f=a.every(Number(r));if(f)return e.ticks(f)}throw new Error("Invalid tickValues: "+t)}if("ticks"in e){if(t===void 0)return e.ticks();if(typeof(h=t)=="number"&&isFinite(h)&&Math.floor(h)===h)return e.ticks(t)}var h;return e.domain()};function Gn(){return Gn=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},Gn.apply(this,arguments)}var X3=function(e){var t,n=e.axis,r=e.scale,i=e.ticksPosition,a=e.tickValues,o=e.tickSize,s=e.tickPadding,c=e.tickRotation,l=e.truncateTickAt,u=e.engine,d=u===void 0?"svg":u,f=K3(r,a),h=Zq[d],g="bandwidth"in r?G3(r):r,p={lineX:0,lineY:0},v={textX:0,textY:0},w=typeof document=="object"&&document.dir==="rtl",_=h.align.center,x=h.baseline.center;return n==="x"?(t=function(S){var b;return{x:(b=g(S))!=null?b:0,y:0}},p.lineY=o*(i==="after"?1:-1),v.textY=(o+s)*(i==="after"?1:-1),x=i==="after"?h.baseline.top:h.baseline.bottom,c===0?_=h.align.center:i==="after"&&c<0||i==="before"&&c>0?(_=h.align[w?"left":"right"],x=h.baseline.center):(i==="after"&&c>0||i==="before"&&c<0)&&(_=h.align[w?"right":"left"],x=h.baseline.center)):(t=function(S){var b;return{x:0,y:(b=g(S))!=null?b:0}},p.lineX=o*(i==="after"?1:-1),v.textX=(o+s)*(i==="after"?1:-1),_=i==="after"?h.align.left:h.align.right),{ticks:f.map(function(S){var b=typeof S=="string"?function(T){var j=String(T).length;return l&&l>0&&j>l?""+String(T).slice(0,l).concat("..."):""+T}(S):S;return Gn({key:S instanceof Date?""+S.valueOf():""+S,value:b},t(S),p,v)}),textAlign:_,textBaseline:x}},Q3=function(e,t){if(e===void 0||typeof e=="function")return e;if(t.type==="time"){var n=sd(e);return function(r){return n(r instanceof Date?r:new Date(r))}}return fc(e)},hp=function(e){var t,n=e.width,r=e.height,i=e.scale,a=e.axis,o=e.values,s=(t=o,(Array.isArray(t)?o:void 0)||K3(i,o)),c="bandwidth"in i?G3(i):i,l=a==="x"?s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:(d=c(u))!=null?d:0,x2:(f=c(u))!=null?f:0,y1:0,y2:r}}):s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:0,x2:n,y1:(d=c(u))!=null?d:0,y2:(f=c(u))!=null?f:0}});return l},PK=m.memo(function(e){var t,n=e.value,r=e.format,i=e.lineX,a=e.lineY,o=e.onClick,s=e.textBaseline,c=e.textAnchor,l=e.animatedProps,u=Tt(),d=u.axis.ticks.line,f=u.axis.ticks.text,h=(t=r==null?void 0:r(n))!=null?t:n,g=m.useMemo(function(){var p={opacity:l.opacity};return o?{style:Gn({},p,{cursor:"pointer"}),onClick:function(v){return o(v,h)}}:{style:p}},[l.opacity,o,h]);return y.jsxs(Ct.g,Gn({transform:l.transform},g,{children:[y.jsx("line",{x1:0,x2:i,y1:0,y2:a,style:d}),f.outlineWidth>0&&y.jsx(Ct.text,{dominantBaseline:s,textAnchor:c,transform:l.textTransform,style:f,strokeWidth:2*f.outlineWidth,stroke:f.outlineColor,strokeLinejoin:"round",children:""+h}),y.jsx(Ct.text,{dominantBaseline:s,textAnchor:c,transform:l.textTransform,style:Ig(f),children:""+h})]}))}),IK=function(e){var t=e.axis,n=e.scale,r=e.x,i=r===void 0?0:r,a=e.y,o=a===void 0?0:a,s=e.length,c=e.ticksPosition,l=e.tickValues,u=e.tickSize,d=u===void 0?5:u,f=e.tickPadding,h=f===void 0?5:f,g=e.tickRotation,p=g===void 0?0:g,v=e.format,w=e.renderTick,_=w===void 0?PK:w,x=e.truncateTickAt,S=e.legend,b=e.legendPosition,T=b===void 0?"end":b,j=e.legendOffset,M=j===void 0?0:j,k=e.onClick,E=e.ariaHidden,C=Tt(),O=C.axis.legend.text,$=m.useMemo(function(){return Q3(v,n)},[v,n]),A=X3({axis:t,scale:n,ticksPosition:c,tickValues:l,tickSize:d,tickPadding:h,tickRotation:p,truncateTickAt:x}),P=A.ticks,D=A.textAlign,N=A.textBaseline,q=null;if(S!==void 0){var z,U=0,G=0,ne=0;t==="y"?(ne=-90,U=M,T==="start"?(z="start",G=s):T==="middle"?(z="middle",G=s/2):T==="end"&&(z="end")):(G=M,T==="start"?z="start":T==="middle"?(z="middle",U=s/2):T==="end"&&(z="end",U=s)),q=y.jsxs(y.Fragment,{children:[O.outlineWidth>0&&y.jsx("text",{transform:"translate("+U+", "+G+") rotate("+ne+")",textAnchor:z,style:Gn({dominantBaseline:"central"},O),strokeWidth:2*O.outlineWidth,stroke:O.outlineColor,strokeLinejoin:"round",children:S}),y.jsx("text",{transform:"translate("+U+", "+G+") rotate("+ne+")",textAnchor:z,style:Gn({dominantBaseline:"central"},O),children:S})]})}var te=kn(),X=te.animate,J=te.config,Q=Sr({transform:"translate("+i+","+o+")",lineX2:t==="x"?s:0,lineY2:t==="x"?0:s,config:J,immediate:!X}),re=m.useCallback(function(L){return{opacity:1,transform:"translate("+L.x+","+L.y+")",textTransform:"translate("+L.textX+","+L.textY+") rotate("+p+")"}},[p]),F=m.useCallback(function(L){return{opacity:0,transform:"translate("+L.x+","+L.y+")",textTransform:"translate("+L.textX+","+L.textY+") rotate("+p+")"}},[p]),I=ca(P,{keys:function(L){return L.key},initial:re,from:F,enter:re,update:re,leave:{opacity:0},config:J,immediate:!X});return y.jsxs(Ct.g,{transform:Q.transform,"aria-hidden":E,children:[I(function(L,H,R,K){return ue.createElement(_,Gn({tickIndex:K,format:$,rotate:p,textBaseline:N,textAnchor:D,truncateTickAt:x,animatedProps:L},H,k?{onClick:k}:{}))}),y.jsx(Ct.line,{style:C.axis.domain.line,x1:0,x2:Q.lineX2,y1:0,y2:Q.lineY2}),q]})},DK=m.memo(IK),J3=["top","right","bottom","left"],eC=m.memo(function(e){var t=e.xScale,n=e.yScale,r=e.width,i=e.height,a={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return y.jsx(y.Fragment,{children:J3.map(function(o){var s=a[o];if(!s)return null;var c=o==="top"||o==="bottom";return y.jsx(DK,Gn({},s,{axis:c?"x":"y",x:o==="right"?r:0,y:o==="bottom"?i:0,scale:c?t:n,length:c?r:i,ticksPosition:o==="top"||o==="left"?"before":"after",truncateTickAt:s.truncateTickAt}),o)})})}),NK=m.memo(function(e){var t=e.animatedProps,n=Tt();return y.jsx(Ct.line,Gn({},t,n.grid.line))}),Fy=m.memo(function(e){var t=e.lines,n=kn(),r=n.animate,i=n.config,a=ca(t,{keys:function(o){return o.key},initial:function(o){return{opacity:1,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2}},from:function(o){return{opacity:0,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2}},enter:function(o){return{opacity:1,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2}},update:function(o){return{opacity:1,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2}},leave:{opacity:0},config:i,immediate:!r});return y.jsx("g",{children:a(function(o,s){return m.createElement(NK,Gn({},s,{key:s.key,animatedProps:o}))})})}),tC=m.memo(function(e){var t=e.width,n=e.height,r=e.xScale,i=e.yScale,a=e.xValues,o=e.yValues,s=m.useMemo(function(){return!!r&&hp({width:t,height:n,scale:r,axis:"x",values:a})},[r,a,t,n]),c=m.useMemo(function(){return!!i&&hp({width:t,height:n,scale:i,axis:"y",values:o})},[n,t,i,o]);return y.jsxs(y.Fragment,{children:[s&&y.jsx(Fy,{lines:s}),c&&y.jsx(Fy,{lines:c})]})}),LK=function(e,t){var n,r=t.axis,i=t.scale,a=t.x,o=a===void 0?0:a,s=t.y,c=s===void 0?0:s,l=t.length,u=t.ticksPosition,d=t.tickValues,f=t.tickSize,h=f===void 0?5:f,g=t.tickPadding,p=g===void 0?5:g,v=t.tickRotation,w=v===void 0?0:v,_=t.format,x=t.legend,S=t.legendPosition,b=S===void 0?"end":S,T=t.legendOffset,j=T===void 0?0:T,M=t.theme,k=X3({axis:r,scale:i,ticksPosition:u,tickValues:d,tickSize:h,tickPadding:p,tickRotation:w,engine:"canvas"}),E=k.ticks,C=k.textAlign,O=k.textBaseline;e.save(),e.translate(o,c),e.textAlign=C,e.textBaseline=O;var $=M.axis.ticks.text;e.font=($.fontWeight?$.fontWeight+" ":"")+$.fontSize+"px "+$.fontFamily,((n=M.axis.domain.line.strokeWidth)!=null?n:0)>0&&(e.lineWidth=Number(M.axis.domain.line.strokeWidth),e.lineCap="square",M.axis.domain.line.stroke&&(e.strokeStyle=M.axis.domain.line.stroke),e.beginPath(),e.moveTo(0,0),e.lineTo(r==="x"?l:0,r==="x"?0:l),e.stroke());var A=typeof _=="function"?_:function(z){return""+z};if(E.forEach(function(z){var U;((U=M.axis.ticks.line.strokeWidth)!=null?U:0)>0&&(e.lineWidth=Number(M.axis.ticks.line.strokeWidth),e.lineCap="square",M.axis.ticks.line.stroke&&(e.strokeStyle=M.axis.ticks.line.stroke),e.beginPath(),e.moveTo(z.x,z.y),e.lineTo(z.x+z.lineX,z.y+z.lineY),e.stroke());var G=A(z.value);e.save(),e.translate(z.x+z.textX,z.y+z.textY),e.rotate(Yn(w)),$.outlineWidth>0&&(e.strokeStyle=$.outlineColor,e.lineWidth=2*$.outlineWidth,e.lineJoin="round",e.strokeText(""+G,0,0)),M.axis.ticks.text.fill&&(e.fillStyle=$.fill),e.fillText(""+G,0,0),e.restore()}),x!==void 0){var P=0,D=0,N=0,q="center";r==="y"?(N=-90,P=j,b==="start"?(q="start",D=l):b==="middle"?(q="center",D=l/2):b==="end"&&(q="end")):(D=j,b==="start"?q="start":b==="middle"?(q="center",P=l/2):b==="end"&&(q="end",P=l)),e.translate(P,D),e.rotate(Yn(N)),e.font=(M.axis.legend.text.fontWeight?M.axis.legend.text.fontWeight+" ":"")+M.axis.legend.text.fontSize+"px "+M.axis.legend.text.fontFamily,M.axis.legend.text.fill&&(e.fillStyle=M.axis.legend.text.fill),e.textAlign=q,e.textBaseline="middle",e.fillText(x,0,0)}e.restore()},nC=function(e,t){var n=t.xScale,r=t.yScale,i=t.width,a=t.height,o=t.top,s=t.right,c=t.bottom,l=t.left,u=t.theme,d={top:o,right:s,bottom:c,left:l};J3.forEach(function(f){var h=d[f];if(!h)return null;var g=f==="top"||f==="bottom",p=f==="top"||f==="left"?"before":"after",v=g?n:r,w=Q3(h.format,v);LK(e,Gn({},h,{axis:g?"x":"y",x:f==="right"?i:0,y:f==="bottom"?a:0,scale:v,format:w,length:g?i:a,ticksPosition:p,theme:u}))})},tu=function(e,t){var n=t.width,r=t.height,i=t.scale,a=t.axis,o=t.values;hp({width:n,height:r,scale:i,axis:a,values:o}).forEach(function(s){e.beginPath(),e.moveTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.stroke()})},FK=Lw,BK=0;function UK(e){var t=++BK;return FK(e)+t}var WK=UK;const zK=Ht(WK),Br=11102230246251565e-32,pn=134217729,HK=(3+8*Br)*Br;function zf(e,t,n,r,i){let a,o,s,c,l=t[0],u=r[0],d=0,f=0;u>l==u>-l?(a=l,l=t[++d]):(a=u,u=r[++f]);let h=0;if(d<e&&f<n)for(u>l==u>-l?(o=l+a,s=a-(o-l),l=t[++d]):(o=u+a,s=a-(o-u),u=r[++f]),a=o,s!==0&&(i[h++]=s);d<e&&f<n;)u>l==u>-l?(o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d]):(o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f]),a=o,s!==0&&(i[h++]=s);for(;d<e;)o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d],a=o,s!==0&&(i[h++]=s);for(;f<n;)o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f],a=o,s!==0&&(i[h++]=s);return(a!==0||h===0)&&(i[h++]=a),h}function VK(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}function gc(e){return new Float64Array(e)}const qK=(3+16*Br)*Br,YK=(2+12*Br)*Br,GK=(9+64*Br)*Br*Br,Sa=gc(4),By=gc(8),Uy=gc(12),Wy=gc(16),bn=gc(4);function ZK(e,t,n,r,i,a,o){let s,c,l,u,d,f,h,g,p,v,w,_,x,S,b,T,j,M;const k=e-i,E=n-i,C=t-a,O=r-a;S=k*O,f=pn*k,h=f-(f-k),g=k-h,f=pn*O,p=f-(f-O),v=O-p,b=g*v-(S-h*p-g*p-h*v),T=C*E,f=pn*C,h=f-(f-C),g=C-h,f=pn*E,p=f-(f-E),v=E-p,j=g*v-(T-h*p-g*p-h*v),w=b-j,d=b-w,Sa[0]=b-(w+d)+(d-j),_=S+w,d=_-S,x=S-(_-d)+(w-d),w=x-T,d=x-w,Sa[1]=x-(w+d)+(d-T),M=_+w,d=M-_,Sa[2]=_-(M-d)+(w-d),Sa[3]=M;let $=VK(4,Sa),A=YK*o;if($>=A||-$>=A||(d=e-k,s=e-(k+d)+(d-i),d=n-E,l=n-(E+d)+(d-i),d=t-C,c=t-(C+d)+(d-a),d=r-O,u=r-(O+d)+(d-a),s===0&&c===0&&l===0&&u===0)||(A=GK*o+HK*Math.abs($),$+=k*u+O*s-(C*l+E*c),$>=A||-$>=A))return $;S=s*O,f=pn*s,h=f-(f-s),g=s-h,f=pn*O,p=f-(f-O),v=O-p,b=g*v-(S-h*p-g*p-h*v),T=c*E,f=pn*c,h=f-(f-c),g=c-h,f=pn*E,p=f-(f-E),v=E-p,j=g*v-(T-h*p-g*p-h*v),w=b-j,d=b-w,bn[0]=b-(w+d)+(d-j),_=S+w,d=_-S,x=S-(_-d)+(w-d),w=x-T,d=x-w,bn[1]=x-(w+d)+(d-T),M=_+w,d=M-_,bn[2]=_-(M-d)+(w-d),bn[3]=M;const P=zf(4,Sa,4,bn,By);S=k*u,f=pn*k,h=f-(f-k),g=k-h,f=pn*u,p=f-(f-u),v=u-p,b=g*v-(S-h*p-g*p-h*v),T=C*l,f=pn*C,h=f-(f-C),g=C-h,f=pn*l,p=f-(f-l),v=l-p,j=g*v-(T-h*p-g*p-h*v),w=b-j,d=b-w,bn[0]=b-(w+d)+(d-j),_=S+w,d=_-S,x=S-(_-d)+(w-d),w=x-T,d=x-w,bn[1]=x-(w+d)+(d-T),M=_+w,d=M-_,bn[2]=_-(M-d)+(w-d),bn[3]=M;const D=zf(P,By,4,bn,Uy);S=s*u,f=pn*s,h=f-(f-s),g=s-h,f=pn*u,p=f-(f-u),v=u-p,b=g*v-(S-h*p-g*p-h*v),T=c*l,f=pn*c,h=f-(f-c),g=c-h,f=pn*l,p=f-(f-l),v=l-p,j=g*v-(T-h*p-g*p-h*v),w=b-j,d=b-w,bn[0]=b-(w+d)+(d-j),_=S+w,d=_-S,x=S-(_-d)+(w-d),w=x-T,d=x-w,bn[1]=x-(w+d)+(d-T),M=_+w,d=M-_,bn[2]=_-(M-d)+(w-d),bn[3]=M;const N=zf(D,Uy,4,bn,Wy);return Wy[N-1]}function Hc(e,t,n,r,i,a){const o=(t-a)*(n-i),s=(e-i)*(r-a),c=o-s,l=Math.abs(o+s);return Math.abs(c)>=qK*l?c:-ZK(e,t,n,r,i,a,l)}const zy=Math.pow(2,-52),Vc=new Uint32Array(512);class nu{static from(t,n=eX,r=tX){const i=t.length,a=new Float64Array(i*2);for(let o=0;o<i;o++){const s=t[o];a[2*o]=n(s),a[2*o+1]=r(s)}return new nu(a)}constructor(t){const n=t.length>>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:a}=this,o=t.length>>1;let s=1/0,c=1/0,l=-1/0,u=-1/0;for(let k=0;k<o;k++){const E=t[2*k],C=t[2*k+1];E<s&&(s=E),C<c&&(c=C),E>l&&(l=E),C>u&&(u=C),this._ids[k]=k}const d=(s+l)/2,f=(c+u)/2;let h,g,p;for(let k=0,E=1/0;k<o;k++){const C=Hf(d,f,t[2*k],t[2*k+1]);C<E&&(h=k,E=C)}const v=t[2*h],w=t[2*h+1];for(let k=0,E=1/0;k<o;k++){if(k===h)continue;const C=Hf(v,w,t[2*k],t[2*k+1]);C<E&&C>0&&(g=k,E=C)}let _=t[2*g],x=t[2*g+1],S=1/0;for(let k=0;k<o;k++){if(k===h||k===g)continue;const E=QK(v,w,_,x,t[2*k],t[2*k+1]);E<S&&(p=k,S=E)}let b=t[2*p],T=t[2*p+1];if(S===1/0){for(let C=0;C<o;C++)this._dists[C]=t[2*C]-t[0]||t[2*C+1]-t[1];Ra(this._ids,this._dists,0,o-1);const k=new Uint32Array(o);let E=0;for(let C=0,O=-1/0;C<o;C++){const $=this._ids[C],A=this._dists[$];A>O&&(k[E++]=$,O=A)}this.hull=k.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Hc(v,w,_,x,b,T)<0){const k=g,E=_,C=x;g=p,_=b,x=T,p=k,b=E,T=C}const j=JK(v,w,_,x,b,T);this._cx=j.x,this._cy=j.y;for(let k=0;k<o;k++)this._dists[k]=Hf(t[2*k],t[2*k+1],j.x,j.y);Ra(this._ids,this._dists,0,o-1),this._hullStart=h;let M=3;r[h]=n[p]=g,r[g]=n[h]=p,r[p]=n[g]=h,i[h]=0,i[g]=1,i[p]=2,a.fill(-1),a[this._hashKey(v,w)]=h,a[this._hashKey(_,x)]=g,a[this._hashKey(b,T)]=p,this.trianglesLen=0,this._addTriangle(h,g,p,-1,-1,-1);for(let k=0,E,C;k<this._ids.length;k++){const O=this._ids[k],$=t[2*O],A=t[2*O+1];if(k>0&&Math.abs($-E)<=zy&&Math.abs(A-C)<=zy||(E=$,C=A,O===h||O===g||O===p))continue;let P=0;for(let U=0,G=this._hashKey($,A);U<this._hashSize&&(P=a[(G+U)%this._hashSize],!(P!==-1&&P!==r[P]));U++);P=n[P];let D=P,N;for(;N=r[D],Hc($,A,t[2*D],t[2*D+1],t[2*N],t[2*N+1])>=0;)if(D=N,D===P){D=-1;break}if(D===-1)continue;let q=this._addTriangle(D,O,r[D],-1,-1,i[D]);i[O]=this._legalize(q+2),i[D]=q,M++;let z=r[D];for(;N=r[z],Hc($,A,t[2*z],t[2*z+1],t[2*N],t[2*N+1])<0;)q=this._addTriangle(z,O,N,i[O],-1,i[z]),i[O]=this._legalize(q+2),r[z]=z,M--,z=N;if(D===P)for(;N=n[D],Hc($,A,t[2*N],t[2*N+1],t[2*D],t[2*D+1])<0;)q=this._addTriangle(N,O,D,-1,i[D],i[N]),this._legalize(q+2),i[N]=q,r[D]=D,M--,D=N;this._hullStart=n[O]=D,r[D]=n[z]=O,r[O]=z,a[this._hashKey($,A)]=O,a[this._hashKey(t[2*D],t[2*D+1])]=D}this.hull=new Uint32Array(M);for(let k=0,E=this._hullStart;k<M;k++)this.hull[k]=E,E=r[E];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(KK(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:r,coords:i}=this;let a=0,o=0;for(;;){const s=r[t],c=t-t%3;if(o=c+(t+2)%3,s===-1){if(a===0)break;t=Vc[--a];continue}const l=s-s%3,u=c+(t+1)%3,d=l+(s+2)%3,f=n[o],h=n[t],g=n[u],p=n[d];if(XK(i[2*f],i[2*f+1],i[2*h],i[2*h+1],i[2*g],i[2*g+1],i[2*p],i[2*p+1])){n[t]=p,n[s]=f;const w=r[d];if(w===-1){let x=this._hullStart;do{if(this._hullTri[x]===d){this._hullTri[x]=t;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(t,w),this._link(s,r[o]),this._link(o,d);const _=l+(s+1)%3;a<Vc.length&&(Vc[a++]=_)}else{if(a===0)break;t=Vc[--a]}}return o}_link(t,n){this._halfedges[t]=n,n!==-1&&(this._halfedges[n]=t)}_addTriangle(t,n,r,i,a,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,a),this._link(s+2,o),this.trianglesLen+=3,s}}function KK(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function Hf(e,t,n,r){const i=e-n,a=t-r;return i*i+a*a}function XK(e,t,n,r,i,a,o,s){const c=e-o,l=t-s,u=n-o,d=r-s,f=i-o,h=a-s,g=c*c+l*l,p=u*u+d*d,v=f*f+h*h;return c*(d*v-p*h)-l*(u*v-p*f)+g*(u*h-d*f)<0}function QK(e,t,n,r,i,a){const o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c),h=(l*u-s*d)*f,g=(o*d-c*u)*f;return h*h+g*g}function JK(e,t,n,r,i,a){const o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c),h=e+(l*u-s*d)*f,g=t+(o*d-c*u)*f;return{x:h,y:g}}function Ra(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const a=e[i],o=t[a];let s=i-1;for(;s>=n&&t[e[s]]>o;)e[s+1]=e[s--];e[s+1]=a}else{const i=n+r>>1;let a=n+1,o=r;Yo(e,i,a),t[e[n]]>t[e[r]]&&Yo(e,n,r),t[e[a]]>t[e[r]]&&Yo(e,a,r),t[e[n]]>t[e[a]]&&Yo(e,n,a);const s=e[a],c=t[s];for(;;){do a++;while(t[e[a]]<c);do o--;while(t[e[o]]>c);if(o<a)break;Yo(e,a,o)}e[n+1]=e[o],e[o]=s,r-a+1>=o-n?(Ra(e,t,a,r),Ra(e,t,n,o-1)):(Ra(e,t,n,o-1),Ra(e,t,a,r))}}function Yo(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function eX(e){return e[0]}function tX(e){return e[1]}const Hy=1e-6;class Ui{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,r){t=+t,n=+n,r=+r;const i=t+r,a=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${a}`:(Math.abs(this._x1-i)>Hy||Math.abs(this._y1-a)>Hy)&&(this._+="L"+i+","+a),r&&(this._+=`A${r},${r},0,1,1,${t-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=a}`)}rect(t,n,r,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class pp{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class nX{constructor(t,[n,r,i,a]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((a=+a)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=i,this.xmin=n,this.ymax=a,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:r},vectors:i}=this;let a,o;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let p=0,v=0,w=r.length,_,x;p<w;p+=3,v+=2){const S=r[p]*2,b=r[p+1]*2,T=r[p+2]*2,j=t[S],M=t[S+1],k=t[b],E=t[b+1],C=t[T],O=t[T+1],$=k-j,A=E-M,P=C-j,D=O-M,N=($*D-A*P)*2;if(Math.abs(N)<1e-9){if(a===void 0){a=o=0;for(const z of n)a+=t[z*2],o+=t[z*2+1];a/=n.length,o/=n.length}const q=1e9*Math.sign((a-j)*D-(o-M)*P);_=(j+C)/2-q*D,x=(M+O)/2+q*P}else{const q=1/N,z=$*$+A*A,U=P*P+D*D;_=j+(D*z-A*U)*q,x=M+($*U-P*z)*q}s[v]=_,s[v+1]=x}let c=n[n.length-1],l,u=c*4,d,f=t[2*c],h,g=t[2*c+1];i.fill(0);for(let p=0;p<n.length;++p)c=n[p],l=u,d=f,h=g,u=c*4,f=t[2*c],g=t[2*c+1],i[l+2]=i[u]=h-g,i[l+3]=i[u+1]=f-d}render(t){const n=t==null?t=new Ui:void 0,{delaunay:{halfedges:r,inedges:i,hull:a},circumcenters:o,vectors:s}=this;if(a.length<=1)return null;for(let u=0,d=r.length;u<d;++u){const f=r[u];if(f<u)continue;const h=Math.floor(u/3)*2,g=Math.floor(f/3)*2,p=o[h],v=o[h+1],w=o[g],_=o[g+1];this._renderSegment(p,v,w,_,t)}let c,l=a[a.length-1];for(let u=0;u<a.length;++u){c=l,l=a[u];const d=Math.floor(i[l]/3)*2,f=o[d],h=o[d+1],g=c*4,p=this._project(f,h,s[g+2],s[g+3]);p&&this._renderSegment(f,h,p[0],p[1],t)}return n&&n.value()}renderBounds(t){const n=t==null?t=new Ui:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const r=n==null?n=new Ui:void 0,i=this._clip(t);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let a=i.length;for(;i[0]===i[a-2]&&i[1]===i[a-1]&&a>1;)a-=2;for(let o=2;o<a;o+=2)(i[o]!==i[o-2]||i[o+1]!==i[o-1])&&n.lineTo(i[o],i[o+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,r=t.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(t){const n=new pp;return this.renderCell(t,n),n.value()}_renderSegment(t,n,r,i,a){let o;const s=this._regioncode(t,n),c=this._regioncode(r,i);s===0&&c===0?(a.moveTo(t,n),a.lineTo(r,i)):(o=this._clipSegment(t,n,r,i,s,c))&&(a.moveTo(o[0],o[1]),a.lineTo(o[2],o[3]))}contains(t,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(t,n,r)===t}*neighbors(t){const n=this._clip(t);if(n)for(const r of this.delaunay.neighbors(t)){const i=this._clip(r);if(i){e:for(let a=0,o=n.length;a<o;a+=2)for(let s=0,c=i.length;s<c;s+=2)if(n[a]===i[s]&&n[a+1]===i[s+1]&&n[(a+2)%o]===i[(s+c-2)%c]&&n[(a+3)%o]===i[(s+c-1)%c]){yield r;break e}}}}_cell(t){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:a}}=this,o=r[t];if(o===-1)return null;const s=[];let c=o;do{const l=Math.floor(c/3);if(s.push(n[l*2],n[l*2+1]),c=c%3===2?c-2:c+1,a[c]!==t)break;c=i[c]}while(c!==o&&c!==-1);return s}_clip(t){if(t===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(n===null)return null;const{vectors:r}=this,i=t*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(t,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(t,n))}_clipFinite(t,n){const r=n.length;let i=null,a,o,s=n[r-2],c=n[r-1],l,u=this._regioncode(s,c),d,f=0;for(let h=0;h<r;h+=2)if(a=s,o=c,s=n[h],c=n[h+1],l=u,u=this._regioncode(s,c),l===0&&u===0)d=f,f=0,i?i.push(s,c):i=[s,c];else{let g,p,v,w,_;if(l===0){if((g=this._clipSegment(a,o,s,c,l,u))===null)continue;[p,v,w,_]=g}else{if((g=this._clipSegment(s,c,a,o,u,l))===null)continue;[w,_,p,v]=g,d=f,f=this._edgecode(p,v),d&&f&&this._edge(t,d,f,i,i.length),i?i.push(p,v):i=[p,v]}d=f,f=this._edgecode(w,_),d&&f&&this._edge(t,d,f,i,i.length),i?i.push(w,_):i=[w,_]}if(i)d=f,f=this._edgecode(i[0],i[1]),d&&f&&this._edge(t,d,f,i,i.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(t,n,r,i,a,o){const s=a<o;for(s&&([t,n,r,i,a,o]=[r,i,t,n,o,a]);;){if(a===0&&o===0)return s?[r,i,t,n]:[t,n,r,i];if(a&o)return null;let c,l,u=a||o;u&8?(c=t+(r-t)*(this.ymax-n)/(i-n),l=this.ymax):u&4?(c=t+(r-t)*(this.ymin-n)/(i-n),l=this.ymin):u&2?(l=n+(i-n)*(this.xmax-t)/(r-t),c=this.xmax):(l=n+(i-n)*(this.xmin-t)/(r-t),c=this.xmin),a?(t=c,n=l,a=this._regioncode(t,n)):(r=c,i=l,o=this._regioncode(r,i))}}_clipInfinite(t,n,r,i,a,o){let s=Array.from(n),c;if((c=this._project(s[0],s[1],r,i))&&s.unshift(c[0],c[1]),(c=this._project(s[s.length-2],s[s.length-1],a,o))&&s.push(c[0],c[1]),s=this._clipFinite(t,s))for(let l=0,u=s.length,d,f=this._edgecode(s[u-2],s[u-1]);l<u;l+=2)d=f,f=this._edgecode(s[l],s[l+1]),d&&f&&(l=this._edge(t,d,f,s,l),u=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,n,r,i,a){for(;n!==r;){let o,s;switch(n){case 5:n=4;continue;case 4:n=6,o=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,o=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,o=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,o=this.xmin,s=this.ymin;break}(i[a]!==o||i[a+1]!==s)&&this.contains(t,o,s)&&(i.splice(a,0,o,s),a+=2)}return a}_project(t,n,r,i){let a=1/0,o,s,c;if(i<0){if(n<=this.ymin)return null;(o=(this.ymin-n)/i)<a&&(c=this.ymin,s=t+(a=o)*r)}else if(i>0){if(n>=this.ymax)return null;(o=(this.ymax-n)/i)<a&&(c=this.ymax,s=t+(a=o)*r)}if(r>0){if(t>=this.xmax)return null;(o=(this.xmax-t)/r)<a&&(s=this.xmax,c=n+(a=o)*i)}else if(r<0){if(t<=this.xmin)return null;(o=(this.xmin-t)/r)<a&&(s=this.xmin,c=n+(a=o)*i)}return[s,c]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n<t.length;n+=2){const r=(n+2)%t.length,i=(n+4)%t.length;(t[n]===t[r]&&t[r]===t[i]||t[n+1]===t[r+1]&&t[r+1]===t[i+1])&&(t.splice(r,2),n-=2)}t.length||(t=null)}return t}}const rX=2*Math.PI,ka=Math.pow;function iX(e){return e[0]}function aX(e){return e[1]}function oX(e){const{triangles:t,coords:n}=e;for(let r=0;r<t.length;r+=3){const i=2*t[r],a=2*t[r+1],o=2*t[r+2];if((n[o]-n[i])*(n[a+1]-n[i+1])-(n[a]-n[i])*(n[o+1]-n[i+1])>1e-10)return!1}return!0}function sX(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class Ug{static from(t,n=iX,r=aX,i){return new Ug("length"in t?cX(t,n,r,i):Float64Array.from(lX(t,n,r,i)))}constructor(t){this._delaunator=new nu(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&oX(t)){this.collinear=Int32Array.from({length:n.length/2},(f,h)=>h).sort((f,h)=>n[2*f]-n[2*h]||n[2*f+1]-n[2*h+1]);const c=this.collinear[0],l=this.collinear[this.collinear.length-1],u=[n[2*c],n[2*c+1],n[2*l],n[2*l+1]],d=1e-8*Math.hypot(u[3]-u[1],u[2]-u[0]);for(let f=0,h=n.length/2;f<h;++f){const g=sX(n[2*f],n[2*f+1],d);n[2*f]=g[0],n[2*f+1]=g[1]}this._delaunator=new nu(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,a=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let c=0,l=r.length;c<l;++c){const u=a[c%3===2?c-2:c+1];(r[c]===-1||o[u]===-1)&&(o[u]=c)}for(let c=0,l=i.length;c<l;++c)s[i[c]]=c;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],o[i[0]]=1,i.length===2&&(o[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new nX(this,t)}*neighbors(t){const{inedges:n,hull:r,_hullIndex:i,halfedges:a,triangles:o,collinear:s}=this;if(s){const d=s.indexOf(t);d>0&&(yield s[d-1]),d<s.length-1&&(yield s[d+1]);return}const c=n[t];if(c===-1)return;let l=c,u=-1;do{if(yield u=o[l],l=l%3===2?l-2:l+1,o[l]!==t)return;if(l=a[l],l===-1){const d=r[(i[t]+1)%r.length];d!==u&&(yield d);return}}while(l!==c)}find(t,n,r=0){if(t=+t,t!==t||(n=+n,n!==n))return-1;const i=r;let a;for(;(a=this._step(r,t,n))>=0&&a!==r&&a!==i;)r=a;return a}_step(t,n,r){const{inedges:i,hull:a,_hullIndex:o,halfedges:s,triangles:c,points:l}=this;if(i[t]===-1||!l.length)return(t+1)%(l.length>>1);let u=t,d=ka(n-l[t*2],2)+ka(r-l[t*2+1],2);const f=i[t];let h=f;do{let g=c[h];const p=ka(n-l[g*2],2)+ka(r-l[g*2+1],2);if(p<d&&(d=p,u=g),h=h%3===2?h-2:h+1,c[h]!==t)break;if(h=s[h],h===-1){if(h=a[(o[t]+1)%a.length],h!==g&&ka(n-l[h*2],2)+ka(r-l[h*2+1],2)<d)return h;break}}while(h!==f);return u}render(t){const n=t==null?t=new Ui:void 0,{points:r,halfedges:i,triangles:a}=this;for(let o=0,s=i.length;o<s;++o){const c=i[o];if(c<o)continue;const l=a[o]*2,u=a[c]*2;t.moveTo(r[l],r[l+1]),t.lineTo(r[u],r[u+1])}return this.renderHull(t),n&&n.value()}renderPoints(t,n){n===void 0&&(!t||typeof t.moveTo!="function")&&(n=t,t=null),n=n==null?2:+n;const r=t==null?t=new Ui:void 0,{points:i}=this;for(let a=0,o=i.length;a<o;a+=2){const s=i[a],c=i[a+1];t.moveTo(s+n,c),t.arc(s,c,n,0,rX)}return r&&r.value()}renderHull(t){const n=t==null?t=new Ui:void 0,{hull:r,points:i}=this,a=r[0]*2,o=r.length;t.moveTo(i[a],i[a+1]);for(let s=1;s<o;++s){const c=2*r[s];t.lineTo(i[c],i[c+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new pp;return this.renderHull(t),t.value()}renderTriangle(t,n){const r=n==null?n=new Ui:void 0,{points:i,triangles:a}=this,o=a[t*=3]*2,s=a[t+1]*2,c=a[t+2]*2;return n.moveTo(i[o],i[o+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[c],i[c+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,r=t.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new pp;return this.renderTriangle(t,n),n.value()}}function cX(e,t,n,r){const i=e.length,a=new Float64Array(i*2);for(let o=0;o<i;++o){const s=e[o];a[o*2]=t.call(r,s,o,e),a[o*2+1]=n.call(r,s,o,e)}return a}function*lX(e,t,n,r){let i=0;for(const a of e)yield t.call(r,a,i,e),yield n.call(r,a,i,e),++i}var Wg=function(e){return[e.x,e.y]},vc=m3,rC="cursor",iC="top",uX=function(e){var t=e.points,n=e.getNodePosition,r=n===void 0?Wg:n,i=e.margin,a=i===void 0?vc:i;return t.map(function(o){var s=r(o),c=s[0],l=s[1];return[c+a.left,l+a.top]})},dX=function(e){var t=e.points,n=e.width,r=e.height,i=e.margin,a=i===void 0?vc:i,o=e.debug,s=Ug.from(t),c=o?s.voronoi([0,0,a.left+n+a.right,a.top+r+a.bottom]):void 0;return{points:t,delaunay:s,voronoi:c}},aC=function(e){var t=e.points,n=e.getNodePosition,r=n===void 0?Wg:n,i=e.width,a=e.height,o=e.margin,s=o===void 0?vc:o,c=e.debug;return m.useMemo(function(){return dX({points:uX({points:t,margin:s,getNodePosition:r}),width:i,height:a,margin:s,debug:c})},[t,i,a,s,c])},fX=function(e){var t=e.elementRef,n=e.nodes,r=e.getNodePosition,i=r===void 0?Wg:r,a=e.delaunay,o=e.setCurrent,s=e.margin,c=s===void 0?vc:s,l=e.detectionRadius,u=l===void 0?1/0:l,d=e.isInteractive,f=d===void 0||d,h=e.onMouseEnter,g=e.onMouseMove,p=e.onMouseLeave,v=e.onClick,w=e.onTouchStart,_=e.onTouchMove,x=e.onTouchEnd,S=e.enableTouchCrosshair,b=S!==void 0&&S,T=e.tooltip,j=e.tooltipPosition,M=j===void 0?rC:j,k=e.tooltipAnchor,E=k===void 0?iC:k,C=m.useState(null),O=C[0],$=C[1],A=m.useRef(null);m.useEffect(function(){A.current=O},[A,O]);var P=m.useCallback(function(F){if(!t.current)return null;var I=os(t.current,F),L=I[0],H=I[1],R=a.find(L,H),K=R!==void 0?n[R]:null;if(K&&u!==1/0){var Z=i(K),ee=Z[0],pe=Z[1];rY(L,H,ee+c.left,pe+c.top)>u&&(R=null,K=null)}return R===null||K===null?null:[R,K]},[t,a,n,i,c,u]),D=la(),N=D.showTooltipAt,q=D.showTooltipFromEvent,z=D.hideTooltip,U=m.useMemo(function(){if(T)return M==="cursor"?function(F,I){q(T(F),I,E)}:function(F){var I=i(F),L=I[0],H=I[1];N(T(F),[L+c.left,H+c.top],E)}},[N,q,T,M,E,i,c]),G=m.useCallback(function(F){var I=P(F);if($(I),o==null||o(I?I[1]:null),I){var L=I[1];U==null||U(L,F),h==null||h(I[1],F)}},[P,$,o,U,h]),ne=m.useCallback(function(F){var I=P(F);if($(I),I){var L=I[0],H=I[1];if(o==null||o(H),U==null||U(H,F),A.current){var R=A.current,K=R[0],Z=R[1];L!==K?p==null||p(Z,F):g==null||g(H,F)}else h==null||h(H,F)}else o==null||o(null),z==null||z(),A.current&&(p==null||p(A.current[1],F))},[P,$,A,h,g,p,U,z]),te=m.useCallback(function(F){$(null),o==null||o(null),z(),p&&A.current&&p(A.current[1],F)},[$,o,A,z,p]),X=m.useCallback(function(F){var I=P(F);$(I),I&&(v==null||v(I[1],F))},[P,$,v]),J=m.useCallback(function(F){var I=P(F);b&&($(I),o==null||o(I?I[1]:null)),I&&(w==null||w(I[1],F))},[P,$,o,b,w]),Q=m.useCallback(function(F){var I=P(F);b&&($(I),o==null||o(I?I[1]:null)),I&&(_==null||_(I[1],F))},[P,$,o,b,_]),re=m.useCallback(function(F){b&&($(null),o==null||o(null)),x&&A.current&&x(A.current[1],F)},[b,$,o,x,A]);return{current:O,handleMouseEnter:f?G:void 0,handleMouseMove:f?ne:void 0,handleMouseLeave:f?te:void 0,handleClick:f?X:void 0,handleTouchStart:f?J:void 0,handleTouchMove:f?Q:void 0,handleTouchEnd:f?re:void 0}},hX=function(e){var t=e.nodes,n=e.width,r=e.height,i=e.margin,a=i===void 0?vc:i,o=e.getNodePosition,s=e.setCurrent,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,g=e.onTouchEnd,p=e.enableTouchCrosshair,v=p!==void 0&&p,w=e.detectionRadius,_=w===void 0?1/0:w,x=e.tooltip,S=e.tooltipPosition,b=S===void 0?rC:S,T=e.tooltipAnchor,j=T===void 0?iC:T,M=e.debug,k=m.useRef(null),E=aC({points:t,getNodePosition:o,width:n,height:r,margin:a,debug:M}),C=E.delaunay,O=E.voronoi,$=fX({elementRef:k,nodes:t,delaunay:C,margin:a,detectionRadius:_,setCurrent:s,onMouseEnter:c,onMouseMove:l,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:h,onTouchEnd:g,enableTouchCrosshair:v,tooltip:x,tooltipPosition:b,tooltipAnchor:j}),A=$.current,P=$.handleMouseEnter,D=$.handleMouseMove,N=$.handleMouseLeave,q=$.handleClick,z=$.handleTouchStart,U=$.handleTouchMove,G=$.handleTouchEnd,ne=m.useMemo(function(){if(M&&O)return O.render()},[M,O]);return y.jsxs("g",{ref:k,transform:"translate("+-a.left+","+-a.top+")",children:[M&&O&&y.jsxs(y.Fragment,{children:[y.jsx("path",{d:ne,stroke:"red",strokeWidth:1,opacity:.75}),_<1/0&&y.jsx("path",{stroke:"red",strokeWidth:.35,fill:"none",d:C.renderPoints(void 0,_)}),A&&y.jsx("path",{fill:"pink",opacity:.35,d:O.renderCell(A[0])})]}),y.jsx("rect",{"data-ref":"mesh-interceptor",width:a.left+n+a.right,height:a.top+r+a.bottom,fill:"red",opacity:0,style:{cursor:"auto"},onMouseEnter:P,onMouseMove:D,onMouseLeave:N,onTouchStart:z,onTouchMove:U,onTouchEnd:G,onClick:q})]})},pX=function(e,t){e.save(),e.globalAlpha=.75,e.beginPath(),t.render(e),e.strokeStyle="red",e.lineWidth=1,e.stroke(),e.restore()},mX=function(e,t,n){e.save(),e.globalAlpha=.35,e.beginPath(),t.renderCell(n,e),e.fillStyle="pink",e.fill(),e.restore()};function Cn(){return Cn=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},Cn.apply(this,arguments)}var zg=m.memo(function(e){var t=e.point;return y.jsx(Im,{id:y.jsxs("span",{children:["x: ",y.jsx("strong",{children:t.data.xFormatted}),", y:"," ",y.jsx("strong",{children:t.data.yFormatted})]}),enableChip:!0,color:t.serieColor})}),oC=m.memo(function(e){var t=e.slice,n=e.axis,r=Tt(),i=n==="x"?"y":"x";return y.jsx(fw,{rows:t.points.map(function(a){return[y.jsx(dw,{color:a.serieColor,style:r.tooltip.chip},"chip"),a.serieId,y.jsx("span",{style:r.tooltip.tableCellValue,children:a.data[i+"Formatted"]},"value")]})})}),sC={curve:"linear",xScale:{type:"point"},yScale:{type:"linear",min:0,max:"auto"},layers:["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"],axisBottom:{},axisLeft:{},enableGridX:!0,enableGridY:!0,enablePoints:!0,pointSize:6,pointColor:{from:"color"},pointBorderWidth:0,pointBorderColor:{theme:"background"},enablePointLabel:!1,pointLabel:"yFormatted",colors:{scheme:"nivo"},enableArea:!1,areaBaselineValue:0,areaOpacity:.2,areaBlendMode:"normal",lineWidth:2,legends:[],isInteractive:!0,tooltip:zg,enableSlices:!1,debugSlices:!1,sliceTooltip:oC,debugMesh:!1,enableCrosshair:!0,crosshairType:"bottom-left"},ti=Cn({},sC,{enablePointLabel:!1,useMesh:!1,enableTouchCrosshair:!1,animate:!0,motionConfig:"gentle",defs:[],fill:[],role:"img"});Cn({},sC,{pixelRatio:typeof window<"u"&&window.devicePixelRatio||1});var gX=function(e){var t=e.curve;return m.useMemo(function(){return Tg().defined(function(n){return n.x!==null&&n.y!==null}).x(function(n){return n.x}).y(function(n){return n.y}).curve(p3(t))},[t])},vX=function(e){var t=e.curve,n=e.yScale,r=e.areaBaselineValue;return m.useMemo(function(){return Pz().defined(function(i){return i.x!==null&&i.y!==null}).x(function(i){return i.x}).y1(function(i){return i.y}).curve(p3(t)).y0(n(r))},[t,n,r])},yX=function(e){var t=e.componentId,n=e.enableSlices,r=e.points,i=e.width,a=e.height;return m.useMemo(function(){if(n===!1)return[];if(n==="x"){var o=new Map;return r.forEach(function(c){c.data.x!==null&&c.data.y!==null&&(o.has(c.x)?o.get(c.x).push(c):o.set(c.x,[c]))}),Array.from(o.entries()).sort(function(c,l){return c[0]-l[0]}).map(function(c,l,u){var d,f,h=c[0],g=c[1],p=u[l-1],v=u[l+1];return d=p?h-(h-p[0])/2:h,f=v?h-d+(v[0]-h)/2:i-d,{id:"slice:"+t+":"+h,x0:d,x:h,y0:0,y:0,width:f,height:a,points:g.reverse()}})}if(n==="y"){var s=new Map;return r.forEach(function(c){c.data.x!==null&&c.data.y!==null&&(s.has(c.y)?s.get(c.y).push(c):s.set(c.y,[c]))}),Array.from(s.entries()).sort(function(c,l){return c[0]-l[0]}).map(function(c,l,u){var d,f,h=c[0],g=c[1],p=u[l-1],v=u[l+1];return d=p?h-(h-p[0])/2:h,f=v?h-d+(v[0]-h)/2:a-d,{id:h,x0:0,x:0,y0:d,y:h,width:i,height:f,points:g.reverse()}})}},[t,n,a,r,i])},bX="line",cC=function(e){var t=e.data,n=e.xScale,r=n===void 0?ti.xScale:n,i=e.xFormat,a=e.yScale,o=a===void 0?ti.yScale:a,s=e.yFormat,c=e.width,l=e.height,u=e.colors,d=u===void 0?ti.colors:u,f=e.curve,h=f===void 0?ti.curve:f,g=e.areaBaselineValue,p=g===void 0?ti.areaBaselineValue:g,v=e.pointColor,w=v===void 0?ti.pointColor:v,_=e.pointBorderColor,x=_===void 0?ti.pointBorderColor:_,S=e.enableSlices,b=S===void 0?ti.enableSlicesTooltip:S,T=m.useState(zK(bX))[0],j=eo(i),M=eo(s),k=Ng(d,"id"),E=Tt(),C=wr(w,E),O=wr(x,E),$=m.useState([]),A=$[0],P=$[1],D=m.useMemo(function(){return OK(t.filter(function(Q){return A.indexOf(Q.id)===-1}),r,o,c,l)},[t,A,r,o,c,l]),N=D.xScale,q=D.yScale,z=D.series,U=m.useMemo(function(){var Q=t.map(function(F){return{id:F.id,label:F.id,color:k(F)}}),re=Q.map(function(F){return Cn({},z.find(function(I){return I.id===F.id}),{color:F.color})}).filter(function(F){return!!F.id});return{legendData:Q.map(function(F){return Cn({},F,{hidden:!re.find(function(I){return I.id===F.id})})}).reverse(),series:re}},[t,z,k]),G=U.legendData,ne=U.series,te=m.useCallback(function(Q){P(function(re){return re.indexOf(Q)>-1?re.filter(function(F){return F!==Q}):[].concat(re,[Q])})},[]),X=function(Q){var re=Q.series,F=Q.getPointColor,I=Q.getPointBorderColor,L=Q.formatX,H=Q.formatY;return m.useMemo(function(){return re.reduce(function(R,K){return[].concat(R,K.data.filter(function(Z){return Z.position.x!==null&&Z.position.y!==null}).map(function(Z,ee){var pe={id:K.id+"."+ee,index:R.length+ee,serieId:K.id,serieColor:K.color,x:Z.position.x,y:Z.position.y};return pe.color=F(K),pe.borderColor=I(pe),pe.data=Cn({},Z.data,{xFormatted:L(Z.data.x),yFormatted:H(Z.data.y)}),pe}))},[])},[re,F,I,L,H])}({series:ne,getPointColor:C,getPointBorderColor:O,formatX:j,formatY:M}),J=yX({componentId:T,enableSlices:b,points:X,width:c,height:l});return{legendData:G,toggleSerie:te,lineGenerator:gX({curve:h}),areaGenerator:vX({curve:h,yScale:q,areaBaselineValue:p}),getColor:k,series:ne,xScale:N,yScale:q,slices:J,points:X}},xX=function(e){var t=e.areaBlendMode,n=e.areaOpacity,r=e.color,i=e.fill,a=e.path,o=kn(),s=o.animate,c=o.config,l=jg(a),u=Sr({color:r,config:c,immediate:!s});return y.jsx(Ct.path,{d:l,fill:i||u.color,fillOpacity:n,strokeWidth:0,style:{mixBlendMode:t}})},_X=m.memo(function(e){var t=e.areaGenerator,n=e.areaOpacity,r=e.areaBlendMode,i=e.lines.slice(0).reverse();return y.jsx("g",{children:i.map(function(a){return y.jsx(xX,Cn({path:t(a.data.map(function(o){return o.position}))},Cn({areaOpacity:n,areaBlendMode:r},a)),a.id)})})}),wX=m.memo(function(e){var t=e.lineGenerator,n=e.points,r=e.color,i=e.thickness,a=m.useMemo(function(){return t(n)},[t,n]),o=jg(a);return y.jsx(Ct.path,{d:o,fill:"none",strokeWidth:i,stroke:r})}),CX=m.memo(function(e){var t=e.lines,n=e.lineGenerator,r=e.lineWidth;return t.slice(0).reverse().map(function(i){var a=i.id,o=i.data,s=i.color;return y.jsx(wX,{id:a,points:o.map(function(c){return c.position}),lineGenerator:n,color:s,thickness:r},a)})}),TX=m.memo(function(e){var t=e.slice,n=e.slices,r=e.axis,i=e.debug,a=e.tooltip,o=e.isCurrent,s=e.setCurrent,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,g=e.onTouchEnd,p=la(),v=p.showTooltipFromEvent,w=p.hideTooltip,_=m.useCallback(function(k){v(m.createElement(a,{slice:t,axis:r}),k,"right"),s(t),c&&c(t,k)},[v,a,t,r,s,c]),x=m.useCallback(function(k){v(m.createElement(a,{slice:t,axis:r}),k,"right"),l&&l(t,k)},[v,a,t,r,l]),S=m.useCallback(function(k){w(),s(null),u&&u(t,k)},[w,s,u,t]),b=m.useCallback(function(k){d&&d(t,k)},[t,d]),T=m.useCallback(function(k){v(m.createElement(a,{slice:t,axis:r}),k,"right"),s(t),f&&f(t,k)},[r,f,s,v,t,a]),j=m.useCallback(function(k){var E=k.touches[0],C=document.elementFromPoint(E.clientX,E.clientY),O=C==null?void 0:C.getAttribute("data-ref");if(O){var $=n.find(function(A){return A.id===O});$&&(v(m.createElement(a,{slice:$,axis:r}),k,"right"),s($))}h&&h(t,k)},[r,h,s,v,t,n,a]),M=m.useCallback(function(k){w(),s(null),g&&g(t,k)},[w,s,g,t]);return y.jsx("rect",{x:t.x0,y:t.y0,width:t.width,height:t.height,stroke:"red",strokeWidth:i?1:0,strokeOpacity:.75,fill:"red",fillOpacity:o&&i?.35:0,onMouseEnter:_,onMouseMove:x,onMouseLeave:S,onClick:b,onTouchStart:T,onTouchMove:j,onTouchEnd:M,"data-ref":t.id})}),SX=m.memo(function(e){var t=e.slices,n=e.axis,r=e.debug,i=e.height,a=e.tooltip,o=e.current,s=e.setCurrent,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,g=e.onTouchEnd;return t.map(function(p){return y.jsx(TX,{slice:p,slices:t,axis:n,debug:r,height:i,tooltip:a,setCurrent:s,isCurrent:o!==null&&o.id===p.id,onMouseEnter:c,onMouseMove:l,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:h,onTouchEnd:g},p.id)})}),kX=m.memo(function(e){var t=e.points,n=e.symbol,r=e.size,i=e.borderWidth,a=e.enableLabel,o=e.label,s=e.labelYOffset,c=Tt(),l=nY(o),u=t.slice(0).reverse().map(function(d){return{id:d.id,x:d.x,y:d.y,datum:d.data,fill:d.color,stroke:d.borderColor,label:a?l(d):null}});return y.jsx("g",{children:u.map(function(d){return y.jsx(Jq,{x:d.x,y:d.y,datum:d.datum,symbol:n,size:r,color:d.fill,borderWidth:i,borderColor:d.stroke,label:d.label,labelYOffset:s,theme:c},d.id)})})}),EX=m.memo(function(e){var t=e.points,n=e.width,r=e.height,i=e.margin,a=e.setCurrent,o=e.onMouseEnter,s=e.onMouseMove,c=e.onMouseLeave,l=e.onClick,u=e.onTouchStart,d=e.onTouchMove,f=e.onTouchEnd,h=e.tooltip,g=e.debug,p=e.enableTouchCrosshair,v=la(),w=v.showTooltipAt,_=v.hideTooltip,x=m.useCallback(function(E,C){w(m.createElement(h,{point:E}),[E.x+i.left,E.y+i.top],"top"),o&&o(E,C)},[w,h,o,i]),S=m.useCallback(function(E,C){w(m.createElement(h,{point:E}),[E.x+i.left,E.y+i.top],"top"),s&&s(E,C)},[w,h,i.left,i.top,s]),b=m.useCallback(function(E,C){_(),c&&c(E,C)},[_,c]),T=m.useCallback(function(E,C){l&&l(E,C)},[l]),j=m.useCallback(function(E,C){w(m.createElement(h,{point:E}),[E.x+i.left,E.y+i.top],"top"),u&&u(E,C)},[i.left,i.top,u,w,h]),M=m.useCallback(function(E,C){w(m.createElement(h,{point:E}),[E.x+i.left,E.y+i.top],"top"),d&&d(E,C)},[i.left,i.top,d,w,h]),k=m.useCallback(function(E,C){_(),f&&f(E,C)},[f,_]);return y.jsx(hX,{nodes:t,width:n,height:r,setCurrent:a,onMouseEnter:x,onMouseMove:S,onMouseLeave:b,onClick:T,onTouchStart:j,onTouchMove:M,onTouchEnd:k,enableTouchCrosshair:p,debug:g})}),OX=M3(function(e){var t=e.data,n=e.xScale,r=n===void 0?{type:"point"}:n,i=e.xFormat,a=e.yScale,o=a===void 0?{type:"linear",min:0,max:"auto"}:a,s=e.yFormat,c=e.layers,l=c===void 0?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:c,u=e.curve,d=u===void 0?"linear":u,f=e.areaBaselineValue,h=f===void 0?0:f,g=e.colors,p=g===void 0?{scheme:"nivo"}:g,v=e.margin,w=e.width,_=e.height,x=e.axisTop,S=e.axisRight,b=e.axisBottom,T=b===void 0?{}:b,j=e.axisLeft,M=j===void 0?{}:j,k=e.enableGridX,E=k===void 0||k,C=e.enableGridY,O=C===void 0||C,$=e.gridXValues,A=e.gridYValues,P=e.lineWidth,D=P===void 0?2:P,N=e.enableArea,q=N!==void 0&&N,z=e.areaOpacity,U=z===void 0?.2:z,G=e.areaBlendMode,ne=G===void 0?"normal":G,te=e.enablePoints,X=te===void 0||te,J=e.pointSymbol,Q=e.pointSize,re=Q===void 0?6:Q,F=e.pointColor,I=F===void 0?{from:"color"}:F,L=e.pointBorderWidth,H=L===void 0?0:L,R=e.pointBorderColor,K=R===void 0?{theme:"background"}:R,Z=e.enablePointLabel,ee=Z!==void 0&&Z,pe=e.pointLabel,we=pe===void 0?"data.yFormatted":pe,ve=e.pointLabelYOffset,Le=e.defs,Re=Le===void 0?[]:Le,Ve=e.fill,ze=Ve===void 0?[]:Ve,ut=e.markers,at=e.legends,de=at===void 0?[]:at,me=e.isInteractive,ke=me===void 0||me,tt=e.useMesh,Et=tt!==void 0&&tt,qe=e.debugMesh,ot=qe!==void 0&&qe,pt=e.onMouseEnter,It=e.onMouseMove,st=e.onMouseLeave,dt=e.onClick,mt=e.onTouchStart,Wt=e.onTouchMove,De=e.onTouchEnd,Ae=e.tooltip,Ye=Ae===void 0?zg:Ae,ct=e.enableSlices,gt=ct!==void 0&&ct,St=e.debugSlices,Vt=St!==void 0&&St,Rt=e.sliceTooltip,Dt=Rt===void 0?oC:Rt,qt=e.enableCrosshair,vt=qt===void 0||qt,Yt=e.crosshairType,rn=Yt===void 0?"bottom-left":Yt,Jt=e.enableTouchCrosshair,ye=Jt!==void 0&&Jt,Ee=e.role,je=Ee===void 0?"img":Ee,Ge=pc(w,_,v),Ue=Ge.margin,ft=Ge.innerWidth,W=Ge.innerHeight,ce=Ge.outerWidth,ae=Ge.outerHeight,se=cC({data:t,xScale:r,xFormat:i,yScale:o,yFormat:s,width:ft,height:W,colors:p,curve:d,areaBaselineValue:h,pointColor:I,pointBorderColor:K,enableSlices:gt}),be=se.legendData,Oe=se.toggleSerie,xe=se.lineGenerator,Se=se.areaGenerator,Ne=se.series,Pe=se.xScale,Xe=se.yScale,zt=se.slices,Ot=se.points,Xt=Tt(),ge=wr(I,Xt),ln=wr(K,Xt),Mt=m.useState(null),Jn=Mt[0],yc=Mt[1],er=m.useState(null),Ti=er[0],bc=er[1],Or={grid:y.jsx(tC,{theme:Xt,width:ft,height:W,xScale:E?Pe:null,yScale:O?Xe:null,xValues:$,yValues:A},"grid"),markers:y.jsx(O3,{markers:ut,width:ft,height:W,xScale:Pe,yScale:Xe,theme:Xt},"markers"),axes:y.jsx(eC,{xScale:Pe,yScale:Xe,width:ft,height:W,theme:Xt,top:x,right:S,bottom:T,left:M},"axes"),areas:null,lines:y.jsx(CX,{lines:Ne,lineGenerator:xe,lineWidth:D},"lines"),slices:null,points:null,crosshair:null,mesh:null,legends:de.map(function(Mr,To){return y.jsx(Fg,Cn({},Mr,{containerWidth:ft,containerHeight:W,data:Mr.data||be,theme:Xt,toggleSerie:Mr.toggleSerie?Oe:void 0}),"legend."+To)})},qd=Dg(Re,Ne,ze);return q&&(Or.areas=y.jsx(_X,{areaGenerator:Se,areaOpacity:U,areaBlendMode:ne,lines:Ne},"areas")),ke&>!==!1&&(Or.slices=y.jsx(SX,{slices:zt,axis:gt,debug:Vt,height:W,tooltip:Dt,current:Ti,setCurrent:bc,onMouseEnter:pt,onMouseMove:It,onMouseLeave:st,onClick:dt,onTouchStart:mt,onTouchMove:Wt,onTouchEnd:De},"slices")),X&&(Or.points=y.jsx(kX,{points:Ot,symbol:J,size:re,color:ge,borderWidth:H,borderColor:ln,enableLabel:ee,label:we,labelYOffset:ve},"points")),ke&&vt&&(Jn!==null&&(Or.crosshair=y.jsx(Vh,{width:ft,height:W,x:Jn.x,y:Jn.y,type:rn},"crosshair")),Ti!==null&&(Or.crosshair=y.jsx(Vh,{width:ft,height:W,x:Ti.x,y:Ti.y,type:gt},"crosshair"))),ke&&Et&>===!1&&(Or.mesh=y.jsx(EX,{points:Ot,width:ft,height:W,margin:Ue,current:Jn,setCurrent:yc,onMouseEnter:pt,onMouseMove:It,onMouseLeave:st,onClick:dt,onTouchStart:mt,onTouchMove:Wt,onTouchEnd:De,tooltip:Ye,enableTouchCrosshair:ye,debug:ot},"mesh")),y.jsx(Wd,{defs:qd,width:ce,height:ae,margin:Ue,role:je,children:l.map(function(Mr,To){return typeof Mr=="function"?y.jsx(m.Fragment,{children:Mr(Cn({},e,{innerWidth:ft,innerHeight:W,series:Ne,slices:zt,points:Ot,xScale:Pe,yScale:Xe,lineGenerator:xe,areaGenerator:Se,currentPoint:Jn,setCurrentPoint:yc,currentSlice:Ti,setCurrentSlice:bc}))},To):Or[Mr]})})}),MX=function(e){return y.jsx(wo,{children:function(t){var n=t.width,r=t.height;return y.jsx(OX,Cn({width:n,height:r},e))}})},$X=M3(function(e){var t=m.useRef(null),n=e.width,r=e.height,i=e.margin,a=e.pixelRatio,o=a===void 0?typeof window<"u"&&window.devicePixelRatio||1:a,s=e.data,c=e.xScale,l=c===void 0?{type:"point"}:c,u=e.xFormat,d=e.yScale,f=d===void 0?{type:"linear",min:0,max:"auto"}:d,h=e.yFormat,g=e.curve,p=g===void 0?"linear":g,v=e.layers,w=v===void 0?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:v,_=e.colors,x=_===void 0?{scheme:"nivo"}:_,S=e.lineWidth,b=S===void 0?2:S,T=e.enableArea,j=T!==void 0&&T,M=e.areaBaselineValue,k=M===void 0?0:M,E=e.areaOpacity,C=E===void 0?.2:E,O=e.enablePoints,$=O===void 0||O,A=e.pointSize,P=A===void 0?6:A,D=e.pointColor,N=D===void 0?{from:"color"}:D,q=e.pointBorderWidth,z=q===void 0?0:q,U=e.pointBorderColor,G=U===void 0?{theme:"background"}:U,ne=e.enableGridX,te=ne===void 0||ne,X=e.gridXValues,J=e.enableGridY,Q=J===void 0||J,re=e.gridYValues,F=e.axisTop,I=e.axisRight,L=e.axisBottom,H=L===void 0?{}:L,R=e.axisLeft,K=R===void 0?{}:R,Z=e.legends,ee=Z===void 0?[]:Z,pe=e.isInteractive,we=pe===void 0||pe,ve=e.debugMesh,Le=ve!==void 0&&ve,Re=e.onMouseLeave,Ve=e.onClick,ze=e.tooltip,ut=ze===void 0?zg:ze,at=e.canvasRef,de=pc(n,r,i),me=de.margin,ke=de.innerWidth,tt=de.innerHeight,Et=de.outerWidth,qe=de.outerHeight,ot=Tt(),pt=m.useState(null),It=pt[0],st=pt[1],dt=cC({data:s,xScale:l,xFormat:u,yScale:f,yFormat:h,width:ke,height:tt,colors:x,curve:p,areaBaselineValue:k,pointColor:N,pointBorderColor:G}),mt=dt.lineGenerator,Wt=dt.areaGenerator,De=dt.series,Ae=dt.xScale,Ye=dt.yScale,ct=dt.points,gt=aC({points:ct,width:ke,height:tt,debug:Le}),St=gt.delaunay,Vt=gt.voronoi;m.useEffect(function(){at&&(at.current=t.current),t.current.width=Et*o,t.current.height=qe*o;var ye=t.current.getContext("2d");ye.scale(o,o),ye.fillStyle=ot.background,ye.fillRect(0,0,Et,qe),ye.translate(me.left,me.top),w.forEach(function(Ee){if(typeof Ee=="function"&&Ee({ctx:ye,innerWidth:ke,innerHeight:tt,series:De,points:ct,xScale:Ae,yScale:Ye,lineWidth:b,lineGenerator:mt,areaGenerator:Wt,currentPoint:It,setCurrentPoint:st}),Ee==="grid"&&ot.grid.line.strokeWidth>0&&(ye.lineWidth=ot.grid.line.strokeWidth,ye.strokeStyle=ot.grid.line.stroke,te&&tu(ye,{width:ke,height:tt,scale:Ae,axis:"x",values:X}),Q&&tu(ye,{width:ke,height:tt,scale:Ye,axis:"y",values:re})),Ee==="axes"&&nC(ye,{xScale:Ae,yScale:Ye,width:ke,height:tt,top:F,right:I,bottom:H,left:K,theme:ot}),Ee==="areas"&&j===!0){ye.save(),ye.globalAlpha=C,Wt.context(ye);for(var je=De.length-1;je>=0;je--)ye.fillStyle=De[je].color,ye.beginPath(),Wt(De[je].data.map(function(Ue){return Ue.position})),ye.fill();ye.restore()}if(Ee==="lines"&&(mt.context(ye),De.forEach(function(Ue){ye.strokeStyle=Ue.color,ye.lineWidth=b,ye.beginPath(),mt(Ue.data.map(function(ft){return ft.position})),ye.stroke()})),Ee==="points"&&$===!0&&P>0&&ct.forEach(function(Ue){ye.fillStyle=Ue.color,ye.beginPath(),ye.arc(Ue.x,Ue.y,P/2,0,2*Math.PI),ye.fill(),z>0&&(ye.strokeStyle=Ue.borderColor,ye.lineWidth=z,ye.stroke())}),Ee==="mesh"&&Le===!0&&(pX(ye,Vt),It&&mX(ye,Vt,It.index)),Ee==="legends"){var Ge=De.map(function(Ue){return{id:Ue.id,label:Ue.id,color:Ue.color}}).reverse();ee.forEach(function(Ue){B3(ye,Cn({},Ue,{data:Ue.data||Ge,containerWidth:ke,containerHeight:tt,theme:ot}))})}})},[t,Et,qe,w,ot,mt,De,Ae,Ye,te,X,Q,re,F,I,H,K,ee,ct,$,P,It]);var Rt=m.useCallback(function(ye){var Ee=os(t.current,ye),je=Ee[0],Ge=Ee[1];if(!A3(me.left,me.top,ke,tt,je,Ge))return null;var Ue=St.find(je-me.left,Ge-me.top);return ct[Ue]},[t,me,ke,tt,St]),Dt=la(),qt=Dt.showTooltipFromEvent,vt=Dt.hideTooltip,Yt=m.useCallback(function(ye){var Ee=Rt(ye);st(Ee),Ee?qt(m.createElement(ut,{point:Ee}),ye):vt()},[Rt,st,qt,vt,ut]),rn=m.useCallback(function(ye){vt(),st(null),It&&Re&&Re(It,ye)},[vt,st,Re]),Jt=m.useCallback(function(ye){if(Ve){var Ee=Rt(ye);Ee&&Ve(Ee,ye)}},[Rt,Ve]);return y.jsx("canvas",{ref:t,width:Et*o,height:qe*o,style:{width:Et,height:qe,cursor:we?"auto":"normal"},onMouseEnter:we?Yt:void 0,onMouseMove:we?Yt:void 0,onMouseLeave:we?rn:void 0,onClick:we?Jt:void 0})}),AX=m.forwardRef(function(e,t){return y.jsx($X,Cn({},e,{canvasRef:t}))});m.forwardRef(function(e,t){return y.jsx(wo,{children:function(n){var r=n.width,i=n.height;return y.jsx(AX,Cn({width:r,height:i},e,{ref:t}))}})});var RX=V3;function jX(e,t){var n=[];return RX(e,function(r,i,a){t(r,i,a)&&n.push(r)}),n}var PX=jX,IX=o3,DX=PX,NX=Bg,LX=Pn;function FX(e,t){var n=LX(e)?IX:DX;return n(e,NX(t))}var BX=FX;const UX=Ht(BX);var WX=Gr,zX=Qn,HX="[object Number]";function VX(e){return typeof e=="number"||zX(e)&&WX(e)==HX}var qX=VX;const Vy=Ht(qX);function YX(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var GX=YX,ZX=vo,KX=hc;function XX(e,t){return e&&ZX(t,KX(t),e)}var QX=XX,JX=vo,eQ=uc;function tQ(e,t){return e&&JX(t,eQ(t),e)}var nQ=tQ,rQ=vo,iQ=Ag;function aQ(e,t){return rQ(e,iQ(e),t)}var oQ=aQ,sQ=Mg,cQ=Um,lQ=Ag,uQ=s3,dQ=Object.getOwnPropertySymbols,fQ=dQ?function(e){for(var t=[];e;)sQ(t,lQ(e)),e=cQ(e);return t}:uQ,lC=fQ,hQ=vo,pQ=lC;function mQ(e,t){return hQ(e,pQ(e),t)}var gQ=mQ,vQ=a3,yQ=lC,bQ=uc;function xQ(e){return vQ(e,bQ,yQ)}var uC=xQ,_Q=Object.prototype,wQ=_Q.hasOwnProperty;function CQ(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&wQ.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var TQ=CQ,SQ=Bm;function kQ(e,t){var n=t?SQ(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var EQ=kQ,OQ=/\w*$/;function MQ(e){var t=new e.constructor(e.source,OQ.exec(e));return t.lastIndex=e.lastIndex,t}var $Q=MQ,qy=uo,Yy=qy?qy.prototype:void 0,Gy=Yy?Yy.valueOf:void 0;function AQ(e){return Gy?Object(Gy.call(e)):{}}var RQ=AQ,jQ=Bm,PQ=EQ,IQ=$Q,DQ=RQ,NQ=Cw,LQ="[object Boolean]",FQ="[object Date]",BQ="[object Map]",UQ="[object Number]",WQ="[object RegExp]",zQ="[object Set]",HQ="[object String]",VQ="[object Symbol]",qQ="[object ArrayBuffer]",YQ="[object DataView]",GQ="[object Float32Array]",ZQ="[object Float64Array]",KQ="[object Int8Array]",XQ="[object Int16Array]",QQ="[object Int32Array]",JQ="[object Uint8Array]",eJ="[object Uint8ClampedArray]",tJ="[object Uint16Array]",nJ="[object Uint32Array]";function rJ(e,t,n){var r=e.constructor;switch(t){case qQ:return jQ(e);case LQ:case FQ:return new r(+e);case YQ:return PQ(e,n);case GQ:case ZQ:case KQ:case XQ:case QQ:case JQ:case eJ:case tJ:case nJ:return NQ(e,n);case BQ:return new r;case UQ:case HQ:return new r(e);case WQ:return IQ(e);case zQ:return new r;case VQ:return DQ(e)}}var iJ=rJ,aJ=Fd,oJ=Qn,sJ="[object Map]";function cJ(e){return oJ(e)&&aJ(e)==sJ}var lJ=cJ,uJ=lJ,dJ=go,Zy=Ku,Ky=Zy&&Zy.isMap,fJ=Ky?dJ(Ky):uJ,hJ=fJ,pJ=Fd,mJ=Qn,gJ="[object Set]";function vJ(e){return mJ(e)&&pJ(e)==gJ}var yJ=vJ,bJ=yJ,xJ=go,Xy=Ku,Qy=Xy&&Xy.isSet,_J=Qy?xJ(Qy):bJ,wJ=_J,CJ=Yu,TJ=GX,SJ=Ym,kJ=QX,EJ=nQ,OJ=_w,MJ=Tw,$J=oQ,AJ=gQ,RJ=c3,jJ=uC,PJ=Fd,IJ=TQ,DJ=iJ,NJ=kw,LJ=Pn,FJ=Zu,BJ=hJ,UJ=Er,WJ=wJ,zJ=hc,HJ=uc,VJ=1,qJ=2,YJ=4,dC="[object Arguments]",GJ="[object Array]",ZJ="[object Boolean]",KJ="[object Date]",XJ="[object Error]",fC="[object Function]",QJ="[object GeneratorFunction]",JJ="[object Map]",eee="[object Number]",hC="[object Object]",tee="[object RegExp]",nee="[object Set]",ree="[object String]",iee="[object Symbol]",aee="[object WeakMap]",oee="[object ArrayBuffer]",see="[object DataView]",cee="[object Float32Array]",lee="[object Float64Array]",uee="[object Int8Array]",dee="[object Int16Array]",fee="[object Int32Array]",hee="[object Uint8Array]",pee="[object Uint8ClampedArray]",mee="[object Uint16Array]",gee="[object Uint32Array]",jt={};jt[dC]=jt[GJ]=jt[oee]=jt[see]=jt[ZJ]=jt[KJ]=jt[cee]=jt[lee]=jt[uee]=jt[dee]=jt[fee]=jt[JJ]=jt[eee]=jt[hC]=jt[tee]=jt[nee]=jt[ree]=jt[iee]=jt[hee]=jt[pee]=jt[mee]=jt[gee]=!0;jt[XJ]=jt[fC]=jt[aee]=!1;function sl(e,t,n,r,i,a){var o,s=t&VJ,c=t&qJ,l=t&YJ;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!UJ(e))return e;var u=LJ(e);if(u){if(o=IJ(e),!s)return MJ(e,o)}else{var d=PJ(e),f=d==fC||d==QJ;if(FJ(e))return OJ(e,s);if(d==hC||d==dC||f&&!i){if(o=c||f?{}:NJ(e),!s)return c?AJ(e,EJ(o,e)):$J(e,kJ(o,e))}else{if(!jt[d])return i?e:{};o=DJ(e,d,s)}}a||(a=new CJ);var h=a.get(e);if(h)return h;a.set(e,o),WJ(e)?e.forEach(function(v){o.add(sl(v,t,n,v,e,a))}):BJ(e)&&e.forEach(function(v,w){o.set(w,sl(v,t,n,w,e,a))});var g=l?c?jJ:RJ:c?HJ:zJ,p=u?void 0:g(e);return TJ(p||e,function(v,w){p&&(w=v,v=e[w]),SJ(o,w,sl(v,t,n,w,e,a))}),o}var vee=sl;function yee(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var bee=yee,xee=dc,_ee=bee;function wee(e,t){return t.length<2?e:xee(e,_ee(t,0,-1))}var Cee=wee,Tee=yo,See=Yw,kee=Cee,Eee=bo;function Oee(e,t){return t=Tee(t,e),e=kee(e,t),e==null||delete e[Eee(See(t))]}var Mee=Oee,$ee=Hm;function Aee(e){return $ee(e)?void 0:e}var Ree=Aee,jee=ed,Pee=vee,Iee=Mee,Dee=yo,Nee=vo,Lee=Ree,Fee=r3,Bee=uC,Uee=1,Wee=2,zee=4,Hee=Fee(function(e,t){var n={};if(e==null)return n;var r=!1;t=jee(t,function(a){return a=Dee(a,e),r||(r=a.length>1),a}),Nee(e,Bee(e),n),r&&(n=Pee(n,Uee|Wee|zee,Lee));for(var i=t.length;i--;)Iee(n,t[i]);return n}),Vee=Hee;const pC=Ht(Vee);function Cr(){return Cr=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},Cr.apply(this,arguments)}var mp={dotSize:4,noteWidth:120,noteTextOffset:8,animate:!0},qee=function(e){var t=typeof e;return m.isValidElement(e)||t==="string"||t==="function"||t==="object"},Yee=function(e){var t=typeof e;return t==="string"||t==="function"},qs=function(e){return e.type==="circle"},gp=function(e){return e.type==="dot"},Ys=function(e){return e.type==="rect"},Gee=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return n.reduce(function(a,o){var s=o.offset||0;return[].concat(a,UX(t,o.match).map(function(c){var l=r(c),u=i(c);return(qs(o)||Ys(o))&&(u.size=u.size+2*s,u.width=u.width+2*s,u.height=u.height+2*s),Cr({},pC(o,["match","offset"]),l,u,{size:o.size||u.size,datum:c})}))},[])},Zee=function(e,t,n,r){var i=Math.atan2(r-t,n-e);return Gq(Ud(i))},mC=function(e){var t,n,r=e.x,i=e.y,a=e.noteX,o=e.noteY,s=e.noteWidth,c=s===void 0?mp.noteWidth:s,l=e.noteTextOffset,u=l===void 0?mp.noteTextOffset:l;if(Vy(a))t=r+a;else{if(a.abs===void 0)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=a.abs}if(Vy(o))n=i+o;else{if(o.abs===void 0)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=o.abs}var d=r,f=i,h=Zee(r,i,t,n);if(qs(e)){var g=Yi(Yn(h),e.size/2);d+=g.x,f+=g.y}if(Ys(e)){var p=Math.round((h+90)/45)%8;p===0&&(f-=e.height/2),p===1&&(d+=e.width/2,f-=e.height/2),p===2&&(d+=e.width/2),p===3&&(d+=e.width/2,f+=e.height/2),p===4&&(f+=e.height/2),p===5&&(d-=e.width/2,f+=e.height/2),p===6&&(d-=e.width/2),p===7&&(d-=e.width/2,f-=e.height/2)}var v=t,w=t;return(h+90)%360>180?(v-=c,w-=c):w+=c,{points:[[d,f],[t,n],[w,n]],text:[v,n-u],angle:h+90}},gC=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return m.useMemo(function(){return Gee({data:t,annotations:n,getPosition:r,getDimensions:i})},[t,n,r,i])},Kee=function(e){var t=e.annotations;return m.useMemo(function(){return t.map(function(n){return Cr({},n,{computed:mC(Cr({},n))})})},[t])},Xee=function(e){return m.useMemo(function(){return mC(e)},[e])},Qee=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,a=Tt(),o=kn(),s=o.animate,c=o.config,l=Sr({x:n,y:r,config:c,immediate:!s});return typeof i=="function"?m.createElement(i,{x:n,y:r,datum:t}):y.jsxs(y.Fragment,{children:[a.annotations.text.outlineWidth>0&&y.jsx(Ct.text,{x:l.x,y:l.y,style:Cr({},a.annotations.text,{strokeLinejoin:"round",strokeWidth:2*a.annotations.text.outlineWidth,stroke:a.annotations.text.outlineColor}),children:i}),y.jsx(Ct.text,{x:l.x,y:l.y,style:pC(a.annotations.text,["outlineWidth","outlineColor"]),children:i})]})},Jy=function(e){var t=e.points,n=e.isOutline,r=n!==void 0&&n,i=Tt(),a=m.useMemo(function(){var c=t[0];return t.slice(1).reduce(function(l,u){return l+" L"+u[0]+","+u[1]},"M"+c[0]+","+c[1])},[t]),o=jg(a);if(r&&i.annotations.link.outlineWidth<=0)return null;var s=Cr({},i.annotations.link);return r&&(s.strokeLinecap="square",s.strokeWidth=i.annotations.link.strokeWidth+2*i.annotations.link.outlineWidth,s.stroke=i.annotations.link.outlineColor,s.opacity=i.annotations.link.outlineOpacity),y.jsx(Ct.path,{fill:"none",d:o,style:s})},Jee=function(e){var t=e.x,n=e.y,r=e.size,i=Tt(),a=kn(),o=a.animate,s=a.config,c=Sr({x:t,y:n,radius:r/2,config:s,immediate:!o});return y.jsxs(y.Fragment,{children:[i.annotations.outline.outlineWidth>0&&y.jsx(Ct.circle,{cx:c.x,cy:c.y,r:c.radius,style:Cr({},i.annotations.outline,{fill:"none",strokeWidth:i.annotations.outline.strokeWidth+2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),y.jsx(Ct.circle,{cx:c.x,cy:c.y,r:c.radius,style:i.annotations.outline})]})},ete=function(e){var t=e.x,n=e.y,r=e.size,i=r===void 0?mp.dotSize:r,a=Tt(),o=kn(),s=o.animate,c=o.config,l=Sr({x:t,y:n,radius:i/2,config:c,immediate:!s});return y.jsxs(y.Fragment,{children:[a.annotations.outline.outlineWidth>0&&y.jsx(Ct.circle,{cx:l.x,cy:l.y,r:l.radius,style:Cr({},a.annotations.outline,{fill:"none",strokeWidth:2*a.annotations.outline.outlineWidth,stroke:a.annotations.outline.outlineColor,opacity:a.annotations.outline.outlineOpacity})}),y.jsx(Ct.circle,{cx:l.x,cy:l.y,r:l.radius,style:a.annotations.symbol})]})},tte=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.borderRadius,o=a===void 0?6:a,s=Tt(),c=kn(),l=c.animate,u=c.config,d=Sr({x:t-r/2,y:n-i/2,width:r,height:i,config:u,immediate:!l});return y.jsxs(y.Fragment,{children:[s.annotations.outline.outlineWidth>0&&y.jsx(Ct.rect,{x:d.x,y:d.y,rx:o,ry:o,width:d.width,height:d.height,style:Cr({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),y.jsx(Ct.rect,{x:d.x,y:d.y,rx:o,ry:o,width:d.width,height:d.height,style:s.annotations.outline})]})},nte=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,a=Xee(e);if(!qee(i))throw new Error("note should be a valid react element");return y.jsxs(y.Fragment,{children:[y.jsx(Jy,{points:a.points,isOutline:!0}),qs(e)&&y.jsx(Jee,{x:n,y:r,size:e.size}),gp(e)&&y.jsx(ete,{x:n,y:r,size:e.size}),Ys(e)&&y.jsx(tte,{x:n,y:r,width:e.width,height:e.height,borderRadius:e.borderRadius}),y.jsx(Jy,{points:a.points}),y.jsx(Qee,{datum:t,x:a.text[0],y:a.text[1],note:i})]})},eb=function(e,t){t.forEach(function(n,r){var i=n[0],a=n[1];r===0?e.moveTo(i,a):e.lineTo(i,a)})},rte=function(e,t){var n=t.annotations,r=t.theme;n.length!==0&&(e.save(),n.forEach(function(i){if(!Yee(i.note))throw new Error("note is invalid for canvas implementation");r.annotations.link.outlineWidth>0&&(e.lineCap="square",e.strokeStyle=r.annotations.link.outlineColor,e.lineWidth=r.annotations.link.strokeWidth+2*r.annotations.link.outlineWidth,e.beginPath(),eb(e,i.computed.points),e.stroke(),e.lineCap="butt"),qs(i)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),gp(i)&&r.annotations.symbol.outlineWidth>0&&(e.strokeStyle=r.annotations.symbol.outlineColor,e.lineWidth=2*r.annotations.symbol.outlineWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),Ys(i)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.rect(i.x-i.width/2,i.y-i.height/2,i.width,i.height),e.stroke()),e.strokeStyle=r.annotations.link.stroke,e.lineWidth=r.annotations.link.strokeWidth,e.beginPath(),eb(e,i.computed.points),e.stroke(),qs(i)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),gp(i)&&(e.fillStyle=r.annotations.symbol.fill,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.fill()),Ys(i)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.rect(i.x-i.width/2,i.y-i.height/2,i.width,i.height),e.stroke()),typeof i.note=="function"?i.note(e,{datum:i.datum,x:i.computed.text[0],y:i.computed.text[1],theme:r}):(e.font=r.annotations.text.fontSize+"px "+r.annotations.text.fontFamily,e.textAlign="left",e.textBaseline="alphabetic",e.fillStyle=r.annotations.text.fill,e.strokeStyle=r.annotations.text.outlineColor,e.lineWidth=2*r.annotations.text.outlineWidth,r.annotations.text.outlineWidth>0&&(e.lineJoin="round",e.strokeText(i.note,i.computed.text[0],i.computed.text[1]),e.lineJoin="miter"),e.fillText(i.note,i.computed.text[0],i.computed.text[1]))}),e.restore())};function kt(){return kt=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},kt.apply(this,arguments)}function Co(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var tb,ite=function(e){var t=e.bars,n=e.annotations,r=gC({data:t,annotations:n,getPosition:function(i){return{x:i.x+i.width/2,y:i.y+i.height/2}},getDimensions:function(i){var a=i.height,o=i.width;return{width:o,height:a,size:Math.max(o,a)}}});return y.jsx(y.Fragment,{children:r.map(function(i,a){return y.jsx(nte,kt({},i),a)})})},ate=function(e){var t=e.width,n=e.height,r=e.legends,i=e.toggleSerie;return y.jsx(y.Fragment,{children:r.map(function(a,o){var s,c=a[0],l=a[1];return y.jsx(Fg,kt({},c,{containerWidth:t,containerHeight:n,data:(s=c.data)!=null?s:l,toggleSerie:c.toggleSerie&&c.dataFrom==="keys"?i:void 0}),o)})})},ote=["data"],ste=function(e){var t,n=e.bar,r=n.data,i=Co(n,ote),a=e.style,o=a.borderColor,s=a.color,c=a.height,l=a.labelColor,u=a.labelOpacity,d=a.labelX,f=a.labelY,h=a.transform,g=a.width,p=e.borderRadius,v=e.borderWidth,w=e.label,_=e.shouldRenderLabel,x=e.isInteractive,S=e.onClick,b=e.onMouseEnter,T=e.onMouseLeave,j=e.tooltip,M=e.isFocusable,k=e.ariaLabel,E=e.ariaLabelledBy,C=e.ariaDescribedBy,O=Tt(),$=la(),A=$.showTooltipFromEvent,P=$.showTooltipAt,D=$.hideTooltip,N=m.useMemo(function(){return function(){return m.createElement(j,kt({},i,r))}},[j,i,r]),q=m.useCallback(function(X){S==null||S(kt({color:i.color},r),X)},[i,r,S]),z=m.useCallback(function(X){return A(N(),X)},[A,N]),U=m.useCallback(function(X){b==null||b(r,X),A(N(),X)},[r,b,A,N]),G=m.useCallback(function(X){T==null||T(r,X),D()},[r,D,T]),ne=m.useCallback(function(){P(N(),[i.absX+i.width/2,i.absY])},[P,N,i]),te=m.useCallback(function(){D()},[D]);return y.jsxs(Ct.g,{transform:h,children:[y.jsx(Ct.rect,{width:vi(g,function(X){return Math.max(X,0)}),height:vi(c,function(X){return Math.max(X,0)}),rx:p,ry:p,fill:(t=r.fill)!=null?t:s,strokeWidth:v,stroke:o,focusable:M,tabIndex:M?0:void 0,"aria-label":k?k(r):void 0,"aria-labelledby":E?E(r):void 0,"aria-describedby":C?C(r):void 0,onMouseEnter:x?U:void 0,onMouseMove:x?z:void 0,onMouseLeave:x?G:void 0,onClick:x?q:void 0,onFocus:x&&M?ne:void 0,onBlur:x&&M?te:void 0}),_&&y.jsx(Ct.text,{x:d,y:f,textAnchor:"middle",dominantBaseline:"central",fillOpacity:u,style:kt({},O.labels.text,{pointerEvents:"none",fill:l}),children:w})]})},cte=["color","label"],lte=function(e){var t=e.color,n=e.label,r=Co(e,cte);return y.jsx(Im,{id:n,value:r.formattedValue,enableChip:!0,color:t})},$t={indexBy:"id",keys:["value"],groupMode:"stacked",layout:"vertical",reverse:!1,minValue:"auto",maxValue:"auto",valueScale:{type:"linear"},indexScale:{type:"band",round:!0},padding:.1,innerPadding:0,axisBottom:{},axisLeft:{},enableGridX:!1,enableGridY:!0,enableLabel:!0,label:"formattedValue",labelSkipWidth:0,labelSkipHeight:0,labelTextColor:{from:"theme",theme:"labels.text.fill"},colorBy:"id",colors:{scheme:"nivo"},borderRadius:0,borderWidth:0,borderColor:{from:"color"},isInteractive:!0,tooltip:lte,tooltipLabel:function(e){return e.id+" - "+e.indexValue},legends:[],initialHiddenIds:[],annotations:[],markers:[],enableTotals:!1,totalsOffset:10},Lt=kt({},$t,{layers:["grid","axes","bars","totals","markers","legends","annotations"],barComponent:ste,defs:[],fill:[],animate:!0,motionConfig:"default",role:"img",isFocusable:!1}),dn=kt({},$t,{layers:["grid","axes","bars","totals","legends","annotations"],pixelRatio:typeof window<"u"&&(tb=window.devicePixelRatio)!=null?tb:1}),vC=function(e,t,n,r,i,a){return Vs(r,{all:e.map(t),min:0,max:0},i,a).padding(n)},yC=function(e,t){return e.map(function(n){return kt({},t.reduce(function(r,i){return r[i]=null,r},{}),n)})},zd=function(e){return Object.keys(e).reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},{})},Hd=function(e){return[e,Number(e)]},ute=["layout","minValue","maxValue","reverse","width","height","padding","innerPadding","valueScale","indexScale","hiddenIds"],Hg=function(e,t){return e>t},bC=function(e,t){return e<t},xC=function(e,t){return Array.from(" ".repeat(t-e),function(n,r){return e+r})},dte=function(e){return Hg(e,0)?0:e},fte=function(e,t,n,r){var i=e.data,a=e.formatValue,o=e.getColor,s=e.getIndex,c=e.getTooltipLabel,l=e.innerPadding,u=l===void 0?0:l,d=e.keys,f=e.xScale,h=e.yScale,g=e.margin,p=n?bC:Hg,v=i.map(zd),w=[];return d.forEach(function(_,x){return xC(0,f.domain().length).forEach(function(S){var b,T,j,M=Hd(i[S][_]),k=M[0],E=M[1],C=s(i[S]),O=((b=f(C))!=null?b:0)+t*x+u*x,$=p(T=E,0)?(j=h(T))!=null?j:0:r,A=function(D,N){var q;return p(D,0)?r-N:((q=h(D))!=null?q:0)-r}(E,$),P={id:_,value:k===null?k:E,formattedValue:a(E),hidden:!1,index:S,indexValue:C,data:v[S]};w.push({key:_+"."+P.indexValue,index:w.length,data:P,x:O,y:$,absX:g.left+O,absY:g.top+$,width:t,height:A,color:o(P),label:c(P)})})}),w},hte=function(e,t,n,r){var i=e.data,a=e.formatValue,o=e.getIndex,s=e.getColor,c=e.getTooltipLabel,l=e.keys,u=e.innerPadding,d=u===void 0?0:u,f=e.xScale,h=e.yScale,g=e.margin,p=n?bC:Hg,v=i.map(zd),w=[];return l.forEach(function(_,x){return xC(0,h.domain().length).forEach(function(S){var b,T,j,M=Hd(i[S][_]),k=M[0],E=M[1],C=o(i[S]),O=p(T=E,0)?r:(j=f(T))!=null?j:0,$=((b=h(C))!=null?b:0)+t*x+d*x,A=function(D,N){var q;return p(D,0)?((q=f(D))!=null?q:0)-r:r-N}(E,O),P={id:_,value:k===null?k:E,formattedValue:a(E),hidden:!1,index:S,indexValue:C,data:v[S]};w.push({key:_+"."+P.indexValue,index:w.length,data:P,x:O,y:$,absX:g.left+O,absY:g.top+$,width:A,height:t,color:s(P),label:c(P)})})}),w},pte=function(e){var t,n,r=e.layout,i=e.minValue,a=e.maxValue,o=e.reverse,s=e.width,c=e.height,l=e.padding,u=l===void 0?0:l,d=e.innerPadding,f=d===void 0?0:d,h=e.valueScale,g=e.indexScale,p=e.hiddenIds,v=p===void 0?[]:p,w=Co(e,ute),_=w.keys.filter(function(U){return!v.includes(U)}),x=yC(w.data,_),S=r==="vertical"?["y","x",s]:["x","y",c],b=S[0],T=S[1],j=S[2],M=vC(x,w.getIndex,u,g,j,T),k=kt({max:a,min:i,reverse:o},h),E=k.min==="auto"?dte:function(U){return U},C=x.reduce(function(U,G){return[].concat(U,_.map(function(ne){return G[ne]}))},[]).filter(Boolean),O=E(Math.min.apply(Math,C)),$=(n=Math.max.apply(Math,C),isFinite(n)?n:0),A=Vs(k,{all:C,min:O,max:$},b==="x"?s:c,b),P=r==="vertical"?[M,A]:[A,M],D=P[0],N=P[1],q=(M.bandwidth()-f*(_.length-1))/_.length,z=[kt({},w,{data:x,keys:_,innerPadding:f,xScale:D,yScale:N}),q,k.reverse,(t=A(0))!=null?t:0];return{xScale:D,yScale:N,bars:q>0?r==="vertical"?fte.apply(void 0,z):hte.apply(void 0,z):[]}},mte=["data","layout","minValue","maxValue","reverse","width","height","padding","valueScale","indexScale","hiddenIds"],gte=function e(t){var n;return t.some(Array.isArray)?e((n=[]).concat.apply(n,t)):t},vte=function(e,t,n){var r=e.formatValue,i=e.getColor,a=e.getIndex,o=e.getTooltipLabel,s=e.innerPadding,c=e.stackedData,l=e.xScale,u=e.yScale,d=e.margin,f=[];return c.forEach(function(h){return l.domain().forEach(function(g,p){var v,w,_=h[p],x=(v=l(a(_.data)))!=null?v:0,S=((w=function(E){return u(E[n?0:1])}(_))!=null?w:0)+.5*s,b=function(E,C){var O;return((O=u(E[n?1:0]))!=null?O:0)-C}(_,S)-s,T=Hd(_.data[h.key]),j=T[0],M=T[1],k={id:h.key,value:j===null?j:M,formattedValue:r(M),hidden:!1,index:p,indexValue:g,data:zd(_.data)};f.push({key:h.key+"."+g,index:f.length,data:k,x,y:S,absX:d.left+x,absY:d.top+S,width:t,height:b,color:i(k),label:o(k)})})}),f},yte=function(e,t,n){var r=e.formatValue,i=e.getColor,a=e.getIndex,o=e.getTooltipLabel,s=e.innerPadding,c=e.stackedData,l=e.xScale,u=e.yScale,d=e.margin,f=[];return c.forEach(function(h){return u.domain().forEach(function(g,p){var v,w,_=h[p],x=(v=u(a(_.data)))!=null?v:0,S=((w=function(E){return l(E[n?1:0])}(_))!=null?w:0)+.5*s,b=function(E,C){var O;return((O=l(E[n?0:1]))!=null?O:0)-C}(_,S)-s,T=Hd(_.data[h.key]),j=T[0],M=T[1],k={id:h.key,value:j===null?j:M,formattedValue:r(M),hidden:!1,index:p,indexValue:g,data:zd(_.data)};f.push({key:h.key+"."+g,index:f.length,data:k,x:S,y:x,absX:d.left+S,absY:d.top+x,width:b,height:t,color:i(k),label:o(k)})})}),f},bte=function(e){var t,n=e.data,r=e.layout,i=e.minValue,a=e.maxValue,o=e.reverse,s=e.width,c=e.height,l=e.padding,u=l===void 0?0:l,d=e.valueScale,f=e.indexScale,h=e.hiddenIds,g=h===void 0?[]:h,p=Co(e,mte),v=p.keys.filter(function(q){return!g.includes(q)}),w=rH().keys(v).offset(iH)(yC(n,v)),_=r==="vertical"?["y","x",s]:["x","y",c],x=_[0],S=_[1],b=_[2],T=vC(n,p.getIndex,u,f,b,S),j=kt({max:a,min:i,reverse:o},d),M=(t=gte(w),d.type==="log"?t.filter(function(q){return q!==0}):t),k=Math.min.apply(Math,M),E=Math.max.apply(Math,M),C=Vs(j,{all:M,min:k,max:E},x==="x"?s:c,x),O=r==="vertical"?[T,C]:[C,T],$=O[0],A=O[1],P=p.innerPadding>0?p.innerPadding:0,D=T.bandwidth(),N=[kt({},p,{innerPadding:P,stackedData:w,xScale:$,yScale:A}),D,j.reverse];return{xScale:$,yScale:A,bars:D>0?r==="vertical"?vte.apply(void 0,N):yte.apply(void 0,N):[]}},xte=function(e){var t=e.bars,n=e.direction,r=e.from,i=e.groupMode,a=e.layout,o=e.legendLabel,s=e.reverse,c=$3(o??(r==="indexes"?"indexValue":"id"));return r==="indexes"?function(l,u,d){var f=fp(l.map(function(h){var g,p;return{id:(g=h.data.indexValue)!=null?g:"",label:d(h.data),hidden:h.data.hidden,color:(p=h.color)!=null?p:"#000"}}),function(h){return h.id});return u==="horizontal"&&f.reverse(),f}(t,a,c):function(l,u,d,f,h,g){var p=fp(l.map(function(v){var w;return{id:v.data.id,label:g(v.data),hidden:v.data.hidden,color:(w=v.color)!=null?w:"#000"}}),function(v){return v.id});return(u==="vertical"&&f==="stacked"&&d==="column"&&h!==!0||u==="horizontal"&&f==="stacked"&&h===!0)&&p.reverse(),p}(t,a,n,i,s,c)},nb=function(e,t,n){var r=e.get(t)||0;e.set(t,r+n)},_te=function(e,t,n){var r=e.get(t)||0;e.set(t,r+(n>0?n:0))},wte=function(e,t,n){var r=e.get(t)||0;e.set(t,Math.max(r,Number(n)))},Cte=function(e,t){var n=e.get(t)||0;e.set(t,n+1)},_C=function(e){var t=e.indexBy,n=t===void 0?$t.indexBy:t,r=e.keys,i=r===void 0?$t.keys:r,a=e.label,o=a===void 0?$t.label:a,s=e.tooltipLabel,c=s===void 0?$t.tooltipLabel:s,l=e.valueFormat,u=e.colors,d=u===void 0?$t.colors:u,f=e.colorBy,h=f===void 0?$t.colorBy:f,g=e.borderColor,p=g===void 0?$t.borderColor:g,v=e.labelTextColor,w=v===void 0?$t.labelTextColor:v,_=e.groupMode,x=_===void 0?$t.groupMode:_,S=e.layout,b=S===void 0?$t.layout:S,T=e.reverse,j=T===void 0?$t.reverse:T,M=e.data,k=e.minValue,E=k===void 0?$t.minValue:k,C=e.maxValue,O=C===void 0?$t.maxValue:C,$=e.margin,A=e.width,P=e.height,D=e.padding,N=D===void 0?$t.padding:D,q=e.innerPadding,z=q===void 0?$t.innerPadding:q,U=e.valueScale,G=U===void 0?$t.valueScale:U,ne=e.indexScale,te=ne===void 0?$t.indexScale:ne,X=e.initialHiddenIds,J=X===void 0?$t.initialHiddenIds:X,Q=e.enableLabel,re=Q===void 0?$t.enableLabel:Q,F=e.labelSkipWidth,I=F===void 0?$t.labelSkipWidth:F,L=e.labelSkipHeight,H=L===void 0?$t.labelSkipHeight:L,R=e.legends,K=R===void 0?$t.legends:R,Z=e.legendLabel,ee=e.totalsOffset,pe=ee===void 0?$t.totalsOffset:ee,we=m.useState(J??[]),ve=we[0],Le=we[1],Re=m.useCallback(function(De){Le(function(Ae){return Ae.indexOf(De)>-1?Ae.filter(function(Ye){return Ye!==De}):[].concat(Ae,[De])})},[]),Ve=Gi(n),ze=Gi(o),ut=Gi(c),at=eo(l),de=Tt(),me=Ng(d,h),ke=wr(p,de),tt=wr(w,de),Et=(x==="grouped"?pte:bte)({layout:b,reverse:j,data:M,getIndex:Ve,keys:i,minValue:E,maxValue:O,width:A,height:P,getColor:me,padding:N,innerPadding:z,valueScale:G,indexScale:te,hiddenIds:ve,formatValue:at,getTooltipLabel:ut,margin:$}),qe=Et.bars,ot=Et.xScale,pt=Et.yScale,It=m.useMemo(function(){return qe.filter(function(De){return De.data.value!==null}).map(function(De,Ae){return kt({},De,{index:Ae})})},[qe]),st=m.useCallback(function(De){var Ae=De.width,Ye=De.height;return!!re&&!(I>0&&Ae<I)&&!(H>0&&Ye<H)},[re,I,H]),dt=m.useMemo(function(){return i.map(function(De){var Ae=qe.find(function(Ye){return Ye.data.id===De});return kt({},Ae,{data:kt({id:De},Ae==null?void 0:Ae.data,{hidden:ve.includes(De)})})})},[ve,i,qe]),mt=m.useMemo(function(){return K.map(function(De){return[De,xte({bars:De.dataFrom==="keys"?dt:qe,direction:De.direction,from:De.dataFrom,groupMode:x,layout:b,legendLabel:Z,reverse:j})]})},[K,dt,qe,x,b,Z,j]),Wt=m.useMemo(function(){return function(De,Ae,Ye,ct,gt,St,Vt){ct===void 0&&(ct=$t.layout),gt===void 0&&(gt=$t.groupMode);var Rt=[];if(De.length===0)return Rt;var Dt=new Map,qt=De[0].width,vt=De[0].height;if(gt==="stacked"){var Yt=new Map;De.forEach(function(ye){var Ee=ye.data,je=Ee.indexValue,Ge=Ee.value;nb(Dt,je,Number(Ge)),_te(Yt,je,Number(Ge))}),Yt.forEach(function(ye,Ee){var je,Ge,Ue,ft=Dt.get(Ee)||0;ct==="vertical"?(je=Ae(Ee),Ge=Ye(ye),Ue=Ye(ye/2)):(je=Ae(ye),Ge=Ye(Ee),Ue=Ae(ye/2)),je+=ct==="vertical"?qt/2:St,Ge+=ct==="vertical"?-St:vt/2,Rt.push({key:"total_"+Ee,x:je,y:Ge,value:ft,formattedValue:Vt(ft),animationOffset:Ue})})}else if(gt==="grouped"){var rn=new Map,Jt=new Map;De.forEach(function(ye){var Ee=ye.data,je=Ee.indexValue,Ge=Ee.value;nb(Dt,je,Number(Ge)),wte(rn,je,Number(Ge)),Cte(Jt,je)}),rn.forEach(function(ye,Ee){var je,Ge,Ue,ft=Dt.get(Ee)||0,W=Jt.get(Ee);ct==="vertical"?(je=Ae(Ee),Ge=Ye(ye),Ue=Ye(ye/2)):(je=Ae(ye),Ge=Ye(Ee),Ue=Ae(ye/2)),je+=ct==="vertical"?W*qt/2:St,Ge+=ct==="vertical"?-St:W*vt/2,Rt.push({key:"total_"+Ee,x:je,y:Ge,value:ft,formattedValue:Vt(ft),animationOffset:Ue})})}return Rt}(qe,ot,pt,b,x,pe,at)},[qe,ot,pt,b,x,pe,at]);return{bars:qe,barsWithValue:It,xScale:ot,yScale:pt,getIndex:Ve,getLabel:ze,getTooltipLabel:ut,formatValue:at,getColor:me,getBorderColor:ke,getLabelColor:tt,shouldRenderBarLabel:st,hiddenIds:ve,toggleSerie:Re,legendsWithData:mt,barTotals:Wt}},Tte=function(e){var t=e.data,n=e.springConfig,r=e.animate,i=e.layout,a=i===void 0?Lt.layout:i,o=Tt();return ca(t,{keys:function(s){return s.key},from:function(s){return{x:a==="vertical"?s.x:s.animationOffset,y:a==="vertical"?s.animationOffset:s.y,labelOpacity:0}},enter:function(s){return{x:s.x,y:s.y,labelOpacity:1}},update:function(s){return{x:s.x,y:s.y,labelOpacity:1}},leave:function(s){return{x:a==="vertical"?s.x:s.animationOffset,y:a==="vertical"?s.animationOffset:s.y,labelOpacity:0}},config:n,immediate:!r,initial:r?void 0:null})(function(s,c){return y.jsx(Ct.text,{x:s.x,y:s.y,fillOpacity:s.labelOpacity,style:kt({},o.labels.text,{pointerEvents:"none",fill:o.text.fill}),fontWeight:"bold",fontSize:o.labels.text.fontSize,fontFamily:o.labels.text.fontFamily,textAnchor:a==="vertical"?"middle":"start",alignmentBaseline:a==="vertical"?"alphabetic":"middle",children:c.formattedValue},c.key)})},Ste=["isInteractive","animate","motionConfig","theme","renderWrapper"],kte=function(e){var t=e.data,n=e.indexBy,r=e.keys,i=e.margin,a=e.width,o=e.height,s=e.groupMode,c=e.layout,l=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,h=e.indexScale,g=e.padding,p=e.innerPadding,v=e.axisTop,w=e.axisRight,_=e.axisBottom,x=_===void 0?Lt.axisBottom:_,S=e.axisLeft,b=S===void 0?Lt.axisLeft:S,T=e.enableGridX,j=T===void 0?Lt.enableGridX:T,M=e.enableGridY,k=M===void 0?Lt.enableGridY:M,E=e.gridXValues,C=e.gridYValues,O=e.layers,$=O===void 0?Lt.layers:O,A=e.barComponent,P=A===void 0?Lt.barComponent:A,D=e.enableLabel,N=D===void 0?Lt.enableLabel:D,q=e.label,z=e.labelSkipWidth,U=z===void 0?Lt.labelSkipWidth:z,G=e.labelSkipHeight,ne=G===void 0?Lt.labelSkipHeight:G,te=e.labelTextColor,X=e.markers,J=X===void 0?Lt.markers:X,Q=e.colorBy,re=e.colors,F=e.defs,I=F===void 0?Lt.defs:F,L=e.fill,H=L===void 0?Lt.fill:L,R=e.borderRadius,K=R===void 0?Lt.borderRadius:R,Z=e.borderWidth,ee=Z===void 0?Lt.borderWidth:Z,pe=e.borderColor,we=e.annotations,ve=we===void 0?Lt.annotations:we,Le=e.legendLabel,Re=e.tooltipLabel,Ve=e.valueFormat,ze=e.isInteractive,ut=ze===void 0?Lt.isInteractive:ze,at=e.tooltip,de=at===void 0?Lt.tooltip:at,me=e.onClick,ke=e.onMouseEnter,tt=e.onMouseLeave,Et=e.legends,qe=e.role,ot=qe===void 0?Lt.role:qe,pt=e.ariaLabel,It=e.ariaLabelledBy,st=e.ariaDescribedBy,dt=e.isFocusable,mt=dt===void 0?Lt.isFocusable:dt,Wt=e.barAriaLabel,De=e.barAriaLabelledBy,Ae=e.barAriaDescribedBy,Ye=e.initialHiddenIds,ct=e.enableTotals,gt=ct===void 0?Lt.enableTotals:ct,St=e.totalsOffset,Vt=St===void 0?Lt.totalsOffset:St,Rt=kn(),Dt=Rt.animate,qt=Rt.config,vt=pc(a,o,i),Yt=vt.outerWidth,rn=vt.outerHeight,Jt=vt.margin,ye=vt.innerWidth,Ee=vt.innerHeight,je=_C({indexBy:n,label:q,tooltipLabel:Re,valueFormat:Ve,colors:re,colorBy:Q,borderColor:pe,labelTextColor:te,groupMode:s,layout:c,reverse:l,data:t,keys:r,minValue:u,maxValue:d,margin:Jt,width:ye,height:Ee,padding:g,innerPadding:p,valueScale:f,indexScale:h,enableLabel:N,labelSkipWidth:U,labelSkipHeight:ne,legends:Et,legendLabel:Le,initialHiddenIds:Ye,totalsOffset:Vt}),Ge=je.bars,Ue=je.barsWithValue,ft=je.xScale,W=je.yScale,ce=je.getLabel,ae=je.getTooltipLabel,se=je.getBorderColor,be=je.getLabelColor,Oe=je.shouldRenderBarLabel,xe=je.toggleSerie,Se=je.legendsWithData,Ne=je.barTotals,Pe=ca(Ue,{keys:function(ge){return ge.key},from:function(ge){return kt({borderColor:se(ge),color:ge.color,height:0,labelColor:be(ge),labelOpacity:0,labelX:ge.width/2,labelY:ge.height/2,transform:"translate("+ge.x+", "+(ge.y+ge.height)+")",width:ge.width},c==="vertical"?{}:{height:ge.height,transform:"translate("+ge.x+", "+ge.y+")",width:0})},enter:function(ge){return{borderColor:se(ge),color:ge.color,height:ge.height,labelColor:be(ge),labelOpacity:1,labelX:ge.width/2,labelY:ge.height/2,transform:"translate("+ge.x+", "+ge.y+")",width:ge.width}},update:function(ge){return{borderColor:se(ge),color:ge.color,height:ge.height,labelColor:be(ge),labelOpacity:1,labelX:ge.width/2,labelY:ge.height/2,transform:"translate("+ge.x+", "+ge.y+")",width:ge.width}},leave:function(ge){return kt({borderColor:se(ge),color:ge.color,height:0,labelColor:be(ge),labelOpacity:0,labelX:ge.width/2,labelY:0,transform:"translate("+ge.x+", "+(ge.y+ge.height)+")",width:ge.width},c==="vertical"?{}:{labelX:0,labelY:ge.height/2,height:ge.height,transform:"translate("+ge.x+", "+ge.y+")",width:0})},config:qt,immediate:!Dt,initial:Dt?void 0:null}),Xe=m.useMemo(function(){return{borderRadius:K,borderWidth:ee,enableLabel:N,isInteractive:ut,labelSkipWidth:U,labelSkipHeight:ne,onClick:me,onMouseEnter:ke,onMouseLeave:tt,getTooltipLabel:ae,tooltip:de,isFocusable:mt,ariaLabel:Wt,ariaLabelledBy:De,ariaDescribedBy:Ae}},[K,ee,N,ae,ut,ne,U,me,ke,tt,de,mt,Wt,De,Ae]),zt=Dg(I,Ge,H,{dataKey:"data",targetKey:"data.fill"}),Ot={annotations:null,axes:null,bars:null,grid:null,legends:null,markers:null,totals:null};$.includes("annotations")&&(Ot.annotations=y.jsx(ite,{bars:Ge,annotations:ve},"annotations")),$.includes("axes")&&(Ot.axes=y.jsx(eC,{xScale:ft,yScale:W,width:ye,height:Ee,top:v,right:w,bottom:x,left:b},"axes")),$.includes("bars")&&(Ot.bars=y.jsx(m.Fragment,{children:Pe(function(ge,ln){return m.createElement(P,kt({},Xe,{bar:ln,style:ge,shouldRenderLabel:Oe(ln),label:ce(ln.data)}))})},"bars")),$.includes("grid")&&(Ot.grid=y.jsx(tC,{width:ye,height:Ee,xScale:j?ft:null,yScale:k?W:null,xValues:E,yValues:C},"grid")),$.includes("legends")&&(Ot.legends=y.jsx(ate,{width:ye,height:Ee,legends:Se,toggleSerie:xe},"legends")),$.includes("markers")&&(Ot.markers=y.jsx(O3,{markers:J,width:ye,height:Ee,xScale:ft,yScale:W},"markers")),$.includes("totals")&>&&(Ot.totals=y.jsx(Tte,{data:Ne,springConfig:qt,animate:Dt,layout:c},"totals"));var Xt=m.useMemo(function(){return kt({},Xe,{margin:Jt,width:a,height:o,innerWidth:ye,innerHeight:Ee,bars:Ge,legendData:Se,enableLabel:N,xScale:ft,yScale:W,tooltip:de,getTooltipLabel:ae,onClick:me,onMouseEnter:ke,onMouseLeave:tt})},[Xe,Jt,a,o,ye,Ee,Ge,Se,N,ft,W,de,ae,me,ke,tt]);return y.jsx(Wd,{width:Yt,height:rn,margin:Jt,defs:zt,role:ot,ariaLabel:pt,ariaLabelledBy:It,ariaDescribedBy:st,isFocusable:mt,children:$.map(function(ge,ln){var Mt;return typeof ge=="function"?y.jsx(m.Fragment,{children:m.createElement(ge,Xt)},ln):(Mt=Ot==null?void 0:Ot[ge])!=null?Mt:null})})},Ete=function(e){var t=e.isInteractive,n=t===void 0?Lt.isInteractive:t,r=e.animate,i=r===void 0?Lt.animate:r,a=e.motionConfig,o=a===void 0?Lt.motionConfig:a,s=e.theme,c=e.renderWrapper,l=Co(e,Ste);return y.jsx(mc,{animate:i,isInteractive:n,motionConfig:o,renderWrapper:c,theme:s,children:y.jsx(kte,kt({isInteractive:n},l))})},Ote=["isInteractive","renderWrapper","theme"],Vf=function(e,t,n,r){return e.find(function(i){return A3(i.x+t.left,i.y+t.top,i.width,i.height,n,r)})},Mte=function(e){var t=e.data,n=e.indexBy,r=e.keys,i=e.margin,a=e.width,o=e.height,s=e.groupMode,c=e.layout,l=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,h=e.indexScale,g=e.padding,p=e.innerPadding,v=e.axisTop,w=e.axisRight,_=e.axisBottom,x=_===void 0?dn.axisBottom:_,S=e.axisLeft,b=S===void 0?dn.axisLeft:S,T=e.enableGridX,j=T===void 0?dn.enableGridX:T,M=e.enableGridY,k=M===void 0?dn.enableGridY:M,E=e.gridXValues,C=e.gridYValues,O=e.layers,$=O===void 0?dn.layers:O,A=e.renderBar,P=A===void 0?function(ae,se){var be=se.bar,Oe=be.color,xe=be.height,Se=be.width,Ne=be.x,Pe=be.y,Xe=se.borderColor,zt=se.borderRadius,Ot=se.borderWidth,Xt=se.label,ge=se.labelColor,ln=se.shouldRenderLabel;if(ae.fillStyle=Oe,Ot>0&&(ae.strokeStyle=Xe,ae.lineWidth=Ot),ae.beginPath(),zt>0){var Mt=Math.min(zt,xe);ae.moveTo(Ne+Mt,Pe),ae.lineTo(Ne+Se-Mt,Pe),ae.quadraticCurveTo(Ne+Se,Pe,Ne+Se,Pe+Mt),ae.lineTo(Ne+Se,Pe+xe-Mt),ae.quadraticCurveTo(Ne+Se,Pe+xe,Ne+Se-Mt,Pe+xe),ae.lineTo(Ne+Mt,Pe+xe),ae.quadraticCurveTo(Ne,Pe+xe,Ne,Pe+xe-Mt),ae.lineTo(Ne,Pe+Mt),ae.quadraticCurveTo(Ne,Pe,Ne+Mt,Pe),ae.closePath()}else ae.rect(Ne,Pe,Se,xe);ae.fill(),Ot>0&&ae.stroke(),ln&&(ae.textBaseline="middle",ae.textAlign="center",ae.fillStyle=ge,ae.fillText(Xt,Ne+Se/2,Pe+xe/2))}:A,D=e.enableLabel,N=D===void 0?dn.enableLabel:D,q=e.label,z=e.labelSkipWidth,U=z===void 0?dn.labelSkipWidth:z,G=e.labelSkipHeight,ne=G===void 0?dn.labelSkipHeight:G,te=e.labelTextColor,X=e.colorBy,J=e.colors,Q=e.borderRadius,re=Q===void 0?dn.borderRadius:Q,F=e.borderWidth,I=F===void 0?dn.borderWidth:F,L=e.borderColor,H=e.annotations,R=H===void 0?dn.annotations:H,K=e.legendLabel,Z=e.tooltipLabel,ee=e.valueFormat,pe=e.isInteractive,we=pe===void 0?dn.isInteractive:pe,ve=e.tooltip,Le=ve===void 0?dn.tooltip:ve,Re=e.onClick,Ve=e.onMouseEnter,ze=e.onMouseLeave,ut=e.legends,at=e.pixelRatio,de=at===void 0?dn.pixelRatio:at,me=e.canvasRef,ke=e.enableTotals,tt=ke===void 0?dn.enableTotals:ke,Et=e.totalsOffset,qe=Et===void 0?dn.totalsOffset:Et,ot=m.useRef(null),pt=Tt(),It=pc(a,o,i),st=It.margin,dt=It.innerWidth,mt=It.innerHeight,Wt=It.outerWidth,De=It.outerHeight,Ae=_C({indexBy:n,label:q,tooltipLabel:Z,valueFormat:ee,colors:J,colorBy:X,borderColor:L,labelTextColor:te,groupMode:s,layout:c,reverse:l,data:t,keys:r,minValue:u,maxValue:d,margin:st,width:dt,height:mt,padding:g,innerPadding:p,valueScale:f,indexScale:h,enableLabel:N,labelSkipWidth:U,labelSkipHeight:ne,legends:ut,legendLabel:K,totalsOffset:qe}),Ye=Ae.bars,ct=Ae.barsWithValue,gt=Ae.xScale,St=Ae.yScale,Vt=Ae.getLabel,Rt=Ae.getTooltipLabel,Dt=Ae.getBorderColor,qt=Ae.getLabelColor,vt=Ae.shouldRenderBarLabel,Yt=Ae.legendsWithData,rn=Ae.barTotals,Jt=la(),ye=Jt.showTooltipFromEvent,Ee=Jt.hideTooltip,je=Kee({annotations:gC({data:Ye,annotations:R,getPosition:function(ae){return{x:ae.x,y:ae.y}},getDimensions:function(ae){var se=ae.width,be=ae.height;return{width:se,height:be,size:Math.max(se,be)}}})}),Ge=m.useMemo(function(){return{borderRadius:re,borderWidth:I,isInteractive:we,isFocusable:!1,labelSkipWidth:U,labelSkipHeight:ne,margin:st,width:a,height:o,innerWidth:dt,innerHeight:mt,bars:Ye,legendData:Yt,enableLabel:N,xScale:gt,yScale:St,tooltip:Le,getTooltipLabel:Rt,onClick:Re,onMouseEnter:Ve,onMouseLeave:ze}},[re,I,we,U,ne,st,a,o,dt,mt,Ye,Yt,N,gt,St,Le,Rt,Re,Ve,ze]),Ue=eo(ee);m.useEffect(function(){var ae,se=(ae=ot.current)==null?void 0:ae.getContext("2d");ot.current&&se&&(ot.current.width=Wt*de,ot.current.height=De*de,se.scale(de,de),se.fillStyle=pt.background,se.fillRect(0,0,Wt,De),se.translate(st.left,st.top),$.forEach(function(be){be==="grid"?typeof pt.grid.line.strokeWidth=="number"&&pt.grid.line.strokeWidth>0&&(se.lineWidth=pt.grid.line.strokeWidth,se.strokeStyle=pt.grid.line.stroke,j&&tu(se,{width:dt,height:mt,scale:gt,axis:"x",values:E}),k&&tu(se,{width:dt,height:mt,scale:St,axis:"y",values:C})):be==="axes"?nC(se,{xScale:gt,yScale:St,width:dt,height:mt,top:v,right:w,bottom:x,left:b,theme:pt}):be==="bars"?ct.forEach(function(Oe){P(se,{bar:Oe,borderColor:Dt(Oe),borderRadius:re,borderWidth:I,label:Vt(Oe.data),labelColor:qt(Oe),shouldRenderLabel:vt(Oe)})}):be==="legends"?Yt.forEach(function(Oe){var xe=Oe[0],Se=Oe[1];B3(se,kt({},xe,{data:Se,containerWidth:dt,containerHeight:mt,theme:pt}))}):be==="annotations"?rte(se,{annotations:je,theme:pt}):be==="totals"&&tt?function(Oe,xe,Se,Ne){Ne===void 0&&(Ne=dn.layout),Oe.fillStyle=Se.text.fill,Oe.font="bold "+Se.labels.text.fontSize+"px "+Se.labels.text.fontFamily,Oe.textBaseline=Ne==="vertical"?"alphabetic":"middle",Oe.textAlign=Ne==="vertical"?"center":"start",xe.forEach(function(Pe){Oe.fillText(Pe.formattedValue,Pe.x,Pe.y)})}(se,rn,pt,c):typeof be=="function"&&be(se,Ge)}),se.save())},[x,b,w,v,ct,re,I,je,j,k,Dt,Vt,qt,E,C,s,o,mt,dt,Ge,$,c,Yt,st.left,st.top,De,Wt,de,P,gt,St,l,vt,pt,a,rn,tt,Ue]);var ft=m.useCallback(function(ae){if(Ye&&ot.current){var se=os(ot.current,ae),be=se[0],Oe=se[1],xe=Vf(Ye,st,be,Oe);xe!==void 0?(ye(m.createElement(Le,kt({},xe.data,{color:xe.color,label:xe.label,value:Number(xe.data.value)})),ae),ae.type==="mouseenter"&&(Ve==null||Ve(xe.data,ae))):Ee()}},[Ee,st,Ve,Ye,ye,Le]),W=m.useCallback(function(ae){if(Ye&&ot.current){Ee();var se=os(ot.current,ae),be=se[0],Oe=se[1],xe=Vf(Ye,st,be,Oe);xe&&(ze==null||ze(xe.data,ae))}},[Ee,st,ze,Ye]),ce=m.useCallback(function(ae){if(Ye&&ot.current){var se=os(ot.current,ae),be=se[0],Oe=se[1],xe=Vf(Ye,st,be,Oe);xe!==void 0&&(Re==null||Re(kt({},xe.data,{color:xe.color}),ae))}},[st,Re,Ye]);return y.jsx("canvas",{ref:function(ae){ot.current=ae,me&&"current"in me&&(me.current=ae)},width:Wt*de,height:De*de,style:{width:Wt,height:De,cursor:we?"auto":"normal"},onMouseEnter:we?ft:void 0,onMouseMove:we?ft:void 0,onMouseLeave:we?W:void 0,onClick:we?ce:void 0})},$te=m.forwardRef(function(e,t){var n=e.isInteractive,r=e.renderWrapper,i=e.theme,a=Co(e,Ote);return y.jsx(mc,{isInteractive:n,renderWrapper:r,theme:i,animate:!1,children:y.jsx(Mte,kt({},a,{canvasRef:t}))})}),Ate=function(e){return y.jsx(wo,{children:function(t){var n=t.width,r=t.height;return y.jsx(Ete,kt({width:n,height:r},e))}})};m.forwardRef(function(e,t){return y.jsx(wo,{children:function(n){var r=n.width,i=n.height;return y.jsx($te,kt({width:r,height:i},e,{ref:t}))}})});const Rte="_side-content-bar_16o0s_1",jte="_mobile_16o0s_12",Pte="_expanded_16o0s_20",Ite="_content-container_16o0s_23",Dte="_resizer_16o0s_31",Nte="_expander_16o0s_46",Lte="_icon_16o0s_65",Rr={"side-content-bar":"_side-content-bar_16o0s_1",sideContentBar:Rte,mobile:jte,expanded:Pte,"content-container":"_content-container_16o0s_23",contentContainer:Ite,resizer:Dte,expander:Nte,icon:Lte},wC=({width:e,children:t,isExpandedOnMobileState:[n,r],resizeable:i=!0,onResize:a})=>{const{ProjectIconComponent:o}=m.useContext(Kt),{isMobile:s}=nc(),c=gm({onSwipedRight:d=>{d.velocity>.8&&r(!1)},delta:100}),[l,u]=m.useState(null);return y.jsxs(y.Fragment,{children:[y.jsxs("section",{className:oe("luminus-side-content-bar shadow",Rr.sideContentBar,{[Rr.mobile]:s},{[Rr.expanded]:n}),style:{width:`${e}px`},...c,children:[i&&!s?y.jsx("div",{role:"button",className:oe(Rr.resizer,"luminus-side-content-bar-resizer","shadow"),draggable:!0,onDragStart:d=>u({startX:d.clientX,widthStart:e}),onDrag:d=>a(((l==null?void 0:l.widthStart)??0)+(((l==null?void 0:l.startX)??0)-d.clientX)),onDragEnd:()=>u(null),children:y.jsx(o,{className:Rr.icon,icon:"resizer-horizontal"})}):null,y.jsx("div",{className:Rr.contentContainer,children:t})]}),s?y.jsx("div",{role:"button",onClick:()=>r(!n),className:oe(Rr.expander,{[Rr.expanded]:n},"luminus-side-content-bar-expander","shadow"),children:y.jsx(o,{className:Rr.icon,icon:"chevron-left"})}):null]})},Fte=({title:e})=>y.jsx("div",{className:"mb-3",children:typeof e=="string"?y.jsx(_n,{variant:"h3",children:e}):e}),Bte="_full-screen-container_1rm4r_1",CC={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:Bte},Ute=oe("overflow-hidden luminus-full-screen-container",CC.fullScreenContainer),Wte="container-fluid",zte=({title:e,children:t,sideContent:n,sideContentWidth:r=250,sideContentResizeable:i=!0,noPadding:a,className:o,variant:s="main",helmet:c,unavailableOnMobile:l})=>{const{addHelmet:u,removeHelmet:d}=m.useContext(l_),{texts:{container:f}}=m.useContext(Kt),[h,g]=m.useState(r),[p,v]=m.useState(!1),w=m.useMemo(()=>{switch(s){case"fullScreen":return Ute;case"main":return Wte;default:throw new Error(`PageContainer got incorrect variant type: ${s}`)}},[s]);m.useEffect(()=>(c?u(c):typeof e=="string"&&e&&u(e),()=>d()),[c,u,d,e]);const _=gm({onSwipedLeft:b=>{b.velocity>.8&&v(!0)},delta:100}),{isMobile:x}=nc(),S=m.useMemo(()=>x&&l,[x,l]);return m.useEffect(()=>{g(r)},[r]),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:oe(w,a?"p-0":"p-3",o),style:s==="fullScreen"?{width:n?`calc(100% - ${h}px)`:"100%"}:void 0,..._,children:y.jsx("div",{className:s==="fullScreen"?CC.fullScreenContainer:void 0,style:s==="main"?{paddingRight:n?`${h}px`:void 0}:{height:"100%",width:"100%"},children:S?y.jsx(vm,{variant:"warning",children:f.unavailableOnMobile}):y.jsxs(y.Fragment,{children:[e?y.jsx(Fte,{title:e}):null,t]})})}),n&&!S?y.jsx(wC,{width:h,isExpandedOnMobileState:[p,v],resizeable:i,onResize:b=>i?g(b):{},children:n}):null]})},Vg=({InputContainer:e=ic,formField:t,label:n,resetsFields:r,options:i,isNumber:a,size:o,showClearIcon:s,clearValue:c,noSortOptions:l,required:u,hidden:d,disabled:f,withoutLabel:h,hint:g,className:p})=>{const{register:v,formState:w,getValues:_,setValue:x,watch:S}=gn.useFormContext(),b=$u({falseIfNotInit:!0});console.log("disabled ",f),console.log("formDisabled ",b);const[T,j]=m.useState(void 0),[M,k]=m.useState(!1),E=m.useMemo(()=>i.toSorted((A,P)=>l?0:(A.name??"").localeCompare(P.name??"")),[i,l]),C=m.useCallback(()=>{const A=c??null;a?x(t,A===null?null:Number(A),{shouldDirty:!0,shouldValidate:M}):x(t,(A==null?void 0:A.toString())??"",{shouldDirty:!0,shouldValidate:M})},[c,a,x,t,M]);m.useEffect(()=>{const A=t.split(".");let P=w.errors;A.forEach(D=>{P!==void 0&&(P=P[D])}),j(P)},[w,t]);const O=m.useMemo(()=>f||b,[f,b]);console.log(O),m.useEffect(()=>{x(t,_(t))},[E,t,_,x]),m.useEffect(()=>{w.isSubmitted&&k(!0)},[w]);const $=T!==void 0;return y.jsx(y.Fragment,{children:y.jsxs(e,{label:n??"",required:u,disabled:O,hidden:d,withoutLabel:h,isInvalid:$,hint:g,className:p,children:[y.jsxs(Tr.Select,{size:o,...v(t,{setValueAs:A=>a?A==null||A===""?null:parseInt(A,10):A==null||A===""?null:A,onChange:()=>{r&&r.forEach(A=>x(A,null,{shouldDirty:!0,shouldValidate:M}))}}),isInvalid:$,hidden:d,disabled:O,className:"w-100",children:[y.jsx("option",{value:""}),E.map(A=>y.jsx("option",{value:A.id??"",children:A.name},A.id))]}),s&&S(t)&&y.jsx("div",{className:"luminus-input-remove-icon inset",children:y.jsx(rc,{color:"secondary",size:"sm",onClick:C,children:y.jsx(Xs,{})})}),T&&y.jsx(Ru,{message:T.message})]})})},qg=({InputContainer:e=ic,formField:t,label:n,resetsFields:r,size:i,showClearIcon:a,clearValue:o,required:s,hidden:c,disabled:l,rows:u,withoutLabel:d,customFormControlProps:f,minLength:h,maxLength:g,hint:p,onChange:v,className:w})=>{const{register:_,formState:x,setValue:S,watch:b}=gn.useFormContext(),T=$u({falseIfNotInit:!0}),[j,M]=m.useState(void 0),[k,E]=m.useState(!1),C=m.useCallback(()=>{const P=o??null;S(t,(P==null?void 0:P.toString())??"",{shouldDirty:!0,shouldValidate:k})},[o,S,t,k]),O=m.useCallback(()=>{const P=t.split(".");let D=x.errors;P.forEach(N=>{D!==void 0&&(D=D[N])}),M(D)},[x,t]),$=m.useMemo(()=>l||T,[l,T]);m.useEffect(()=>{O()},[O]),m.useEffect(()=>{x.isSubmitted&&E(!0)},[x]);const A=j!==void 0;return y.jsxs(e,{label:n??"",required:s,disabled:$,hidden:c,withoutLabel:d,isInvalid:A,className:w,hint:p,isForTextAreaInput:!0,children:[y.jsx(Tr.Control,{as:"textarea",size:i,..._(t,{setValueAs:P=>P==null||P===""?null:P,onChange:P=>{var D;r&&r.forEach(N=>S(N,null,{shouldDirty:!0,shouldValidate:k})),v&&v((D=P.target)!=null&&D.value?P.target.value.toString():null)}}),isInvalid:A,hidden:c,disabled:$,rows:u??2,className:"w-100",minLength:h,maxLength:g,...f}),a&&b(t)&&y.jsx("div",{className:"luminus-input-remove-icon",children:y.jsx(rc,{color:"secondary",size:"sm",onClick:C,children:y.jsx(Xs,{})})}),j&&y.jsx(Ru,{message:j.message})]})},to=m.forwardRef(({InputContainer:e=ic,type:t,formField:n,label:r,placeholder:i,size:a,resetsFields:o,showClearIcon:s,clearValue:c,required:l,hidden:u,disabled:d,withoutLabel:f,list:h,step:g,CustomOnChangeComponent:p,noSelectOnFocus:v,minLength:w,maxLength:_,hint:x,onChange:S,className:b,autoComplete:T},j)=>{var L,H,R,K;const{register:M,formState:k,setValue:E,watch:C}=gn.useFormContext(),O=$u({falseIfNotInit:!0}),[$,A]=m.useState(void 0),[P,D]=m.useState(!1),N=m.useCallback(()=>{const Z=c??null;t==="number"?E(n,Z!==null?Number(Z):null,{shouldDirty:!0,shouldValidate:P}):E(n,(Z==null?void 0:Z.toString())??"",{shouldDirty:!0,shouldValidate:P})},[c,t,E,n,P]),q=m.useCallback(()=>{const Z=n.split(".");let ee=k.errors;Z.forEach(pe=>{ee!==void 0&&(ee=ee[pe])}),A(ee)},[k,n]),z=m.useMemo(()=>d||O,[d,O]);m.useEffect(()=>{q()},[q]),m.useEffect(()=>{k.isSubmitted&&D(!0)},[k]);const U=$!==void 0,[G,ne]=m.useState(!1),te=C(n),X=lm(t,te??null,G),{ref:J,...Q}=M(n,{setValueAs:Z=>t==="number"?Z==null||Z===""?null:Number(Z):Z==null||Z===""?null:Z,onChange:Z=>{var ee;o&&o.forEach(pe=>E(pe,null,{shouldDirty:!0,shouldValidate:P})),S&&S((ee=Z.target)!=null&&ee.value?t==="number"?Number(Z.target.value)??null:Z.target.value.toString():null)},onBlur:()=>ne(!1)}),re=m.useRef(null),F=(((L=re.current)==null?void 0:L.scrollWidth)??0)>(((H=re.current)==null?void 0:H.clientWidth)??0),I=(R=re.current)==null?void 0:R.getBoundingClientRect();return m.useImperativeHandle(j,()=>re.current,[re]),y.jsxs(e,{label:r??"",required:l,disabled:z,hidden:u,withoutLabel:f,isInvalid:U,hint:x,className:b,children:[y.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[y.jsx(Tr.Control,{type:X,placeholder:i??r,size:a,onFocus:Z=>{ne(!0),!v&&Z.target.select()},...Q,ref:Z=>{J(Z),re.current=Z},isInvalid:U,hidden:u,disabled:z,list:h,className:"w-100",step:g,minLength:w,maxLength:_,autoComplete:T}),p&&y.jsx("div",{className:"custom-picker-button",children:p})]}),s&&C(n)&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(rc,{color:"secondary",size:"sm",onClick:N,children:y.jsx(Xs,{})})}),F?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((I==null?void 0:I.top)??0)+((I==null?void 0:I.height)??0),left:(I==null?void 0:I.left)??0,pointerEvents:"none"},children:((K=re.current)==null?void 0:K.value)??""}):null,$&&y.jsx(Ru,{message:$.message})]})}),rb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=gn.get(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},TC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?rb(r.ref,n,e):r.refs&&r.refs.forEach(i=>rb(i,n,e))}},Hte=(e,t)=>{t.shouldUseNativeValidation&&TC(e,t);const n={};for(const r in e){const i=gn.get(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(Vte(t.names||Object.keys(e),r)){const o=Object.assign({},gn.get(n,r));gn.set(o,"root",a),gn.set(n,r,o)}else gn.set(n,r,a)}return n},Vte=(e,t)=>e.some(n=>n.startsWith(t+"."));var qte=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=gn.appendErrors(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},Vd=function(e,t,n){return n===void 0&&(n={}),function(r,i,a){try{return Promise.resolve(function(o,s){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return a.shouldUseNativeValidation&&TC({},a),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(function(s){return Array.isArray(s==null?void 0:s.errors)}(o))return{values:{},errors:Hte(qte(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}}};const Yte="_wrapper_1tb6d_1",Gte="_controls_1tb6d_16",Zte="_explorerWindow_1tb6d_20",Kte="_folderList_1tb6d_28",Xte="_fileList_1tb6d_35",Qte="_dndText_1tb6d_61",Jte="_extensionIcon_1tb6d_72",Oi={wrapper:Yte,controls:Gte,explorerWindow:Zte,folderList:Kte,fileList:Xte,dndText:Qte,extensionIcon:Jte},tn=m.createContext({apiActions:{},loadDocuments(){throw new Error("DocumentsContext was not initialized.")},reducer:[{},{}],entityType:"",entityId:-1}),ene="_defaultFolder_8tlxv_1",tne="_names_8tlxv_5",nne="_folderType_8tlxv_9",qf={defaultFolder:ene,names:tne,folderType:nne},SC=({isActive:e,isDefault:t,folderName:n,typeName:r})=>{const{ProjectIconComponent:i}=m.useContext(Kt);return y.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[y.jsx(i,{icon:`folder${e?"-filled":""}`,className:oe("d-inline-block",t?qf.defaultFolder:"text-primary"),iconProps:{className:"d-block"},size:18}),y.jsxs("div",{className:oe("d-flex flex-column gap-0 align-items-start",qf.names),children:[y.jsx("span",{className:e?"fw-bold":"",children:n}),r?y.jsxs("span",{className:qf.folderType,children:["(",r,")"]}):null]})]})},rne=({customText:e})=>{const{reducer:[t,n]}=m.useContext(tn),r=m.useCallback(()=>{n({type:"select-folder",folderId:"root"})},[n]);return y.jsx("li",{children:y.jsx("button",{onClick:r,type:"button",className:oe("border-0 bg-transparent"),children:y.jsx(SC,{folderName:e??"root",isActive:t.activeFolder==="root",typeName:"",isDefault:!0})})})};function ine(e){if(e.state!=="openned-modal")throw new Error('Not in "openned-modal" state!')}const kC=()=>{const e=Eu(),{startLoading:t,stopLoading:n}=m.useContext(yu),{reducer:[,r]}=m.useContext(tn),i=m.useCallback(async(o,s)=>{t("documents-renameFolder");try{await e.put("/documents/folder/rename",{folderId:o,name:s}),r({type:"update-folders",folderIds:[o],newProperties:{name:s}})}finally{n("documents-renameFolder")}},[e,r,t,n]),a=m.useCallback(async o=>{t("documentsFolderCreate");try{const s=await e.post("/documents/folder",o);r({type:"create-folder",folderData:o,folderId:s.data.id,isOnlyRead:s.data.onlyRead})}finally{n("documentsFolderCreate")}},[e,r,t,n]);return{renameFolder:i,createFolder:a}},ane=()=>{const{reducer:[e],entityId:t,entityType:n}=m.useContext(tn),{zNumberRequired:r,zStringRequired:i}=Mu(),{createFolder:a}=kC(),o=sn.object({name:i(),documentTypeId:r()}),s=gn.useForm({resolver:Vd(o)}),c=m.useCallback(async l=>{const u={...l,dbObjectId:t.toString(),entity:n,parentFolderId:e.activeFolder==="root"?null:e.activeFolder};await a(u)},[a,t,n,e.activeFolder]);return{formMethods:s,onSubmit:c}},one=({handleClose:e})=>{var o;const{texts:{documents:t}}=m.useContext(Kt),{reducer:[n],entityType:r}=m.useContext(tn);if(ine(n),n.modalType!=="create-folder")throw new Error("Tried to render CreateFolderModal without create-folder modal type reducer state.");const{onSubmit:i,formMethods:a}=ane();return y.jsx(y.Fragment,{children:y.jsx(gn.FormProvider,{...a,children:y.jsxs(Tr,{onSubmit:a.handleSubmit(i),children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsx(Mn.Title,{children:t.createFolderInFolder(((o=n.foldersMap.get(n.chosenFolderId))==null?void 0:o.name)??r)})}),y.jsxs(Mn.Body,{children:[y.jsx(to,{formField:"name",type:"text",label:t.name,required:!0}),y.jsx(Vg,{options:n.documentTypes,formField:"documentTypeId",label:t.folderType,isNumber:!0,required:!0})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Ji,{onClick:e,variant:"outlined",color:"secondary",children:t.cancel}),y.jsx(Ji,{type:"submit",children:t.createFolder})]})]})})})},EC=100,sne=(e,t)=>{const n=Eu(),{startLoading:r,stopLoading:i}=m.useContext(yu),{loadDocuments:a}=m.useContext(tn),{zStringRequired:o,zString:s,zNumberRequired:c,zDateRequired:l}=Mu(),u=sn.object({name:o(),description:s(),validToDate:l(),documentTypeId:c()}),d=gn.useForm({resolver:Vd(u),defaultValues:{...e,validToDate:xu(e.validToDate)}}),f=m.useCallback(async h=>{r("documents-updateProperties");try{await n.put(`/documents/${e.id}/update-info`,h),await a(),t()}finally{i("documents-updateProperties")}},[n,e.id,t,a,r,i]);return{formMethods:d,onSubmit:f}},cne=({handleClose:e,file:t})=>{const{texts:{documents:n}}=m.useContext(Kt),{reducer:[r]}=m.useContext(tn),{formMethods:i,onSubmit:a}=sne(t,e);return y.jsxs(y.Fragment,{children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsx(Mn.Title,{children:n.editFileProperties})}),y.jsx(gn.FormProvider,{...i,children:y.jsxs(Tr,{onSubmit:i.handleSubmit(a),children:[y.jsxs(Mn.Body,{children:[y.jsx(to,{formField:"name",type:"text",label:n.name,required:!0}),y.jsx(to,{formField:"validToDate",type:"date",label:n.validSince,required:!0}),y.jsx(Vg,{formField:"documentTypeId",label:n.category,options:r.documentTypes,isNumber:!0,required:!0}),y.jsx(qg,{formField:"description",label:n.description,customFormControlProps:{maxLength:EC}})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Ji,{onClick:e,color:"secondary",variant:"outlined",children:n.cancel}),y.jsx(Ji,{type:"submit",children:n.save})]})]})})]})},lne=({handleClose:e})=>{const{reducer:[t]}=m.useContext(tn),n=m.useMemo(()=>{if(t.markedFiles.length===1)return t.constantFiles.find(r=>r.id===t.markedFiles[0])},[t.constantFiles,t.markedFiles]);return n===void 0?(e(),y.jsx(y.Fragment,{})):y.jsx(cne,{file:n,handleClose:e})},une=()=>{const{reducer:[e,t]}=m.useContext(tn),n=m.useCallback(()=>{t({type:"close-modal"})},[t]),r=m.useMemo(()=>{if(e.state!=="openned-modal")return null;switch(e.modalType){case"create-folder":return y.jsx(one,{handleClose:n});case"edit-file-properties":return y.jsx(lne,{handleClose:n});default:return null}},[e.state,e.modalType]);return y.jsx(Mn,{show:e.state==="openned-modal",onHide:n,children:r})},ib="documents_drag_image_element",qc="drop-container-highlight-class",ab="data-drop-container-id",ob="data-draggable-id",dne=()=>{const e=document.getElementById(ib);if(e!==null)return e;const t=document.createElement("div");return t.id=ib,t.style.position="absolute",t.style.top=`${-window.outerHeight}px`,t.style.left=`${-window.outerWidth}px`,t.style.width="50px",t.style.height="50px",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="white",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.fontSize="16px",t.style.borderRadius="5px",document.body.appendChild(t),t},Yg=()=>{const{apiActions:{moveDocuments:e},reducer:[t]}=m.useContext(tn),n=m.useCallback(l=>{var u;if(t.markedFiles.length>0){const d=dne();d.innerHTML=t.markedFiles.length.toString(),l.dataTransfer.setDragImage(d,0,0),l.dataTransfer.clearData(),l.dataTransfer.setData("application/json",JSON.stringify(t.markedFiles)),l.dataTransfer.dropEffect="none",l.dataTransfer.effectAllowed="move"}else l.dataTransfer.setData("application/json",JSON.stringify([parseInt(((u=l.currentTarget.attributes.getNamedItem(ob))==null?void 0:u.nodeValue)??"",10)])),l.dataTransfer.dropEffect="none",l.dataTransfer.effectAllowed="move"},[t.markedFiles]),r=m.useCallback(l=>({[ob]:l,draggable:t.markedFiles.length===0||t.markedFiles.includes(l),onDragStart:n}),[n,t.markedFiles]),i=m.useCallback(l=>u=>{var h;u.preventDefault(),u.stopPropagation(),u.currentTarget.classList.remove(qc);const d=u.dataTransfer.files;if(l&&d&&d.length>0){l(d);return}const f=u.dataTransfer.getData("application/json");if(f){const g=JSON.parse(f),p=parseInt(((h=u.currentTarget.attributes.getNamedItem(ab))==null?void 0:h.value)??"",10);e(p,g)}},[e]),a=m.useCallback(()=>l=>{l.preventDefault(),l.stopPropagation()},[]),o=m.useCallback(l=>u=>{u.preventDefault(),u.stopPropagation(),u.dataTransfer.types.includes("Files")?(u.dataTransfer.dropEffect="copy",u.currentTarget.classList.add(qc)):!l&&u.dataTransfer.types.includes("application/json")?(u.dataTransfer.dropEffect="move",u.currentTarget.classList.add(qc)):u.dataTransfer.dropEffect="none"},[]),s=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),l.target===l.currentTarget&&(l.dataTransfer.dropEffect="none",l.currentTarget.classList.remove(qc))},[]),c=m.useCallback((l,u)=>({onDrop:i(u==null?void 0:u.onFilesDrop),onDragOver:a(),onDragEnter:o(u==null?void 0:u.ignoreInner),onDragLeave:s,[ab]:l}),[i,a,o,s]);return{getDraggableProps:r,getDropProps:c}};function OC(e,t,n){for(let r=0;r<e.childrenIds.length;r++){const i=e.childrenIds[r];if(i===t)return!0;const a=n.get(i);if(a&&OC(a,t,n))return!0}return!1}function fne(e){if(e.activeFolder==="root")return!1;const t=e.foldersMap.get(e.activeFolder);return!(t!=null&&t.onlyRead)}function MC(e,t){const n=t.get(e);return n===void 0?"":n.parentId===null?n.name:`${MC(n.parentId,t)}/${n.name}`}const hne=()=>{const{zString:e,zStringRequired:t,zNumberRequired:n}=Mu();return{formSchema:m.useMemo(()=>sn.object({validToDate:t(),description:e(),name:e(),documentTypeId:n()}),[n,e,t])}},Gg=({handleClose:e,files:t,targetFolderId:n})=>{var f;const{texts:{documents:r}}=m.useContext(Kt),{reducer:[i],apiActions:{uploadFiles:a}}=m.useContext(tn),o=m.useMemo(()=>[...t],[t]),s=m.useMemo(()=>n??i.activeFolder,[i.activeFolder,n]),c=m.useMemo(()=>s==="root"?void 0:i.foldersMap.get(s),[s,i.foldersMap]),{formSchema:l}=hne(),u=gn.useForm({resolver:Vd(l),defaultValues:{validToDate:xu(new Date().toISOString()),documentTypeId:(f=i.documentTypes.find(h=>{var g;return h.name===((g=i.foldersMap.get(s))==null?void 0:g.defaultDocType)}))==null?void 0:f.id}}),d=m.useCallback(async h=>{s!=="root"&&(await a(t,{folderId:s,...h}),e())},[t,e,s,a]);return y.jsxs(Mn,{show:!0,onHide:e,children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsxs("div",{children:[r.uploadFilesPrompt(t.length,c.name),y.jsx("ul",{children:o.map((h,g)=>y.jsxs("li",{children:[h.name," - ",Va(h.size)]},`${h.name}-${g}`))})]})}),y.jsx(gn.FormProvider,{...u,children:y.jsxs(Tr,{onSubmit:u.handleSubmit(d),children:[y.jsxs(Mn.Body,{children:[y.jsx(Vg,{formField:"documentTypeId",label:r.documentType,options:i.documentTypes,isNumber:!0,required:!0}),y.jsx(to,{formField:"validToDate",label:r.validSince,type:"date",required:!0}),o.length===1?y.jsx(to,{formField:"name",label:r.name,type:"text"}):null,y.jsx(qg,{formField:"description",label:r.description,customFormControlProps:{maxLength:EC}})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Ji,{variant:"outlined",color:"secondary",onClick:e,children:r.cancel}),y.jsx(Ji,{type:"submit",children:r.upload})]})]})})]})},pne="_folder_1cktt_1",mne="_collapseArrowDiv_1cktt_8",gne="_button_1cktt_20",vne="_nestedList_1cktt_24",yne="_numberOfFiles_1cktt_31",bne="_collapseArrow_1cktt_8",Mi={folder:pne,collapseArrowDiv:mne,button:gne,nestedList:vne,numberOfFiles:yne,collapseArrow:bne},$C=({dirId:e,writePermissions:t})=>{const{ProjectIconComponent:n}=m.useContext(Kt),{reducer:[r,i]}=m.useContext(tn),{getDropProps:a}=Yg(),[o,s]=m.useState(null),[c,l]=m.useState(!0),u=m.useMemo(()=>{const p=r.foldersMap.get(e);if(p===void 0)throw new Error(`tried to get dir with id ${e}`);return p},[e,r.foldersMap]),d=m.useCallback(()=>{r.activeFolder!=="root"&&OC(u,r.activeFolder,r.foldersMap)&&i({type:"select-folder",folderId:e}),l(!0)},[e,u,i,r.activeFolder,r.foldersMap]),f=m.useMemo(()=>u.childrenIds.length>0,[u.childrenIds.length]),h=m.useCallback(()=>{i({type:"select-folder",folderId:e})},[e,i]),g=m.useMemo(()=>r.filteredFiles.filter(p=>p.folderId===e&&p.archive===!1).length,[e,r.filteredFiles]);return y.jsxs(y.Fragment,{children:[y.jsxs("li",{className:Mi.folder,children:[y.jsx("div",{className:Mi.collapseArrowDiv,children:f?c?y.jsx("button",{onClick:()=>l(!1),type:"button",children:y.jsx(n,{icon:"chevron-right",iconProps:{className:Mi.collapseArrow}})}):y.jsx("button",{onClick:d,type:"button",children:y.jsx(n,{icon:"chevron-down",iconProps:{className:Mi.collapseArrow}})}):null}),y.jsx("button",{className:oe(Mi.button),onClick:h,type:"button",...t&&!u.onlyRead?a(e,{onFilesDrop:p=>s(p)}):{},children:y.jsxs("div",{className:"d-flex align-items-center gap-2",children:[y.jsx(SC,{isDefault:u.isDefault,folderName:u.name,typeName:u.defaultDocType??"",isActive:e===r.activeFolder}),g>0?y.jsxs("span",{className:Mi.numberOfFiles,children:["[",g,"]"]}):void 0]})}),f?c?null:y.jsx("ul",{className:Mi.nestedList,children:u==null?void 0:u.childrenIds.map(p=>y.jsx($C,{dirId:p,writePermissions:t},p))}):void 0]}),o!==null?y.jsx(Gg,{files:o,handleClose:()=>s(null),targetFolderId:e}):null]})},xne="_wrapper_1th2u_1",_ne="_downloadButton_1th2u_9",vp={wrapper:xne,downloadButton:_ne};function wne(e){return rt({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},child:[]}]})(e)}function Cne(e){return rt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"},child:[]}]})(e)}function Tne(e){return rt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23 1.5q.41 0 .7.3.3.29.3.7v19q0 .41-.3.7-.29.3-.7.3H7q-.41 0-.7-.3-.3-.29-.3-.7V18H1q-.41 0-.7-.3-.3-.29-.3-.7V7q0-.41.3-.7Q.58 6 1 6h5V2.5q0-.41.3-.7.29-.3.7-.3zM6 13.28l1.42 2.66h2.14l-2.38-3.87 2.34-3.8H7.46l-1.3 2.4-.05.08-.04.09-.64-1.28-.66-1.29H2.59l2.27 3.82-2.48 3.85h2.16zM14.25 21v-3H7.5v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3H7.5v3zm8.25 15v-3h-6.75v3zm0-4.5v-3.75h-6.75v3.75zm0-5.25V7.5h-6.75v3.75zm0-5.25V3h-6.75v3Z"},child:[]}]})(e)}function Sne(e){return rt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.004 1.5q.41 0 .703.293t.293.703v19.008q0 .41-.293.703t-.703.293H6.996q-.41 0-.703-.293T6 21.504V18H.996q-.41 0-.703-.293T0 17.004V6.996q0-.41.293-.703T.996 6H6V2.496q0-.41.293-.703t.703-.293zM6.035 11.203l1.442 4.735h1.64l1.57-7.876H9.036l-.937 4.653-1.325-4.5H5.38l-1.406 4.523-.938-4.675H1.312l1.57 7.874h1.641zM22.5 21v-3h-15v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3h-15v3Z"},child:[]}]})(e)}const kne="_excel_18ggp_1",Ene="_word_18ggp_5",One="_pdf_18ggp_9",Mne="_image_18ggp_13",Yc={excel:kne,word:Ene,pdf:One,image:Mne},AC=({fileExtension:e,className:t,...n})=>{switch(e==null?void 0:e.toUpperCase()){case"JPG":case"JPEG":case"BMP":case"PNG":return y.jsx("span",{className:oe(t,Yc.image),children:y.jsx(Cne,{...n})});case"XLS":case"XLSX":case"CSV":return y.jsx(Tne,{className:oe(t,Yc.excel),...n});case"DOC":case"DOCM":case"DOCX":return y.jsx(Sne,{className:oe(t,Yc.word),...n});case"PDF":return y.jsx(kA,{className:oe(t,Yc.pdf),...n});default:return y.jsx(wne,{})}},$ne=()=>{const{ProjectIconComponent:e,texts:{documents:t}}=m.useContext(Kt),{apiActions:{downloadFile:n},reducer:[r]}=m.useContext(tn),i=m.useMemo(()=>r.activeFolder==="root",[r.activeFolder]),a=m.useCallback((s,c,l)=>s?w2(c??"")&&localStorage.getItem("file-download-try-opening")!=="false"?y.jsx("span",{role:"button",className:"link link-primary d-flex align-items-center",onClick:d=>{d.stopPropagation(),n(l,!0)},children:s}):s:"",[n]);return{columns:m.useMemo(()=>[{fieldName:"id",caption:"id",type:"number",isVisible:!1},...i?[{fieldName:"folderName",caption:t.folder,type:"string"}]:[],{fieldName:"--icon",caption:"",type:"string",valueFormat:s=>{const c=s.row.original.fileExtension,l=s.row.original.id;return a(y.jsx(AC,{fileExtension:c,className:vp.extensionIcon,size:18}),c??"",l)},width:36,align:"center",filterType:"none",noSort:!0},{fieldName:"name",caption:t.name,type:"string",valueFormat:s=>{const c=s.row.original.name,l=s.row.original.fileExtension,u=s.row.original.id;return a(c??"",l??"",u)}},{fieldName:"description",caption:t.description,type:"string"},{fieldName:"fileExtension",caption:t.fileExtension,type:"string",filterType:"select",width:50},{fieldName:"--downloadButton",caption:"",type:"number",filterType:"none",width:38,align:"center",noSort:!0,valueFormat:s=>y.jsx(Au,{className:vp.downloadButton,onClick:()=>n(s.row.original.id,!1),children:y.jsx(e,{icon:"file-download",size:18})})},{fieldName:"documentTypeName",caption:t.documentType,type:"string",filterType:"select"},{fieldName:"validToDate",caption:t.validSince,type:"date"},{fieldName:"size",caption:t.size,type:"number",valueFormat:({cell:{value:s}})=>s!==void 0?Va(s*1024*1024):"",filterType:"none"},{fieldName:"archive",caption:t.archived,type:"boolean",filterType:"select",valueFormat:({cell:{value:s}})=>s?t.yes[0]:t.no[0]}],[e,t.archived,t.description,t.documentType,t.fileExtension,t.folder,t.name,t.no,t.size,t.validSince,t.yes,n,i,a])}},Ane=({BnfTableComponent:e,tableIdentifier:t,writePermissions:n})=>{const{reducer:[r,i]}=m.useContext(tn),{columns:a}=$ne(),o=m.useCallback(h=>{i({type:"mark-files-by-action",setStateAction:h})},[i]),s=m.useMemo(()=>r.activeFolder==="root",[r.activeFolder]),c=m.useMemo(()=>{var h;return r.activeFolder==="root"?!1:((h=r.foldersMap.get(r.activeFolder))==null?void 0:h.onlyRead)??!1},[r.activeFolder,r.foldersMap]),l=m.useMemo(()=>({enabled:n&&!s,idField:"id",selectedRows:r.markedFiles,setSelectedRows:o}),[s,o,r.markedFiles,n]),u=m.useMemo(()=>r.activeFolder==="root"?r.filteredFiles:r.filteredFiles.filter(h=>h.folderId===r.activeFolder),[r.activeFolder,r.filteredFiles]),{getDraggableProps:d}=Yg(),f=m.useCallback(h=>n===!1||c?{}:d(h.id),[d,c,n]);return y.jsx("div",{className:oe(vp.wrapper),children:y.jsx(e,{data:u,columnsDef:a,rowSelection:l,useScrollableContainer:!0,getRowProps:f,defaultConfig:{defaultFilters:[{id:"archive",value:"false"}]},tableId:t,searchStatePrefix:"docs",useSearchState:!0,hideBottomBar:!0},r.activeFolder)})},Rne="_wrapper_1q562_1",jne="_divButtons_1q562_10",Yf={wrapper:Rne,divButtons:jne},Pne="_wrapper_1bpdd_1",Ine="_fileInput_1bpdd_5",sb={wrapper:Pne,fileInput:Ine},Dne=({entityId:e,entityType:t,children:n,disabled:r})=>{const i=m.useRef(null),[a,o]=m.useState(null),{reducer:[s]}=m.useContext(tn),c=f=>{var h;(((h=f.target.files)==null?void 0:h.length)??0)>0&&o(f.target.files)},l=m.useCallback(()=>{o(null),i.current&&(i.current.value="")},[]),u=m.useMemo(()=>`documents-upload-${t}-${e}`,[e,t]),d=m.useMemo(()=>r||s.activeFolder==="root",[r,s.activeFolder]);return y.jsxs("div",{className:sb.wrapper,children:[y.jsx("label",{htmlFor:u,className:oe("btn btn-context luminus-context-button",d?"disabled":void 0),children:n}),y.jsx("input",{id:u,type:"file",multiple:!0,onChange:c,className:sb.fileInput,ref:i,disabled:d}),a!==null?y.jsx(Gg,{handleClose:l,files:a}):void 0]})},dr=({children:e,onClick:t,className:n,disabled:r=!1})=>y.jsx(Au,{onClick:t,className:n,disabled:r,children:e}),Nne=({className:e,entityId:t,entityType:n})=>{var j,M;const{texts:{documents:r}}=m.useContext(Kt),{prompt:i}=i2(),{confirm:a}=sm(),{apiActions:o,reducer:[s,c]}=m.useContext(tn),{deleteFiles:l,renameFiles:u,downloadAsZip:d,archivateFiles:f,deleteDirectory:h}=o,{renameFolder:g}=kC(),p=m.useMemo(()=>s.markedFiles.length===0,[s.markedFiles.length]),v=m.useMemo(()=>s.markedFiles.length===1,[s.markedFiles.length]),w=m.useCallback(async()=>{if(s.activeFolder==="root")return;const k=await i(r.enterNewFolderName,{input:"input"});k!==null&&g(s.activeFolder,k)},[r.enterNewFolderName,i,g,s.activeFolder]),_=m.useCallback(async()=>{if(s.activeFolder==="root")return;const k=await i(r.enterNewFileName,{input:"input"});k!==null&&u(k)},[r.enterNewFileName,i,u,s.activeFolder]),x=m.useMemo(()=>s.activeFolder==="root",[s.activeFolder]),S=m.useMemo(()=>{var k;return s.activeFolder==="root"?!1:((k=s.foldersMap.get(s.activeFolder))==null?void 0:k.onlyRead)??!1},[s.activeFolder,s.foldersMap]),b=m.useMemo(()=>s.markedFiles.every(k=>{var E;return((E=s.constantFiles.find(C=>C.id===k))==null?void 0:E.archive)===!1}),[s.constantFiles,s.markedFiles]),T=m.useMemo(()=>s.markedFiles.every(k=>{var E;return((E=s.constantFiles.find(C=>C.id===k))==null?void 0:E.archive)===!0}),[s.constantFiles,s.markedFiles]);return y.jsx("div",{className:oe(e,Yf.wrapper,s.state==="folder-choosing"?"ignore-dim":void 0,"d-flex justify-content-between"),children:s.state!=="folder-choosing"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Yf.divButtons,children:[y.jsx(Dne,{entityId:t,entityType:n,disabled:S,children:r.uploadFiles}),y.jsx(dr,{onClick:()=>{c({type:"open-modal",modalType:"create-folder",chosenFolderId:s.activeFolder??"root"})},disabled:S,children:r.createFolder}),y.jsx(dr,{disabled:s.activeFolder==="root"||((j=s.foldersMap.get(s.activeFolder))==null?void 0:j.isDefault),onClick:async()=>{var E;await a(`${r.deleteFolder} ${(E=s.foldersMap.get(s.activeFolder))==null?void 0:E.name}?`)&&h(s.activeFolder)},children:r.deleteFolder}),y.jsx(dr,{disabled:s.activeFolder==="root"||((M=s.foldersMap.get(s.activeFolder))==null?void 0:M.isDefault),onClick:w,children:r.renameFolder})]}),!x&&!S?y.jsxs("div",{className:Yf.divButtons,children:[y.jsx(dr,{onClick:()=>{c({type:"open-modal",modalType:"edit-file-properties"})},disabled:!v,children:r.editFileProperties}),y.jsx(dr,{onClick:async()=>{await a(r.confirmDeleteFile(s.markedFiles.length))&&l(s.markedFiles)},disabled:p,children:r.delete}),T?y.jsx(dr,{onClick:async()=>{await a(r.confirmDearchiveFile(s.markedFiles.length))&&await f(!0)},disabled:p,children:r.dearchivate}):y.jsx(dr,{onClick:async()=>{await a(r.confirmArchiveFile(s.markedFiles.length))&&await f()},disabled:p||!b,children:r.archivate}),y.jsx(dr,{onClick:_,disabled:p,children:r.rename}),y.jsx(dr,{onClick:d,disabled:p,children:r.downloadZip})]}):null]}):s.state==="folder-choosing"?y.jsx(y.Fragment,{children:y.jsx(dr,{onClick:()=>c({type:"return-from-folder-choosing"}),className:oe("ignore-dim","body-background-color"),children:r.back})}):void 0})},Lne=({file:e})=>{const{confirm:t}=sm(),{reducer:[n],apiActions:{downloadFile:r}}=m.useContext(tn),{texts:{documents:i}}=m.useContext(Kt),a=m.useCallback(async()=>{await t(i.confirmFileDownload(e.name,e.size==null?void 0:Va(e.size*1024*1024)))&&r(e.id)},[t,i,r,e.id,e.name,e.size]);return y.jsxs(gu,{action:!0,onClick:a,children:[y.jsx(_n,{variant:"body",className:"text-muted",children:MC(e.folderId,n.foldersMap)}),y.jsxs("div",{className:"d-flex justify-content-between gap-2",children:[y.jsx(_n,{variant:"body",children:e.name}),y.jsx(_n,{variant:"body",children:e.size==null?null:Va(e.size*1024*1024)})]})]})},Fne="_typeSelect_m3myk_1",Bne={typeSelect:Fne},Une=()=>{const{reducer:[e]}=m.useContext(tn),{texts:{documents:t}}=m.useContext(Kt),[n,r]=m.useState(""),[i,a]=m.useState(null),o=m.useMemo(()=>{const c=new Map;return e.filteredFiles.forEach(u=>{c.get(u.documentTypeId)===void 0&&c.set(u.documentTypeId,u.documentTypeName)}),[{id:null,name:t.all},...Array.from(c).map(u=>({id:u[0],name:u[1]}))]},[t.all,e.filteredFiles]),s=m.useMemo(()=>e.filteredFiles.filter(c=>em(c.name,n)&&(i===null||c.documentTypeId===i)),[n,i,e.filteredFiles]);return y.jsxs("div",{className:"d-flex h-100 flex-column",children:[y.jsxs("div",{className:"d-flex gap-1 mb-1",children:[y.jsx(M_,{options:o,label:t.documentType,value:i,onChange:a,isNumber:!0,size:"sm",className:Bne.typeSelect}),y.jsx(k_,{label:t.search,type:"text",value:n,onChange:c=>r(c===null?"":c),className:"flex-grow-1",size:"sm"})]}),y.jsx(Ax,{className:"overflow-y-auto",children:s.map(c=>y.jsx(Lne,{file:c},c.id))})]})};function Wne(e){return{name:e.name,defaultDocType:e.defaultDocType,childrenIds:[],parentId:e.parentId??null,isDefault:e.isDefault,onlyRead:e.onlyRead}}function zne(e){const t=[],n=new Map,r=new Map;return e.forEach(i=>{n.set(i.id,Wne(i)),i.parentId===null?t.push(i.id):r.set(i.id,i.parentId)}),r.forEach((i,a)=>{const o=n.get(i);if(o===void 0)throw new Error(`Did not get folder with ID ${i}, which is supposed to be parent directory of folder with ID ${a}`);o.childrenIds.push(a)}),{dirsMap:n,rootIds:t}}function cb(e,t){const n=t.toUpperCase();return e.filter(r=>{var a;const i=(a=r.name)==null?void 0:a.toUpperCase();return i==null?void 0:i.includes(n)})}function Hne(e,t){return e.map(n=>{var r;return{...n,folderName:((r=t.get(n.folderId))==null?void 0:r.name)??""}})}const Vne=([e,t],n,r)=>{const{texts:{documents:i}}=m.useContext(Kt),{startLoading:a,stopLoading:o}=m.useContext(yu),{addNotification:s}=ku(),c=Eu(),l=m.useCallback(async x=>{a("documentList");try{const b=(await c.get(`/documents/${n}/${r}`)).data,{dirsMap:T,rootIds:j}=zne(b.folders),M=Hne(b.documents,T);t({type:"load-data",files:M,foldersMap:T,rootFolderIds:j,setActiveFolder:x})}finally{o("documentList")}},[c,t,r,n,a,o]);m.useEffect(()=>{l(!0)},[l]);const u=m.useCallback(async()=>{a("documents-types");try{const x=await c.get(`/documents/types/${n}`);if(x.status!==200)throw new Error(`Unexpected status code: ${x.status}`);t({type:"load-document-types",documentTypes:x.data})}finally{o("documents-types")}},[c,t,n,a,o]);m.useEffect(()=>{u()},[u]);const d=m.useCallback(async(x,S)=>{const b=S??e.markedFiles;a("documentsMove");try{await c.put(`/documents/move-to-folder?folderId=${x}`,b),t({type:"update-files",fileIds:b,newProperties:{folderId:x}}),s(i.fileMoveSuccessful(b.length,e.foldersMap.get(x).name),"success")}finally{o("documentsMove")}},[e.markedFiles,e.foldersMap,a,c,t,s,i,o]),f=m.useCallback(async x=>{const S=x??e.markedFiles;a("documentsFilesDelete");try{const b=await c.delete(`/documents/delete?${ph(S,"documentIds")}`);if(b.status!==200)throw new Error(`Unexpected status code: ${b.status}`);t({type:"delete-files",fileIds:S}),s(i.fileDeleteSuccessful(S.length),"success")}finally{o("documentsFilesDelete")}},[e.markedFiles,a,c,t,s,i,o]),h=m.useCallback(async x=>{var S;if(!(x==="root"||(S=e.foldersMap.get(x))!=null&&S.isDefault)){a("documentsFolderDelete");try{const b=await c.delete(`/documents/folder/${x}`);if(b.status!==200)throw new Error(`Unexpected status code: ${b.status}`);t({type:"delete-folder",folderId:x}),s(i.folderDeleteSuccessful(e.foldersMap.get(x).name),"success")}finally{o("documentsFolderDelete")}}},[e.foldersMap,a,c,t,s,i,o]),g=m.useCallback(async x=>{a("documentsRename");try{const S=await c.put("/documents/update-name",{documentIds:e.markedFiles,name:x});if(S.status!==200)throw new Error(`Unexpected status code: ${S.status}`);l()}finally{o("documentsRename")}},[a,c,e.markedFiles,l,o]),p=m.useCallback(async x=>{a("documents-archivate");try{const S=await c.put(`/documents/${x?"dearchive":"archive"}`,e.markedFiles);if(S.status!==200)throw new Error(`Unexpected status code: ${S.status}`);t({type:"update-files",fileIds:e.markedFiles,newProperties:{archive:!x}}),s((x?i.dearchivateSuccessful:i.archivateSuccessful)(e.markedFiles.length),"success")}finally{o("documents-archivate")}},[a,c,e.markedFiles,t,s,i.archivateSuccessful,i.dearchivateSuccessful,o]),v=m.useCallback(async()=>{var S;if(e.activeFolder==="root")return;const x=e.markedFiles.length;s(i.downloadAsZip(x),"info"),a("documents-ZIP_download");try{const b=await c.get(`/documents/download-zip?${ph(e.markedFiles,"documentIds")}`,{responseType:"blob"});_l(b.data,(((S=e.foldersMap.get(e.activeFolder))==null?void 0:S.name)??"")+"_files")}finally{o("documents-ZIP_download")}},[e.activeFolder,e.markedFiles,e.foldersMap,s,i,a,c,o]),w=m.useCallback(async(x,S)=>{s(i.downloadingFile,"info"),a("documents-downloading_file");try{const b=await c.get(`/documents/${x}?isSmall=true`,{responseType:"blob"}),T=e.constantFiles.find(M=>M.id===x),j=`${(T==null?void 0:T.name)??x.toString()}.${T!=null&&T.fileExtension?T==null?void 0:T.fileExtension.toLowerCase():"unknown"}`;_l(b.data,j,S)}finally{o("documents-downloading_file")}},[s,i.downloadingFile,a,c,e.constantFiles,o]),_=m.useCallback(async(x,S)=>{a("documents-upload"),s(i.uploadingDocuments,"info");try{await c.postForm("/documents/upload",{files:x,...S}),await l()}finally{o("documents-upload")}},[a,s,i.uploadingDocuments,c,l,o]);return{loadDocuments:l,moveDocuments:d,deleteFiles:f,deleteDirectory:h,renameFiles:g,archivateFiles:p,downloadAsZip:v,downloadFile:w,uploadFiles:_}},qne=(e,t)=>{var n,r;switch(t.type){case"load-data":{const i={...e,constantFiles:t.files,filteredFiles:cb(t.files,e.searchString),foldersMap:t.foldersMap,rootFolderIds:t.rootFolderIds};if(t.setActiveFolder){const a=t.rootFolderIds.find(o=>t.files.some(s=>s.archive===!1&&s.folderId===o))??"root";i.activeFolder=a}return i}case"load-document-types":return{...e,documentTypes:t.documentTypes};case"select-folder":return{...e,activeFolder:t.folderId,markedFiles:[]};case"mark-file":{const i=e.markedFiles.includes(t.fileId)?[...e.markedFiles.filter(a=>a!==t.fileId)]:[...e.markedFiles,t.fileId];return{...e,state:i.length>0?"selection-file":"explorer",markedFiles:i}}case"mark-files-by-action":{const i=typeof t.setStateAction=="function"?t.setStateAction(e.markedFiles):t.setStateAction;return{...e,state:i.length>0?"selection-file":"explorer",markedFiles:i}}case"mark-all-files":return e.markedFiles.length<e.filteredFiles.filter(i=>i.folderId===e.activeFolder).length?{...e,markedFiles:e.filteredFiles.filter(i=>i.folderId===e.activeFolder).map(i=>i.id),state:"explorer"}:{...e,markedFiles:[],state:"explorer"};case"enter-folder-choosing":return e.state==="folder-choosing"||e.state==="openned-modal"?e:{...e,state:"folder-choosing",canTargetRoot:t.canTargetRoot??!1,previousState:e.state,choosingType:t.choosingType};case"return-from-folder-choosing":return e.state!=="folder-choosing"?e:{...e,state:e.previousState};case"update-files":return{...e,filteredFiles:[...e.filteredFiles.map(i=>t.fileIds.includes(i.id)?{...i,...t.newProperties}:i)],constantFiles:[...e.constantFiles.map(i=>t.fileIds.includes(i.id)?{...i,...t.newProperties}:i)],markedFiles:[],state:"explorer"};case"update-folders":{const i=new Map(e.foldersMap);return t.folderIds.forEach(a=>{i.set(a,{...e.foldersMap.get(a),...t.newProperties})}),{...e,foldersMap:i}}case"delete-files":return{...e,filteredFiles:[...e.filteredFiles.filter(i=>!t.fileIds.includes(i.id))],constantFiles:[...e.constantFiles.filter(i=>!t.fileIds.includes(i.id))],markedFiles:e.markedFiles.filter(i=>!t.fileIds.includes(i)),state:"explorer"};case"open-modal":switch(t.modalType){case"create-folder":return{...e,state:"openned-modal",modalType:t.modalType,chosenFolderId:t.chosenFolderId};default:return{...e,state:"openned-modal",modalType:t.modalType}}case"close-modal":return{...e,state:"explorer"};case"delete-folder":{const i=new Map(e.foldersMap),a=(n=i.get(t.folderId))==null?void 0:n.parentId;let o=[...e.rootFolderIds];if(a){const s=JSON.parse(JSON.stringify(i.get(a)));s.childrenIds=s.childrenIds.filter(c=>c!==t.folderId),i.set(a,s)}else o=o.filter(s=>s!==t.folderId);return i.delete(t.folderId),{...e,rootFolderIds:o,foldersMap:i,activeFolder:"root"}}case"create-folder":{const i=new Map(e.foldersMap);i.set(t.folderId,{name:t.folderData.name,defaultDocType:(r=e.documentTypes.find(o=>o.id===t.folderData.documentTypeId))==null?void 0:r.name,childrenIds:[],parentId:t.folderData.parentFolderId,isDefault:!1,onlyRead:t.isOnlyRead});const a=[...e.rootFolderIds];if(t.folderData.parentFolderId===null)a.push(t.folderId);else{const o=i.get(t.folderData.parentFolderId),s=JSON.parse(JSON.stringify(o));s.childrenIds.push(t.folderId),i.set(t.folderData.parentFolderId,s)}return{...e,state:"explorer",rootFolderIds:a,foldersMap:i}}case"search-files":{const i=cb(e.constantFiles,t.searchString);return{...e,searchString:t.searchString,filteredFiles:i,markedFiles:e.markedFiles.filter(a=>i.map(o=>o.id).includes(a))}}default:throw new Error("Wrong action.type specified.")}},Yne=()=>{const e={state:"explorer",activeFolder:"root",searchString:"",filteredFiles:[],constantFiles:[],foldersMap:new Map,rootFolderIds:[],markedFiles:[],documentTypes:[]},[t,n]=m.useReducer(qne,e);return[t,n]},Gne=m.memo(({entityType:e,entityId:t,className:n,BnfTableComponent:r,tableIdentifier:i,customRootFolderName:a,writePermissions:o=!0,...s})=>{const{isMobile:c}=nc(),{ProjectIconComponent:l,texts:{documents:u}}=m.useContext(Kt),[d,f]=Yne(),[h,g]=m.useState(null),{loadDocuments:p,...v}=Vne([d,f],e,t),w=m.useMemo(()=>({entityId:t,entityType:e,apiActions:v,loadDocuments:p,reducer:[d,f]}),[t,e,v,p,d,f]),{getDropProps:_}=Yg();return c?y.jsx(tn.Provider,{value:w,children:y.jsx(Une,{})}):y.jsx("div",{...s,className:oe(Oi.wrapper,n),onDragOver:x=>{x.dataTransfer.dropEffect="none",x.stopPropagation(),x.preventDefault()},onDragEnter:x=>{x.dataTransfer.dropEffect="none",x.stopPropagation(),x.preventDefault()},children:y.jsxs(tn.Provider,{value:w,children:[y.jsx("div",{className:oe(d.state==="folder-choosing"?"dim-others":void 0,Oi.explorerWindow),children:y.jsxs("ul",{className:Oi.folderList,children:[y.jsx(rne,{customText:a??e}),d.rootFolderIds.map(x=>y.jsx($C,{dirId:x,writePermissions:o},x))]})}),y.jsxs("div",{className:oe(Oi.explorerWindow,Oi.fileList),...o&&fne(d)?_(d.activeFolder,{onFilesDrop:x=>g(x),ignoreInner:!0}):{},children:[y.jsxs("div",{className:Oi.dndText,children:[y.jsx(l,{icon:"file-upload",iconProps:{style:{marginRight:0}}}),y.jsx("span",{children:u.dropToUpload})]}),y.jsx(Ane,{tableIdentifier:i,BnfTableComponent:r,writePermissions:o},(d.activeFolder==="root").toString())]}),o?y.jsx(Nne,{className:Oi.controls,entityType:e,entityId:t}):null,y.jsx(une,{}),h!==null?y.jsx(Gg,{files:h,handleClose:()=>g(null),targetFolderId:d.activeFolder==="root"?void 0:d.activeFolder}):null]})})}),Zne=m.createContext(void 0);exports.AbstractModalHeader=Lx;exports.Alert=vm;exports.ApprovalState=tO;exports.AuthContext=bu;exports.AvatarIcon=f_;exports.Backdrop=C_;exports.BaseModal=jx;exports.BootstrapModalManager=Px;exports.Button=Rp;exports.Col=Pp;exports.ConfirmContext=n2;exports.ContextButton=Au;exports.CustomSelectInput=M_;exports.DelegationContext=u2;exports.Documents=Gne;exports.Dropdown=fm;exports.Dropdown$1=Ha;exports.DropdownDivider=Oh;exports.DropdownItem=Ii;exports.DropdownToggle=dm;exports.ENTERED=ri;exports.ENTERING=Ir;exports.EXITED=ni;exports.EXITING=ul;exports.FaMinus=CA;exports.FaPlus=TA;exports.FaSearch=SA;exports.Fade=di;exports.FileExtensionIcon=AC;exports.FileUploadContextButton=j$;exports.FloatingLabelInput=ju;exports.Form=Tr;exports.FormCheckInput=mu;exports.FormControl=xx;exports.FormDisabledContext=u_;exports.FormSelect=Hp;exports.FromToDatePickerDropdownToggle=EA;exports.HelmetContext=l_;exports.HookFormTextAreaInput=qg;exports.HookFormTextInput=to;exports.HtmlTooltip=p2;exports.IconButton=rc;exports.Ie=eO;exports.InputAnchorContainer=S_;exports.InvalidFeedback=Ru;exports.ListGroup=Ax;exports.ListGroupItem=gu;exports.LoadingContext=yu;exports.LoginState=c2;exports.LuminusComponentsContext=Kt;exports.MdCheck=zk;exports.MdCircle=Wk;exports.MdClear=Xs;exports.MdOutlineAddCircleOutline=Kk;exports.MdOutlineArrowOutward=Hk;exports.MdOutlineCameraAlt=nE;exports.MdOutlineChevronRight=oE;exports.MdOutlineClose=e2;exports.MdOutlineDelete=Qx;exports.MdOutlineEdit=rE;exports.MdOutlineExpand=qk;exports.MdOutlineFileUpload=Jx;exports.MdOutlineKeyboardArrowLeft=Jk;exports.MdOutlineKeyboardArrowRight=eE;exports.MdOutlineKeyboardDoubleArrowLeft=tE;exports.MdOutlineMenu=sE;exports.MdOutlinePhotoLibrary=iE;exports.MdOutlineStar=uE;exports.MdOutlineSubdirectoryArrowRight=lE;exports.MdSave=Uk;exports.MdSaveAs=Bk;exports.MdSearch=Fk;exports.MiniDetailWrapper=O_;exports.Modal=Mn;exports.ModalContext=Gp;exports.NoInputContainer=T_;exports.Oe=V;exports.PageContainer=zte;exports.PrimaryButton=Ji;exports.PromptContext=r2;exports.Re=Ate;exports.ResponsiveContextDropdown=w_;exports.ResponsiveContextDropdownItem=mm;exports.RowLabelInput=ic;exports.ShortcutLinksContext=Zne;exports.SideContentBar=wC;exports.SimpleDropdownToggle=um;exports.SimplePicker=p_;exports.SimpleTooltip=Jp;exports.Spinner=Xp;exports.TextInput=k_;exports.TransitionWrapper=Mb;exports.Typography=_n;exports.UserAvatarToggle=V$;exports.UserContext=l2;exports._=sG;exports._extends=ll;exports._inheritsLoose=_b;exports._objectWithoutPropertiesLoose=wp;exports.a=h_;exports.addLeadingZeros=wt;exports.atobUtf8=g2;exports.axios=Ut;exports.buildEmployeeNameString=yO;exports.buildOrgUnitString=bO;exports.buildVehicleNameString=vO;exports.cancelToken=T8;exports.capitalizeFirstLetter=gO;exports.classNames=oe;exports.classes=d_;exports.compareDate=wO;exports.compareDateTime=CO;exports.constructFrom=Ur;exports.context=hu;exports.differenceInCalendarDays=mb;exports.divWithClassName=Ep;exports.extractErrorsFromResponse=Qp;exports.extractFilename=x2;exports.extractPermissionsFromResponse=h2;exports.fixNameIdNulls=d2;exports.format=_p;exports.formatDate=pO;exports.formatDateTime=mO;exports.formatFileSize=Va;exports.getDateString=MO;exports.getDaysDifference=TO;exports.getDefaultExportFromCjs=Ht;exports.getFirstDayOfMonth=y2;exports.getFirstDayOfOffsetMonth=SO;exports.getFirstDayOfYear=EO;exports.getLastDayOfMonth=b2;exports.getLastDayOfOffsetMonth=kO;exports.getLastDayOfYear=OO;exports.getSharedManager=Ix;exports.getTimezoneOffsetInMilliseconds=Kf;exports.hasOnlyNullValues=f2;exports.hookFormSetServerErrors=rO;exports.invariant=Xf;exports.isExtensionOpenable=w2;exports.isFileOpenable=_2;exports.isISODate=v2;exports.isPast=yb;exports.isPrimitive=xl;exports.isValidDate=_O;exports.joinStrings=fs;exports.jsxRuntimeExports=y;exports.millisecondsInHour=ru;exports.millisecondsInMinute=bp;exports.millisecondsInWeek=yp;exports.msToStartOfNextDay=xO;exports.parseISO=au;exports.pe=MX;exports.replaceNullValuesOnlyObjectsWithNulls=nO;exports.requireReactIs=Tp;exports.saveFile=_l;exports.saveFileFromResponse=RO;exports.secondsInDay=xp;exports.secondsInHour=ub;exports.secondsInMinute=oT;exports.secondsInMonth=fb;exports.secondsInQuarter=cT;exports.secondsInWeek=sT;exports.secondsInYear=db;exports.shortenText=hO;exports.startOfDay=Zf;exports.startOfWeek=La;exports.stringContains=mh;exports.stringSearchWithin=em;exports.stringStartsWith=C2;exports.style=li;exports.t=Vd;exports.toDate=Sn;exports.transitionEndListener=Eb;exports.triggerBrowserReflow=Ob;exports.trimIsoDate=xu;exports.truncateText=m2;exports.urlfyArray=ph;exports.useAuth=G2;exports.useAxios=Eu;exports.useBootstrapBreakpoints=wb;exports.useBootstrapMinBreakpoint=Cb;exports.useBootstrapPrefix=nt;exports.useClickOutside=a_;exports.useClipboard=c_;exports.useCol=Lb;exports.useConfirm=sm;exports.useCookies=om;exports.useEventCallback=Bt;exports.useFormControlType=lm;exports.useFormDisabledContext=$u;exports.useIsomorphicEffect=ss;exports.useKeyPress=s_;exports.useNotifications=ku;exports.usePermissions=o_;exports.usePrompt=i2;exports.useSwipeable=gm;exports.useWindowSize=nc;exports.useZodSchemaTypes=Mu;exports.z=sn;
|
|
281
|
+
`,fill:i,opacity:o,strokeWidth:c,stroke:l===void 0?"transparent":l,style:{pointerEvents:"none"}})})};function Bi(){return Bi=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},Bi.apply(this,arguments)}var HY={top:0,right:0,bottom:0,left:0},Lg=function(e){var t,n=e.direction,r=e.itemsSpacing,i=e.padding,a=e.itemCount,o=e.itemWidth,s=e.itemHeight;if(typeof i!="number"&&(typeof(t=i)!="object"||Array.isArray(t)||t===null))throw new Error("Invalid property padding, must be one of: number, object");var c=typeof i=="number"?{top:i,right:i,bottom:i,left:i}:Bi({},HY,i),l=c.left+c.right,u=c.top+c.bottom,d=o+l,f=s+u,h=(a-1)*r;return n==="row"?d=o*a+h+l:n==="column"&&(f=s*a+h+u),{width:d,height:f,padding:c}},L3=function(e){var t=e.anchor,n=e.translateX,r=e.translateY,i=e.containerWidth,a=e.containerHeight,o=e.width,s=e.height,c=n,l=r;switch(t){case"top":c+=(i-o)/2;break;case"top-right":c+=i-o;break;case"right":c+=i-o,l+=(a-s)/2;break;case"bottom-right":c+=i-o,l+=a-s;break;case"bottom":c+=(i-o)/2,l+=a-s;break;case"bottom-left":l+=a-s;break;case"left":l+=(a-s)/2;break;case"center":c+=(i-o)/2,l+=(a-s)/2}return{x:c,y:l}},F3=function(e){var t,n,r,i,a,o,s=e.direction,c=e.justify,l=e.symbolSize,u=e.symbolSpacing,d=e.width,f=e.height;switch(s){case"left-to-right":t=0,n=(f-l)/2,i=f/2,o="central",c?(r=d,a="end"):(r=l+u,a="start");break;case"right-to-left":t=d-l,n=(f-l)/2,i=f/2,o="central",c?(r=0,a="start"):(r=d-l-u,a="end");break;case"top-to-bottom":t=(d-l)/2,n=0,r=d/2,a="middle",c?(i=f,o="alphabetic"):(i=l+u,o="text-before-edge");break;case"bottom-to-top":t=(d-l)/2,n=f-l,r=d/2,a="middle",c?(i=0,o="text-before-edge"):(i=f-l-u,o="alphabetic")}return{symbolX:t,symbolY:n,labelX:r,labelY:i,labelAnchor:a,labelAlignment:o}},VY={circle:BY,diamond:UY,square:WY,triangle:zY},qY=function(e){var t,n,r,i,a,o,s,c,l,u,d,f=e.x,h=e.y,g=e.width,p=e.height,v=e.data,w=e.direction,_=w===void 0?"left-to-right":w,x=e.justify,S=x!==void 0&&x,b=e.textColor,T=e.background,j=T===void 0?"transparent":T,M=e.opacity,k=M===void 0?1:M,E=e.symbolShape,C=E===void 0?"square":E,O=e.symbolSize,$=O===void 0?16:O,A=e.symbolSpacing,P=A===void 0?8:A,D=e.symbolBorderWidth,N=D===void 0?0:D,q=e.symbolBorderColor,z=q===void 0?"transparent":q,U=e.onClick,G=e.onMouseEnter,ne=e.onMouseLeave,te=e.toggleSerie,X=e.effects,J=m.useState({}),Q=J[0],re=J[1],F=Tt(),I=m.useCallback(function(Re){if(X){var Ve=X.filter(function(ze){return ze.on==="hover"}).reduce(function(ze,ut){return Bi({},ze,ut.style)},{});re(Ve)}G==null||G(v,Re)},[G,v,X]),L=m.useCallback(function(Re){if(X){var Ve=X.filter(function(ze){return ze.on!=="hover"}).reduce(function(ze,ut){return Bi({},ze,ut.style)},{});re(Ve)}ne==null||ne(v,Re)},[ne,v,X]),H=F3({direction:_,justify:S,symbolSize:(t=Q.symbolSize)!=null?t:$,symbolSpacing:P,width:g,height:p}),R=H.symbolX,K=H.symbolY,Z=H.labelX,ee=H.labelY,pe=H.labelAnchor,we=H.labelAlignment,ve=[U,G,ne,te].some(function(Re){return Re!==void 0}),Le=typeof C=="function"?C:VY[C];return y.jsxs("g",{transform:"translate("+f+","+h+")",style:{opacity:(n=Q.itemOpacity)!=null?n:k},children:[y.jsx("rect",{width:g,height:p,fill:(r=Q.itemBackground)!=null?r:j,style:{cursor:ve?"pointer":"auto"},onClick:function(Re){U==null||U(v,Re),te==null||te(v.id)},onMouseEnter:I,onMouseLeave:L}),ue.createElement(Le,Bi({id:v.id,x:R,y:K,size:(i=Q.symbolSize)!=null?i:$,fill:(a=(o=v.fill)!=null?o:v.color)!=null?a:"black",borderWidth:(s=Q.symbolBorderWidth)!=null?s:N,borderColor:(c=Q.symbolBorderColor)!=null?c:z},v.hidden?F.legends.hidden.symbol:void 0)),y.jsx("text",{textAnchor:pe,style:Bi({},Ig(F.legends.text),{fill:(l=(u=(d=Q.itemTextColor)!=null?d:b)!=null?u:F.legends.text.fill)!=null?l:"black",dominantBaseline:we,pointerEvents:"none",userSelect:"none"},v.hidden?F.legends.hidden.text:void 0),x:Z,y:ee,children:v.label})]})},YY=function(e){var t=e.data,n=e.x,r=e.y,i=e.direction,a=e.padding,o=a===void 0?0:a,s=e.justify,c=e.effects,l=e.itemWidth,u=e.itemHeight,d=e.itemDirection,f=d===void 0?"left-to-right":d,h=e.itemsSpacing,g=h===void 0?0:h,p=e.itemTextColor,v=e.itemBackground,w=v===void 0?"transparent":v,_=e.itemOpacity,x=_===void 0?1:_,S=e.symbolShape,b=e.symbolSize,T=e.symbolSpacing,j=e.symbolBorderWidth,M=e.symbolBorderColor,k=e.onClick,E=e.onMouseEnter,C=e.onMouseLeave,O=e.toggleSerie,$=Lg({itemCount:t.length,itemWidth:l,itemHeight:u,itemsSpacing:g,direction:i,padding:o}).padding,A=i==="row"?l+g:0,P=i==="column"?u+g:0;return y.jsx("g",{transform:"translate("+n+","+r+")",children:t.map(function(D,N){return y.jsx(qY,{data:D,x:N*A+$.left,y:N*P+$.top,width:l,height:u,direction:f,justify:s,effects:c,textColor:p,background:w,opacity:x,symbolShape:S,symbolSize:b,symbolSpacing:T,symbolBorderWidth:j,symbolBorderColor:M,onClick:k,onMouseEnter:E,onMouseLeave:C,toggleSerie:O},N)})})},Fg=function(e){var t=e.data,n=e.containerWidth,r=e.containerHeight,i=e.translateX,a=i===void 0?0:i,o=e.translateY,s=o===void 0?0:o,c=e.anchor,l=e.direction,u=e.padding,d=u===void 0?0:u,f=e.justify,h=e.itemsSpacing,g=h===void 0?0:h,p=e.itemWidth,v=e.itemHeight,w=e.itemDirection,_=e.itemTextColor,x=e.itemBackground,S=e.itemOpacity,b=e.symbolShape,T=e.symbolSize,j=e.symbolSpacing,M=e.symbolBorderWidth,k=e.symbolBorderColor,E=e.onClick,C=e.onMouseEnter,O=e.onMouseLeave,$=e.toggleSerie,A=e.effects,P=Lg({itemCount:t.length,itemsSpacing:g,itemWidth:p,itemHeight:v,direction:l,padding:d}),D=P.width,N=P.height,q=L3({anchor:c,translateX:a,translateY:s,containerWidth:n,containerHeight:r,width:D,height:N}),z=q.x,U=q.y;return y.jsx(YY,{data:t,x:z,y:U,direction:l,padding:d,justify:f,effects:A,itemsSpacing:g,itemWidth:p,itemHeight:v,itemDirection:w,itemTextColor:_,itemBackground:x,itemOpacity:S,symbolShape:b,symbolSize:T,symbolSpacing:j,symbolBorderWidth:M,symbolBorderColor:k,onClick:E,onMouseEnter:C,onMouseLeave:O,toggleSerie:typeof $=="boolean"?void 0:$})},GY={start:"left",middle:"center",end:"right"},B3=function(e,t){var n=t.data,r=t.containerWidth,i=t.containerHeight,a=t.translateX,o=a===void 0?0:a,s=t.translateY,c=s===void 0?0:s,l=t.anchor,u=t.direction,d=t.padding,f=d===void 0?0:d,h=t.justify,g=h!==void 0&&h,p=t.itemsSpacing,v=p===void 0?0:p,w=t.itemWidth,_=t.itemHeight,x=t.itemDirection,S=x===void 0?"left-to-right":x,b=t.itemTextColor,T=t.symbolSize,j=T===void 0?16:T,M=t.symbolSpacing,k=M===void 0?8:M,E=t.theme,C=Lg({itemCount:n.length,itemWidth:w,itemHeight:_,itemsSpacing:v,direction:u,padding:f}),O=C.width,$=C.height,A=C.padding,P=L3({anchor:l,translateX:o,translateY:c,containerWidth:r,containerHeight:i,width:O,height:$}),D=P.x,N=P.y,q=u==="row"?w+v:0,z=u==="column"?_+v:0;e.save(),e.translate(D,N),e.font=E.legends.text.fontSize+"px "+(E.legends.text.fontFamily||"sans-serif"),n.forEach(function(U,G){var ne,te,X=G*q+A.left,J=G*z+A.top,Q=F3({direction:S,justify:g,symbolSize:j,symbolSpacing:k,width:w,height:_}),re=Q.symbolX,F=Q.symbolY,I=Q.labelX,L=Q.labelY,H=Q.labelAnchor,R=Q.labelAlignment;e.fillStyle=(ne=U.color)!=null?ne:"black",e.fillRect(X+re,J+F,j,j),e.textAlign=GY[H],R==="central"&&(e.textBaseline="middle"),e.fillStyle=(te=b??E.legends.text.fill)!=null?te:"black",e.fillText(String(U.label),X+I,J+L)}),e.restore()};function _i(){return _i=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},_i.apply(this,arguments)}function U3(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var Ay,ZY=function(e){var t=e.width,n=e.height,r=e.legends,i=e.data,a=e.toggleSerie;return y.jsx(y.Fragment,{children:r.map(function(o,s){var c;return y.jsx(Fg,_i({},o,{containerWidth:t,containerHeight:n,data:(c=o.data)!=null?c:i,toggleSerie:o.toggleSerie?a:void 0}),s)})})},Ie={id:"id",value:"value",sortByValue:!1,innerRadius:0,padAngle:0,cornerRadius:0,layers:["arcs","arcLinkLabels","arcLabels","legends"],startAngle:0,endAngle:360,fit:!0,activeInnerRadiusOffset:0,activeOuterRadiusOffset:0,borderWidth:0,borderColor:{from:"color",modifiers:[["darker",1]]},enableArcLabels:!0,arcLabel:"formattedValue",arcLabelsSkipAngle:0,arcLabelsRadiusOffset:.5,arcLabelsTextColor:{theme:"labels.text.fill"},enableArcLinkLabels:!0,arcLinkLabel:"id",arcLinkLabelsSkipAngle:0,arcLinkLabelsOffset:0,arcLinkLabelsDiagonalLength:16,arcLinkLabelsStraightLength:24,arcLinkLabelsThickness:1,arcLinkLabelsTextOffset:6,arcLinkLabelsTextColor:{theme:"labels.text.fill"},arcLinkLabelsColor:{theme:"axis.ticks.line.stroke"},colors:{scheme:"nivo"},defs:[],fill:[],isInteractive:!0,animate:!0,motionConfig:"gentle",transitionMode:"innerRadius",tooltip:function(e){var t=e.datum;return y.jsx(Im,{id:t.id,value:t.formattedValue,enableChip:!0,color:t.color})},legends:[],role:"img",pixelRatio:typeof window<"u"&&(Ay=window.devicePixelRatio)!=null?Ay:1},KY=["points"],XY=function(e){var t=e.data,n=e.id,r=n===void 0?Ie.id:n,i=e.value,a=i===void 0?Ie.value:i,o=e.valueFormat,s=e.colors,c=s===void 0?Ie.colors:s,l=Gi(r),u=Gi(a),d=eo(o),f=Ng(c,"id");return m.useMemo(function(){return t.map(function(h){var g,p=l(h),v=u(h),w={id:p,label:(g=h.label)!=null?g:p,hidden:!1,value:v,formattedValue:d(v),data:h};return _i({},w,{color:f(w)})})},[t,l,u,d,f])},QY=function(e){var t=e.data,n=e.startAngle,r=e.endAngle,i=e.innerRadius,a=e.outerRadius,o=e.padAngle,s=e.sortByValue,c=e.activeId,l=e.activeInnerRadiusOffset,u=e.activeOuterRadiusOffset,d=e.hiddenIds,f=e.forwardLegendData,h=m.useMemo(function(){var w=Dz().value(function(_){return _.value}).startAngle(Yn(n)).endAngle(Yn(r)).padAngle(Yn(o));return s||w.sortValues(null),w},[n,r,o,s]),g=m.useMemo(function(){var w=t.filter(function(_){return!d.includes(_.id)});return{dataWithArc:h(w).map(function(_){var x=Math.abs(_.endAngle-_.startAngle);return _i({},_.data,{arc:{index:_.index,startAngle:_.startAngle,endAngle:_.endAngle,innerRadius:c===_.data.id?i-l:i,outerRadius:c===_.data.id?a+u:a,thickness:a-i,padAngle:_.padAngle,angle:x,angleDeg:Ud(x)}})}),legendData:t.map(function(_){return{id:_.id,label:_.label,color:_.color,hidden:d.includes(_.id),data:_}})}},[h,t,d,c,i,l,a,u]),p=g.legendData,v=m.useRef(f);return m.useEffect(function(){typeof v.current=="function"&&v.current(p)},[v,p]),g},JY=function(e){var t=e.activeId,n=e.onActiveIdChange,r=e.defaultActiveId,i=t!==void 0,a=m.useState(i||r===void 0?null:r),o=a[0],s=a[1];return{activeId:i?t:o,setActiveId:m.useCallback(function(c){n&&n(c),i||s(c)},[i,n,s])}},eG=function(e){var t=e.data,n=e.width,r=e.height,i=e.innerRadius,a=i===void 0?Ie.innerRadius:i,o=e.startAngle,s=o===void 0?Ie.startAngle:o,c=e.endAngle,l=c===void 0?Ie.endAngle:c,u=e.padAngle,d=u===void 0?Ie.padAngle:u,f=e.sortByValue,h=f===void 0?Ie.sortByValue:f,g=e.cornerRadius,p=g===void 0?Ie.cornerRadius:g,v=e.fit,w=v===void 0?Ie.fit:v,_=e.activeInnerRadiusOffset,x=_===void 0?Ie.activeInnerRadiusOffset:_,S=e.activeOuterRadiusOffset,b=S===void 0?Ie.activeOuterRadiusOffset:S,T=e.activeId,j=e.onActiveIdChange,M=e.defaultActiveId,k=e.forwardLegendData,E=JY({activeId:T,onActiveIdChange:j,defaultActiveId:M}),C=E.activeId,O=E.setActiveId,$=m.useState([]),A=$[0],P=$[1],D=m.useMemo(function(){var z,U=Math.min(n,r)/2,G=U*Math.min(a,1),ne=n/2,te=r/2;if(w){var X=LY(ne,te,U,s-90,l-90),J=X.points,Q=U3(X,KY),re=Math.min(n/Q.width,r/Q.height),F={width:Q.width*re,height:Q.height*re};F.x=(n-F.width)/2,F.y=(r-F.height)/2,ne=(ne-Q.x)/Q.width*Q.width*re+F.x,te=(te-Q.y)/Q.height*Q.height*re+F.y,z={box:Q,ratio:re,points:J},U*=re,G*=re}return{centerX:ne,centerY:te,radius:U,innerRadius:G,debug:z}},[n,r,a,s,l,w]),N=QY({data:t,startAngle:s,endAngle:l,innerRadius:D.innerRadius,outerRadius:D.radius,padAngle:d,sortByValue:h,activeId:C,activeInnerRadiusOffset:x,activeOuterRadiusOffset:b,hiddenIds:A,forwardLegendData:k}),q=m.useCallback(function(z){P(function(U){return U.indexOf(z)>-1?U.filter(function(G){return G!==z}):[].concat(U,[z])})},[]);return _i({arcGenerator:FY({cornerRadius:p,padAngle:Yn(d)}),activeId:C,setActiveId:O,toggleSerie:q},N,D)},tG=function(e){var t=e.dataWithArc,n=e.arcGenerator,r=e.centerX,i=e.centerY,a=e.radius,o=e.innerRadius;return m.useMemo(function(){return{dataWithArc:t,arcGenerator:n,centerX:r,centerY:i,radius:a,innerRadius:o}},[t,n,r,i,a,o])},nG=function(e){var t=e.center,n=e.data,r=e.arcGenerator,i=e.borderWidth,a=e.borderColor,o=e.isInteractive,s=e.onClick,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.setActiveId,f=e.tooltip,h=e.transitionMode,g=la(),p=g.showTooltipFromEvent,v=g.hideTooltip,w=m.useMemo(function(){if(o)return function(b,T){s==null||s(b,T)}},[o,s]),_=m.useMemo(function(){if(o)return function(b,T){p(m.createElement(f,{datum:b}),T),d(b.id),c==null||c(b,T)}},[o,p,d,c,f]),x=m.useMemo(function(){if(o)return function(b,T){p(m.createElement(f,{datum:b}),T),l==null||l(b,T)}},[o,p,l,f]),S=m.useMemo(function(){if(o)return function(b,T){v(),d(null),u==null||u(b,T)}},[o,v,d,u]);return y.jsx(NY,{center:t,data:n,arcGenerator:r,borderWidth:i,borderColor:a,transitionMode:h,onClick:w,onMouseEnter:_,onMouseMove:x,onMouseLeave:S})},rG=["isInteractive","animate","motionConfig","theme","renderWrapper"],iG=function(e){var t=e.data,n=e.id,r=n===void 0?Ie.id:n,i=e.value,a=i===void 0?Ie.value:i,o=e.valueFormat,s=e.sortByValue,c=s===void 0?Ie.sortByValue:s,l=e.layers,u=l===void 0?Ie.layers:l,d=e.startAngle,f=d===void 0?Ie.startAngle:d,h=e.endAngle,g=h===void 0?Ie.endAngle:h,p=e.padAngle,v=p===void 0?Ie.padAngle:p,w=e.fit,_=w===void 0?Ie.fit:w,x=e.innerRadius,S=x===void 0?Ie.innerRadius:x,b=e.cornerRadius,T=b===void 0?Ie.cornerRadius:b,j=e.activeInnerRadiusOffset,M=j===void 0?Ie.activeInnerRadiusOffset:j,k=e.activeOuterRadiusOffset,E=k===void 0?Ie.activeOuterRadiusOffset:k,C=e.width,O=e.height,$=e.margin,A=e.colors,P=A===void 0?Ie.colors:A,D=e.borderWidth,N=D===void 0?Ie.borderWidth:D,q=e.borderColor,z=q===void 0?Ie.borderColor:q,U=e.enableArcLabels,G=U===void 0?Ie.enableArcLabels:U,ne=e.arcLabel,te=ne===void 0?Ie.arcLabel:ne,X=e.arcLabelsSkipAngle,J=X===void 0?Ie.arcLabelsSkipAngle:X,Q=e.arcLabelsTextColor,re=Q===void 0?Ie.arcLabelsTextColor:Q,F=e.arcLabelsRadiusOffset,I=F===void 0?Ie.arcLabelsRadiusOffset:F,L=e.arcLabelsComponent,H=e.enableArcLinkLabels,R=H===void 0?Ie.enableArcLinkLabels:H,K=e.arcLinkLabel,Z=K===void 0?Ie.arcLinkLabel:K,ee=e.arcLinkLabelsSkipAngle,pe=ee===void 0?Ie.arcLinkLabelsSkipAngle:ee,we=e.arcLinkLabelsOffset,ve=we===void 0?Ie.arcLinkLabelsOffset:we,Le=e.arcLinkLabelsDiagonalLength,Re=Le===void 0?Ie.arcLinkLabelsDiagonalLength:Le,Ve=e.arcLinkLabelsStraightLength,ze=Ve===void 0?Ie.arcLinkLabelsStraightLength:Ve,ut=e.arcLinkLabelsThickness,at=ut===void 0?Ie.arcLinkLabelsThickness:ut,de=e.arcLinkLabelsTextOffset,me=de===void 0?Ie.arcLinkLabelsTextOffset:de,ke=e.arcLinkLabelsTextColor,tt=ke===void 0?Ie.arcLinkLabelsTextColor:ke,Et=e.arcLinkLabelsColor,qe=Et===void 0?Ie.arcLinkLabelsColor:Et,ot=e.arcLinkLabelComponent,pt=e.defs,It=pt===void 0?Ie.defs:pt,st=e.fill,dt=st===void 0?Ie.fill:st,mt=e.isInteractive,Wt=mt===void 0?Ie.isInteractive:mt,De=e.onClick,Ae=e.onMouseEnter,Ye=e.onMouseMove,ct=e.onMouseLeave,gt=e.tooltip,St=gt===void 0?Ie.tooltip:gt,Vt=e.activeId,Rt=e.onActiveIdChange,Dt=e.defaultActiveId,qt=e.transitionMode,vt=qt===void 0?Ie.transitionMode:qt,Yt=e.legends,rn=Yt===void 0?Ie.legends:Yt,Jt=e.forwardLegendData,ye=e.role,Ee=ye===void 0?Ie.role:ye,je=pc(C,O,$),Ge=je.outerWidth,Ue=je.outerHeight,ft=je.margin,W=je.innerWidth,ce=je.innerHeight,ae=XY({data:t,id:r,value:a,valueFormat:o,colors:P}),se=eG({data:ae,width:W,height:ce,fit:_,innerRadius:S,startAngle:f,endAngle:g,padAngle:v,sortByValue:c,cornerRadius:T,activeInnerRadiusOffset:M,activeOuterRadiusOffset:E,activeId:Vt,onActiveIdChange:Rt,defaultActiveId:Dt,forwardLegendData:Jt}),be=se.dataWithArc,Oe=se.legendData,xe=se.arcGenerator,Se=se.centerX,Ne=se.centerY,Pe=se.radius,Xe=se.innerRadius,zt=se.setActiveId,Ot=se.toggleSerie,Xt=Dg(It,be,dt),ge={arcs:null,arcLinkLabels:null,arcLabels:null,legends:null};u.includes("arcs")&&(ge.arcs=y.jsx(nG,{center:[Se,Ne],data:be,arcGenerator:xe,borderWidth:N,borderColor:z,isInteractive:Wt,onClick:De,onMouseEnter:Ae,onMouseMove:Ye,onMouseLeave:ct,setActiveId:zt,tooltip:St,transitionMode:vt},"arcs")),R&&u.includes("arcLinkLabels")&&(ge.arcLinkLabels=y.jsx(jY,{center:[Se,Ne],data:be,label:Z,skipAngle:pe,offset:ve,diagonalLength:Re,straightLength:ze,strokeWidth:at,textOffset:me,textColor:tt,linkColor:qe,component:ot},"arcLinkLabels")),G&&u.includes("arcLabels")&&(ge.arcLabels=y.jsx(SY,{center:[Se,Ne],data:be,label:te,radiusOffset:I,skipAngle:J,textColor:re,transitionMode:vt,component:L},"arcLabels")),rn.length>0&&u.includes("legends")&&(ge.legends=y.jsx(ZY,{width:W,height:ce,data:Oe,legends:rn,toggleSerie:Ot},"legends"));var ln=tG({dataWithArc:be,arcGenerator:xe,centerX:Se,centerY:Ne,radius:Pe,innerRadius:Xe});return y.jsx(Wd,{width:Ge,height:Ue,margin:ft,defs:Xt,role:Ee,children:u.map(function(Mt,Jn){return ge[Mt]!==void 0?ge[Mt]:typeof Mt=="function"?y.jsx(m.Fragment,{children:m.createElement(Mt,ln)},Jn):null})})},aG=function(e){var t=e.isInteractive,n=t===void 0?Ie.isInteractive:t,r=e.animate,i=r===void 0?Ie.animate:r,a=e.motionConfig,o=a===void 0?Ie.motionConfig:a,s=e.theme,c=e.renderWrapper,l=U3(e,rG);return y.jsx(mc,{animate:i,isInteractive:n,motionConfig:o,renderWrapper:c,theme:s,children:y.jsx(iG,_i({isInteractive:n},l))})},oG=function(e){return y.jsx(wo,{children:function(t){var n=t.width,r=t.height;return y.jsx(aG,_i({width:n,height:r},e))}})};function sG(){}var cG=sG,Uf=l3,lG=cG,uG=$g,dG=1/0,fG=Uf&&1/uG(new Uf([,-0]))[1]==dG?function(e){return new Uf(e)}:lG,hG=fG,pG=xg,mG=N4,gG=L4,vG=_g,yG=hG,bG=$g,xG=200;function _G(e,t,n){var r=-1,i=mG,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=gG;else if(a>=xG){var l=t?null:yG(e);if(l)return bG(l);o=!1,i=vG,c=new pG}else c=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,o&&d===d){for(var f=c.length;f--;)if(c[f]===d)continue e;t&&c.push(d),s.push(u)}else i(c,d,n)||(c!==s&&c.push(d),s.push(u))}return s}var W3=_G,wG=W3;function CG(e){return e&&e.length?wG(e):[]}var TG=CG;const Ry=Ht(TG);var SG=Yu,kG=Rg,EG=1,OG=2;function MG(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new SG;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?kG(u,l,EG|OG,r,d):f))return!1}}return!0}var $G=MG,AG=Er;function RG(e){return e===e&&!AG(e)}var z3=RG,jG=z3,PG=hc;function IG(e){for(var t=PG(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,jG(i)]}return t}var DG=IG;function NG(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var H3=NG,LG=$G,FG=DG,BG=H3;function UG(e){var t=FG(e);return t.length==1&&t[0][2]?BG(t[0][0],t[0][1]):function(n){return n===e||LG(n,e,t)}}var WG=UG,zG=Rg,HG=Fw,VG=e3,qG=Zm,YG=z3,GG=H3,ZG=bo,KG=1,XG=2;function QG(e,t){return qG(e)&&YG(t)?GG(ZG(e),t):function(n){var r=HG(n,e);return r===void 0&&r===t?VG(n,e):zG(t,r,KG|XG)}}var JG=QG;function eZ(e){return function(t){return t==null?void 0:t[e]}}var tZ=eZ,nZ=dc;function rZ(e){return function(t){return nZ(t,e)}}var iZ=rZ,aZ=tZ,oZ=iZ,sZ=Zm,cZ=bo;function lZ(e){return sZ(e)?aZ(cZ(e)):oZ(e)}var uZ=lZ,dZ=WG,fZ=JG,hZ=Qu,pZ=Pn,mZ=uZ;function gZ(e){return typeof e=="function"?e:e==null?hZ:typeof e=="object"?pZ(e)?fZ(e[0],e[1]):dZ(e):mZ(e)}var Bg=gZ,vZ=Bg,yZ=W3;function bZ(e,t){return e&&e.length?yZ(e,vZ(t)):[]}var xZ=bZ;const fp=Ht(xZ);var _Z=xw,wZ=hc;function CZ(e,t){return e&&_Z(e,t,wZ)}var TZ=CZ,SZ=mo;function kZ(e,t){return function(n,r){if(n==null)return n;if(!SZ(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var EZ=kZ,OZ=TZ,MZ=EZ,$Z=MZ(OZ),V3=$Z,AZ=V3,RZ=mo;function jZ(e,t){var n=-1,r=RZ(e)?Array(e.length):[];return AZ(e,function(i,a,o){r[++n]=t(i,a,o)}),r}var PZ=jZ;function IZ(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var DZ=IZ,jy=Ju;function NZ(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=jy(e),o=t!==void 0,s=t===null,c=t===t,l=jy(t);if(!s&&!l&&!a&&e>t||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}var LZ=NZ,FZ=LZ;function BZ(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=FZ(i[r],a[r]);if(c){if(r>=s)return c;var l=n[r];return c*(l=="desc"?-1:1)}}return e.index-t.index}var UZ=BZ,Wf=ed,WZ=dc,zZ=Bg,HZ=PZ,VZ=DZ,qZ=go,YZ=UZ,GZ=Qu,ZZ=Pn;function KZ(e,t,n){t.length?t=Wf(t,function(a){return ZZ(a)?function(o){return WZ(o,a.length===1?a[0]:a)}:a}):t=[GZ];var r=-1;t=Wf(t,qZ(zZ));var i=HZ(e,function(a,o,s){var c=Wf(t,function(l){return l(a)});return{criteria:c,index:++r,value:a}});return VZ(i,function(a,o){return YZ(a,o,n)})}var XZ=KZ,QZ=n3,JZ=XZ,eK=Gm,Py=Iw,tK=eK(function(e,t){if(e==null)return[];var n=t.length;return n>1&&Py(e,t[0],t[1])?t=[]:n>2&&Py(t[0],t[1],t[2])&&(t=[t[0]]),JZ(e,QZ(t,1),[])}),nK=tK;const rK=Ht(nK);var iK=Gr,aK=Qn,oK="[object Date]";function sK(e){return aK(e)&&iK(e)==oK}var cK=sK,lK=cK,uK=go,Iy=Ku,Dy=Iy&&Iy.isDate,dK=Dy?uK(Dy):lK,fK=dK;const hK=Ht(fK);function ji(){return ji=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},ji.apply(this,arguments)}var Ta=[function(e){return e.setMilliseconds(0)},function(e){return e.setSeconds(0)},function(e){return e.setMinutes(0)},function(e){return e.setHours(0)},function(e){return e.setDate(1)},function(e){return e.setMonth(0)}],pK={millisecond:[],second:Ta.slice(0,1),minute:Ta.slice(0,2),hour:Ta.slice(0,3),day:Ta.slice(0,4),month:Ta.slice(0,5),year:Ta.slice(0,6)},mK=function(e){return function(t){return pK[e].forEach(function(n){n(t)}),t}},q3=function(e){var t=e.format,n=t===void 0?"native":t,r=e.precision,i=r===void 0?"millisecond":r,a=e.useUTC,o=a===void 0||a,s=mK(i);return function(c){if(c===void 0)return c;if(n==="native"||c instanceof Date)return s(c);var l=o?O4(n):k4(n);return s(l(c))}},gK=function(e,t,n,r){var i,a,o,s,c=e.min,l=c===void 0?0:c,u=e.max,d=u===void 0?"auto":u,f=e.stacked,h=f!==void 0&&f,g=e.reverse,p=g!==void 0&&g,v=e.clamp,w=v!==void 0&&v,_=e.nice,x=_!==void 0&&_;l==="auto"?i=h===!0?(a=t.minStacked)!=null?a:0:t.min:i=l,d==="auto"?o=h===!0?(s=t.maxStacked)!=null?s:0:t.max:o=d;var S=Jw().rangeRound(r==="x"?[0,n]:[n,0]).domain(p?[o,i]:[i,o]).clamp(w);return x===!0?S.nice():typeof x=="number"&&S.nice(x),vK(S,h)},vK=function(e,t){t===void 0&&(t=!1);var n=e;return n.type="linear",n.stacked=t,n},yK=function(e,t,n){var r=aB().range([0,n]).domain(t.all);return r.type="point",r},bK=function(e,t,n,r){var i=e.round,a=i===void 0||i,o=rg().range(r==="x"?[0,n]:[n,0]).domain(t.all).round(a);return xK(o)},xK=function(e){var t=e;return t.type="band",t},_K=function(e,t,n){var r,i,a=e.format,o=a===void 0?"native":a,s=e.precision,c=s===void 0?"millisecond":s,l=e.min,u=l===void 0?"auto":l,d=e.max,f=d===void 0?"auto":d,h=e.useUTC,g=h===void 0||h,p=e.nice,v=p!==void 0&&p,w=q3({format:o,precision:c,useUTC:g});r=u==="auto"?w(t.min):o!=="native"?w(u):u,i=f==="auto"?w(t.max):o!=="native"?w(f):f;var _=g?KU():ZU();_.range([0,n]),r&&i&&_.domain([r,i]),v===!0?_.nice():typeof v!="object"&&typeof v!="number"||_.nice(v);var x=_;return x.type="time",x.useUTC=g,x},wK=function(e,t,n,r){var i,a=e.base,o=a===void 0?10:a,s=e.min,c=s===void 0?"auto":s,l=e.max,u=l===void 0?"auto":l;if(t.all.some(function(p){return p===0}))throw new Error("a log scale domain must not include or cross zero");var d,f,h=!1;if(t.all.filter(function(p){return p!=null}).forEach(function(p){h||(i===void 0?i=Math.sign(p):Math.sign(p)!==i&&(h=!0))}),h)throw new Error("a log scale domain must be strictly-positive or strictly-negative");d=c==="auto"?t.min:c,f=u==="auto"?t.max:u;var g=t4().domain([d,f]).rangeRound(r==="x"?[0,n]:[n,0]).base(o).nice();return g.type="log",g},CK=function(e,t,n,r){var i,a,o=e.constant,s=o===void 0?1:o,c=e.min,l=c===void 0?"auto":c,u=e.max,d=u===void 0?"auto":u,f=e.reverse,h=f!==void 0&&f;i=l==="auto"?t.min:l,a=d==="auto"?t.max:d;var g=n4().constant(s).rangeRound(r==="x"?[0,n]:[n,0]).nice();h===!0?g.domain([a,i]):g.domain([i,a]);var p=g;return p.type="symlog",p},TK=function(e){return e==="x"?"y":"x"},SK=function(e,t){return e===t},kK=function(e,t){return e.getTime()===t.getTime()};function Vs(e,t,n,r){switch(e.type){case"linear":return gK(e,t,n,r);case"point":return yK(e,t,n);case"band":return bK(e,t,n,r);case"time":return _K(e,t,n);case"log":return wK(e,t,n,r);case"symlog":return CK(e,t,n,r);default:throw new Error("invalid scale spec")}}var Ny=function(e,t,n){var r;if("stacked"in n&&n.stacked){var i=e.data[t==="x"?"xStacked":"yStacked"];return i==null?null:n(i)}return(r=n(e.data[t]))!=null?r:null},EK=function(e,t,n,r,i){var a=e.map(function(u){return function(d){return ji({},d,{data:d.data.map(function(f){return{data:ji({},f)}})})}(u)}),o=OK(a,t,n);"stacked"in t&&t.stacked===!0&&MK(o,a),"stacked"in n&&n.stacked===!0&&$K(o,a);var s=Vs(t,o.x,r,"x"),c=Vs(n,o.y,i,"y"),l=a.map(function(u){return ji({},u,{data:u.data.map(function(d){return ji({},d,{position:{x:Ny(d,"x",s),y:Ny(d,"y",c)}})})})});return ji({},o,{series:l,xScale:s,yScale:c})},OK=function(e,t,n){return{x:Ly(e,"x",t),y:Ly(e,"y",n)}},Ly=function(e,t,n,r){var i={},a=i.getValue,o=a===void 0?function(g){return g.data[t]}:a,s=i.setValue,c=s===void 0?function(g,p){g.data[t]=p}:s;if(n.type==="linear")e.forEach(function(g){g.data.forEach(function(p){var v=o(p);v&&c(p,parseFloat(String(v)))})});else if(n.type==="time"&&n.format!=="native"){var l=q3(n);e.forEach(function(g){g.data.forEach(function(p){var v=o(p);v&&c(p,l(v))})})}var u=[];switch(e.forEach(function(g){g.data.forEach(function(p){u.push(o(p))})}),n.type){case"linear":var d=rK(Ry(u).filter(function(g){return g!==null}),function(g){return g});return{all:d,min:Math.min.apply(Math,d),max:Math.max.apply(Math,d)};case"time":var f=fp(u,function(g){return g.getTime()}).slice(0).sort(function(g,p){return p.getTime()-g.getTime()}).reverse();return{all:f,min:f[0],max:Me(f)};default:var h=Ry(u);return{all:h,min:h[0],max:Me(h)}}},Y3=function(e,t,n){var r=TK(e),i=[];t[r].all.forEach(function(a){var o=hK(a)?kK:SK,s=[];n.forEach(function(c){var l=c.data.find(function(h){return o(h.data[r],a)}),u=null,d=null;if(l!==void 0){if((u=l.data[e])!==null){var f=Me(s);f===void 0?d=u:f!==null&&(d=f+u)}l.data[e==="x"?"xStacked":"yStacked"]=d}s.push(d),d!==null&&i.push(d)})}),t[e].minStacked=Math.min.apply(Math,i),t[e].maxStacked=Math.max.apply(Math,i)},MK=function(e,t){return Y3("x",e,t)},$K=function(e,t){return Y3("y",e,t)},G3=function(e){var t=e.bandwidth();if(t===0)return e;var n=t/2;return e.round()&&(n=Math.round(n)),function(r){var i;return((i=e(r))!=null?i:0)+n}},Z3={millisecond:[Us,Us],second:[Qh,Qh],minute:[c4,m4],hour:[l4,g4],day:[en(function(e){return e.setHours(0,0,0,0)},function(e,t){return e.setDate(e.getDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)}),en(function(e){return e.setUTCHours(0,0,0,0)},function(e,t){return e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t.getTime()-e.getTime())/864e5},function(e){return Math.floor(e.getTime()/864e5)})],week:[Yl,Gl],sunday:[Yl,Gl],monday:[Ws,zs],tuesday:[u4,v4],wednesday:[d4,y4],thursday:[ia,aa],friday:[f4,b4],saturday:[h4,x4],month:[p4,_4],year:[yi,bi]},AK=Object.keys(Z3),RK=new RegExp("^every\\s*(\\d+)?\\s*("+AK.join("|")+")s?$","i"),K3=function(e,t){if(Array.isArray(t))return t;if(typeof t=="string"&&"useUTC"in e){var n=t.match(RK);if(n){var r=n[1],i=n[2],a=Z3[i][e.useUTC?1:0];if(i==="day"){var o,s,c=e.domain(),l=c[0],u=c[1],d=new Date(u);return d.setDate(d.getDate()+1),(o=(s=a.every(Number(r??1)))==null?void 0:s.range(l,d))!=null?o:[]}if(r===void 0)return e.ticks(a);var f=a.every(Number(r));if(f)return e.ticks(f)}throw new Error("Invalid tickValues: "+t)}if("ticks"in e){if(t===void 0)return e.ticks();if(typeof(h=t)=="number"&&isFinite(h)&&Math.floor(h)===h)return e.ticks(t)}var h;return e.domain()};function Gn(){return Gn=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},Gn.apply(this,arguments)}var X3=function(e){var t,n=e.axis,r=e.scale,i=e.ticksPosition,a=e.tickValues,o=e.tickSize,s=e.tickPadding,c=e.tickRotation,l=e.truncateTickAt,u=e.engine,d=u===void 0?"svg":u,f=K3(r,a),h=Gq[d],g="bandwidth"in r?G3(r):r,p={lineX:0,lineY:0},v={textX:0,textY:0},w=typeof document=="object"&&document.dir==="rtl",_=h.align.center,x=h.baseline.center;return n==="x"?(t=function(S){var b;return{x:(b=g(S))!=null?b:0,y:0}},p.lineY=o*(i==="after"?1:-1),v.textY=(o+s)*(i==="after"?1:-1),x=i==="after"?h.baseline.top:h.baseline.bottom,c===0?_=h.align.center:i==="after"&&c<0||i==="before"&&c>0?(_=h.align[w?"left":"right"],x=h.baseline.center):(i==="after"&&c>0||i==="before"&&c<0)&&(_=h.align[w?"right":"left"],x=h.baseline.center)):(t=function(S){var b;return{x:0,y:(b=g(S))!=null?b:0}},p.lineX=o*(i==="after"?1:-1),v.textX=(o+s)*(i==="after"?1:-1),_=i==="after"?h.align.left:h.align.right),{ticks:f.map(function(S){var b=typeof S=="string"?function(T){var j=String(T).length;return l&&l>0&&j>l?""+String(T).slice(0,l).concat("..."):""+T}(S):S;return Gn({key:S instanceof Date?""+S.valueOf():""+S,value:b},t(S),p,v)}),textAlign:_,textBaseline:x}},Q3=function(e,t){if(e===void 0||typeof e=="function")return e;if(t.type==="time"){var n=sd(e);return function(r){return n(r instanceof Date?r:new Date(r))}}return fc(e)},hp=function(e){var t,n=e.width,r=e.height,i=e.scale,a=e.axis,o=e.values,s=(t=o,(Array.isArray(t)?o:void 0)||K3(i,o)),c="bandwidth"in i?G3(i):i,l=a==="x"?s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:(d=c(u))!=null?d:0,x2:(f=c(u))!=null?f:0,y1:0,y2:r}}):s.map(function(u){var d,f;return{key:u instanceof Date?""+u.valueOf():""+u,x1:0,x2:n,y1:(d=c(u))!=null?d:0,y2:(f=c(u))!=null?f:0}});return l},jK=m.memo(function(e){var t,n=e.value,r=e.format,i=e.lineX,a=e.lineY,o=e.onClick,s=e.textBaseline,c=e.textAnchor,l=e.animatedProps,u=Tt(),d=u.axis.ticks.line,f=u.axis.ticks.text,h=(t=r==null?void 0:r(n))!=null?t:n,g=m.useMemo(function(){var p={opacity:l.opacity};return o?{style:Gn({},p,{cursor:"pointer"}),onClick:function(v){return o(v,h)}}:{style:p}},[l.opacity,o,h]);return y.jsxs(Ct.g,Gn({transform:l.transform},g,{children:[y.jsx("line",{x1:0,x2:i,y1:0,y2:a,style:d}),f.outlineWidth>0&&y.jsx(Ct.text,{dominantBaseline:s,textAnchor:c,transform:l.textTransform,style:f,strokeWidth:2*f.outlineWidth,stroke:f.outlineColor,strokeLinejoin:"round",children:""+h}),y.jsx(Ct.text,{dominantBaseline:s,textAnchor:c,transform:l.textTransform,style:Ig(f),children:""+h})]}))}),PK=function(e){var t=e.axis,n=e.scale,r=e.x,i=r===void 0?0:r,a=e.y,o=a===void 0?0:a,s=e.length,c=e.ticksPosition,l=e.tickValues,u=e.tickSize,d=u===void 0?5:u,f=e.tickPadding,h=f===void 0?5:f,g=e.tickRotation,p=g===void 0?0:g,v=e.format,w=e.renderTick,_=w===void 0?jK:w,x=e.truncateTickAt,S=e.legend,b=e.legendPosition,T=b===void 0?"end":b,j=e.legendOffset,M=j===void 0?0:j,k=e.onClick,E=e.ariaHidden,C=Tt(),O=C.axis.legend.text,$=m.useMemo(function(){return Q3(v,n)},[v,n]),A=X3({axis:t,scale:n,ticksPosition:c,tickValues:l,tickSize:d,tickPadding:h,tickRotation:p,truncateTickAt:x}),P=A.ticks,D=A.textAlign,N=A.textBaseline,q=null;if(S!==void 0){var z,U=0,G=0,ne=0;t==="y"?(ne=-90,U=M,T==="start"?(z="start",G=s):T==="middle"?(z="middle",G=s/2):T==="end"&&(z="end")):(G=M,T==="start"?z="start":T==="middle"?(z="middle",U=s/2):T==="end"&&(z="end",U=s)),q=y.jsxs(y.Fragment,{children:[O.outlineWidth>0&&y.jsx("text",{transform:"translate("+U+", "+G+") rotate("+ne+")",textAnchor:z,style:Gn({dominantBaseline:"central"},O),strokeWidth:2*O.outlineWidth,stroke:O.outlineColor,strokeLinejoin:"round",children:S}),y.jsx("text",{transform:"translate("+U+", "+G+") rotate("+ne+")",textAnchor:z,style:Gn({dominantBaseline:"central"},O),children:S})]})}var te=kn(),X=te.animate,J=te.config,Q=Sr({transform:"translate("+i+","+o+")",lineX2:t==="x"?s:0,lineY2:t==="x"?0:s,config:J,immediate:!X}),re=m.useCallback(function(L){return{opacity:1,transform:"translate("+L.x+","+L.y+")",textTransform:"translate("+L.textX+","+L.textY+") rotate("+p+")"}},[p]),F=m.useCallback(function(L){return{opacity:0,transform:"translate("+L.x+","+L.y+")",textTransform:"translate("+L.textX+","+L.textY+") rotate("+p+")"}},[p]),I=ca(P,{keys:function(L){return L.key},initial:re,from:F,enter:re,update:re,leave:{opacity:0},config:J,immediate:!X});return y.jsxs(Ct.g,{transform:Q.transform,"aria-hidden":E,children:[I(function(L,H,R,K){return ue.createElement(_,Gn({tickIndex:K,format:$,rotate:p,textBaseline:N,textAnchor:D,truncateTickAt:x,animatedProps:L},H,k?{onClick:k}:{}))}),y.jsx(Ct.line,{style:C.axis.domain.line,x1:0,x2:Q.lineX2,y1:0,y2:Q.lineY2}),q]})},IK=m.memo(PK),J3=["top","right","bottom","left"],eC=m.memo(function(e){var t=e.xScale,n=e.yScale,r=e.width,i=e.height,a={top:e.top,right:e.right,bottom:e.bottom,left:e.left};return y.jsx(y.Fragment,{children:J3.map(function(o){var s=a[o];if(!s)return null;var c=o==="top"||o==="bottom";return y.jsx(IK,Gn({},s,{axis:c?"x":"y",x:o==="right"?r:0,y:o==="bottom"?i:0,scale:c?t:n,length:c?r:i,ticksPosition:o==="top"||o==="left"?"before":"after",truncateTickAt:s.truncateTickAt}),o)})})}),DK=m.memo(function(e){var t=e.animatedProps,n=Tt();return y.jsx(Ct.line,Gn({},t,n.grid.line))}),Fy=m.memo(function(e){var t=e.lines,n=kn(),r=n.animate,i=n.config,a=ca(t,{keys:function(o){return o.key},initial:function(o){return{opacity:1,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2}},from:function(o){return{opacity:0,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2}},enter:function(o){return{opacity:1,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2}},update:function(o){return{opacity:1,x1:o.x1,x2:o.x2,y1:o.y1,y2:o.y2}},leave:{opacity:0},config:i,immediate:!r});return y.jsx("g",{children:a(function(o,s){return m.createElement(DK,Gn({},s,{key:s.key,animatedProps:o}))})})}),tC=m.memo(function(e){var t=e.width,n=e.height,r=e.xScale,i=e.yScale,a=e.xValues,o=e.yValues,s=m.useMemo(function(){return!!r&&hp({width:t,height:n,scale:r,axis:"x",values:a})},[r,a,t,n]),c=m.useMemo(function(){return!!i&&hp({width:t,height:n,scale:i,axis:"y",values:o})},[n,t,i,o]);return y.jsxs(y.Fragment,{children:[s&&y.jsx(Fy,{lines:s}),c&&y.jsx(Fy,{lines:c})]})}),NK=function(e,t){var n,r=t.axis,i=t.scale,a=t.x,o=a===void 0?0:a,s=t.y,c=s===void 0?0:s,l=t.length,u=t.ticksPosition,d=t.tickValues,f=t.tickSize,h=f===void 0?5:f,g=t.tickPadding,p=g===void 0?5:g,v=t.tickRotation,w=v===void 0?0:v,_=t.format,x=t.legend,S=t.legendPosition,b=S===void 0?"end":S,T=t.legendOffset,j=T===void 0?0:T,M=t.theme,k=X3({axis:r,scale:i,ticksPosition:u,tickValues:d,tickSize:h,tickPadding:p,tickRotation:w,engine:"canvas"}),E=k.ticks,C=k.textAlign,O=k.textBaseline;e.save(),e.translate(o,c),e.textAlign=C,e.textBaseline=O;var $=M.axis.ticks.text;e.font=($.fontWeight?$.fontWeight+" ":"")+$.fontSize+"px "+$.fontFamily,((n=M.axis.domain.line.strokeWidth)!=null?n:0)>0&&(e.lineWidth=Number(M.axis.domain.line.strokeWidth),e.lineCap="square",M.axis.domain.line.stroke&&(e.strokeStyle=M.axis.domain.line.stroke),e.beginPath(),e.moveTo(0,0),e.lineTo(r==="x"?l:0,r==="x"?0:l),e.stroke());var A=typeof _=="function"?_:function(z){return""+z};if(E.forEach(function(z){var U;((U=M.axis.ticks.line.strokeWidth)!=null?U:0)>0&&(e.lineWidth=Number(M.axis.ticks.line.strokeWidth),e.lineCap="square",M.axis.ticks.line.stroke&&(e.strokeStyle=M.axis.ticks.line.stroke),e.beginPath(),e.moveTo(z.x,z.y),e.lineTo(z.x+z.lineX,z.y+z.lineY),e.stroke());var G=A(z.value);e.save(),e.translate(z.x+z.textX,z.y+z.textY),e.rotate(Yn(w)),$.outlineWidth>0&&(e.strokeStyle=$.outlineColor,e.lineWidth=2*$.outlineWidth,e.lineJoin="round",e.strokeText(""+G,0,0)),M.axis.ticks.text.fill&&(e.fillStyle=$.fill),e.fillText(""+G,0,0),e.restore()}),x!==void 0){var P=0,D=0,N=0,q="center";r==="y"?(N=-90,P=j,b==="start"?(q="start",D=l):b==="middle"?(q="center",D=l/2):b==="end"&&(q="end")):(D=j,b==="start"?q="start":b==="middle"?(q="center",P=l/2):b==="end"&&(q="end",P=l)),e.translate(P,D),e.rotate(Yn(N)),e.font=(M.axis.legend.text.fontWeight?M.axis.legend.text.fontWeight+" ":"")+M.axis.legend.text.fontSize+"px "+M.axis.legend.text.fontFamily,M.axis.legend.text.fill&&(e.fillStyle=M.axis.legend.text.fill),e.textAlign=q,e.textBaseline="middle",e.fillText(x,0,0)}e.restore()},nC=function(e,t){var n=t.xScale,r=t.yScale,i=t.width,a=t.height,o=t.top,s=t.right,c=t.bottom,l=t.left,u=t.theme,d={top:o,right:s,bottom:c,left:l};J3.forEach(function(f){var h=d[f];if(!h)return null;var g=f==="top"||f==="bottom",p=f==="top"||f==="left"?"before":"after",v=g?n:r,w=Q3(h.format,v);NK(e,Gn({},h,{axis:g?"x":"y",x:f==="right"?i:0,y:f==="bottom"?a:0,scale:v,format:w,length:g?i:a,ticksPosition:p,theme:u}))})},tu=function(e,t){var n=t.width,r=t.height,i=t.scale,a=t.axis,o=t.values;hp({width:n,height:r,scale:i,axis:a,values:o}).forEach(function(s){e.beginPath(),e.moveTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.stroke()})},LK=Lw,FK=0;function BK(e){var t=++FK;return LK(e)+t}var UK=BK;const WK=Ht(UK),Br=11102230246251565e-32,pn=134217729,zK=(3+8*Br)*Br;function zf(e,t,n,r,i){let a,o,s,c,l=t[0],u=r[0],d=0,f=0;u>l==u>-l?(a=l,l=t[++d]):(a=u,u=r[++f]);let h=0;if(d<e&&f<n)for(u>l==u>-l?(o=l+a,s=a-(o-l),l=t[++d]):(o=u+a,s=a-(o-u),u=r[++f]),a=o,s!==0&&(i[h++]=s);d<e&&f<n;)u>l==u>-l?(o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d]):(o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f]),a=o,s!==0&&(i[h++]=s);for(;d<e;)o=a+l,c=o-a,s=a-(o-c)+(l-c),l=t[++d],a=o,s!==0&&(i[h++]=s);for(;f<n;)o=a+u,c=o-a,s=a-(o-c)+(u-c),u=r[++f],a=o,s!==0&&(i[h++]=s);return(a!==0||h===0)&&(i[h++]=a),h}function HK(e,t){let n=t[0];for(let r=1;r<e;r++)n+=t[r];return n}function gc(e){return new Float64Array(e)}const VK=(3+16*Br)*Br,qK=(2+12*Br)*Br,YK=(9+64*Br)*Br*Br,Sa=gc(4),By=gc(8),Uy=gc(12),Wy=gc(16),bn=gc(4);function GK(e,t,n,r,i,a,o){let s,c,l,u,d,f,h,g,p,v,w,_,x,S,b,T,j,M;const k=e-i,E=n-i,C=t-a,O=r-a;S=k*O,f=pn*k,h=f-(f-k),g=k-h,f=pn*O,p=f-(f-O),v=O-p,b=g*v-(S-h*p-g*p-h*v),T=C*E,f=pn*C,h=f-(f-C),g=C-h,f=pn*E,p=f-(f-E),v=E-p,j=g*v-(T-h*p-g*p-h*v),w=b-j,d=b-w,Sa[0]=b-(w+d)+(d-j),_=S+w,d=_-S,x=S-(_-d)+(w-d),w=x-T,d=x-w,Sa[1]=x-(w+d)+(d-T),M=_+w,d=M-_,Sa[2]=_-(M-d)+(w-d),Sa[3]=M;let $=HK(4,Sa),A=qK*o;if($>=A||-$>=A||(d=e-k,s=e-(k+d)+(d-i),d=n-E,l=n-(E+d)+(d-i),d=t-C,c=t-(C+d)+(d-a),d=r-O,u=r-(O+d)+(d-a),s===0&&c===0&&l===0&&u===0)||(A=YK*o+zK*Math.abs($),$+=k*u+O*s-(C*l+E*c),$>=A||-$>=A))return $;S=s*O,f=pn*s,h=f-(f-s),g=s-h,f=pn*O,p=f-(f-O),v=O-p,b=g*v-(S-h*p-g*p-h*v),T=c*E,f=pn*c,h=f-(f-c),g=c-h,f=pn*E,p=f-(f-E),v=E-p,j=g*v-(T-h*p-g*p-h*v),w=b-j,d=b-w,bn[0]=b-(w+d)+(d-j),_=S+w,d=_-S,x=S-(_-d)+(w-d),w=x-T,d=x-w,bn[1]=x-(w+d)+(d-T),M=_+w,d=M-_,bn[2]=_-(M-d)+(w-d),bn[3]=M;const P=zf(4,Sa,4,bn,By);S=k*u,f=pn*k,h=f-(f-k),g=k-h,f=pn*u,p=f-(f-u),v=u-p,b=g*v-(S-h*p-g*p-h*v),T=C*l,f=pn*C,h=f-(f-C),g=C-h,f=pn*l,p=f-(f-l),v=l-p,j=g*v-(T-h*p-g*p-h*v),w=b-j,d=b-w,bn[0]=b-(w+d)+(d-j),_=S+w,d=_-S,x=S-(_-d)+(w-d),w=x-T,d=x-w,bn[1]=x-(w+d)+(d-T),M=_+w,d=M-_,bn[2]=_-(M-d)+(w-d),bn[3]=M;const D=zf(P,By,4,bn,Uy);S=s*u,f=pn*s,h=f-(f-s),g=s-h,f=pn*u,p=f-(f-u),v=u-p,b=g*v-(S-h*p-g*p-h*v),T=c*l,f=pn*c,h=f-(f-c),g=c-h,f=pn*l,p=f-(f-l),v=l-p,j=g*v-(T-h*p-g*p-h*v),w=b-j,d=b-w,bn[0]=b-(w+d)+(d-j),_=S+w,d=_-S,x=S-(_-d)+(w-d),w=x-T,d=x-w,bn[1]=x-(w+d)+(d-T),M=_+w,d=M-_,bn[2]=_-(M-d)+(w-d),bn[3]=M;const N=zf(D,Uy,4,bn,Wy);return Wy[N-1]}function Hc(e,t,n,r,i,a){const o=(t-a)*(n-i),s=(e-i)*(r-a),c=o-s,l=Math.abs(o+s);return Math.abs(c)>=VK*l?c:-GK(e,t,n,r,i,a,l)}const zy=Math.pow(2,-52),Vc=new Uint32Array(512);class nu{static from(t,n=JK,r=eX){const i=t.length,a=new Float64Array(i*2);for(let o=0;o<i;o++){const s=t[o];a[2*o]=n(s),a[2*o+1]=r(s)}return new nu(a)}constructor(t){const n=t.length>>1;if(n>0&&typeof t[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const r=Math.max(2*n-5,0);this._triangles=new Uint32Array(r*3),this._halfedges=new Int32Array(r*3),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:r,_hullTri:i,_hullHash:a}=this,o=t.length>>1;let s=1/0,c=1/0,l=-1/0,u=-1/0;for(let k=0;k<o;k++){const E=t[2*k],C=t[2*k+1];E<s&&(s=E),C<c&&(c=C),E>l&&(l=E),C>u&&(u=C),this._ids[k]=k}const d=(s+l)/2,f=(c+u)/2;let h,g,p;for(let k=0,E=1/0;k<o;k++){const C=Hf(d,f,t[2*k],t[2*k+1]);C<E&&(h=k,E=C)}const v=t[2*h],w=t[2*h+1];for(let k=0,E=1/0;k<o;k++){if(k===h)continue;const C=Hf(v,w,t[2*k],t[2*k+1]);C<E&&C>0&&(g=k,E=C)}let _=t[2*g],x=t[2*g+1],S=1/0;for(let k=0;k<o;k++){if(k===h||k===g)continue;const E=XK(v,w,_,x,t[2*k],t[2*k+1]);E<S&&(p=k,S=E)}let b=t[2*p],T=t[2*p+1];if(S===1/0){for(let C=0;C<o;C++)this._dists[C]=t[2*C]-t[0]||t[2*C+1]-t[1];Ra(this._ids,this._dists,0,o-1);const k=new Uint32Array(o);let E=0;for(let C=0,O=-1/0;C<o;C++){const $=this._ids[C],A=this._dists[$];A>O&&(k[E++]=$,O=A)}this.hull=k.subarray(0,E),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(Hc(v,w,_,x,b,T)<0){const k=g,E=_,C=x;g=p,_=b,x=T,p=k,b=E,T=C}const j=QK(v,w,_,x,b,T);this._cx=j.x,this._cy=j.y;for(let k=0;k<o;k++)this._dists[k]=Hf(t[2*k],t[2*k+1],j.x,j.y);Ra(this._ids,this._dists,0,o-1),this._hullStart=h;let M=3;r[h]=n[p]=g,r[g]=n[h]=p,r[p]=n[g]=h,i[h]=0,i[g]=1,i[p]=2,a.fill(-1),a[this._hashKey(v,w)]=h,a[this._hashKey(_,x)]=g,a[this._hashKey(b,T)]=p,this.trianglesLen=0,this._addTriangle(h,g,p,-1,-1,-1);for(let k=0,E,C;k<this._ids.length;k++){const O=this._ids[k],$=t[2*O],A=t[2*O+1];if(k>0&&Math.abs($-E)<=zy&&Math.abs(A-C)<=zy||(E=$,C=A,O===h||O===g||O===p))continue;let P=0;for(let U=0,G=this._hashKey($,A);U<this._hashSize&&(P=a[(G+U)%this._hashSize],!(P!==-1&&P!==r[P]));U++);P=n[P];let D=P,N;for(;N=r[D],Hc($,A,t[2*D],t[2*D+1],t[2*N],t[2*N+1])>=0;)if(D=N,D===P){D=-1;break}if(D===-1)continue;let q=this._addTriangle(D,O,r[D],-1,-1,i[D]);i[O]=this._legalize(q+2),i[D]=q,M++;let z=r[D];for(;N=r[z],Hc($,A,t[2*z],t[2*z+1],t[2*N],t[2*N+1])<0;)q=this._addTriangle(z,O,N,i[O],-1,i[z]),i[O]=this._legalize(q+2),r[z]=z,M--,z=N;if(D===P)for(;N=n[D],Hc($,A,t[2*N],t[2*N+1],t[2*D],t[2*D+1])<0;)q=this._addTriangle(N,O,D,-1,i[D],i[N]),this._legalize(q+2),i[N]=q,r[D]=D,M--,D=N;this._hullStart=n[O]=D,r[D]=n[z]=O,r[O]=z,a[this._hashKey($,A)]=O,a[this._hashKey(t[2*D],t[2*D+1])]=D}this.hull=new Uint32Array(M);for(let k=0,E=this._hullStart;k<M;k++)this.hull[k]=E,E=r[E];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(ZK(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:r,coords:i}=this;let a=0,o=0;for(;;){const s=r[t],c=t-t%3;if(o=c+(t+2)%3,s===-1){if(a===0)break;t=Vc[--a];continue}const l=s-s%3,u=c+(t+1)%3,d=l+(s+2)%3,f=n[o],h=n[t],g=n[u],p=n[d];if(KK(i[2*f],i[2*f+1],i[2*h],i[2*h+1],i[2*g],i[2*g+1],i[2*p],i[2*p+1])){n[t]=p,n[s]=f;const w=r[d];if(w===-1){let x=this._hullStart;do{if(this._hullTri[x]===d){this._hullTri[x]=t;break}x=this._hullPrev[x]}while(x!==this._hullStart)}this._link(t,w),this._link(s,r[o]),this._link(o,d);const _=l+(s+1)%3;a<Vc.length&&(Vc[a++]=_)}else{if(a===0)break;t=Vc[--a]}}return o}_link(t,n){this._halfedges[t]=n,n!==-1&&(this._halfedges[n]=t)}_addTriangle(t,n,r,i,a,o){const s=this.trianglesLen;return this._triangles[s]=t,this._triangles[s+1]=n,this._triangles[s+2]=r,this._link(s,i),this._link(s+1,a),this._link(s+2,o),this.trianglesLen+=3,s}}function ZK(e,t){const n=e/(Math.abs(e)+Math.abs(t));return(t>0?3-n:1+n)/4}function Hf(e,t,n,r){const i=e-n,a=t-r;return i*i+a*a}function KK(e,t,n,r,i,a,o,s){const c=e-o,l=t-s,u=n-o,d=r-s,f=i-o,h=a-s,g=c*c+l*l,p=u*u+d*d,v=f*f+h*h;return c*(d*v-p*h)-l*(u*v-p*f)+g*(u*h-d*f)<0}function XK(e,t,n,r,i,a){const o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c),h=(l*u-s*d)*f,g=(o*d-c*u)*f;return h*h+g*g}function QK(e,t,n,r,i,a){const o=n-e,s=r-t,c=i-e,l=a-t,u=o*o+s*s,d=c*c+l*l,f=.5/(o*l-s*c),h=e+(l*u-s*d)*f,g=t+(o*d-c*u)*f;return{x:h,y:g}}function Ra(e,t,n,r){if(r-n<=20)for(let i=n+1;i<=r;i++){const a=e[i],o=t[a];let s=i-1;for(;s>=n&&t[e[s]]>o;)e[s+1]=e[s--];e[s+1]=a}else{const i=n+r>>1;let a=n+1,o=r;Yo(e,i,a),t[e[n]]>t[e[r]]&&Yo(e,n,r),t[e[a]]>t[e[r]]&&Yo(e,a,r),t[e[n]]>t[e[a]]&&Yo(e,n,a);const s=e[a],c=t[s];for(;;){do a++;while(t[e[a]]<c);do o--;while(t[e[o]]>c);if(o<a)break;Yo(e,a,o)}e[n+1]=e[o],e[o]=s,r-a+1>=o-n?(Ra(e,t,a,r),Ra(e,t,n,o-1)):(Ra(e,t,n,o-1),Ra(e,t,a,r))}}function Yo(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function JK(e){return e[0]}function eX(e){return e[1]}const Hy=1e-6;class Ui{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,r){t=+t,n=+n,r=+r;const i=t+r,a=n;if(r<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${a}`:(Math.abs(this._x1-i)>Hy||Math.abs(this._y1-a)>Hy)&&(this._+="L"+i+","+a),r&&(this._+=`A${r},${r},0,1,1,${t-r},${n}A${r},${r},0,1,1,${this._x1=i},${this._y1=a}`)}rect(t,n,r,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class pp{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class tX{constructor(t,[n,r,i,a]=[0,0,960,500]){if(!((i=+i)>=(n=+n))||!((a=+a)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(t.points.length*2),this.vectors=new Float64Array(t.points.length*2),this.xmax=i,this.xmin=n,this.ymax=a,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:r},vectors:i}=this;let a,o;const s=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let p=0,v=0,w=r.length,_,x;p<w;p+=3,v+=2){const S=r[p]*2,b=r[p+1]*2,T=r[p+2]*2,j=t[S],M=t[S+1],k=t[b],E=t[b+1],C=t[T],O=t[T+1],$=k-j,A=E-M,P=C-j,D=O-M,N=($*D-A*P)*2;if(Math.abs(N)<1e-9){if(a===void 0){a=o=0;for(const z of n)a+=t[z*2],o+=t[z*2+1];a/=n.length,o/=n.length}const q=1e9*Math.sign((a-j)*D-(o-M)*P);_=(j+C)/2-q*D,x=(M+O)/2+q*P}else{const q=1/N,z=$*$+A*A,U=P*P+D*D;_=j+(D*z-A*U)*q,x=M+($*U-P*z)*q}s[v]=_,s[v+1]=x}let c=n[n.length-1],l,u=c*4,d,f=t[2*c],h,g=t[2*c+1];i.fill(0);for(let p=0;p<n.length;++p)c=n[p],l=u,d=f,h=g,u=c*4,f=t[2*c],g=t[2*c+1],i[l+2]=i[u]=h-g,i[l+3]=i[u+1]=f-d}render(t){const n=t==null?t=new Ui:void 0,{delaunay:{halfedges:r,inedges:i,hull:a},circumcenters:o,vectors:s}=this;if(a.length<=1)return null;for(let u=0,d=r.length;u<d;++u){const f=r[u];if(f<u)continue;const h=Math.floor(u/3)*2,g=Math.floor(f/3)*2,p=o[h],v=o[h+1],w=o[g],_=o[g+1];this._renderSegment(p,v,w,_,t)}let c,l=a[a.length-1];for(let u=0;u<a.length;++u){c=l,l=a[u];const d=Math.floor(i[l]/3)*2,f=o[d],h=o[d+1],g=c*4,p=this._project(f,h,s[g+2],s[g+3]);p&&this._renderSegment(f,h,p[0],p[1],t)}return n&&n.value()}renderBounds(t){const n=t==null?t=new Ui:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const r=n==null?n=new Ui:void 0,i=this._clip(t);if(i===null||!i.length)return;n.moveTo(i[0],i[1]);let a=i.length;for(;i[0]===i[a-2]&&i[1]===i[a-1]&&a>1;)a-=2;for(let o=2;o<a;o+=2)(i[o]!==i[o-2]||i[o+1]!==i[o-1])&&n.lineTo(i[o],i[o+1]);return n.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,r=t.length/2;n<r;++n){const i=this.cellPolygon(n);i&&(i.index=n,yield i)}}cellPolygon(t){const n=new pp;return this.renderCell(t,n),n.value()}_renderSegment(t,n,r,i,a){let o;const s=this._regioncode(t,n),c=this._regioncode(r,i);s===0&&c===0?(a.moveTo(t,n),a.lineTo(r,i)):(o=this._clipSegment(t,n,r,i,s,c))&&(a.moveTo(o[0],o[1]),a.lineTo(o[2],o[3]))}contains(t,n,r){return n=+n,n!==n||(r=+r,r!==r)?!1:this.delaunay._step(t,n,r)===t}*neighbors(t){const n=this._clip(t);if(n)for(const r of this.delaunay.neighbors(t)){const i=this._clip(r);if(i){e:for(let a=0,o=n.length;a<o;a+=2)for(let s=0,c=i.length;s<c;s+=2)if(n[a]===i[s]&&n[a+1]===i[s+1]&&n[(a+2)%o]===i[(s+c-2)%c]&&n[(a+3)%o]===i[(s+c-1)%c]){yield r;break e}}}}_cell(t){const{circumcenters:n,delaunay:{inedges:r,halfedges:i,triangles:a}}=this,o=r[t];if(o===-1)return null;const s=[];let c=o;do{const l=Math.floor(c/3);if(s.push(n[l*2],n[l*2+1]),c=c%3===2?c-2:c+1,a[c]!==t)break;c=i[c]}while(c!==o&&c!==-1);return s}_clip(t){if(t===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(n===null)return null;const{vectors:r}=this,i=t*4;return this._simplify(r[i]||r[i+1]?this._clipInfinite(t,n,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(t,n))}_clipFinite(t,n){const r=n.length;let i=null,a,o,s=n[r-2],c=n[r-1],l,u=this._regioncode(s,c),d,f=0;for(let h=0;h<r;h+=2)if(a=s,o=c,s=n[h],c=n[h+1],l=u,u=this._regioncode(s,c),l===0&&u===0)d=f,f=0,i?i.push(s,c):i=[s,c];else{let g,p,v,w,_;if(l===0){if((g=this._clipSegment(a,o,s,c,l,u))===null)continue;[p,v,w,_]=g}else{if((g=this._clipSegment(s,c,a,o,u,l))===null)continue;[w,_,p,v]=g,d=f,f=this._edgecode(p,v),d&&f&&this._edge(t,d,f,i,i.length),i?i.push(p,v):i=[p,v]}d=f,f=this._edgecode(w,_),d&&f&&this._edge(t,d,f,i,i.length),i?i.push(w,_):i=[w,_]}if(i)d=f,f=this._edgecode(i[0],i[1]),d&&f&&this._edge(t,d,f,i,i.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return i}_clipSegment(t,n,r,i,a,o){const s=a<o;for(s&&([t,n,r,i,a,o]=[r,i,t,n,o,a]);;){if(a===0&&o===0)return s?[r,i,t,n]:[t,n,r,i];if(a&o)return null;let c,l,u=a||o;u&8?(c=t+(r-t)*(this.ymax-n)/(i-n),l=this.ymax):u&4?(c=t+(r-t)*(this.ymin-n)/(i-n),l=this.ymin):u&2?(l=n+(i-n)*(this.xmax-t)/(r-t),c=this.xmax):(l=n+(i-n)*(this.xmin-t)/(r-t),c=this.xmin),a?(t=c,n=l,a=this._regioncode(t,n)):(r=c,i=l,o=this._regioncode(r,i))}}_clipInfinite(t,n,r,i,a,o){let s=Array.from(n),c;if((c=this._project(s[0],s[1],r,i))&&s.unshift(c[0],c[1]),(c=this._project(s[s.length-2],s[s.length-1],a,o))&&s.push(c[0],c[1]),s=this._clipFinite(t,s))for(let l=0,u=s.length,d,f=this._edgecode(s[u-2],s[u-1]);l<u;l+=2)d=f,f=this._edgecode(s[l],s[l+1]),d&&f&&(l=this._edge(t,d,f,s,l),u=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,n,r,i,a){for(;n!==r;){let o,s;switch(n){case 5:n=4;continue;case 4:n=6,o=this.xmax,s=this.ymin;break;case 6:n=2;continue;case 2:n=10,o=this.xmax,s=this.ymax;break;case 10:n=8;continue;case 8:n=9,o=this.xmin,s=this.ymax;break;case 9:n=1;continue;case 1:n=5,o=this.xmin,s=this.ymin;break}(i[a]!==o||i[a+1]!==s)&&this.contains(t,o,s)&&(i.splice(a,0,o,s),a+=2)}return a}_project(t,n,r,i){let a=1/0,o,s,c;if(i<0){if(n<=this.ymin)return null;(o=(this.ymin-n)/i)<a&&(c=this.ymin,s=t+(a=o)*r)}else if(i>0){if(n>=this.ymax)return null;(o=(this.ymax-n)/i)<a&&(c=this.ymax,s=t+(a=o)*r)}if(r>0){if(t>=this.xmax)return null;(o=(this.xmax-t)/r)<a&&(s=this.xmax,c=n+(a=o)*i)}else if(r<0){if(t<=this.xmin)return null;(o=(this.xmin-t)/r)<a&&(s=this.xmin,c=n+(a=o)*i)}return[s,c]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let n=0;n<t.length;n+=2){const r=(n+2)%t.length,i=(n+4)%t.length;(t[n]===t[r]&&t[r]===t[i]||t[n+1]===t[r+1]&&t[r+1]===t[i+1])&&(t.splice(r,2),n-=2)}t.length||(t=null)}return t}}const nX=2*Math.PI,ka=Math.pow;function rX(e){return e[0]}function iX(e){return e[1]}function aX(e){const{triangles:t,coords:n}=e;for(let r=0;r<t.length;r+=3){const i=2*t[r],a=2*t[r+1],o=2*t[r+2];if((n[o]-n[i])*(n[a+1]-n[i+1])-(n[a]-n[i])*(n[o+1]-n[i+1])>1e-10)return!1}return!0}function oX(e,t,n){return[e+Math.sin(e+t)*n,t+Math.cos(e-t)*n]}class Ug{static from(t,n=rX,r=iX,i){return new Ug("length"in t?sX(t,n,r,i):Float64Array.from(cX(t,n,r,i)))}constructor(t){this._delaunator=new nu(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&aX(t)){this.collinear=Int32Array.from({length:n.length/2},(f,h)=>h).sort((f,h)=>n[2*f]-n[2*h]||n[2*f+1]-n[2*h+1]);const c=this.collinear[0],l=this.collinear[this.collinear.length-1],u=[n[2*c],n[2*c+1],n[2*l],n[2*l+1]],d=1e-8*Math.hypot(u[3]-u[1],u[2]-u[0]);for(let f=0,h=n.length/2;f<h;++f){const g=oX(n[2*f],n[2*f+1],d);n[2*f]=g[0],n[2*f+1]=g[1]}this._delaunator=new nu(n)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,a=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),s=this._hullIndex.fill(-1);for(let c=0,l=r.length;c<l;++c){const u=a[c%3===2?c-2:c+1];(r[c]===-1||o[u]===-1)&&(o[u]=c)}for(let c=0,l=i.length;c<l;++c)s[i[c]]=c;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],o[i[0]]=1,i.length===2&&(o[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new tX(this,t)}*neighbors(t){const{inedges:n,hull:r,_hullIndex:i,halfedges:a,triangles:o,collinear:s}=this;if(s){const d=s.indexOf(t);d>0&&(yield s[d-1]),d<s.length-1&&(yield s[d+1]);return}const c=n[t];if(c===-1)return;let l=c,u=-1;do{if(yield u=o[l],l=l%3===2?l-2:l+1,o[l]!==t)return;if(l=a[l],l===-1){const d=r[(i[t]+1)%r.length];d!==u&&(yield d);return}}while(l!==c)}find(t,n,r=0){if(t=+t,t!==t||(n=+n,n!==n))return-1;const i=r;let a;for(;(a=this._step(r,t,n))>=0&&a!==r&&a!==i;)r=a;return a}_step(t,n,r){const{inedges:i,hull:a,_hullIndex:o,halfedges:s,triangles:c,points:l}=this;if(i[t]===-1||!l.length)return(t+1)%(l.length>>1);let u=t,d=ka(n-l[t*2],2)+ka(r-l[t*2+1],2);const f=i[t];let h=f;do{let g=c[h];const p=ka(n-l[g*2],2)+ka(r-l[g*2+1],2);if(p<d&&(d=p,u=g),h=h%3===2?h-2:h+1,c[h]!==t)break;if(h=s[h],h===-1){if(h=a[(o[t]+1)%a.length],h!==g&&ka(n-l[h*2],2)+ka(r-l[h*2+1],2)<d)return h;break}}while(h!==f);return u}render(t){const n=t==null?t=new Ui:void 0,{points:r,halfedges:i,triangles:a}=this;for(let o=0,s=i.length;o<s;++o){const c=i[o];if(c<o)continue;const l=a[o]*2,u=a[c]*2;t.moveTo(r[l],r[l+1]),t.lineTo(r[u],r[u+1])}return this.renderHull(t),n&&n.value()}renderPoints(t,n){n===void 0&&(!t||typeof t.moveTo!="function")&&(n=t,t=null),n=n==null?2:+n;const r=t==null?t=new Ui:void 0,{points:i}=this;for(let a=0,o=i.length;a<o;a+=2){const s=i[a],c=i[a+1];t.moveTo(s+n,c),t.arc(s,c,n,0,nX)}return r&&r.value()}renderHull(t){const n=t==null?t=new Ui:void 0,{hull:r,points:i}=this,a=r[0]*2,o=r.length;t.moveTo(i[a],i[a+1]);for(let s=1;s<o;++s){const c=2*r[s];t.lineTo(i[c],i[c+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new pp;return this.renderHull(t),t.value()}renderTriangle(t,n){const r=n==null?n=new Ui:void 0,{points:i,triangles:a}=this,o=a[t*=3]*2,s=a[t+1]*2,c=a[t+2]*2;return n.moveTo(i[o],i[o+1]),n.lineTo(i[s],i[s+1]),n.lineTo(i[c],i[c+1]),n.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,r=t.length/3;n<r;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new pp;return this.renderTriangle(t,n),n.value()}}function sX(e,t,n,r){const i=e.length,a=new Float64Array(i*2);for(let o=0;o<i;++o){const s=e[o];a[o*2]=t.call(r,s,o,e),a[o*2+1]=n.call(r,s,o,e)}return a}function*cX(e,t,n,r){let i=0;for(const a of e)yield t.call(r,a,i,e),yield n.call(r,a,i,e),++i}var Wg=function(e){return[e.x,e.y]},vc=m3,rC="cursor",iC="top",lX=function(e){var t=e.points,n=e.getNodePosition,r=n===void 0?Wg:n,i=e.margin,a=i===void 0?vc:i;return t.map(function(o){var s=r(o),c=s[0],l=s[1];return[c+a.left,l+a.top]})},uX=function(e){var t=e.points,n=e.width,r=e.height,i=e.margin,a=i===void 0?vc:i,o=e.debug,s=Ug.from(t),c=o?s.voronoi([0,0,a.left+n+a.right,a.top+r+a.bottom]):void 0;return{points:t,delaunay:s,voronoi:c}},aC=function(e){var t=e.points,n=e.getNodePosition,r=n===void 0?Wg:n,i=e.width,a=e.height,o=e.margin,s=o===void 0?vc:o,c=e.debug;return m.useMemo(function(){return uX({points:lX({points:t,margin:s,getNodePosition:r}),width:i,height:a,margin:s,debug:c})},[t,i,a,s,c])},dX=function(e){var t=e.elementRef,n=e.nodes,r=e.getNodePosition,i=r===void 0?Wg:r,a=e.delaunay,o=e.setCurrent,s=e.margin,c=s===void 0?vc:s,l=e.detectionRadius,u=l===void 0?1/0:l,d=e.isInteractive,f=d===void 0||d,h=e.onMouseEnter,g=e.onMouseMove,p=e.onMouseLeave,v=e.onClick,w=e.onTouchStart,_=e.onTouchMove,x=e.onTouchEnd,S=e.enableTouchCrosshair,b=S!==void 0&&S,T=e.tooltip,j=e.tooltipPosition,M=j===void 0?rC:j,k=e.tooltipAnchor,E=k===void 0?iC:k,C=m.useState(null),O=C[0],$=C[1],A=m.useRef(null);m.useEffect(function(){A.current=O},[A,O]);var P=m.useCallback(function(F){if(!t.current)return null;var I=os(t.current,F),L=I[0],H=I[1],R=a.find(L,H),K=R!==void 0?n[R]:null;if(K&&u!==1/0){var Z=i(K),ee=Z[0],pe=Z[1];nY(L,H,ee+c.left,pe+c.top)>u&&(R=null,K=null)}return R===null||K===null?null:[R,K]},[t,a,n,i,c,u]),D=la(),N=D.showTooltipAt,q=D.showTooltipFromEvent,z=D.hideTooltip,U=m.useMemo(function(){if(T)return M==="cursor"?function(F,I){q(T(F),I,E)}:function(F){var I=i(F),L=I[0],H=I[1];N(T(F),[L+c.left,H+c.top],E)}},[N,q,T,M,E,i,c]),G=m.useCallback(function(F){var I=P(F);if($(I),o==null||o(I?I[1]:null),I){var L=I[1];U==null||U(L,F),h==null||h(I[1],F)}},[P,$,o,U,h]),ne=m.useCallback(function(F){var I=P(F);if($(I),I){var L=I[0],H=I[1];if(o==null||o(H),U==null||U(H,F),A.current){var R=A.current,K=R[0],Z=R[1];L!==K?p==null||p(Z,F):g==null||g(H,F)}else h==null||h(H,F)}else o==null||o(null),z==null||z(),A.current&&(p==null||p(A.current[1],F))},[P,$,A,h,g,p,U,z]),te=m.useCallback(function(F){$(null),o==null||o(null),z(),p&&A.current&&p(A.current[1],F)},[$,o,A,z,p]),X=m.useCallback(function(F){var I=P(F);$(I),I&&(v==null||v(I[1],F))},[P,$,v]),J=m.useCallback(function(F){var I=P(F);b&&($(I),o==null||o(I?I[1]:null)),I&&(w==null||w(I[1],F))},[P,$,o,b,w]),Q=m.useCallback(function(F){var I=P(F);b&&($(I),o==null||o(I?I[1]:null)),I&&(_==null||_(I[1],F))},[P,$,o,b,_]),re=m.useCallback(function(F){b&&($(null),o==null||o(null)),x&&A.current&&x(A.current[1],F)},[b,$,o,x,A]);return{current:O,handleMouseEnter:f?G:void 0,handleMouseMove:f?ne:void 0,handleMouseLeave:f?te:void 0,handleClick:f?X:void 0,handleTouchStart:f?J:void 0,handleTouchMove:f?Q:void 0,handleTouchEnd:f?re:void 0}},fX=function(e){var t=e.nodes,n=e.width,r=e.height,i=e.margin,a=i===void 0?vc:i,o=e.getNodePosition,s=e.setCurrent,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,g=e.onTouchEnd,p=e.enableTouchCrosshair,v=p!==void 0&&p,w=e.detectionRadius,_=w===void 0?1/0:w,x=e.tooltip,S=e.tooltipPosition,b=S===void 0?rC:S,T=e.tooltipAnchor,j=T===void 0?iC:T,M=e.debug,k=m.useRef(null),E=aC({points:t,getNodePosition:o,width:n,height:r,margin:a,debug:M}),C=E.delaunay,O=E.voronoi,$=dX({elementRef:k,nodes:t,delaunay:C,margin:a,detectionRadius:_,setCurrent:s,onMouseEnter:c,onMouseMove:l,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:h,onTouchEnd:g,enableTouchCrosshair:v,tooltip:x,tooltipPosition:b,tooltipAnchor:j}),A=$.current,P=$.handleMouseEnter,D=$.handleMouseMove,N=$.handleMouseLeave,q=$.handleClick,z=$.handleTouchStart,U=$.handleTouchMove,G=$.handleTouchEnd,ne=m.useMemo(function(){if(M&&O)return O.render()},[M,O]);return y.jsxs("g",{ref:k,transform:"translate("+-a.left+","+-a.top+")",children:[M&&O&&y.jsxs(y.Fragment,{children:[y.jsx("path",{d:ne,stroke:"red",strokeWidth:1,opacity:.75}),_<1/0&&y.jsx("path",{stroke:"red",strokeWidth:.35,fill:"none",d:C.renderPoints(void 0,_)}),A&&y.jsx("path",{fill:"pink",opacity:.35,d:O.renderCell(A[0])})]}),y.jsx("rect",{"data-ref":"mesh-interceptor",width:a.left+n+a.right,height:a.top+r+a.bottom,fill:"red",opacity:0,style:{cursor:"auto"},onMouseEnter:P,onMouseMove:D,onMouseLeave:N,onTouchStart:z,onTouchMove:U,onTouchEnd:G,onClick:q})]})},hX=function(e,t){e.save(),e.globalAlpha=.75,e.beginPath(),t.render(e),e.strokeStyle="red",e.lineWidth=1,e.stroke(),e.restore()},pX=function(e,t,n){e.save(),e.globalAlpha=.35,e.beginPath(),t.renderCell(n,e),e.fillStyle="pink",e.fill(),e.restore()};function Cn(){return Cn=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},Cn.apply(this,arguments)}var zg=m.memo(function(e){var t=e.point;return y.jsx(Im,{id:y.jsxs("span",{children:["x: ",y.jsx("strong",{children:t.data.xFormatted}),", y:"," ",y.jsx("strong",{children:t.data.yFormatted})]}),enableChip:!0,color:t.serieColor})}),oC=m.memo(function(e){var t=e.slice,n=e.axis,r=Tt(),i=n==="x"?"y":"x";return y.jsx(fw,{rows:t.points.map(function(a){return[y.jsx(dw,{color:a.serieColor,style:r.tooltip.chip},"chip"),a.serieId,y.jsx("span",{style:r.tooltip.tableCellValue,children:a.data[i+"Formatted"]},"value")]})})}),sC={curve:"linear",xScale:{type:"point"},yScale:{type:"linear",min:0,max:"auto"},layers:["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"],axisBottom:{},axisLeft:{},enableGridX:!0,enableGridY:!0,enablePoints:!0,pointSize:6,pointColor:{from:"color"},pointBorderWidth:0,pointBorderColor:{theme:"background"},enablePointLabel:!1,pointLabel:"yFormatted",colors:{scheme:"nivo"},enableArea:!1,areaBaselineValue:0,areaOpacity:.2,areaBlendMode:"normal",lineWidth:2,legends:[],isInteractive:!0,tooltip:zg,enableSlices:!1,debugSlices:!1,sliceTooltip:oC,debugMesh:!1,enableCrosshair:!0,crosshairType:"bottom-left"},ti=Cn({},sC,{enablePointLabel:!1,useMesh:!1,enableTouchCrosshair:!1,animate:!0,motionConfig:"gentle",defs:[],fill:[],role:"img"});Cn({},sC,{pixelRatio:typeof window<"u"&&window.devicePixelRatio||1});var mX=function(e){var t=e.curve;return m.useMemo(function(){return Tg().defined(function(n){return n.x!==null&&n.y!==null}).x(function(n){return n.x}).y(function(n){return n.y}).curve(p3(t))},[t])},gX=function(e){var t=e.curve,n=e.yScale,r=e.areaBaselineValue;return m.useMemo(function(){return jz().defined(function(i){return i.x!==null&&i.y!==null}).x(function(i){return i.x}).y1(function(i){return i.y}).curve(p3(t)).y0(n(r))},[t,n,r])},vX=function(e){var t=e.componentId,n=e.enableSlices,r=e.points,i=e.width,a=e.height;return m.useMemo(function(){if(n===!1)return[];if(n==="x"){var o=new Map;return r.forEach(function(c){c.data.x!==null&&c.data.y!==null&&(o.has(c.x)?o.get(c.x).push(c):o.set(c.x,[c]))}),Array.from(o.entries()).sort(function(c,l){return c[0]-l[0]}).map(function(c,l,u){var d,f,h=c[0],g=c[1],p=u[l-1],v=u[l+1];return d=p?h-(h-p[0])/2:h,f=v?h-d+(v[0]-h)/2:i-d,{id:"slice:"+t+":"+h,x0:d,x:h,y0:0,y:0,width:f,height:a,points:g.reverse()}})}if(n==="y"){var s=new Map;return r.forEach(function(c){c.data.x!==null&&c.data.y!==null&&(s.has(c.y)?s.get(c.y).push(c):s.set(c.y,[c]))}),Array.from(s.entries()).sort(function(c,l){return c[0]-l[0]}).map(function(c,l,u){var d,f,h=c[0],g=c[1],p=u[l-1],v=u[l+1];return d=p?h-(h-p[0])/2:h,f=v?h-d+(v[0]-h)/2:a-d,{id:h,x0:0,x:0,y0:d,y:h,width:i,height:f,points:g.reverse()}})}},[t,n,a,r,i])},yX="line",cC=function(e){var t=e.data,n=e.xScale,r=n===void 0?ti.xScale:n,i=e.xFormat,a=e.yScale,o=a===void 0?ti.yScale:a,s=e.yFormat,c=e.width,l=e.height,u=e.colors,d=u===void 0?ti.colors:u,f=e.curve,h=f===void 0?ti.curve:f,g=e.areaBaselineValue,p=g===void 0?ti.areaBaselineValue:g,v=e.pointColor,w=v===void 0?ti.pointColor:v,_=e.pointBorderColor,x=_===void 0?ti.pointBorderColor:_,S=e.enableSlices,b=S===void 0?ti.enableSlicesTooltip:S,T=m.useState(WK(yX))[0],j=eo(i),M=eo(s),k=Ng(d,"id"),E=Tt(),C=wr(w,E),O=wr(x,E),$=m.useState([]),A=$[0],P=$[1],D=m.useMemo(function(){return EK(t.filter(function(Q){return A.indexOf(Q.id)===-1}),r,o,c,l)},[t,A,r,o,c,l]),N=D.xScale,q=D.yScale,z=D.series,U=m.useMemo(function(){var Q=t.map(function(F){return{id:F.id,label:F.id,color:k(F)}}),re=Q.map(function(F){return Cn({},z.find(function(I){return I.id===F.id}),{color:F.color})}).filter(function(F){return!!F.id});return{legendData:Q.map(function(F){return Cn({},F,{hidden:!re.find(function(I){return I.id===F.id})})}).reverse(),series:re}},[t,z,k]),G=U.legendData,ne=U.series,te=m.useCallback(function(Q){P(function(re){return re.indexOf(Q)>-1?re.filter(function(F){return F!==Q}):[].concat(re,[Q])})},[]),X=function(Q){var re=Q.series,F=Q.getPointColor,I=Q.getPointBorderColor,L=Q.formatX,H=Q.formatY;return m.useMemo(function(){return re.reduce(function(R,K){return[].concat(R,K.data.filter(function(Z){return Z.position.x!==null&&Z.position.y!==null}).map(function(Z,ee){var pe={id:K.id+"."+ee,index:R.length+ee,serieId:K.id,serieColor:K.color,x:Z.position.x,y:Z.position.y};return pe.color=F(K),pe.borderColor=I(pe),pe.data=Cn({},Z.data,{xFormatted:L(Z.data.x),yFormatted:H(Z.data.y)}),pe}))},[])},[re,F,I,L,H])}({series:ne,getPointColor:C,getPointBorderColor:O,formatX:j,formatY:M}),J=vX({componentId:T,enableSlices:b,points:X,width:c,height:l});return{legendData:G,toggleSerie:te,lineGenerator:mX({curve:h}),areaGenerator:gX({curve:h,yScale:q,areaBaselineValue:p}),getColor:k,series:ne,xScale:N,yScale:q,slices:J,points:X}},bX=function(e){var t=e.areaBlendMode,n=e.areaOpacity,r=e.color,i=e.fill,a=e.path,o=kn(),s=o.animate,c=o.config,l=jg(a),u=Sr({color:r,config:c,immediate:!s});return y.jsx(Ct.path,{d:l,fill:i||u.color,fillOpacity:n,strokeWidth:0,style:{mixBlendMode:t}})},xX=m.memo(function(e){var t=e.areaGenerator,n=e.areaOpacity,r=e.areaBlendMode,i=e.lines.slice(0).reverse();return y.jsx("g",{children:i.map(function(a){return y.jsx(bX,Cn({path:t(a.data.map(function(o){return o.position}))},Cn({areaOpacity:n,areaBlendMode:r},a)),a.id)})})}),_X=m.memo(function(e){var t=e.lineGenerator,n=e.points,r=e.color,i=e.thickness,a=m.useMemo(function(){return t(n)},[t,n]),o=jg(a);return y.jsx(Ct.path,{d:o,fill:"none",strokeWidth:i,stroke:r})}),wX=m.memo(function(e){var t=e.lines,n=e.lineGenerator,r=e.lineWidth;return t.slice(0).reverse().map(function(i){var a=i.id,o=i.data,s=i.color;return y.jsx(_X,{id:a,points:o.map(function(c){return c.position}),lineGenerator:n,color:s,thickness:r},a)})}),CX=m.memo(function(e){var t=e.slice,n=e.slices,r=e.axis,i=e.debug,a=e.tooltip,o=e.isCurrent,s=e.setCurrent,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,g=e.onTouchEnd,p=la(),v=p.showTooltipFromEvent,w=p.hideTooltip,_=m.useCallback(function(k){v(m.createElement(a,{slice:t,axis:r}),k,"right"),s(t),c&&c(t,k)},[v,a,t,r,s,c]),x=m.useCallback(function(k){v(m.createElement(a,{slice:t,axis:r}),k,"right"),l&&l(t,k)},[v,a,t,r,l]),S=m.useCallback(function(k){w(),s(null),u&&u(t,k)},[w,s,u,t]),b=m.useCallback(function(k){d&&d(t,k)},[t,d]),T=m.useCallback(function(k){v(m.createElement(a,{slice:t,axis:r}),k,"right"),s(t),f&&f(t,k)},[r,f,s,v,t,a]),j=m.useCallback(function(k){var E=k.touches[0],C=document.elementFromPoint(E.clientX,E.clientY),O=C==null?void 0:C.getAttribute("data-ref");if(O){var $=n.find(function(A){return A.id===O});$&&(v(m.createElement(a,{slice:$,axis:r}),k,"right"),s($))}h&&h(t,k)},[r,h,s,v,t,n,a]),M=m.useCallback(function(k){w(),s(null),g&&g(t,k)},[w,s,g,t]);return y.jsx("rect",{x:t.x0,y:t.y0,width:t.width,height:t.height,stroke:"red",strokeWidth:i?1:0,strokeOpacity:.75,fill:"red",fillOpacity:o&&i?.35:0,onMouseEnter:_,onMouseMove:x,onMouseLeave:S,onClick:b,onTouchStart:T,onTouchMove:j,onTouchEnd:M,"data-ref":t.id})}),TX=m.memo(function(e){var t=e.slices,n=e.axis,r=e.debug,i=e.height,a=e.tooltip,o=e.current,s=e.setCurrent,c=e.onMouseEnter,l=e.onMouseMove,u=e.onMouseLeave,d=e.onClick,f=e.onTouchStart,h=e.onTouchMove,g=e.onTouchEnd;return t.map(function(p){return y.jsx(CX,{slice:p,slices:t,axis:n,debug:r,height:i,tooltip:a,setCurrent:s,isCurrent:o!==null&&o.id===p.id,onMouseEnter:c,onMouseMove:l,onMouseLeave:u,onClick:d,onTouchStart:f,onTouchMove:h,onTouchEnd:g},p.id)})}),SX=m.memo(function(e){var t=e.points,n=e.symbol,r=e.size,i=e.borderWidth,a=e.enableLabel,o=e.label,s=e.labelYOffset,c=Tt(),l=tY(o),u=t.slice(0).reverse().map(function(d){return{id:d.id,x:d.x,y:d.y,datum:d.data,fill:d.color,stroke:d.borderColor,label:a?l(d):null}});return y.jsx("g",{children:u.map(function(d){return y.jsx(Qq,{x:d.x,y:d.y,datum:d.datum,symbol:n,size:r,color:d.fill,borderWidth:i,borderColor:d.stroke,label:d.label,labelYOffset:s,theme:c},d.id)})})}),kX=m.memo(function(e){var t=e.points,n=e.width,r=e.height,i=e.margin,a=e.setCurrent,o=e.onMouseEnter,s=e.onMouseMove,c=e.onMouseLeave,l=e.onClick,u=e.onTouchStart,d=e.onTouchMove,f=e.onTouchEnd,h=e.tooltip,g=e.debug,p=e.enableTouchCrosshair,v=la(),w=v.showTooltipAt,_=v.hideTooltip,x=m.useCallback(function(E,C){w(m.createElement(h,{point:E}),[E.x+i.left,E.y+i.top],"top"),o&&o(E,C)},[w,h,o,i]),S=m.useCallback(function(E,C){w(m.createElement(h,{point:E}),[E.x+i.left,E.y+i.top],"top"),s&&s(E,C)},[w,h,i.left,i.top,s]),b=m.useCallback(function(E,C){_(),c&&c(E,C)},[_,c]),T=m.useCallback(function(E,C){l&&l(E,C)},[l]),j=m.useCallback(function(E,C){w(m.createElement(h,{point:E}),[E.x+i.left,E.y+i.top],"top"),u&&u(E,C)},[i.left,i.top,u,w,h]),M=m.useCallback(function(E,C){w(m.createElement(h,{point:E}),[E.x+i.left,E.y+i.top],"top"),d&&d(E,C)},[i.left,i.top,d,w,h]),k=m.useCallback(function(E,C){_(),f&&f(E,C)},[f,_]);return y.jsx(fX,{nodes:t,width:n,height:r,setCurrent:a,onMouseEnter:x,onMouseMove:S,onMouseLeave:b,onClick:T,onTouchStart:j,onTouchMove:M,onTouchEnd:k,enableTouchCrosshair:p,debug:g})}),EX=M3(function(e){var t=e.data,n=e.xScale,r=n===void 0?{type:"point"}:n,i=e.xFormat,a=e.yScale,o=a===void 0?{type:"linear",min:0,max:"auto"}:a,s=e.yFormat,c=e.layers,l=c===void 0?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:c,u=e.curve,d=u===void 0?"linear":u,f=e.areaBaselineValue,h=f===void 0?0:f,g=e.colors,p=g===void 0?{scheme:"nivo"}:g,v=e.margin,w=e.width,_=e.height,x=e.axisTop,S=e.axisRight,b=e.axisBottom,T=b===void 0?{}:b,j=e.axisLeft,M=j===void 0?{}:j,k=e.enableGridX,E=k===void 0||k,C=e.enableGridY,O=C===void 0||C,$=e.gridXValues,A=e.gridYValues,P=e.lineWidth,D=P===void 0?2:P,N=e.enableArea,q=N!==void 0&&N,z=e.areaOpacity,U=z===void 0?.2:z,G=e.areaBlendMode,ne=G===void 0?"normal":G,te=e.enablePoints,X=te===void 0||te,J=e.pointSymbol,Q=e.pointSize,re=Q===void 0?6:Q,F=e.pointColor,I=F===void 0?{from:"color"}:F,L=e.pointBorderWidth,H=L===void 0?0:L,R=e.pointBorderColor,K=R===void 0?{theme:"background"}:R,Z=e.enablePointLabel,ee=Z!==void 0&&Z,pe=e.pointLabel,we=pe===void 0?"data.yFormatted":pe,ve=e.pointLabelYOffset,Le=e.defs,Re=Le===void 0?[]:Le,Ve=e.fill,ze=Ve===void 0?[]:Ve,ut=e.markers,at=e.legends,de=at===void 0?[]:at,me=e.isInteractive,ke=me===void 0||me,tt=e.useMesh,Et=tt!==void 0&&tt,qe=e.debugMesh,ot=qe!==void 0&&qe,pt=e.onMouseEnter,It=e.onMouseMove,st=e.onMouseLeave,dt=e.onClick,mt=e.onTouchStart,Wt=e.onTouchMove,De=e.onTouchEnd,Ae=e.tooltip,Ye=Ae===void 0?zg:Ae,ct=e.enableSlices,gt=ct!==void 0&&ct,St=e.debugSlices,Vt=St!==void 0&&St,Rt=e.sliceTooltip,Dt=Rt===void 0?oC:Rt,qt=e.enableCrosshair,vt=qt===void 0||qt,Yt=e.crosshairType,rn=Yt===void 0?"bottom-left":Yt,Jt=e.enableTouchCrosshair,ye=Jt!==void 0&&Jt,Ee=e.role,je=Ee===void 0?"img":Ee,Ge=pc(w,_,v),Ue=Ge.margin,ft=Ge.innerWidth,W=Ge.innerHeight,ce=Ge.outerWidth,ae=Ge.outerHeight,se=cC({data:t,xScale:r,xFormat:i,yScale:o,yFormat:s,width:ft,height:W,colors:p,curve:d,areaBaselineValue:h,pointColor:I,pointBorderColor:K,enableSlices:gt}),be=se.legendData,Oe=se.toggleSerie,xe=se.lineGenerator,Se=se.areaGenerator,Ne=se.series,Pe=se.xScale,Xe=se.yScale,zt=se.slices,Ot=se.points,Xt=Tt(),ge=wr(I,Xt),ln=wr(K,Xt),Mt=m.useState(null),Jn=Mt[0],yc=Mt[1],er=m.useState(null),Ti=er[0],bc=er[1],Or={grid:y.jsx(tC,{theme:Xt,width:ft,height:W,xScale:E?Pe:null,yScale:O?Xe:null,xValues:$,yValues:A},"grid"),markers:y.jsx(O3,{markers:ut,width:ft,height:W,xScale:Pe,yScale:Xe,theme:Xt},"markers"),axes:y.jsx(eC,{xScale:Pe,yScale:Xe,width:ft,height:W,theme:Xt,top:x,right:S,bottom:T,left:M},"axes"),areas:null,lines:y.jsx(wX,{lines:Ne,lineGenerator:xe,lineWidth:D},"lines"),slices:null,points:null,crosshair:null,mesh:null,legends:de.map(function(Mr,To){return y.jsx(Fg,Cn({},Mr,{containerWidth:ft,containerHeight:W,data:Mr.data||be,theme:Xt,toggleSerie:Mr.toggleSerie?Oe:void 0}),"legend."+To)})},qd=Dg(Re,Ne,ze);return q&&(Or.areas=y.jsx(xX,{areaGenerator:Se,areaOpacity:U,areaBlendMode:ne,lines:Ne},"areas")),ke&>!==!1&&(Or.slices=y.jsx(TX,{slices:zt,axis:gt,debug:Vt,height:W,tooltip:Dt,current:Ti,setCurrent:bc,onMouseEnter:pt,onMouseMove:It,onMouseLeave:st,onClick:dt,onTouchStart:mt,onTouchMove:Wt,onTouchEnd:De},"slices")),X&&(Or.points=y.jsx(SX,{points:Ot,symbol:J,size:re,color:ge,borderWidth:H,borderColor:ln,enableLabel:ee,label:we,labelYOffset:ve},"points")),ke&&vt&&(Jn!==null&&(Or.crosshair=y.jsx(Vh,{width:ft,height:W,x:Jn.x,y:Jn.y,type:rn},"crosshair")),Ti!==null&&(Or.crosshair=y.jsx(Vh,{width:ft,height:W,x:Ti.x,y:Ti.y,type:gt},"crosshair"))),ke&&Et&>===!1&&(Or.mesh=y.jsx(kX,{points:Ot,width:ft,height:W,margin:Ue,current:Jn,setCurrent:yc,onMouseEnter:pt,onMouseMove:It,onMouseLeave:st,onClick:dt,onTouchStart:mt,onTouchMove:Wt,onTouchEnd:De,tooltip:Ye,enableTouchCrosshair:ye,debug:ot},"mesh")),y.jsx(Wd,{defs:qd,width:ce,height:ae,margin:Ue,role:je,children:l.map(function(Mr,To){return typeof Mr=="function"?y.jsx(m.Fragment,{children:Mr(Cn({},e,{innerWidth:ft,innerHeight:W,series:Ne,slices:zt,points:Ot,xScale:Pe,yScale:Xe,lineGenerator:xe,areaGenerator:Se,currentPoint:Jn,setCurrentPoint:yc,currentSlice:Ti,setCurrentSlice:bc}))},To):Or[Mr]})})}),OX=function(e){return y.jsx(wo,{children:function(t){var n=t.width,r=t.height;return y.jsx(EX,Cn({width:n,height:r},e))}})},MX=M3(function(e){var t=m.useRef(null),n=e.width,r=e.height,i=e.margin,a=e.pixelRatio,o=a===void 0?typeof window<"u"&&window.devicePixelRatio||1:a,s=e.data,c=e.xScale,l=c===void 0?{type:"point"}:c,u=e.xFormat,d=e.yScale,f=d===void 0?{type:"linear",min:0,max:"auto"}:d,h=e.yFormat,g=e.curve,p=g===void 0?"linear":g,v=e.layers,w=v===void 0?["grid","markers","axes","areas","crosshair","lines","points","slices","mesh","legends"]:v,_=e.colors,x=_===void 0?{scheme:"nivo"}:_,S=e.lineWidth,b=S===void 0?2:S,T=e.enableArea,j=T!==void 0&&T,M=e.areaBaselineValue,k=M===void 0?0:M,E=e.areaOpacity,C=E===void 0?.2:E,O=e.enablePoints,$=O===void 0||O,A=e.pointSize,P=A===void 0?6:A,D=e.pointColor,N=D===void 0?{from:"color"}:D,q=e.pointBorderWidth,z=q===void 0?0:q,U=e.pointBorderColor,G=U===void 0?{theme:"background"}:U,ne=e.enableGridX,te=ne===void 0||ne,X=e.gridXValues,J=e.enableGridY,Q=J===void 0||J,re=e.gridYValues,F=e.axisTop,I=e.axisRight,L=e.axisBottom,H=L===void 0?{}:L,R=e.axisLeft,K=R===void 0?{}:R,Z=e.legends,ee=Z===void 0?[]:Z,pe=e.isInteractive,we=pe===void 0||pe,ve=e.debugMesh,Le=ve!==void 0&&ve,Re=e.onMouseLeave,Ve=e.onClick,ze=e.tooltip,ut=ze===void 0?zg:ze,at=e.canvasRef,de=pc(n,r,i),me=de.margin,ke=de.innerWidth,tt=de.innerHeight,Et=de.outerWidth,qe=de.outerHeight,ot=Tt(),pt=m.useState(null),It=pt[0],st=pt[1],dt=cC({data:s,xScale:l,xFormat:u,yScale:f,yFormat:h,width:ke,height:tt,colors:x,curve:p,areaBaselineValue:k,pointColor:N,pointBorderColor:G}),mt=dt.lineGenerator,Wt=dt.areaGenerator,De=dt.series,Ae=dt.xScale,Ye=dt.yScale,ct=dt.points,gt=aC({points:ct,width:ke,height:tt,debug:Le}),St=gt.delaunay,Vt=gt.voronoi;m.useEffect(function(){at&&(at.current=t.current),t.current.width=Et*o,t.current.height=qe*o;var ye=t.current.getContext("2d");ye.scale(o,o),ye.fillStyle=ot.background,ye.fillRect(0,0,Et,qe),ye.translate(me.left,me.top),w.forEach(function(Ee){if(typeof Ee=="function"&&Ee({ctx:ye,innerWidth:ke,innerHeight:tt,series:De,points:ct,xScale:Ae,yScale:Ye,lineWidth:b,lineGenerator:mt,areaGenerator:Wt,currentPoint:It,setCurrentPoint:st}),Ee==="grid"&&ot.grid.line.strokeWidth>0&&(ye.lineWidth=ot.grid.line.strokeWidth,ye.strokeStyle=ot.grid.line.stroke,te&&tu(ye,{width:ke,height:tt,scale:Ae,axis:"x",values:X}),Q&&tu(ye,{width:ke,height:tt,scale:Ye,axis:"y",values:re})),Ee==="axes"&&nC(ye,{xScale:Ae,yScale:Ye,width:ke,height:tt,top:F,right:I,bottom:H,left:K,theme:ot}),Ee==="areas"&&j===!0){ye.save(),ye.globalAlpha=C,Wt.context(ye);for(var je=De.length-1;je>=0;je--)ye.fillStyle=De[je].color,ye.beginPath(),Wt(De[je].data.map(function(Ue){return Ue.position})),ye.fill();ye.restore()}if(Ee==="lines"&&(mt.context(ye),De.forEach(function(Ue){ye.strokeStyle=Ue.color,ye.lineWidth=b,ye.beginPath(),mt(Ue.data.map(function(ft){return ft.position})),ye.stroke()})),Ee==="points"&&$===!0&&P>0&&ct.forEach(function(Ue){ye.fillStyle=Ue.color,ye.beginPath(),ye.arc(Ue.x,Ue.y,P/2,0,2*Math.PI),ye.fill(),z>0&&(ye.strokeStyle=Ue.borderColor,ye.lineWidth=z,ye.stroke())}),Ee==="mesh"&&Le===!0&&(hX(ye,Vt),It&&pX(ye,Vt,It.index)),Ee==="legends"){var Ge=De.map(function(Ue){return{id:Ue.id,label:Ue.id,color:Ue.color}}).reverse();ee.forEach(function(Ue){B3(ye,Cn({},Ue,{data:Ue.data||Ge,containerWidth:ke,containerHeight:tt,theme:ot}))})}})},[t,Et,qe,w,ot,mt,De,Ae,Ye,te,X,Q,re,F,I,H,K,ee,ct,$,P,It]);var Rt=m.useCallback(function(ye){var Ee=os(t.current,ye),je=Ee[0],Ge=Ee[1];if(!A3(me.left,me.top,ke,tt,je,Ge))return null;var Ue=St.find(je-me.left,Ge-me.top);return ct[Ue]},[t,me,ke,tt,St]),Dt=la(),qt=Dt.showTooltipFromEvent,vt=Dt.hideTooltip,Yt=m.useCallback(function(ye){var Ee=Rt(ye);st(Ee),Ee?qt(m.createElement(ut,{point:Ee}),ye):vt()},[Rt,st,qt,vt,ut]),rn=m.useCallback(function(ye){vt(),st(null),It&&Re&&Re(It,ye)},[vt,st,Re]),Jt=m.useCallback(function(ye){if(Ve){var Ee=Rt(ye);Ee&&Ve(Ee,ye)}},[Rt,Ve]);return y.jsx("canvas",{ref:t,width:Et*o,height:qe*o,style:{width:Et,height:qe,cursor:we?"auto":"normal"},onMouseEnter:we?Yt:void 0,onMouseMove:we?Yt:void 0,onMouseLeave:we?rn:void 0,onClick:we?Jt:void 0})}),$X=m.forwardRef(function(e,t){return y.jsx(MX,Cn({},e,{canvasRef:t}))});m.forwardRef(function(e,t){return y.jsx(wo,{children:function(n){var r=n.width,i=n.height;return y.jsx($X,Cn({width:r,height:i},e,{ref:t}))}})});var AX=V3;function RX(e,t){var n=[];return AX(e,function(r,i,a){t(r,i,a)&&n.push(r)}),n}var jX=RX,PX=o3,IX=jX,DX=Bg,NX=Pn;function LX(e,t){var n=NX(e)?PX:IX;return n(e,DX(t))}var FX=LX;const BX=Ht(FX);var UX=Gr,WX=Qn,zX="[object Number]";function HX(e){return typeof e=="number"||WX(e)&&UX(e)==zX}var VX=HX;const Vy=Ht(VX);function qX(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var YX=qX,GX=vo,ZX=hc;function KX(e,t){return e&&GX(t,ZX(t),e)}var XX=KX,QX=vo,JX=uc;function eQ(e,t){return e&&QX(t,JX(t),e)}var tQ=eQ,nQ=vo,rQ=Ag;function iQ(e,t){return nQ(e,rQ(e),t)}var aQ=iQ,oQ=Mg,sQ=Um,cQ=Ag,lQ=s3,uQ=Object.getOwnPropertySymbols,dQ=uQ?function(e){for(var t=[];e;)oQ(t,cQ(e)),e=sQ(e);return t}:lQ,lC=dQ,fQ=vo,hQ=lC;function pQ(e,t){return fQ(e,hQ(e),t)}var mQ=pQ,gQ=a3,vQ=lC,yQ=uc;function bQ(e){return gQ(e,yQ,vQ)}var uC=bQ,xQ=Object.prototype,_Q=xQ.hasOwnProperty;function wQ(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&_Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var CQ=wQ,TQ=Bm;function SQ(e,t){var n=t?TQ(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var kQ=SQ,EQ=/\w*$/;function OQ(e){var t=new e.constructor(e.source,EQ.exec(e));return t.lastIndex=e.lastIndex,t}var MQ=OQ,qy=uo,Yy=qy?qy.prototype:void 0,Gy=Yy?Yy.valueOf:void 0;function $Q(e){return Gy?Object(Gy.call(e)):{}}var AQ=$Q,RQ=Bm,jQ=kQ,PQ=MQ,IQ=AQ,DQ=Cw,NQ="[object Boolean]",LQ="[object Date]",FQ="[object Map]",BQ="[object Number]",UQ="[object RegExp]",WQ="[object Set]",zQ="[object String]",HQ="[object Symbol]",VQ="[object ArrayBuffer]",qQ="[object DataView]",YQ="[object Float32Array]",GQ="[object Float64Array]",ZQ="[object Int8Array]",KQ="[object Int16Array]",XQ="[object Int32Array]",QQ="[object Uint8Array]",JQ="[object Uint8ClampedArray]",eJ="[object Uint16Array]",tJ="[object Uint32Array]";function nJ(e,t,n){var r=e.constructor;switch(t){case VQ:return RQ(e);case NQ:case LQ:return new r(+e);case qQ:return jQ(e,n);case YQ:case GQ:case ZQ:case KQ:case XQ:case QQ:case JQ:case eJ:case tJ:return DQ(e,n);case FQ:return new r;case BQ:case zQ:return new r(e);case UQ:return PQ(e);case WQ:return new r;case HQ:return IQ(e)}}var rJ=nJ,iJ=Fd,aJ=Qn,oJ="[object Map]";function sJ(e){return aJ(e)&&iJ(e)==oJ}var cJ=sJ,lJ=cJ,uJ=go,Zy=Ku,Ky=Zy&&Zy.isMap,dJ=Ky?uJ(Ky):lJ,fJ=dJ,hJ=Fd,pJ=Qn,mJ="[object Set]";function gJ(e){return pJ(e)&&hJ(e)==mJ}var vJ=gJ,yJ=vJ,bJ=go,Xy=Ku,Qy=Xy&&Xy.isSet,xJ=Qy?bJ(Qy):yJ,_J=xJ,wJ=Yu,CJ=YX,TJ=Ym,SJ=XX,kJ=tQ,EJ=_w,OJ=Tw,MJ=aQ,$J=mQ,AJ=c3,RJ=uC,jJ=Fd,PJ=CQ,IJ=rJ,DJ=kw,NJ=Pn,LJ=Zu,FJ=fJ,BJ=Er,UJ=_J,WJ=hc,zJ=uc,HJ=1,VJ=2,qJ=4,dC="[object Arguments]",YJ="[object Array]",GJ="[object Boolean]",ZJ="[object Date]",KJ="[object Error]",fC="[object Function]",XJ="[object GeneratorFunction]",QJ="[object Map]",JJ="[object Number]",hC="[object Object]",eee="[object RegExp]",tee="[object Set]",nee="[object String]",ree="[object Symbol]",iee="[object WeakMap]",aee="[object ArrayBuffer]",oee="[object DataView]",see="[object Float32Array]",cee="[object Float64Array]",lee="[object Int8Array]",uee="[object Int16Array]",dee="[object Int32Array]",fee="[object Uint8Array]",hee="[object Uint8ClampedArray]",pee="[object Uint16Array]",mee="[object Uint32Array]",jt={};jt[dC]=jt[YJ]=jt[aee]=jt[oee]=jt[GJ]=jt[ZJ]=jt[see]=jt[cee]=jt[lee]=jt[uee]=jt[dee]=jt[QJ]=jt[JJ]=jt[hC]=jt[eee]=jt[tee]=jt[nee]=jt[ree]=jt[fee]=jt[hee]=jt[pee]=jt[mee]=!0;jt[KJ]=jt[fC]=jt[iee]=!1;function sl(e,t,n,r,i,a){var o,s=t&HJ,c=t&VJ,l=t&qJ;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!BJ(e))return e;var u=NJ(e);if(u){if(o=PJ(e),!s)return OJ(e,o)}else{var d=jJ(e),f=d==fC||d==XJ;if(LJ(e))return EJ(e,s);if(d==hC||d==dC||f&&!i){if(o=c||f?{}:DJ(e),!s)return c?$J(e,kJ(o,e)):MJ(e,SJ(o,e))}else{if(!jt[d])return i?e:{};o=IJ(e,d,s)}}a||(a=new wJ);var h=a.get(e);if(h)return h;a.set(e,o),UJ(e)?e.forEach(function(v){o.add(sl(v,t,n,v,e,a))}):FJ(e)&&e.forEach(function(v,w){o.set(w,sl(v,t,n,w,e,a))});var g=l?c?RJ:AJ:c?zJ:WJ,p=u?void 0:g(e);return CJ(p||e,function(v,w){p&&(w=v,v=e[w]),TJ(o,w,sl(v,t,n,w,e,a))}),o}var gee=sl;function vee(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}var yee=vee,bee=dc,xee=yee;function _ee(e,t){return t.length<2?e:bee(e,xee(t,0,-1))}var wee=_ee,Cee=yo,Tee=Yw,See=wee,kee=bo;function Eee(e,t){return t=Cee(t,e),e=See(e,t),e==null||delete e[kee(Tee(t))]}var Oee=Eee,Mee=Hm;function $ee(e){return Mee(e)?void 0:e}var Aee=$ee,Ree=ed,jee=gee,Pee=Oee,Iee=yo,Dee=vo,Nee=Aee,Lee=r3,Fee=uC,Bee=1,Uee=2,Wee=4,zee=Lee(function(e,t){var n={};if(e==null)return n;var r=!1;t=Ree(t,function(a){return a=Iee(a,e),r||(r=a.length>1),a}),Dee(e,Fee(e),n),r&&(n=jee(n,Bee|Uee|Wee,Nee));for(var i=t.length;i--;)Pee(n,t[i]);return n}),Hee=zee;const pC=Ht(Hee);function Cr(){return Cr=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},Cr.apply(this,arguments)}var mp={dotSize:4,noteWidth:120,noteTextOffset:8,animate:!0},Vee=function(e){var t=typeof e;return m.isValidElement(e)||t==="string"||t==="function"||t==="object"},qee=function(e){var t=typeof e;return t==="string"||t==="function"},qs=function(e){return e.type==="circle"},gp=function(e){return e.type==="dot"},Ys=function(e){return e.type==="rect"},Yee=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return n.reduce(function(a,o){var s=o.offset||0;return[].concat(a,BX(t,o.match).map(function(c){var l=r(c),u=i(c);return(qs(o)||Ys(o))&&(u.size=u.size+2*s,u.width=u.width+2*s,u.height=u.height+2*s),Cr({},pC(o,["match","offset"]),l,u,{size:o.size||u.size,datum:c})}))},[])},Gee=function(e,t,n,r){var i=Math.atan2(r-t,n-e);return Yq(Ud(i))},mC=function(e){var t,n,r=e.x,i=e.y,a=e.noteX,o=e.noteY,s=e.noteWidth,c=s===void 0?mp.noteWidth:s,l=e.noteTextOffset,u=l===void 0?mp.noteTextOffset:l;if(Vy(a))t=r+a;else{if(a.abs===void 0)throw new Error("noteX should be either a number or an object containing an 'abs' property");t=a.abs}if(Vy(o))n=i+o;else{if(o.abs===void 0)throw new Error("noteY should be either a number or an object containing an 'abs' property");n=o.abs}var d=r,f=i,h=Gee(r,i,t,n);if(qs(e)){var g=Yi(Yn(h),e.size/2);d+=g.x,f+=g.y}if(Ys(e)){var p=Math.round((h+90)/45)%8;p===0&&(f-=e.height/2),p===1&&(d+=e.width/2,f-=e.height/2),p===2&&(d+=e.width/2),p===3&&(d+=e.width/2,f+=e.height/2),p===4&&(f+=e.height/2),p===5&&(d-=e.width/2,f+=e.height/2),p===6&&(d-=e.width/2),p===7&&(d-=e.width/2,f-=e.height/2)}var v=t,w=t;return(h+90)%360>180?(v-=c,w-=c):w+=c,{points:[[d,f],[t,n],[w,n]],text:[v,n-u],angle:h+90}},gC=function(e){var t=e.data,n=e.annotations,r=e.getPosition,i=e.getDimensions;return m.useMemo(function(){return Yee({data:t,annotations:n,getPosition:r,getDimensions:i})},[t,n,r,i])},Zee=function(e){var t=e.annotations;return m.useMemo(function(){return t.map(function(n){return Cr({},n,{computed:mC(Cr({},n))})})},[t])},Kee=function(e){return m.useMemo(function(){return mC(e)},[e])},Xee=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,a=Tt(),o=kn(),s=o.animate,c=o.config,l=Sr({x:n,y:r,config:c,immediate:!s});return typeof i=="function"?m.createElement(i,{x:n,y:r,datum:t}):y.jsxs(y.Fragment,{children:[a.annotations.text.outlineWidth>0&&y.jsx(Ct.text,{x:l.x,y:l.y,style:Cr({},a.annotations.text,{strokeLinejoin:"round",strokeWidth:2*a.annotations.text.outlineWidth,stroke:a.annotations.text.outlineColor}),children:i}),y.jsx(Ct.text,{x:l.x,y:l.y,style:pC(a.annotations.text,["outlineWidth","outlineColor"]),children:i})]})},Jy=function(e){var t=e.points,n=e.isOutline,r=n!==void 0&&n,i=Tt(),a=m.useMemo(function(){var c=t[0];return t.slice(1).reduce(function(l,u){return l+" L"+u[0]+","+u[1]},"M"+c[0]+","+c[1])},[t]),o=jg(a);if(r&&i.annotations.link.outlineWidth<=0)return null;var s=Cr({},i.annotations.link);return r&&(s.strokeLinecap="square",s.strokeWidth=i.annotations.link.strokeWidth+2*i.annotations.link.outlineWidth,s.stroke=i.annotations.link.outlineColor,s.opacity=i.annotations.link.outlineOpacity),y.jsx(Ct.path,{fill:"none",d:o,style:s})},Qee=function(e){var t=e.x,n=e.y,r=e.size,i=Tt(),a=kn(),o=a.animate,s=a.config,c=Sr({x:t,y:n,radius:r/2,config:s,immediate:!o});return y.jsxs(y.Fragment,{children:[i.annotations.outline.outlineWidth>0&&y.jsx(Ct.circle,{cx:c.x,cy:c.y,r:c.radius,style:Cr({},i.annotations.outline,{fill:"none",strokeWidth:i.annotations.outline.strokeWidth+2*i.annotations.outline.outlineWidth,stroke:i.annotations.outline.outlineColor,opacity:i.annotations.outline.outlineOpacity})}),y.jsx(Ct.circle,{cx:c.x,cy:c.y,r:c.radius,style:i.annotations.outline})]})},Jee=function(e){var t=e.x,n=e.y,r=e.size,i=r===void 0?mp.dotSize:r,a=Tt(),o=kn(),s=o.animate,c=o.config,l=Sr({x:t,y:n,radius:i/2,config:c,immediate:!s});return y.jsxs(y.Fragment,{children:[a.annotations.outline.outlineWidth>0&&y.jsx(Ct.circle,{cx:l.x,cy:l.y,r:l.radius,style:Cr({},a.annotations.outline,{fill:"none",strokeWidth:2*a.annotations.outline.outlineWidth,stroke:a.annotations.outline.outlineColor,opacity:a.annotations.outline.outlineOpacity})}),y.jsx(Ct.circle,{cx:l.x,cy:l.y,r:l.radius,style:a.annotations.symbol})]})},ete=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.borderRadius,o=a===void 0?6:a,s=Tt(),c=kn(),l=c.animate,u=c.config,d=Sr({x:t-r/2,y:n-i/2,width:r,height:i,config:u,immediate:!l});return y.jsxs(y.Fragment,{children:[s.annotations.outline.outlineWidth>0&&y.jsx(Ct.rect,{x:d.x,y:d.y,rx:o,ry:o,width:d.width,height:d.height,style:Cr({},s.annotations.outline,{fill:"none",strokeWidth:s.annotations.outline.strokeWidth+2*s.annotations.outline.outlineWidth,stroke:s.annotations.outline.outlineColor,opacity:s.annotations.outline.outlineOpacity})}),y.jsx(Ct.rect,{x:d.x,y:d.y,rx:o,ry:o,width:d.width,height:d.height,style:s.annotations.outline})]})},tte=function(e){var t=e.datum,n=e.x,r=e.y,i=e.note,a=Kee(e);if(!Vee(i))throw new Error("note should be a valid react element");return y.jsxs(y.Fragment,{children:[y.jsx(Jy,{points:a.points,isOutline:!0}),qs(e)&&y.jsx(Qee,{x:n,y:r,size:e.size}),gp(e)&&y.jsx(Jee,{x:n,y:r,size:e.size}),Ys(e)&&y.jsx(ete,{x:n,y:r,width:e.width,height:e.height,borderRadius:e.borderRadius}),y.jsx(Jy,{points:a.points}),y.jsx(Xee,{datum:t,x:a.text[0],y:a.text[1],note:i})]})},eb=function(e,t){t.forEach(function(n,r){var i=n[0],a=n[1];r===0?e.moveTo(i,a):e.lineTo(i,a)})},nte=function(e,t){var n=t.annotations,r=t.theme;n.length!==0&&(e.save(),n.forEach(function(i){if(!qee(i.note))throw new Error("note is invalid for canvas implementation");r.annotations.link.outlineWidth>0&&(e.lineCap="square",e.strokeStyle=r.annotations.link.outlineColor,e.lineWidth=r.annotations.link.strokeWidth+2*r.annotations.link.outlineWidth,e.beginPath(),eb(e,i.computed.points),e.stroke(),e.lineCap="butt"),qs(i)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),gp(i)&&r.annotations.symbol.outlineWidth>0&&(e.strokeStyle=r.annotations.symbol.outlineColor,e.lineWidth=2*r.annotations.symbol.outlineWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),Ys(i)&&r.annotations.outline.outlineWidth>0&&(e.strokeStyle=r.annotations.outline.outlineColor,e.lineWidth=r.annotations.outline.strokeWidth+2*r.annotations.outline.outlineWidth,e.beginPath(),e.rect(i.x-i.width/2,i.y-i.height/2,i.width,i.height),e.stroke()),e.strokeStyle=r.annotations.link.stroke,e.lineWidth=r.annotations.link.strokeWidth,e.beginPath(),eb(e,i.computed.points),e.stroke(),qs(i)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.stroke()),gp(i)&&(e.fillStyle=r.annotations.symbol.fill,e.beginPath(),e.arc(i.x,i.y,i.size/2,0,2*Math.PI),e.fill()),Ys(i)&&(e.strokeStyle=r.annotations.outline.stroke,e.lineWidth=r.annotations.outline.strokeWidth,e.beginPath(),e.rect(i.x-i.width/2,i.y-i.height/2,i.width,i.height),e.stroke()),typeof i.note=="function"?i.note(e,{datum:i.datum,x:i.computed.text[0],y:i.computed.text[1],theme:r}):(e.font=r.annotations.text.fontSize+"px "+r.annotations.text.fontFamily,e.textAlign="left",e.textBaseline="alphabetic",e.fillStyle=r.annotations.text.fill,e.strokeStyle=r.annotations.text.outlineColor,e.lineWidth=2*r.annotations.text.outlineWidth,r.annotations.text.outlineWidth>0&&(e.lineJoin="round",e.strokeText(i.note,i.computed.text[0],i.computed.text[1]),e.lineJoin="miter"),e.fillText(i.note,i.computed.text[0],i.computed.text[1]))}),e.restore())};function kt(){return kt=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},kt.apply(this,arguments)}function Co(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var tb,rte=function(e){var t=e.bars,n=e.annotations,r=gC({data:t,annotations:n,getPosition:function(i){return{x:i.x+i.width/2,y:i.y+i.height/2}},getDimensions:function(i){var a=i.height,o=i.width;return{width:o,height:a,size:Math.max(o,a)}}});return y.jsx(y.Fragment,{children:r.map(function(i,a){return y.jsx(tte,kt({},i),a)})})},ite=function(e){var t=e.width,n=e.height,r=e.legends,i=e.toggleSerie;return y.jsx(y.Fragment,{children:r.map(function(a,o){var s,c=a[0],l=a[1];return y.jsx(Fg,kt({},c,{containerWidth:t,containerHeight:n,data:(s=c.data)!=null?s:l,toggleSerie:c.toggleSerie&&c.dataFrom==="keys"?i:void 0}),o)})})},ate=["data"],ote=function(e){var t,n=e.bar,r=n.data,i=Co(n,ate),a=e.style,o=a.borderColor,s=a.color,c=a.height,l=a.labelColor,u=a.labelOpacity,d=a.labelX,f=a.labelY,h=a.transform,g=a.width,p=e.borderRadius,v=e.borderWidth,w=e.label,_=e.shouldRenderLabel,x=e.isInteractive,S=e.onClick,b=e.onMouseEnter,T=e.onMouseLeave,j=e.tooltip,M=e.isFocusable,k=e.ariaLabel,E=e.ariaLabelledBy,C=e.ariaDescribedBy,O=Tt(),$=la(),A=$.showTooltipFromEvent,P=$.showTooltipAt,D=$.hideTooltip,N=m.useMemo(function(){return function(){return m.createElement(j,kt({},i,r))}},[j,i,r]),q=m.useCallback(function(X){S==null||S(kt({color:i.color},r),X)},[i,r,S]),z=m.useCallback(function(X){return A(N(),X)},[A,N]),U=m.useCallback(function(X){b==null||b(r,X),A(N(),X)},[r,b,A,N]),G=m.useCallback(function(X){T==null||T(r,X),D()},[r,D,T]),ne=m.useCallback(function(){P(N(),[i.absX+i.width/2,i.absY])},[P,N,i]),te=m.useCallback(function(){D()},[D]);return y.jsxs(Ct.g,{transform:h,children:[y.jsx(Ct.rect,{width:vi(g,function(X){return Math.max(X,0)}),height:vi(c,function(X){return Math.max(X,0)}),rx:p,ry:p,fill:(t=r.fill)!=null?t:s,strokeWidth:v,stroke:o,focusable:M,tabIndex:M?0:void 0,"aria-label":k?k(r):void 0,"aria-labelledby":E?E(r):void 0,"aria-describedby":C?C(r):void 0,onMouseEnter:x?U:void 0,onMouseMove:x?z:void 0,onMouseLeave:x?G:void 0,onClick:x?q:void 0,onFocus:x&&M?ne:void 0,onBlur:x&&M?te:void 0}),_&&y.jsx(Ct.text,{x:d,y:f,textAnchor:"middle",dominantBaseline:"central",fillOpacity:u,style:kt({},O.labels.text,{pointerEvents:"none",fill:l}),children:w})]})},ste=["color","label"],cte=function(e){var t=e.color,n=e.label,r=Co(e,ste);return y.jsx(Im,{id:n,value:r.formattedValue,enableChip:!0,color:t})},$t={indexBy:"id",keys:["value"],groupMode:"stacked",layout:"vertical",reverse:!1,minValue:"auto",maxValue:"auto",valueScale:{type:"linear"},indexScale:{type:"band",round:!0},padding:.1,innerPadding:0,axisBottom:{},axisLeft:{},enableGridX:!1,enableGridY:!0,enableLabel:!0,label:"formattedValue",labelSkipWidth:0,labelSkipHeight:0,labelTextColor:{from:"theme",theme:"labels.text.fill"},colorBy:"id",colors:{scheme:"nivo"},borderRadius:0,borderWidth:0,borderColor:{from:"color"},isInteractive:!0,tooltip:cte,tooltipLabel:function(e){return e.id+" - "+e.indexValue},legends:[],initialHiddenIds:[],annotations:[],markers:[],enableTotals:!1,totalsOffset:10},Lt=kt({},$t,{layers:["grid","axes","bars","totals","markers","legends","annotations"],barComponent:ote,defs:[],fill:[],animate:!0,motionConfig:"default",role:"img",isFocusable:!1}),dn=kt({},$t,{layers:["grid","axes","bars","totals","legends","annotations"],pixelRatio:typeof window<"u"&&(tb=window.devicePixelRatio)!=null?tb:1}),vC=function(e,t,n,r,i,a){return Vs(r,{all:e.map(t),min:0,max:0},i,a).padding(n)},yC=function(e,t){return e.map(function(n){return kt({},t.reduce(function(r,i){return r[i]=null,r},{}),n)})},zd=function(e){return Object.keys(e).reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},{})},Hd=function(e){return[e,Number(e)]},lte=["layout","minValue","maxValue","reverse","width","height","padding","innerPadding","valueScale","indexScale","hiddenIds"],Hg=function(e,t){return e>t},bC=function(e,t){return e<t},xC=function(e,t){return Array.from(" ".repeat(t-e),function(n,r){return e+r})},ute=function(e){return Hg(e,0)?0:e},dte=function(e,t,n,r){var i=e.data,a=e.formatValue,o=e.getColor,s=e.getIndex,c=e.getTooltipLabel,l=e.innerPadding,u=l===void 0?0:l,d=e.keys,f=e.xScale,h=e.yScale,g=e.margin,p=n?bC:Hg,v=i.map(zd),w=[];return d.forEach(function(_,x){return xC(0,f.domain().length).forEach(function(S){var b,T,j,M=Hd(i[S][_]),k=M[0],E=M[1],C=s(i[S]),O=((b=f(C))!=null?b:0)+t*x+u*x,$=p(T=E,0)?(j=h(T))!=null?j:0:r,A=function(D,N){var q;return p(D,0)?r-N:((q=h(D))!=null?q:0)-r}(E,$),P={id:_,value:k===null?k:E,formattedValue:a(E),hidden:!1,index:S,indexValue:C,data:v[S]};w.push({key:_+"."+P.indexValue,index:w.length,data:P,x:O,y:$,absX:g.left+O,absY:g.top+$,width:t,height:A,color:o(P),label:c(P)})})}),w},fte=function(e,t,n,r){var i=e.data,a=e.formatValue,o=e.getIndex,s=e.getColor,c=e.getTooltipLabel,l=e.keys,u=e.innerPadding,d=u===void 0?0:u,f=e.xScale,h=e.yScale,g=e.margin,p=n?bC:Hg,v=i.map(zd),w=[];return l.forEach(function(_,x){return xC(0,h.domain().length).forEach(function(S){var b,T,j,M=Hd(i[S][_]),k=M[0],E=M[1],C=o(i[S]),O=p(T=E,0)?r:(j=f(T))!=null?j:0,$=((b=h(C))!=null?b:0)+t*x+d*x,A=function(D,N){var q;return p(D,0)?((q=f(D))!=null?q:0)-r:r-N}(E,O),P={id:_,value:k===null?k:E,formattedValue:a(E),hidden:!1,index:S,indexValue:C,data:v[S]};w.push({key:_+"."+P.indexValue,index:w.length,data:P,x:O,y:$,absX:g.left+O,absY:g.top+$,width:A,height:t,color:s(P),label:c(P)})})}),w},hte=function(e){var t,n,r=e.layout,i=e.minValue,a=e.maxValue,o=e.reverse,s=e.width,c=e.height,l=e.padding,u=l===void 0?0:l,d=e.innerPadding,f=d===void 0?0:d,h=e.valueScale,g=e.indexScale,p=e.hiddenIds,v=p===void 0?[]:p,w=Co(e,lte),_=w.keys.filter(function(U){return!v.includes(U)}),x=yC(w.data,_),S=r==="vertical"?["y","x",s]:["x","y",c],b=S[0],T=S[1],j=S[2],M=vC(x,w.getIndex,u,g,j,T),k=kt({max:a,min:i,reverse:o},h),E=k.min==="auto"?ute:function(U){return U},C=x.reduce(function(U,G){return[].concat(U,_.map(function(ne){return G[ne]}))},[]).filter(Boolean),O=E(Math.min.apply(Math,C)),$=(n=Math.max.apply(Math,C),isFinite(n)?n:0),A=Vs(k,{all:C,min:O,max:$},b==="x"?s:c,b),P=r==="vertical"?[M,A]:[A,M],D=P[0],N=P[1],q=(M.bandwidth()-f*(_.length-1))/_.length,z=[kt({},w,{data:x,keys:_,innerPadding:f,xScale:D,yScale:N}),q,k.reverse,(t=A(0))!=null?t:0];return{xScale:D,yScale:N,bars:q>0?r==="vertical"?dte.apply(void 0,z):fte.apply(void 0,z):[]}},pte=["data","layout","minValue","maxValue","reverse","width","height","padding","valueScale","indexScale","hiddenIds"],mte=function e(t){var n;return t.some(Array.isArray)?e((n=[]).concat.apply(n,t)):t},gte=function(e,t,n){var r=e.formatValue,i=e.getColor,a=e.getIndex,o=e.getTooltipLabel,s=e.innerPadding,c=e.stackedData,l=e.xScale,u=e.yScale,d=e.margin,f=[];return c.forEach(function(h){return l.domain().forEach(function(g,p){var v,w,_=h[p],x=(v=l(a(_.data)))!=null?v:0,S=((w=function(E){return u(E[n?0:1])}(_))!=null?w:0)+.5*s,b=function(E,C){var O;return((O=u(E[n?1:0]))!=null?O:0)-C}(_,S)-s,T=Hd(_.data[h.key]),j=T[0],M=T[1],k={id:h.key,value:j===null?j:M,formattedValue:r(M),hidden:!1,index:p,indexValue:g,data:zd(_.data)};f.push({key:h.key+"."+g,index:f.length,data:k,x,y:S,absX:d.left+x,absY:d.top+S,width:t,height:b,color:i(k),label:o(k)})})}),f},vte=function(e,t,n){var r=e.formatValue,i=e.getColor,a=e.getIndex,o=e.getTooltipLabel,s=e.innerPadding,c=e.stackedData,l=e.xScale,u=e.yScale,d=e.margin,f=[];return c.forEach(function(h){return u.domain().forEach(function(g,p){var v,w,_=h[p],x=(v=u(a(_.data)))!=null?v:0,S=((w=function(E){return l(E[n?1:0])}(_))!=null?w:0)+.5*s,b=function(E,C){var O;return((O=l(E[n?0:1]))!=null?O:0)-C}(_,S)-s,T=Hd(_.data[h.key]),j=T[0],M=T[1],k={id:h.key,value:j===null?j:M,formattedValue:r(M),hidden:!1,index:p,indexValue:g,data:zd(_.data)};f.push({key:h.key+"."+g,index:f.length,data:k,x:S,y:x,absX:d.left+S,absY:d.top+x,width:b,height:t,color:i(k),label:o(k)})})}),f},yte=function(e){var t,n=e.data,r=e.layout,i=e.minValue,a=e.maxValue,o=e.reverse,s=e.width,c=e.height,l=e.padding,u=l===void 0?0:l,d=e.valueScale,f=e.indexScale,h=e.hiddenIds,g=h===void 0?[]:h,p=Co(e,pte),v=p.keys.filter(function(q){return!g.includes(q)}),w=nH().keys(v).offset(rH)(yC(n,v)),_=r==="vertical"?["y","x",s]:["x","y",c],x=_[0],S=_[1],b=_[2],T=vC(n,p.getIndex,u,f,b,S),j=kt({max:a,min:i,reverse:o},d),M=(t=mte(w),d.type==="log"?t.filter(function(q){return q!==0}):t),k=Math.min.apply(Math,M),E=Math.max.apply(Math,M),C=Vs(j,{all:M,min:k,max:E},x==="x"?s:c,x),O=r==="vertical"?[T,C]:[C,T],$=O[0],A=O[1],P=p.innerPadding>0?p.innerPadding:0,D=T.bandwidth(),N=[kt({},p,{innerPadding:P,stackedData:w,xScale:$,yScale:A}),D,j.reverse];return{xScale:$,yScale:A,bars:D>0?r==="vertical"?gte.apply(void 0,N):vte.apply(void 0,N):[]}},bte=function(e){var t=e.bars,n=e.direction,r=e.from,i=e.groupMode,a=e.layout,o=e.legendLabel,s=e.reverse,c=$3(o??(r==="indexes"?"indexValue":"id"));return r==="indexes"?function(l,u,d){var f=fp(l.map(function(h){var g,p;return{id:(g=h.data.indexValue)!=null?g:"",label:d(h.data),hidden:h.data.hidden,color:(p=h.color)!=null?p:"#000"}}),function(h){return h.id});return u==="horizontal"&&f.reverse(),f}(t,a,c):function(l,u,d,f,h,g){var p=fp(l.map(function(v){var w;return{id:v.data.id,label:g(v.data),hidden:v.data.hidden,color:(w=v.color)!=null?w:"#000"}}),function(v){return v.id});return(u==="vertical"&&f==="stacked"&&d==="column"&&h!==!0||u==="horizontal"&&f==="stacked"&&h===!0)&&p.reverse(),p}(t,a,n,i,s,c)},nb=function(e,t,n){var r=e.get(t)||0;e.set(t,r+n)},xte=function(e,t,n){var r=e.get(t)||0;e.set(t,r+(n>0?n:0))},_te=function(e,t,n){var r=e.get(t)||0;e.set(t,Math.max(r,Number(n)))},wte=function(e,t){var n=e.get(t)||0;e.set(t,n+1)},_C=function(e){var t=e.indexBy,n=t===void 0?$t.indexBy:t,r=e.keys,i=r===void 0?$t.keys:r,a=e.label,o=a===void 0?$t.label:a,s=e.tooltipLabel,c=s===void 0?$t.tooltipLabel:s,l=e.valueFormat,u=e.colors,d=u===void 0?$t.colors:u,f=e.colorBy,h=f===void 0?$t.colorBy:f,g=e.borderColor,p=g===void 0?$t.borderColor:g,v=e.labelTextColor,w=v===void 0?$t.labelTextColor:v,_=e.groupMode,x=_===void 0?$t.groupMode:_,S=e.layout,b=S===void 0?$t.layout:S,T=e.reverse,j=T===void 0?$t.reverse:T,M=e.data,k=e.minValue,E=k===void 0?$t.minValue:k,C=e.maxValue,O=C===void 0?$t.maxValue:C,$=e.margin,A=e.width,P=e.height,D=e.padding,N=D===void 0?$t.padding:D,q=e.innerPadding,z=q===void 0?$t.innerPadding:q,U=e.valueScale,G=U===void 0?$t.valueScale:U,ne=e.indexScale,te=ne===void 0?$t.indexScale:ne,X=e.initialHiddenIds,J=X===void 0?$t.initialHiddenIds:X,Q=e.enableLabel,re=Q===void 0?$t.enableLabel:Q,F=e.labelSkipWidth,I=F===void 0?$t.labelSkipWidth:F,L=e.labelSkipHeight,H=L===void 0?$t.labelSkipHeight:L,R=e.legends,K=R===void 0?$t.legends:R,Z=e.legendLabel,ee=e.totalsOffset,pe=ee===void 0?$t.totalsOffset:ee,we=m.useState(J??[]),ve=we[0],Le=we[1],Re=m.useCallback(function(De){Le(function(Ae){return Ae.indexOf(De)>-1?Ae.filter(function(Ye){return Ye!==De}):[].concat(Ae,[De])})},[]),Ve=Gi(n),ze=Gi(o),ut=Gi(c),at=eo(l),de=Tt(),me=Ng(d,h),ke=wr(p,de),tt=wr(w,de),Et=(x==="grouped"?hte:yte)({layout:b,reverse:j,data:M,getIndex:Ve,keys:i,minValue:E,maxValue:O,width:A,height:P,getColor:me,padding:N,innerPadding:z,valueScale:G,indexScale:te,hiddenIds:ve,formatValue:at,getTooltipLabel:ut,margin:$}),qe=Et.bars,ot=Et.xScale,pt=Et.yScale,It=m.useMemo(function(){return qe.filter(function(De){return De.data.value!==null}).map(function(De,Ae){return kt({},De,{index:Ae})})},[qe]),st=m.useCallback(function(De){var Ae=De.width,Ye=De.height;return!!re&&!(I>0&&Ae<I)&&!(H>0&&Ye<H)},[re,I,H]),dt=m.useMemo(function(){return i.map(function(De){var Ae=qe.find(function(Ye){return Ye.data.id===De});return kt({},Ae,{data:kt({id:De},Ae==null?void 0:Ae.data,{hidden:ve.includes(De)})})})},[ve,i,qe]),mt=m.useMemo(function(){return K.map(function(De){return[De,bte({bars:De.dataFrom==="keys"?dt:qe,direction:De.direction,from:De.dataFrom,groupMode:x,layout:b,legendLabel:Z,reverse:j})]})},[K,dt,qe,x,b,Z,j]),Wt=m.useMemo(function(){return function(De,Ae,Ye,ct,gt,St,Vt){ct===void 0&&(ct=$t.layout),gt===void 0&&(gt=$t.groupMode);var Rt=[];if(De.length===0)return Rt;var Dt=new Map,qt=De[0].width,vt=De[0].height;if(gt==="stacked"){var Yt=new Map;De.forEach(function(ye){var Ee=ye.data,je=Ee.indexValue,Ge=Ee.value;nb(Dt,je,Number(Ge)),xte(Yt,je,Number(Ge))}),Yt.forEach(function(ye,Ee){var je,Ge,Ue,ft=Dt.get(Ee)||0;ct==="vertical"?(je=Ae(Ee),Ge=Ye(ye),Ue=Ye(ye/2)):(je=Ae(ye),Ge=Ye(Ee),Ue=Ae(ye/2)),je+=ct==="vertical"?qt/2:St,Ge+=ct==="vertical"?-St:vt/2,Rt.push({key:"total_"+Ee,x:je,y:Ge,value:ft,formattedValue:Vt(ft),animationOffset:Ue})})}else if(gt==="grouped"){var rn=new Map,Jt=new Map;De.forEach(function(ye){var Ee=ye.data,je=Ee.indexValue,Ge=Ee.value;nb(Dt,je,Number(Ge)),_te(rn,je,Number(Ge)),wte(Jt,je)}),rn.forEach(function(ye,Ee){var je,Ge,Ue,ft=Dt.get(Ee)||0,W=Jt.get(Ee);ct==="vertical"?(je=Ae(Ee),Ge=Ye(ye),Ue=Ye(ye/2)):(je=Ae(ye),Ge=Ye(Ee),Ue=Ae(ye/2)),je+=ct==="vertical"?W*qt/2:St,Ge+=ct==="vertical"?-St:W*vt/2,Rt.push({key:"total_"+Ee,x:je,y:Ge,value:ft,formattedValue:Vt(ft),animationOffset:Ue})})}return Rt}(qe,ot,pt,b,x,pe,at)},[qe,ot,pt,b,x,pe,at]);return{bars:qe,barsWithValue:It,xScale:ot,yScale:pt,getIndex:Ve,getLabel:ze,getTooltipLabel:ut,formatValue:at,getColor:me,getBorderColor:ke,getLabelColor:tt,shouldRenderBarLabel:st,hiddenIds:ve,toggleSerie:Re,legendsWithData:mt,barTotals:Wt}},Cte=function(e){var t=e.data,n=e.springConfig,r=e.animate,i=e.layout,a=i===void 0?Lt.layout:i,o=Tt();return ca(t,{keys:function(s){return s.key},from:function(s){return{x:a==="vertical"?s.x:s.animationOffset,y:a==="vertical"?s.animationOffset:s.y,labelOpacity:0}},enter:function(s){return{x:s.x,y:s.y,labelOpacity:1}},update:function(s){return{x:s.x,y:s.y,labelOpacity:1}},leave:function(s){return{x:a==="vertical"?s.x:s.animationOffset,y:a==="vertical"?s.animationOffset:s.y,labelOpacity:0}},config:n,immediate:!r,initial:r?void 0:null})(function(s,c){return y.jsx(Ct.text,{x:s.x,y:s.y,fillOpacity:s.labelOpacity,style:kt({},o.labels.text,{pointerEvents:"none",fill:o.text.fill}),fontWeight:"bold",fontSize:o.labels.text.fontSize,fontFamily:o.labels.text.fontFamily,textAnchor:a==="vertical"?"middle":"start",alignmentBaseline:a==="vertical"?"alphabetic":"middle",children:c.formattedValue},c.key)})},Tte=["isInteractive","animate","motionConfig","theme","renderWrapper"],Ste=function(e){var t=e.data,n=e.indexBy,r=e.keys,i=e.margin,a=e.width,o=e.height,s=e.groupMode,c=e.layout,l=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,h=e.indexScale,g=e.padding,p=e.innerPadding,v=e.axisTop,w=e.axisRight,_=e.axisBottom,x=_===void 0?Lt.axisBottom:_,S=e.axisLeft,b=S===void 0?Lt.axisLeft:S,T=e.enableGridX,j=T===void 0?Lt.enableGridX:T,M=e.enableGridY,k=M===void 0?Lt.enableGridY:M,E=e.gridXValues,C=e.gridYValues,O=e.layers,$=O===void 0?Lt.layers:O,A=e.barComponent,P=A===void 0?Lt.barComponent:A,D=e.enableLabel,N=D===void 0?Lt.enableLabel:D,q=e.label,z=e.labelSkipWidth,U=z===void 0?Lt.labelSkipWidth:z,G=e.labelSkipHeight,ne=G===void 0?Lt.labelSkipHeight:G,te=e.labelTextColor,X=e.markers,J=X===void 0?Lt.markers:X,Q=e.colorBy,re=e.colors,F=e.defs,I=F===void 0?Lt.defs:F,L=e.fill,H=L===void 0?Lt.fill:L,R=e.borderRadius,K=R===void 0?Lt.borderRadius:R,Z=e.borderWidth,ee=Z===void 0?Lt.borderWidth:Z,pe=e.borderColor,we=e.annotations,ve=we===void 0?Lt.annotations:we,Le=e.legendLabel,Re=e.tooltipLabel,Ve=e.valueFormat,ze=e.isInteractive,ut=ze===void 0?Lt.isInteractive:ze,at=e.tooltip,de=at===void 0?Lt.tooltip:at,me=e.onClick,ke=e.onMouseEnter,tt=e.onMouseLeave,Et=e.legends,qe=e.role,ot=qe===void 0?Lt.role:qe,pt=e.ariaLabel,It=e.ariaLabelledBy,st=e.ariaDescribedBy,dt=e.isFocusable,mt=dt===void 0?Lt.isFocusable:dt,Wt=e.barAriaLabel,De=e.barAriaLabelledBy,Ae=e.barAriaDescribedBy,Ye=e.initialHiddenIds,ct=e.enableTotals,gt=ct===void 0?Lt.enableTotals:ct,St=e.totalsOffset,Vt=St===void 0?Lt.totalsOffset:St,Rt=kn(),Dt=Rt.animate,qt=Rt.config,vt=pc(a,o,i),Yt=vt.outerWidth,rn=vt.outerHeight,Jt=vt.margin,ye=vt.innerWidth,Ee=vt.innerHeight,je=_C({indexBy:n,label:q,tooltipLabel:Re,valueFormat:Ve,colors:re,colorBy:Q,borderColor:pe,labelTextColor:te,groupMode:s,layout:c,reverse:l,data:t,keys:r,minValue:u,maxValue:d,margin:Jt,width:ye,height:Ee,padding:g,innerPadding:p,valueScale:f,indexScale:h,enableLabel:N,labelSkipWidth:U,labelSkipHeight:ne,legends:Et,legendLabel:Le,initialHiddenIds:Ye,totalsOffset:Vt}),Ge=je.bars,Ue=je.barsWithValue,ft=je.xScale,W=je.yScale,ce=je.getLabel,ae=je.getTooltipLabel,se=je.getBorderColor,be=je.getLabelColor,Oe=je.shouldRenderBarLabel,xe=je.toggleSerie,Se=je.legendsWithData,Ne=je.barTotals,Pe=ca(Ue,{keys:function(ge){return ge.key},from:function(ge){return kt({borderColor:se(ge),color:ge.color,height:0,labelColor:be(ge),labelOpacity:0,labelX:ge.width/2,labelY:ge.height/2,transform:"translate("+ge.x+", "+(ge.y+ge.height)+")",width:ge.width},c==="vertical"?{}:{height:ge.height,transform:"translate("+ge.x+", "+ge.y+")",width:0})},enter:function(ge){return{borderColor:se(ge),color:ge.color,height:ge.height,labelColor:be(ge),labelOpacity:1,labelX:ge.width/2,labelY:ge.height/2,transform:"translate("+ge.x+", "+ge.y+")",width:ge.width}},update:function(ge){return{borderColor:se(ge),color:ge.color,height:ge.height,labelColor:be(ge),labelOpacity:1,labelX:ge.width/2,labelY:ge.height/2,transform:"translate("+ge.x+", "+ge.y+")",width:ge.width}},leave:function(ge){return kt({borderColor:se(ge),color:ge.color,height:0,labelColor:be(ge),labelOpacity:0,labelX:ge.width/2,labelY:0,transform:"translate("+ge.x+", "+(ge.y+ge.height)+")",width:ge.width},c==="vertical"?{}:{labelX:0,labelY:ge.height/2,height:ge.height,transform:"translate("+ge.x+", "+ge.y+")",width:0})},config:qt,immediate:!Dt,initial:Dt?void 0:null}),Xe=m.useMemo(function(){return{borderRadius:K,borderWidth:ee,enableLabel:N,isInteractive:ut,labelSkipWidth:U,labelSkipHeight:ne,onClick:me,onMouseEnter:ke,onMouseLeave:tt,getTooltipLabel:ae,tooltip:de,isFocusable:mt,ariaLabel:Wt,ariaLabelledBy:De,ariaDescribedBy:Ae}},[K,ee,N,ae,ut,ne,U,me,ke,tt,de,mt,Wt,De,Ae]),zt=Dg(I,Ge,H,{dataKey:"data",targetKey:"data.fill"}),Ot={annotations:null,axes:null,bars:null,grid:null,legends:null,markers:null,totals:null};$.includes("annotations")&&(Ot.annotations=y.jsx(rte,{bars:Ge,annotations:ve},"annotations")),$.includes("axes")&&(Ot.axes=y.jsx(eC,{xScale:ft,yScale:W,width:ye,height:Ee,top:v,right:w,bottom:x,left:b},"axes")),$.includes("bars")&&(Ot.bars=y.jsx(m.Fragment,{children:Pe(function(ge,ln){return m.createElement(P,kt({},Xe,{bar:ln,style:ge,shouldRenderLabel:Oe(ln),label:ce(ln.data)}))})},"bars")),$.includes("grid")&&(Ot.grid=y.jsx(tC,{width:ye,height:Ee,xScale:j?ft:null,yScale:k?W:null,xValues:E,yValues:C},"grid")),$.includes("legends")&&(Ot.legends=y.jsx(ite,{width:ye,height:Ee,legends:Se,toggleSerie:xe},"legends")),$.includes("markers")&&(Ot.markers=y.jsx(O3,{markers:J,width:ye,height:Ee,xScale:ft,yScale:W},"markers")),$.includes("totals")&>&&(Ot.totals=y.jsx(Cte,{data:Ne,springConfig:qt,animate:Dt,layout:c},"totals"));var Xt=m.useMemo(function(){return kt({},Xe,{margin:Jt,width:a,height:o,innerWidth:ye,innerHeight:Ee,bars:Ge,legendData:Se,enableLabel:N,xScale:ft,yScale:W,tooltip:de,getTooltipLabel:ae,onClick:me,onMouseEnter:ke,onMouseLeave:tt})},[Xe,Jt,a,o,ye,Ee,Ge,Se,N,ft,W,de,ae,me,ke,tt]);return y.jsx(Wd,{width:Yt,height:rn,margin:Jt,defs:zt,role:ot,ariaLabel:pt,ariaLabelledBy:It,ariaDescribedBy:st,isFocusable:mt,children:$.map(function(ge,ln){var Mt;return typeof ge=="function"?y.jsx(m.Fragment,{children:m.createElement(ge,Xt)},ln):(Mt=Ot==null?void 0:Ot[ge])!=null?Mt:null})})},kte=function(e){var t=e.isInteractive,n=t===void 0?Lt.isInteractive:t,r=e.animate,i=r===void 0?Lt.animate:r,a=e.motionConfig,o=a===void 0?Lt.motionConfig:a,s=e.theme,c=e.renderWrapper,l=Co(e,Tte);return y.jsx(mc,{animate:i,isInteractive:n,motionConfig:o,renderWrapper:c,theme:s,children:y.jsx(Ste,kt({isInteractive:n},l))})},Ete=["isInteractive","renderWrapper","theme"],Vf=function(e,t,n,r){return e.find(function(i){return A3(i.x+t.left,i.y+t.top,i.width,i.height,n,r)})},Ote=function(e){var t=e.data,n=e.indexBy,r=e.keys,i=e.margin,a=e.width,o=e.height,s=e.groupMode,c=e.layout,l=e.reverse,u=e.minValue,d=e.maxValue,f=e.valueScale,h=e.indexScale,g=e.padding,p=e.innerPadding,v=e.axisTop,w=e.axisRight,_=e.axisBottom,x=_===void 0?dn.axisBottom:_,S=e.axisLeft,b=S===void 0?dn.axisLeft:S,T=e.enableGridX,j=T===void 0?dn.enableGridX:T,M=e.enableGridY,k=M===void 0?dn.enableGridY:M,E=e.gridXValues,C=e.gridYValues,O=e.layers,$=O===void 0?dn.layers:O,A=e.renderBar,P=A===void 0?function(ae,se){var be=se.bar,Oe=be.color,xe=be.height,Se=be.width,Ne=be.x,Pe=be.y,Xe=se.borderColor,zt=se.borderRadius,Ot=se.borderWidth,Xt=se.label,ge=se.labelColor,ln=se.shouldRenderLabel;if(ae.fillStyle=Oe,Ot>0&&(ae.strokeStyle=Xe,ae.lineWidth=Ot),ae.beginPath(),zt>0){var Mt=Math.min(zt,xe);ae.moveTo(Ne+Mt,Pe),ae.lineTo(Ne+Se-Mt,Pe),ae.quadraticCurveTo(Ne+Se,Pe,Ne+Se,Pe+Mt),ae.lineTo(Ne+Se,Pe+xe-Mt),ae.quadraticCurveTo(Ne+Se,Pe+xe,Ne+Se-Mt,Pe+xe),ae.lineTo(Ne+Mt,Pe+xe),ae.quadraticCurveTo(Ne,Pe+xe,Ne,Pe+xe-Mt),ae.lineTo(Ne,Pe+Mt),ae.quadraticCurveTo(Ne,Pe,Ne+Mt,Pe),ae.closePath()}else ae.rect(Ne,Pe,Se,xe);ae.fill(),Ot>0&&ae.stroke(),ln&&(ae.textBaseline="middle",ae.textAlign="center",ae.fillStyle=ge,ae.fillText(Xt,Ne+Se/2,Pe+xe/2))}:A,D=e.enableLabel,N=D===void 0?dn.enableLabel:D,q=e.label,z=e.labelSkipWidth,U=z===void 0?dn.labelSkipWidth:z,G=e.labelSkipHeight,ne=G===void 0?dn.labelSkipHeight:G,te=e.labelTextColor,X=e.colorBy,J=e.colors,Q=e.borderRadius,re=Q===void 0?dn.borderRadius:Q,F=e.borderWidth,I=F===void 0?dn.borderWidth:F,L=e.borderColor,H=e.annotations,R=H===void 0?dn.annotations:H,K=e.legendLabel,Z=e.tooltipLabel,ee=e.valueFormat,pe=e.isInteractive,we=pe===void 0?dn.isInteractive:pe,ve=e.tooltip,Le=ve===void 0?dn.tooltip:ve,Re=e.onClick,Ve=e.onMouseEnter,ze=e.onMouseLeave,ut=e.legends,at=e.pixelRatio,de=at===void 0?dn.pixelRatio:at,me=e.canvasRef,ke=e.enableTotals,tt=ke===void 0?dn.enableTotals:ke,Et=e.totalsOffset,qe=Et===void 0?dn.totalsOffset:Et,ot=m.useRef(null),pt=Tt(),It=pc(a,o,i),st=It.margin,dt=It.innerWidth,mt=It.innerHeight,Wt=It.outerWidth,De=It.outerHeight,Ae=_C({indexBy:n,label:q,tooltipLabel:Z,valueFormat:ee,colors:J,colorBy:X,borderColor:L,labelTextColor:te,groupMode:s,layout:c,reverse:l,data:t,keys:r,minValue:u,maxValue:d,margin:st,width:dt,height:mt,padding:g,innerPadding:p,valueScale:f,indexScale:h,enableLabel:N,labelSkipWidth:U,labelSkipHeight:ne,legends:ut,legendLabel:K,totalsOffset:qe}),Ye=Ae.bars,ct=Ae.barsWithValue,gt=Ae.xScale,St=Ae.yScale,Vt=Ae.getLabel,Rt=Ae.getTooltipLabel,Dt=Ae.getBorderColor,qt=Ae.getLabelColor,vt=Ae.shouldRenderBarLabel,Yt=Ae.legendsWithData,rn=Ae.barTotals,Jt=la(),ye=Jt.showTooltipFromEvent,Ee=Jt.hideTooltip,je=Zee({annotations:gC({data:Ye,annotations:R,getPosition:function(ae){return{x:ae.x,y:ae.y}},getDimensions:function(ae){var se=ae.width,be=ae.height;return{width:se,height:be,size:Math.max(se,be)}}})}),Ge=m.useMemo(function(){return{borderRadius:re,borderWidth:I,isInteractive:we,isFocusable:!1,labelSkipWidth:U,labelSkipHeight:ne,margin:st,width:a,height:o,innerWidth:dt,innerHeight:mt,bars:Ye,legendData:Yt,enableLabel:N,xScale:gt,yScale:St,tooltip:Le,getTooltipLabel:Rt,onClick:Re,onMouseEnter:Ve,onMouseLeave:ze}},[re,I,we,U,ne,st,a,o,dt,mt,Ye,Yt,N,gt,St,Le,Rt,Re,Ve,ze]),Ue=eo(ee);m.useEffect(function(){var ae,se=(ae=ot.current)==null?void 0:ae.getContext("2d");ot.current&&se&&(ot.current.width=Wt*de,ot.current.height=De*de,se.scale(de,de),se.fillStyle=pt.background,se.fillRect(0,0,Wt,De),se.translate(st.left,st.top),$.forEach(function(be){be==="grid"?typeof pt.grid.line.strokeWidth=="number"&&pt.grid.line.strokeWidth>0&&(se.lineWidth=pt.grid.line.strokeWidth,se.strokeStyle=pt.grid.line.stroke,j&&tu(se,{width:dt,height:mt,scale:gt,axis:"x",values:E}),k&&tu(se,{width:dt,height:mt,scale:St,axis:"y",values:C})):be==="axes"?nC(se,{xScale:gt,yScale:St,width:dt,height:mt,top:v,right:w,bottom:x,left:b,theme:pt}):be==="bars"?ct.forEach(function(Oe){P(se,{bar:Oe,borderColor:Dt(Oe),borderRadius:re,borderWidth:I,label:Vt(Oe.data),labelColor:qt(Oe),shouldRenderLabel:vt(Oe)})}):be==="legends"?Yt.forEach(function(Oe){var xe=Oe[0],Se=Oe[1];B3(se,kt({},xe,{data:Se,containerWidth:dt,containerHeight:mt,theme:pt}))}):be==="annotations"?nte(se,{annotations:je,theme:pt}):be==="totals"&&tt?function(Oe,xe,Se,Ne){Ne===void 0&&(Ne=dn.layout),Oe.fillStyle=Se.text.fill,Oe.font="bold "+Se.labels.text.fontSize+"px "+Se.labels.text.fontFamily,Oe.textBaseline=Ne==="vertical"?"alphabetic":"middle",Oe.textAlign=Ne==="vertical"?"center":"start",xe.forEach(function(Pe){Oe.fillText(Pe.formattedValue,Pe.x,Pe.y)})}(se,rn,pt,c):typeof be=="function"&&be(se,Ge)}),se.save())},[x,b,w,v,ct,re,I,je,j,k,Dt,Vt,qt,E,C,s,o,mt,dt,Ge,$,c,Yt,st.left,st.top,De,Wt,de,P,gt,St,l,vt,pt,a,rn,tt,Ue]);var ft=m.useCallback(function(ae){if(Ye&&ot.current){var se=os(ot.current,ae),be=se[0],Oe=se[1],xe=Vf(Ye,st,be,Oe);xe!==void 0?(ye(m.createElement(Le,kt({},xe.data,{color:xe.color,label:xe.label,value:Number(xe.data.value)})),ae),ae.type==="mouseenter"&&(Ve==null||Ve(xe.data,ae))):Ee()}},[Ee,st,Ve,Ye,ye,Le]),W=m.useCallback(function(ae){if(Ye&&ot.current){Ee();var se=os(ot.current,ae),be=se[0],Oe=se[1],xe=Vf(Ye,st,be,Oe);xe&&(ze==null||ze(xe.data,ae))}},[Ee,st,ze,Ye]),ce=m.useCallback(function(ae){if(Ye&&ot.current){var se=os(ot.current,ae),be=se[0],Oe=se[1],xe=Vf(Ye,st,be,Oe);xe!==void 0&&(Re==null||Re(kt({},xe.data,{color:xe.color}),ae))}},[st,Re,Ye]);return y.jsx("canvas",{ref:function(ae){ot.current=ae,me&&"current"in me&&(me.current=ae)},width:Wt*de,height:De*de,style:{width:Wt,height:De,cursor:we?"auto":"normal"},onMouseEnter:we?ft:void 0,onMouseMove:we?ft:void 0,onMouseLeave:we?W:void 0,onClick:we?ce:void 0})},Mte=m.forwardRef(function(e,t){var n=e.isInteractive,r=e.renderWrapper,i=e.theme,a=Co(e,Ete);return y.jsx(mc,{isInteractive:n,renderWrapper:r,theme:i,animate:!1,children:y.jsx(Ote,kt({},a,{canvasRef:t}))})}),$te=function(e){return y.jsx(wo,{children:function(t){var n=t.width,r=t.height;return y.jsx(kte,kt({width:n,height:r},e))}})};m.forwardRef(function(e,t){return y.jsx(wo,{children:function(n){var r=n.width,i=n.height;return y.jsx(Mte,kt({width:r,height:i},e,{ref:t}))}})});const Ate="_side-content-bar_16o0s_1",Rte="_mobile_16o0s_12",jte="_expanded_16o0s_20",Pte="_content-container_16o0s_23",Ite="_resizer_16o0s_31",Dte="_expander_16o0s_46",Nte="_icon_16o0s_65",Rr={"side-content-bar":"_side-content-bar_16o0s_1",sideContentBar:Ate,mobile:Rte,expanded:jte,"content-container":"_content-container_16o0s_23",contentContainer:Pte,resizer:Ite,expander:Dte,icon:Nte},wC=({width:e,children:t,isExpandedOnMobileState:[n,r],resizeable:i=!0,onResize:a})=>{const{ProjectIconComponent:o}=m.useContext(Kt),{isMobile:s}=nc(),c=gm({onSwipedRight:d=>{d.velocity>.8&&r(!1)},delta:100}),[l,u]=m.useState(null);return y.jsxs(y.Fragment,{children:[y.jsxs("section",{className:oe("luminus-side-content-bar shadow",Rr.sideContentBar,{[Rr.mobile]:s},{[Rr.expanded]:n}),style:{width:`${e}px`},...c,children:[i&&!s?y.jsx("div",{role:"button",className:oe(Rr.resizer,"luminus-side-content-bar-resizer","shadow"),draggable:!0,onDragStart:d=>u({startX:d.clientX,widthStart:e}),onDrag:d=>a(((l==null?void 0:l.widthStart)??0)+(((l==null?void 0:l.startX)??0)-d.clientX)),onDragEnd:()=>u(null),children:y.jsx(o,{className:Rr.icon,icon:"resizer-horizontal"})}):null,y.jsx("div",{className:Rr.contentContainer,children:t})]}),s?y.jsx("div",{role:"button",onClick:()=>r(!n),className:oe(Rr.expander,{[Rr.expanded]:n},"luminus-side-content-bar-expander","shadow"),children:y.jsx(o,{className:Rr.icon,icon:"chevron-left"})}):null]})},Lte=({title:e})=>y.jsx("div",{className:"mb-3",children:typeof e=="string"?y.jsx(_n,{variant:"h3",children:e}):e}),Fte="_full-screen-container_1rm4r_1",CC={"full-screen-container":"_full-screen-container_1rm4r_1",fullScreenContainer:Fte},Bte=oe("overflow-hidden luminus-full-screen-container",CC.fullScreenContainer),Ute="container-fluid",Wte=({title:e,children:t,sideContent:n,sideContentWidth:r=250,sideContentResizeable:i=!0,noPadding:a,className:o,variant:s="main",helmet:c,unavailableOnMobile:l})=>{const{addHelmet:u,removeHelmet:d}=m.useContext(l_),{texts:{container:f}}=m.useContext(Kt),[h,g]=m.useState(r),[p,v]=m.useState(!1),w=m.useMemo(()=>{switch(s){case"fullScreen":return Bte;case"main":return Ute;default:throw new Error(`PageContainer got incorrect variant type: ${s}`)}},[s]);m.useEffect(()=>(c?u(c):typeof e=="string"&&e&&u(e),()=>d()),[c,u,d,e]);const _=gm({onSwipedLeft:b=>{b.velocity>.8&&v(!0)},delta:100}),{isMobile:x}=nc(),S=m.useMemo(()=>x&&l,[x,l]);return m.useEffect(()=>{g(r)},[r]),y.jsxs(y.Fragment,{children:[y.jsx("div",{className:oe(w,a?"p-0":"p-3",o),style:s==="fullScreen"?{width:n?`calc(100% - ${h}px)`:"100%"}:void 0,..._,children:y.jsx("div",{className:s==="fullScreen"?CC.fullScreenContainer:void 0,style:s==="main"?{paddingRight:n?`${h}px`:void 0}:{height:"100%",width:"100%"},children:S?y.jsx(vm,{variant:"warning",children:f.unavailableOnMobile}):y.jsxs(y.Fragment,{children:[e?y.jsx(Lte,{title:e}):null,t]})})}),n&&!S?y.jsx(wC,{width:h,isExpandedOnMobileState:[p,v],resizeable:i,onResize:b=>i?g(b):{},children:n}):null]})},Vg=({InputContainer:e=ic,formField:t,label:n,resetsFields:r,options:i,isNumber:a,size:o,showClearIcon:s,clearValue:c,noSortOptions:l,required:u,hidden:d,disabled:f,withoutLabel:h,hint:g,className:p})=>{const{register:v,formState:w,getValues:_,setValue:x,watch:S}=gn.useFormContext(),b=$u({falseIfNotInit:!0});console.log("disabled ",f),console.log("formDisabled ",b);const[T,j]=m.useState(void 0),[M,k]=m.useState(!1),E=m.useMemo(()=>i.toSorted((A,P)=>l?0:(A.name??"").localeCompare(P.name??"")),[i,l]),C=m.useCallback(()=>{const A=c??null;a?x(t,A===null?null:Number(A),{shouldDirty:!0,shouldValidate:M}):x(t,(A==null?void 0:A.toString())??"",{shouldDirty:!0,shouldValidate:M})},[c,a,x,t,M]);m.useEffect(()=>{const A=t.split(".");let P=w.errors;A.forEach(D=>{P!==void 0&&(P=P[D])}),j(P)},[w,t]);const O=m.useMemo(()=>f||b,[f,b]);console.log(O),m.useEffect(()=>{x(t,_(t))},[E,t,_,x]),m.useEffect(()=>{w.isSubmitted&&k(!0)},[w]);const $=T!==void 0;return y.jsx(y.Fragment,{children:y.jsxs(e,{label:n??"",required:u,disabled:O,hidden:d,withoutLabel:h,isInvalid:$,hint:g,className:p,children:[y.jsxs(Tr.Select,{size:o,...v(t,{setValueAs:A=>a?A==null||A===""?null:parseInt(A,10):A==null||A===""?null:A,onChange:()=>{r&&r.forEach(A=>x(A,null,{shouldDirty:!0,shouldValidate:M}))}}),isInvalid:$,hidden:d,disabled:O,className:"w-100",children:[y.jsx("option",{value:""}),E.map(A=>y.jsx("option",{value:A.id??"",children:A.name},A.id))]}),s&&S(t)&&y.jsx("div",{className:"luminus-input-remove-icon inset",children:y.jsx(rc,{color:"secondary",size:"sm",onClick:C,children:y.jsx(Xs,{})})}),T&&y.jsx(Ru,{message:T.message})]})})},qg=({InputContainer:e=ic,formField:t,label:n,resetsFields:r,size:i,showClearIcon:a,clearValue:o,required:s,hidden:c,disabled:l,rows:u,withoutLabel:d,customFormControlProps:f,minLength:h,maxLength:g,hint:p,onChange:v,className:w})=>{const{register:_,formState:x,setValue:S,watch:b}=gn.useFormContext(),T=$u({falseIfNotInit:!0}),[j,M]=m.useState(void 0),[k,E]=m.useState(!1),C=m.useCallback(()=>{const P=o??null;S(t,(P==null?void 0:P.toString())??"",{shouldDirty:!0,shouldValidate:k})},[o,S,t,k]),O=m.useCallback(()=>{const P=t.split(".");let D=x.errors;P.forEach(N=>{D!==void 0&&(D=D[N])}),M(D)},[x,t]),$=m.useMemo(()=>l||T,[l,T]);m.useEffect(()=>{O()},[O]),m.useEffect(()=>{x.isSubmitted&&E(!0)},[x]);const A=j!==void 0;return y.jsxs(e,{label:n??"",required:s,disabled:$,hidden:c,withoutLabel:d,isInvalid:A,className:w,hint:p,isForTextAreaInput:!0,children:[y.jsx(Tr.Control,{as:"textarea",size:i,..._(t,{setValueAs:P=>P==null||P===""?null:P,onChange:P=>{var D;r&&r.forEach(N=>S(N,null,{shouldDirty:!0,shouldValidate:k})),v&&v((D=P.target)!=null&&D.value?P.target.value.toString():null)}}),isInvalid:A,hidden:c,disabled:$,rows:u??2,className:"w-100",minLength:h,maxLength:g,...f}),a&&b(t)&&y.jsx("div",{className:"luminus-input-remove-icon",children:y.jsx(rc,{color:"secondary",size:"sm",onClick:C,children:y.jsx(Xs,{})})}),j&&y.jsx(Ru,{message:j.message})]})},to=m.forwardRef(({InputContainer:e=ic,type:t,formField:n,label:r,placeholder:i,size:a,resetsFields:o,showClearIcon:s,clearValue:c,required:l,hidden:u,disabled:d,withoutLabel:f,list:h,step:g,CustomOnChangeComponent:p,noSelectOnFocus:v,minLength:w,maxLength:_,hint:x,onChange:S,className:b,autoComplete:T},j)=>{var L,H,R,K;const{register:M,formState:k,setValue:E,watch:C}=gn.useFormContext(),O=$u({falseIfNotInit:!0}),[$,A]=m.useState(void 0),[P,D]=m.useState(!1),N=m.useCallback(()=>{const Z=c??null;t==="number"?E(n,Z!==null?Number(Z):null,{shouldDirty:!0,shouldValidate:P}):E(n,(Z==null?void 0:Z.toString())??"",{shouldDirty:!0,shouldValidate:P})},[c,t,E,n,P]),q=m.useCallback(()=>{const Z=n.split(".");let ee=k.errors;Z.forEach(pe=>{ee!==void 0&&(ee=ee[pe])}),A(ee)},[k,n]),z=m.useMemo(()=>d||O,[d,O]);m.useEffect(()=>{q()},[q]),m.useEffect(()=>{k.isSubmitted&&D(!0)},[k]);const U=$!==void 0,[G,ne]=m.useState(!1),te=C(n),X=lm(t,te??null,G),{ref:J,...Q}=M(n,{setValueAs:Z=>t==="number"?Z==null||Z===""?null:Number(Z):Z==null||Z===""?null:Z,onChange:Z=>{var ee;o&&o.forEach(pe=>E(pe,null,{shouldDirty:!0,shouldValidate:P})),S&&S((ee=Z.target)!=null&&ee.value?t==="number"?Number(Z.target.value)??null:Z.target.value.toString():null)},onBlur:()=>ne(!1)}),re=m.useRef(null),F=(((L=re.current)==null?void 0:L.scrollWidth)??0)>(((H=re.current)==null?void 0:H.clientWidth)??0),I=(R=re.current)==null?void 0:R.getBoundingClientRect();return m.useImperativeHandle(j,()=>re.current,[re]),y.jsxs(e,{label:r??"",required:l,disabled:z,hidden:u,withoutLabel:f,isInvalid:U,hint:x,className:b,children:[y.jsxs("div",{className:"luminus-input-container position-relative w-100",children:[y.jsx(Tr.Control,{type:X,placeholder:i??r,size:a,onFocus:Z=>{ne(!0),!v&&Z.target.select()},...Q,ref:Z=>{J(Z),re.current=Z},isInvalid:U,hidden:u,disabled:z,list:h,className:"w-100",step:g,minLength:w,maxLength:_,autoComplete:T}),p&&y.jsx("div",{className:"custom-picker-button",children:p})]}),s&&C(n)&&y.jsx("div",{className:`luminus-input-remove-icon ${t!=="text"?"inset":""}`,children:y.jsx(rc,{color:"secondary",size:"sm",onClick:N,children:y.jsx(Xs,{})})}),F?y.jsx("div",{className:"luminus-overflow-tooltip",style:{opacity:0,position:"fixed",top:((I==null?void 0:I.top)??0)+((I==null?void 0:I.height)??0),left:(I==null?void 0:I.left)??0,pointerEvents:"none"},children:((K=re.current)==null?void 0:K.value)??""}):null,$&&y.jsx(Ru,{message:$.message})]})}),rb=(e,t,n)=>{if(e&&"reportValidity"in e){const r=gn.get(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},TC=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?rb(r.ref,n,e):r.refs&&r.refs.forEach(i=>rb(i,n,e))}},zte=(e,t)=>{t.shouldUseNativeValidation&&TC(e,t);const n={};for(const r in e){const i=gn.get(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(Hte(t.names||Object.keys(e),r)){const o=Object.assign({},gn.get(n,r));gn.set(o,"root",a),gn.set(n,r,o)}else gn.set(n,r,a)}return n},Hte=(e,t)=>e.some(n=>n.startsWith(t+"."));var Vte=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(d){return e.push(d)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=gn.appendErrors(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},Vd=function(e,t,n){return n===void 0&&(n={}),function(r,i,a){try{return Promise.resolve(function(o,s){try{var c=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return a.shouldUseNativeValidation&&TC({},a),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return c&&c.then?c.then(void 0,s):c}(0,function(o){if(function(s){return Array.isArray(s==null?void 0:s.errors)}(o))return{values:{},errors:zte(Vte(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}}};const qte="_wrapper_1tb6d_1",Yte="_controls_1tb6d_16",Gte="_explorerWindow_1tb6d_20",Zte="_folderList_1tb6d_28",Kte="_fileList_1tb6d_35",Xte="_dndText_1tb6d_61",Qte="_extensionIcon_1tb6d_72",Oi={wrapper:qte,controls:Yte,explorerWindow:Gte,folderList:Zte,fileList:Kte,dndText:Xte,extensionIcon:Qte},tn=m.createContext({apiActions:{},loadDocuments(){throw new Error("DocumentsContext was not initialized.")},reducer:[{},{}],entityType:"",entityId:-1}),Jte="_defaultFolder_8tlxv_1",ene="_names_8tlxv_5",tne="_folderType_8tlxv_9",qf={defaultFolder:Jte,names:ene,folderType:tne},SC=({isActive:e,isDefault:t,folderName:n,typeName:r})=>{const{ProjectIconComponent:i}=m.useContext(Kt);return y.jsxs("div",{className:"d-flex gap-2 align-items-center",children:[y.jsx(i,{icon:`folder${e?"-filled":""}`,className:oe("d-inline-block",t?qf.defaultFolder:"text-primary"),iconProps:{className:"d-block"},size:18}),y.jsxs("div",{className:oe("d-flex flex-column gap-0 align-items-start",qf.names),children:[y.jsx("span",{className:e?"fw-bold":"",children:n}),r?y.jsxs("span",{className:qf.folderType,children:["(",r,")"]}):null]})]})},nne=({customText:e})=>{const{reducer:[t,n]}=m.useContext(tn),r=m.useCallback(()=>{n({type:"select-folder",folderId:"root"})},[n]);return y.jsx("li",{children:y.jsx("button",{onClick:r,type:"button",className:oe("border-0 bg-transparent"),children:y.jsx(SC,{folderName:e??"root",isActive:t.activeFolder==="root",typeName:"",isDefault:!0})})})};function rne(e){if(e.state!=="openned-modal")throw new Error('Not in "openned-modal" state!')}const kC=()=>{const e=Eu(),{startLoading:t,stopLoading:n}=m.useContext(yu),{reducer:[,r]}=m.useContext(tn),i=m.useCallback(async(o,s)=>{t("documents-renameFolder");try{await e.put("/documents/folder/rename",{folderId:o,name:s}),r({type:"update-folders",folderIds:[o],newProperties:{name:s}})}finally{n("documents-renameFolder")}},[e,r,t,n]),a=m.useCallback(async o=>{t("documentsFolderCreate");try{const s=await e.post("/documents/folder",o);r({type:"create-folder",folderData:o,folderId:s.data.id,isOnlyRead:s.data.onlyRead})}finally{n("documentsFolderCreate")}},[e,r,t,n]);return{renameFolder:i,createFolder:a}},ine=()=>{const{reducer:[e],entityId:t,entityType:n}=m.useContext(tn),{zNumberRequired:r,zStringRequired:i}=Mu(),{createFolder:a}=kC(),o=sn.object({name:i(),documentTypeId:r()}),s=gn.useForm({resolver:Vd(o)}),c=m.useCallback(async l=>{const u={...l,dbObjectId:t.toString(),entity:n,parentFolderId:e.activeFolder==="root"?null:e.activeFolder};await a(u)},[a,t,n,e.activeFolder]);return{formMethods:s,onSubmit:c}},ane=({handleClose:e})=>{var o;const{texts:{documents:t}}=m.useContext(Kt),{reducer:[n],entityType:r}=m.useContext(tn);if(rne(n),n.modalType!=="create-folder")throw new Error("Tried to render CreateFolderModal without create-folder modal type reducer state.");const{onSubmit:i,formMethods:a}=ine();return y.jsx(y.Fragment,{children:y.jsx(gn.FormProvider,{...a,children:y.jsxs(Tr,{onSubmit:a.handleSubmit(i),children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsx(Mn.Title,{children:t.createFolderInFolder(((o=n.foldersMap.get(n.chosenFolderId))==null?void 0:o.name)??r)})}),y.jsxs(Mn.Body,{children:[y.jsx(to,{formField:"name",type:"text",label:t.name,required:!0}),y.jsx(Vg,{options:n.documentTypes,formField:"documentTypeId",label:t.folderType,isNumber:!0,required:!0})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Ji,{onClick:e,variant:"outlined",color:"secondary",children:t.cancel}),y.jsx(Ji,{type:"submit",children:t.createFolder})]})]})})})},EC=100,one=(e,t)=>{const n=Eu(),{startLoading:r,stopLoading:i}=m.useContext(yu),{loadDocuments:a}=m.useContext(tn),{zStringRequired:o,zString:s,zNumberRequired:c,zDateRequired:l}=Mu(),u=sn.object({name:o(),description:s(),validToDate:l(),documentTypeId:c()}),d=gn.useForm({resolver:Vd(u),defaultValues:{...e,validToDate:xu(e.validToDate)}}),f=m.useCallback(async h=>{r("documents-updateProperties");try{await n.put(`/documents/${e.id}/update-info`,h),await a(),t()}finally{i("documents-updateProperties")}},[n,e.id,t,a,r,i]);return{formMethods:d,onSubmit:f}},sne=({handleClose:e,file:t})=>{const{texts:{documents:n}}=m.useContext(Kt),{reducer:[r]}=m.useContext(tn),{formMethods:i,onSubmit:a}=one(t,e);return y.jsxs(y.Fragment,{children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsx(Mn.Title,{children:n.editFileProperties})}),y.jsx(gn.FormProvider,{...i,children:y.jsxs(Tr,{onSubmit:i.handleSubmit(a),children:[y.jsxs(Mn.Body,{children:[y.jsx(to,{formField:"name",type:"text",label:n.name,required:!0}),y.jsx(to,{formField:"validToDate",type:"date",label:n.validSince,required:!0}),y.jsx(Vg,{formField:"documentTypeId",label:n.category,options:r.documentTypes,isNumber:!0,required:!0}),y.jsx(qg,{formField:"description",label:n.description,customFormControlProps:{maxLength:EC}})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Ji,{onClick:e,color:"secondary",variant:"outlined",children:n.cancel}),y.jsx(Ji,{type:"submit",children:n.save})]})]})})]})},cne=({handleClose:e})=>{const{reducer:[t]}=m.useContext(tn),n=m.useMemo(()=>{if(t.markedFiles.length===1)return t.constantFiles.find(r=>r.id===t.markedFiles[0])},[t.constantFiles,t.markedFiles]);return n===void 0?(e(),y.jsx(y.Fragment,{})):y.jsx(sne,{file:n,handleClose:e})},lne=()=>{const{reducer:[e,t]}=m.useContext(tn),n=m.useCallback(()=>{t({type:"close-modal"})},[t]),r=m.useMemo(()=>{if(e.state!=="openned-modal")return null;switch(e.modalType){case"create-folder":return y.jsx(ane,{handleClose:n});case"edit-file-properties":return y.jsx(cne,{handleClose:n});default:return null}},[e.state,e.modalType]);return y.jsx(Mn,{show:e.state==="openned-modal",onHide:n,children:r})},ib="documents_drag_image_element",qc="drop-container-highlight-class",ab="data-drop-container-id",ob="data-draggable-id",une=()=>{const e=document.getElementById(ib);if(e!==null)return e;const t=document.createElement("div");return t.id=ib,t.style.position="absolute",t.style.top=`${-window.outerHeight}px`,t.style.left=`${-window.outerWidth}px`,t.style.width="50px",t.style.height="50px",t.style.backgroundColor="rgba(0, 0, 0, 0.5)",t.style.color="white",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.style.fontSize="16px",t.style.borderRadius="5px",document.body.appendChild(t),t},Yg=()=>{const{apiActions:{moveDocuments:e},reducer:[t]}=m.useContext(tn),n=m.useCallback(l=>{var u;if(t.markedFiles.length>0){const d=une();d.innerHTML=t.markedFiles.length.toString(),l.dataTransfer.setDragImage(d,0,0),l.dataTransfer.clearData(),l.dataTransfer.setData("application/json",JSON.stringify(t.markedFiles)),l.dataTransfer.dropEffect="none",l.dataTransfer.effectAllowed="move"}else l.dataTransfer.setData("application/json",JSON.stringify([parseInt(((u=l.currentTarget.attributes.getNamedItem(ob))==null?void 0:u.nodeValue)??"",10)])),l.dataTransfer.dropEffect="none",l.dataTransfer.effectAllowed="move"},[t.markedFiles]),r=m.useCallback(l=>({[ob]:l,draggable:t.markedFiles.length===0||t.markedFiles.includes(l),onDragStart:n}),[n,t.markedFiles]),i=m.useCallback(l=>u=>{var h;u.preventDefault(),u.stopPropagation(),u.currentTarget.classList.remove(qc);const d=u.dataTransfer.files;if(l&&d&&d.length>0){l(d);return}const f=u.dataTransfer.getData("application/json");if(f){const g=JSON.parse(f),p=parseInt(((h=u.currentTarget.attributes.getNamedItem(ab))==null?void 0:h.value)??"",10);e(p,g)}},[e]),a=m.useCallback(()=>l=>{l.preventDefault(),l.stopPropagation()},[]),o=m.useCallback(l=>u=>{u.preventDefault(),u.stopPropagation(),u.dataTransfer.types.includes("Files")?(u.dataTransfer.dropEffect="copy",u.currentTarget.classList.add(qc)):!l&&u.dataTransfer.types.includes("application/json")?(u.dataTransfer.dropEffect="move",u.currentTarget.classList.add(qc)):u.dataTransfer.dropEffect="none"},[]),s=m.useCallback(l=>{l.preventDefault(),l.stopPropagation(),l.target===l.currentTarget&&(l.dataTransfer.dropEffect="none",l.currentTarget.classList.remove(qc))},[]),c=m.useCallback((l,u)=>({onDrop:i(u==null?void 0:u.onFilesDrop),onDragOver:a(),onDragEnter:o(u==null?void 0:u.ignoreInner),onDragLeave:s,[ab]:l}),[i,a,o,s]);return{getDraggableProps:r,getDropProps:c}};function OC(e,t,n){for(let r=0;r<e.childrenIds.length;r++){const i=e.childrenIds[r];if(i===t)return!0;const a=n.get(i);if(a&&OC(a,t,n))return!0}return!1}function dne(e){if(e.activeFolder==="root")return!1;const t=e.foldersMap.get(e.activeFolder);return!(t!=null&&t.onlyRead)}function MC(e,t){const n=t.get(e);return n===void 0?"":n.parentId===null?n.name:`${MC(n.parentId,t)}/${n.name}`}const fne=()=>{const{zString:e,zStringRequired:t,zNumberRequired:n}=Mu();return{formSchema:m.useMemo(()=>sn.object({validToDate:t(),description:e(),name:e(),documentTypeId:n()}),[n,e,t])}},Gg=({handleClose:e,files:t,targetFolderId:n})=>{var f;const{texts:{documents:r}}=m.useContext(Kt),{reducer:[i],apiActions:{uploadFiles:a}}=m.useContext(tn),o=m.useMemo(()=>[...t],[t]),s=m.useMemo(()=>n??i.activeFolder,[i.activeFolder,n]),c=m.useMemo(()=>s==="root"?void 0:i.foldersMap.get(s),[s,i.foldersMap]),{formSchema:l}=fne(),u=gn.useForm({resolver:Vd(l),defaultValues:{validToDate:xu(new Date().toISOString()),documentTypeId:(f=i.documentTypes.find(h=>{var g;return h.name===((g=i.foldersMap.get(s))==null?void 0:g.defaultDocType)}))==null?void 0:f.id}}),d=m.useCallback(async h=>{s!=="root"&&(await a(t,{folderId:s,...h}),e())},[t,e,s,a]);return y.jsxs(Mn,{show:!0,onHide:e,children:[y.jsx(Mn.Header,{closeButton:!0,children:y.jsxs("div",{children:[r.uploadFilesPrompt(t.length,c.name),y.jsx("ul",{children:o.map((h,g)=>y.jsxs("li",{children:[h.name," - ",Va(h.size)]},`${h.name}-${g}`))})]})}),y.jsx(gn.FormProvider,{...u,children:y.jsxs(Tr,{onSubmit:u.handleSubmit(d),children:[y.jsxs(Mn.Body,{children:[y.jsx(Vg,{formField:"documentTypeId",label:r.documentType,options:i.documentTypes,isNumber:!0,required:!0}),y.jsx(to,{formField:"validToDate",label:r.validSince,type:"date",required:!0}),o.length===1?y.jsx(to,{formField:"name",label:r.name,type:"text"}):null,y.jsx(qg,{formField:"description",label:r.description,customFormControlProps:{maxLength:EC}})]}),y.jsxs(Mn.Footer,{children:[y.jsx(Ji,{variant:"outlined",color:"secondary",onClick:e,children:r.cancel}),y.jsx(Ji,{type:"submit",children:r.upload})]})]})})]})},hne="_folder_1cktt_1",pne="_collapseArrowDiv_1cktt_8",mne="_button_1cktt_20",gne="_nestedList_1cktt_24",vne="_numberOfFiles_1cktt_31",yne="_collapseArrow_1cktt_8",Mi={folder:hne,collapseArrowDiv:pne,button:mne,nestedList:gne,numberOfFiles:vne,collapseArrow:yne},$C=({dirId:e,writePermissions:t})=>{const{ProjectIconComponent:n}=m.useContext(Kt),{reducer:[r,i]}=m.useContext(tn),{getDropProps:a}=Yg(),[o,s]=m.useState(null),[c,l]=m.useState(!0),u=m.useMemo(()=>{const p=r.foldersMap.get(e);if(p===void 0)throw new Error(`tried to get dir with id ${e}`);return p},[e,r.foldersMap]),d=m.useCallback(()=>{r.activeFolder!=="root"&&OC(u,r.activeFolder,r.foldersMap)&&i({type:"select-folder",folderId:e}),l(!0)},[e,u,i,r.activeFolder,r.foldersMap]),f=m.useMemo(()=>u.childrenIds.length>0,[u.childrenIds.length]),h=m.useCallback(()=>{i({type:"select-folder",folderId:e})},[e,i]),g=m.useMemo(()=>r.filteredFiles.filter(p=>p.folderId===e&&p.archive===!1).length,[e,r.filteredFiles]);return y.jsxs(y.Fragment,{children:[y.jsxs("li",{className:Mi.folder,children:[y.jsx("div",{className:Mi.collapseArrowDiv,children:f?c?y.jsx("button",{onClick:()=>l(!1),type:"button",children:y.jsx(n,{icon:"chevron-right",iconProps:{className:Mi.collapseArrow}})}):y.jsx("button",{onClick:d,type:"button",children:y.jsx(n,{icon:"chevron-down",iconProps:{className:Mi.collapseArrow}})}):null}),y.jsx("button",{className:oe(Mi.button),onClick:h,type:"button",...t&&!u.onlyRead?a(e,{onFilesDrop:p=>s(p)}):{},children:y.jsxs("div",{className:"d-flex align-items-center gap-2",children:[y.jsx(SC,{isDefault:u.isDefault,folderName:u.name,typeName:u.defaultDocType??"",isActive:e===r.activeFolder}),g>0?y.jsxs("span",{className:Mi.numberOfFiles,children:["[",g,"]"]}):void 0]})}),f?c?null:y.jsx("ul",{className:Mi.nestedList,children:u==null?void 0:u.childrenIds.map(p=>y.jsx($C,{dirId:p,writePermissions:t},p))}):void 0]}),o!==null?y.jsx(Gg,{files:o,handleClose:()=>s(null),targetFolderId:e}):null]})},bne="_wrapper_1th2u_1",xne="_downloadButton_1th2u_9",vp={wrapper:bne,downloadButton:xne};function _ne(e){return rt({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M320 464c8.8 0 16-7.2 16-16V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16H320zM0 64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V64z"},child:[]}]})(e)}function wne(e){return rt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M448 80c8.8 0 16 7.2 16 16V415.8l-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3V96c0-8.8 7.2-16 16-16H448zM64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"},child:[]}]})(e)}function Cne(e){return rt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23 1.5q.41 0 .7.3.3.29.3.7v19q0 .41-.3.7-.29.3-.7.3H7q-.41 0-.7-.3-.3-.29-.3-.7V18H1q-.41 0-.7-.3-.3-.29-.3-.7V7q0-.41.3-.7Q.58 6 1 6h5V2.5q0-.41.3-.7.29-.3.7-.3zM6 13.28l1.42 2.66h2.14l-2.38-3.87 2.34-3.8H7.46l-1.3 2.4-.05.08-.04.09-.64-1.28-.66-1.29H2.59l2.27 3.82-2.48 3.85h2.16zM14.25 21v-3H7.5v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3H7.5v3zm8.25 15v-3h-6.75v3zm0-4.5v-3.75h-6.75v3.75zm0-5.25V7.5h-6.75v3.75zm0-5.25V3h-6.75v3Z"},child:[]}]})(e)}function Tne(e){return rt({tag:"svg",attr:{role:"img",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M23.004 1.5q.41 0 .703.293t.293.703v19.008q0 .41-.293.703t-.703.293H6.996q-.41 0-.703-.293T6 21.504V18H.996q-.41 0-.703-.293T0 17.004V6.996q0-.41.293-.703T.996 6H6V2.496q0-.41.293-.703t.703-.293zM6.035 11.203l1.442 4.735h1.64l1.57-7.876H9.036l-.937 4.653-1.325-4.5H5.38l-1.406 4.523-.938-4.675H1.312l1.57 7.874h1.641zM22.5 21v-3h-15v3zm0-4.5v-3.75H12v3.75zm0-5.25V7.5H12v3.75zm0-5.25V3h-15v3Z"},child:[]}]})(e)}const Sne="_excel_18ggp_1",kne="_word_18ggp_5",Ene="_pdf_18ggp_9",One="_image_18ggp_13",Yc={excel:Sne,word:kne,pdf:Ene,image:One},AC=({fileExtension:e,className:t,...n})=>{switch(e==null?void 0:e.toUpperCase()){case"JPG":case"JPEG":case"BMP":case"PNG":return y.jsx("span",{className:oe(t,Yc.image),children:y.jsx(wne,{...n})});case"XLS":case"XLSX":case"CSV":return y.jsx(Cne,{className:oe(t,Yc.excel),...n});case"DOC":case"DOCM":case"DOCX":return y.jsx(Tne,{className:oe(t,Yc.word),...n});case"PDF":return y.jsx(SA,{className:oe(t,Yc.pdf),...n});default:return y.jsx(_ne,{})}},Mne=()=>{const{ProjectIconComponent:e,texts:{documents:t}}=m.useContext(Kt),{apiActions:{downloadFile:n},reducer:[r]}=m.useContext(tn),i=m.useMemo(()=>r.activeFolder==="root",[r.activeFolder]),a=m.useCallback((s,c,l)=>s?w2(c??"")&&localStorage.getItem("file-download-try-opening")!=="false"?y.jsx("span",{role:"button",className:"link link-primary d-flex align-items-center",onClick:d=>{d.stopPropagation(),n(l,!0)},children:s}):s:"",[n]);return{columns:m.useMemo(()=>[{fieldName:"id",caption:"id",type:"number",isVisible:!1},...i?[{fieldName:"folderName",caption:t.folder,type:"string"}]:[],{fieldName:"--icon",caption:"",type:"string",valueFormat:s=>{const c=s.row.original.fileExtension,l=s.row.original.id;return a(y.jsx(AC,{fileExtension:c,className:vp.extensionIcon,size:18}),c??"",l)},width:36,align:"center",filterType:"none",noSort:!0},{fieldName:"name",caption:t.name,type:"string",valueFormat:s=>{const c=s.row.original.name,l=s.row.original.fileExtension,u=s.row.original.id;return a(c??"",l??"",u)}},{fieldName:"description",caption:t.description,type:"string"},{fieldName:"fileExtension",caption:t.fileExtension,type:"string",filterType:"select",width:50},{fieldName:"--downloadButton",caption:"",type:"number",filterType:"none",width:38,align:"center",noSort:!0,valueFormat:s=>y.jsx(Au,{className:vp.downloadButton,onClick:()=>n(s.row.original.id,!1),children:y.jsx(e,{icon:"file-download",size:18})})},{fieldName:"documentTypeName",caption:t.documentType,type:"string",filterType:"select"},{fieldName:"validToDate",caption:t.validSince,type:"date"},{fieldName:"size",caption:t.size,type:"number",valueFormat:({cell:{value:s}})=>s!==void 0?Va(s*1024*1024):"",filterType:"none"},{fieldName:"archive",caption:t.archived,type:"boolean",filterType:"select",valueFormat:({cell:{value:s}})=>s?t.yes[0]:t.no[0]}],[e,t.archived,t.description,t.documentType,t.fileExtension,t.folder,t.name,t.no,t.size,t.validSince,t.yes,n,i,a])}},$ne=({BnfTableComponent:e,tableIdentifier:t,writePermissions:n})=>{const{reducer:[r,i]}=m.useContext(tn),{columns:a}=Mne(),o=m.useCallback(h=>{i({type:"mark-files-by-action",setStateAction:h})},[i]),s=m.useMemo(()=>r.activeFolder==="root",[r.activeFolder]),c=m.useMemo(()=>{var h;return r.activeFolder==="root"?!1:((h=r.foldersMap.get(r.activeFolder))==null?void 0:h.onlyRead)??!1},[r.activeFolder,r.foldersMap]),l=m.useMemo(()=>({enabled:n&&!s,idField:"id",selectedRows:r.markedFiles,setSelectedRows:o}),[s,o,r.markedFiles,n]),u=m.useMemo(()=>r.activeFolder==="root"?r.filteredFiles:r.filteredFiles.filter(h=>h.folderId===r.activeFolder),[r.activeFolder,r.filteredFiles]),{getDraggableProps:d}=Yg(),f=m.useCallback(h=>n===!1||c?{}:d(h.id),[d,c,n]);return y.jsx("div",{className:oe(vp.wrapper),children:y.jsx(e,{data:u,columnsDef:a,rowSelection:l,useScrollableContainer:!0,getRowProps:f,defaultConfig:{defaultFilters:[{id:"archive",value:"false"}]},tableId:t,searchStatePrefix:"docs",useSearchState:!0,hideBottomBar:!0},r.activeFolder)})},Ane="_wrapper_1q562_1",Rne="_divButtons_1q562_10",Yf={wrapper:Ane,divButtons:Rne},jne="_wrapper_1bpdd_1",Pne="_fileInput_1bpdd_5",sb={wrapper:jne,fileInput:Pne},Ine=({entityId:e,entityType:t,children:n,disabled:r})=>{const i=m.useRef(null),[a,o]=m.useState(null),{reducer:[s]}=m.useContext(tn),c=f=>{var h;(((h=f.target.files)==null?void 0:h.length)??0)>0&&o(f.target.files)},l=m.useCallback(()=>{o(null),i.current&&(i.current.value="")},[]),u=m.useMemo(()=>`documents-upload-${t}-${e}`,[e,t]),d=m.useMemo(()=>r||s.activeFolder==="root",[r,s.activeFolder]);return y.jsxs("div",{className:sb.wrapper,children:[y.jsx("label",{htmlFor:u,className:oe("btn btn-context luminus-context-button",d?"disabled":void 0),children:n}),y.jsx("input",{id:u,type:"file",multiple:!0,onChange:c,className:sb.fileInput,ref:i,disabled:d}),a!==null?y.jsx(Gg,{handleClose:l,files:a}):void 0]})},dr=({children:e,onClick:t,className:n,disabled:r=!1})=>y.jsx(Au,{onClick:t,className:n,disabled:r,children:e}),Dne=({className:e,entityId:t,entityType:n})=>{var j,M;const{texts:{documents:r}}=m.useContext(Kt),{prompt:i}=i2(),{confirm:a}=sm(),{apiActions:o,reducer:[s,c]}=m.useContext(tn),{deleteFiles:l,renameFiles:u,downloadAsZip:d,archivateFiles:f,deleteDirectory:h}=o,{renameFolder:g}=kC(),p=m.useMemo(()=>s.markedFiles.length===0,[s.markedFiles.length]),v=m.useMemo(()=>s.markedFiles.length===1,[s.markedFiles.length]),w=m.useCallback(async()=>{if(s.activeFolder==="root")return;const k=await i(r.enterNewFolderName,{input:"input"});k!==null&&g(s.activeFolder,k)},[r.enterNewFolderName,i,g,s.activeFolder]),_=m.useCallback(async()=>{if(s.activeFolder==="root")return;const k=await i(r.enterNewFileName,{input:"input"});k!==null&&u(k)},[r.enterNewFileName,i,u,s.activeFolder]),x=m.useMemo(()=>s.activeFolder==="root",[s.activeFolder]),S=m.useMemo(()=>{var k;return s.activeFolder==="root"?!1:((k=s.foldersMap.get(s.activeFolder))==null?void 0:k.onlyRead)??!1},[s.activeFolder,s.foldersMap]),b=m.useMemo(()=>s.markedFiles.every(k=>{var E;return((E=s.constantFiles.find(C=>C.id===k))==null?void 0:E.archive)===!1}),[s.constantFiles,s.markedFiles]),T=m.useMemo(()=>s.markedFiles.every(k=>{var E;return((E=s.constantFiles.find(C=>C.id===k))==null?void 0:E.archive)===!0}),[s.constantFiles,s.markedFiles]);return y.jsx("div",{className:oe(e,Yf.wrapper,s.state==="folder-choosing"?"ignore-dim":void 0,"d-flex justify-content-between"),children:s.state!=="folder-choosing"?y.jsxs(y.Fragment,{children:[y.jsxs("div",{className:Yf.divButtons,children:[y.jsx(Ine,{entityId:t,entityType:n,disabled:S,children:r.uploadFiles}),y.jsx(dr,{onClick:()=>{c({type:"open-modal",modalType:"create-folder",chosenFolderId:s.activeFolder??"root"})},disabled:S,children:r.createFolder}),y.jsx(dr,{disabled:s.activeFolder==="root"||((j=s.foldersMap.get(s.activeFolder))==null?void 0:j.isDefault),onClick:async()=>{var E;await a(`${r.deleteFolder} ${(E=s.foldersMap.get(s.activeFolder))==null?void 0:E.name}?`)&&h(s.activeFolder)},children:r.deleteFolder}),y.jsx(dr,{disabled:s.activeFolder==="root"||((M=s.foldersMap.get(s.activeFolder))==null?void 0:M.isDefault),onClick:w,children:r.renameFolder})]}),!x&&!S?y.jsxs("div",{className:Yf.divButtons,children:[y.jsx(dr,{onClick:()=>{c({type:"open-modal",modalType:"edit-file-properties"})},disabled:!v,children:r.editFileProperties}),y.jsx(dr,{onClick:async()=>{await a(r.confirmDeleteFile(s.markedFiles.length))&&l(s.markedFiles)},disabled:p,children:r.delete}),T?y.jsx(dr,{onClick:async()=>{await a(r.confirmDearchiveFile(s.markedFiles.length))&&await f(!0)},disabled:p,children:r.dearchivate}):y.jsx(dr,{onClick:async()=>{await a(r.confirmArchiveFile(s.markedFiles.length))&&await f()},disabled:p||!b,children:r.archivate}),y.jsx(dr,{onClick:_,disabled:p,children:r.rename}),y.jsx(dr,{onClick:d,disabled:p,children:r.downloadZip})]}):null]}):s.state==="folder-choosing"?y.jsx(y.Fragment,{children:y.jsx(dr,{onClick:()=>c({type:"return-from-folder-choosing"}),className:oe("ignore-dim","body-background-color"),children:r.back})}):void 0})},Nne=({file:e})=>{const{confirm:t}=sm(),{reducer:[n],apiActions:{downloadFile:r}}=m.useContext(tn),{texts:{documents:i}}=m.useContext(Kt),a=m.useCallback(async()=>{await t(i.confirmFileDownload(e.name,e.size==null?void 0:Va(e.size*1024*1024)))&&r(e.id)},[t,i,r,e.id,e.name,e.size]);return y.jsxs(gu,{action:!0,onClick:a,children:[y.jsx(_n,{variant:"body",className:"text-muted",children:MC(e.folderId,n.foldersMap)}),y.jsxs("div",{className:"d-flex justify-content-between gap-2",children:[y.jsx(_n,{variant:"body",children:e.name}),y.jsx(_n,{variant:"body",children:e.size==null?null:Va(e.size*1024*1024)})]})]})},Lne="_typeSelect_m3myk_1",Fne={typeSelect:Lne},Bne=()=>{const{reducer:[e]}=m.useContext(tn),{texts:{documents:t}}=m.useContext(Kt),[n,r]=m.useState(""),[i,a]=m.useState(null),o=m.useMemo(()=>{const c=new Map;return e.filteredFiles.forEach(u=>{c.get(u.documentTypeId)===void 0&&c.set(u.documentTypeId,u.documentTypeName)}),[{id:null,name:t.all},...Array.from(c).map(u=>({id:u[0],name:u[1]}))]},[t.all,e.filteredFiles]),s=m.useMemo(()=>e.filteredFiles.filter(c=>em(c.name,n)&&(i===null||c.documentTypeId===i)),[n,i,e.filteredFiles]);return y.jsxs("div",{className:"d-flex h-100 flex-column",children:[y.jsxs("div",{className:"d-flex gap-1 mb-1",children:[y.jsx(M_,{options:o,label:t.documentType,value:i,onChange:a,isNumber:!0,size:"sm",className:Fne.typeSelect}),y.jsx(k_,{label:t.search,type:"text",value:n,onChange:c=>r(c===null?"":c),className:"flex-grow-1",size:"sm"})]}),y.jsx(Ax,{className:"overflow-y-auto",children:s.map(c=>y.jsx(Nne,{file:c},c.id))})]})};function Une(e){return{name:e.name,defaultDocType:e.defaultDocType,childrenIds:[],parentId:e.parentId??null,isDefault:e.isDefault,onlyRead:e.onlyRead}}function Wne(e){const t=[],n=new Map,r=new Map;return e.forEach(i=>{n.set(i.id,Une(i)),i.parentId===null?t.push(i.id):r.set(i.id,i.parentId)}),r.forEach((i,a)=>{const o=n.get(i);if(o===void 0)throw new Error(`Did not get folder with ID ${i}, which is supposed to be parent directory of folder with ID ${a}`);o.childrenIds.push(a)}),{dirsMap:n,rootIds:t}}function cb(e,t){const n=t.toUpperCase();return e.filter(r=>{var a;const i=(a=r.name)==null?void 0:a.toUpperCase();return i==null?void 0:i.includes(n)})}function zne(e,t){return e.map(n=>{var r;return{...n,folderName:((r=t.get(n.folderId))==null?void 0:r.name)??""}})}const Hne=([e,t],n,r)=>{const{texts:{documents:i}}=m.useContext(Kt),{startLoading:a,stopLoading:o}=m.useContext(yu),{addNotification:s}=ku(),c=Eu(),l=m.useCallback(async x=>{a("documentList");try{const b=(await c.get(`/documents/${n}/${r}`)).data,{dirsMap:T,rootIds:j}=Wne(b.folders),M=zne(b.documents,T);t({type:"load-data",files:M,foldersMap:T,rootFolderIds:j,setActiveFolder:x})}finally{o("documentList")}},[c,t,r,n,a,o]);m.useEffect(()=>{l(!0)},[l]);const u=m.useCallback(async()=>{a("documents-types");try{const x=await c.get(`/documents/types/${n}`);if(x.status!==200)throw new Error(`Unexpected status code: ${x.status}`);t({type:"load-document-types",documentTypes:x.data})}finally{o("documents-types")}},[c,t,n,a,o]);m.useEffect(()=>{u()},[u]);const d=m.useCallback(async(x,S)=>{const b=S??e.markedFiles;a("documentsMove");try{await c.put(`/documents/move-to-folder?folderId=${x}`,b),t({type:"update-files",fileIds:b,newProperties:{folderId:x}}),s(i.fileMoveSuccessful(b.length,e.foldersMap.get(x).name),"success")}finally{o("documentsMove")}},[e.markedFiles,e.foldersMap,a,c,t,s,i,o]),f=m.useCallback(async x=>{const S=x??e.markedFiles;a("documentsFilesDelete");try{const b=await c.delete(`/documents/delete?${ph(S,"documentIds")}`);if(b.status!==200)throw new Error(`Unexpected status code: ${b.status}`);t({type:"delete-files",fileIds:S}),s(i.fileDeleteSuccessful(S.length),"success")}finally{o("documentsFilesDelete")}},[e.markedFiles,a,c,t,s,i,o]),h=m.useCallback(async x=>{var S;if(!(x==="root"||(S=e.foldersMap.get(x))!=null&&S.isDefault)){a("documentsFolderDelete");try{const b=await c.delete(`/documents/folder/${x}`);if(b.status!==200)throw new Error(`Unexpected status code: ${b.status}`);t({type:"delete-folder",folderId:x}),s(i.folderDeleteSuccessful(e.foldersMap.get(x).name),"success")}finally{o("documentsFolderDelete")}}},[e.foldersMap,a,c,t,s,i,o]),g=m.useCallback(async x=>{a("documentsRename");try{const S=await c.put("/documents/update-name",{documentIds:e.markedFiles,name:x});if(S.status!==200)throw new Error(`Unexpected status code: ${S.status}`);l()}finally{o("documentsRename")}},[a,c,e.markedFiles,l,o]),p=m.useCallback(async x=>{a("documents-archivate");try{const S=await c.put(`/documents/${x?"dearchive":"archive"}`,e.markedFiles);if(S.status!==200)throw new Error(`Unexpected status code: ${S.status}`);t({type:"update-files",fileIds:e.markedFiles,newProperties:{archive:!x}}),s((x?i.dearchivateSuccessful:i.archivateSuccessful)(e.markedFiles.length),"success")}finally{o("documents-archivate")}},[a,c,e.markedFiles,t,s,i.archivateSuccessful,i.dearchivateSuccessful,o]),v=m.useCallback(async()=>{var S;if(e.activeFolder==="root")return;const x=e.markedFiles.length;s(i.downloadAsZip(x),"info"),a("documents-ZIP_download");try{const b=await c.get(`/documents/download-zip?${ph(e.markedFiles,"documentIds")}`,{responseType:"blob"});_l(b.data,(((S=e.foldersMap.get(e.activeFolder))==null?void 0:S.name)??"")+"_files")}finally{o("documents-ZIP_download")}},[e.activeFolder,e.markedFiles,e.foldersMap,s,i,a,c,o]),w=m.useCallback(async(x,S)=>{s(i.downloadingFile,"info"),a("documents-downloading_file");try{const b=await c.get(`/documents/${x}?isSmall=true`,{responseType:"blob"}),T=e.constantFiles.find(M=>M.id===x),j=`${(T==null?void 0:T.name)??x.toString()}.${T!=null&&T.fileExtension?T==null?void 0:T.fileExtension.toLowerCase():"unknown"}`;_l(b.data,j,S)}finally{o("documents-downloading_file")}},[s,i.downloadingFile,a,c,e.constantFiles,o]),_=m.useCallback(async(x,S)=>{a("documents-upload"),s(i.uploadingDocuments,"info");try{await c.postForm("/documents/upload",{files:x,...S}),await l()}finally{o("documents-upload")}},[a,s,i.uploadingDocuments,c,l,o]);return{loadDocuments:l,moveDocuments:d,deleteFiles:f,deleteDirectory:h,renameFiles:g,archivateFiles:p,downloadAsZip:v,downloadFile:w,uploadFiles:_}},Vne=(e,t)=>{var n,r;switch(t.type){case"load-data":{const i={...e,constantFiles:t.files,filteredFiles:cb(t.files,e.searchString),foldersMap:t.foldersMap,rootFolderIds:t.rootFolderIds};if(t.setActiveFolder){const a=t.rootFolderIds.find(o=>t.files.some(s=>s.archive===!1&&s.folderId===o))??"root";i.activeFolder=a}return i}case"load-document-types":return{...e,documentTypes:t.documentTypes};case"select-folder":return{...e,activeFolder:t.folderId,markedFiles:[]};case"mark-file":{const i=e.markedFiles.includes(t.fileId)?[...e.markedFiles.filter(a=>a!==t.fileId)]:[...e.markedFiles,t.fileId];return{...e,state:i.length>0?"selection-file":"explorer",markedFiles:i}}case"mark-files-by-action":{const i=typeof t.setStateAction=="function"?t.setStateAction(e.markedFiles):t.setStateAction;return{...e,state:i.length>0?"selection-file":"explorer",markedFiles:i}}case"mark-all-files":return e.markedFiles.length<e.filteredFiles.filter(i=>i.folderId===e.activeFolder).length?{...e,markedFiles:e.filteredFiles.filter(i=>i.folderId===e.activeFolder).map(i=>i.id),state:"explorer"}:{...e,markedFiles:[],state:"explorer"};case"enter-folder-choosing":return e.state==="folder-choosing"||e.state==="openned-modal"?e:{...e,state:"folder-choosing",canTargetRoot:t.canTargetRoot??!1,previousState:e.state,choosingType:t.choosingType};case"return-from-folder-choosing":return e.state!=="folder-choosing"?e:{...e,state:e.previousState};case"update-files":return{...e,filteredFiles:[...e.filteredFiles.map(i=>t.fileIds.includes(i.id)?{...i,...t.newProperties}:i)],constantFiles:[...e.constantFiles.map(i=>t.fileIds.includes(i.id)?{...i,...t.newProperties}:i)],markedFiles:[],state:"explorer"};case"update-folders":{const i=new Map(e.foldersMap);return t.folderIds.forEach(a=>{i.set(a,{...e.foldersMap.get(a),...t.newProperties})}),{...e,foldersMap:i}}case"delete-files":return{...e,filteredFiles:[...e.filteredFiles.filter(i=>!t.fileIds.includes(i.id))],constantFiles:[...e.constantFiles.filter(i=>!t.fileIds.includes(i.id))],markedFiles:e.markedFiles.filter(i=>!t.fileIds.includes(i)),state:"explorer"};case"open-modal":switch(t.modalType){case"create-folder":return{...e,state:"openned-modal",modalType:t.modalType,chosenFolderId:t.chosenFolderId};default:return{...e,state:"openned-modal",modalType:t.modalType}}case"close-modal":return{...e,state:"explorer"};case"delete-folder":{const i=new Map(e.foldersMap),a=(n=i.get(t.folderId))==null?void 0:n.parentId;let o=[...e.rootFolderIds];if(a){const s=JSON.parse(JSON.stringify(i.get(a)));s.childrenIds=s.childrenIds.filter(c=>c!==t.folderId),i.set(a,s)}else o=o.filter(s=>s!==t.folderId);return i.delete(t.folderId),{...e,rootFolderIds:o,foldersMap:i,activeFolder:"root"}}case"create-folder":{const i=new Map(e.foldersMap);i.set(t.folderId,{name:t.folderData.name,defaultDocType:(r=e.documentTypes.find(o=>o.id===t.folderData.documentTypeId))==null?void 0:r.name,childrenIds:[],parentId:t.folderData.parentFolderId,isDefault:!1,onlyRead:t.isOnlyRead});const a=[...e.rootFolderIds];if(t.folderData.parentFolderId===null)a.push(t.folderId);else{const o=i.get(t.folderData.parentFolderId),s=JSON.parse(JSON.stringify(o));s.childrenIds.push(t.folderId),i.set(t.folderData.parentFolderId,s)}return{...e,state:"explorer",rootFolderIds:a,foldersMap:i}}case"search-files":{const i=cb(e.constantFiles,t.searchString);return{...e,searchString:t.searchString,filteredFiles:i,markedFiles:e.markedFiles.filter(a=>i.map(o=>o.id).includes(a))}}default:throw new Error("Wrong action.type specified.")}},qne=()=>{const e={state:"explorer",activeFolder:"root",searchString:"",filteredFiles:[],constantFiles:[],foldersMap:new Map,rootFolderIds:[],markedFiles:[],documentTypes:[]},[t,n]=m.useReducer(Vne,e);return[t,n]},Yne=m.memo(({entityType:e,entityId:t,className:n,BnfTableComponent:r,tableIdentifier:i,customRootFolderName:a,writePermissions:o=!0,...s})=>{const{isMobile:c}=nc(),{ProjectIconComponent:l,texts:{documents:u}}=m.useContext(Kt),[d,f]=qne(),[h,g]=m.useState(null),{loadDocuments:p,...v}=Hne([d,f],e,t),w=m.useMemo(()=>({entityId:t,entityType:e,apiActions:v,loadDocuments:p,reducer:[d,f]}),[t,e,v,p,d,f]),{getDropProps:_}=Yg();return c?y.jsx(tn.Provider,{value:w,children:y.jsx(Bne,{})}):y.jsx("div",{...s,className:oe(Oi.wrapper,n),onDragOver:x=>{x.dataTransfer.dropEffect="none",x.stopPropagation(),x.preventDefault()},onDragEnter:x=>{x.dataTransfer.dropEffect="none",x.stopPropagation(),x.preventDefault()},children:y.jsxs(tn.Provider,{value:w,children:[y.jsx("div",{className:oe(d.state==="folder-choosing"?"dim-others":void 0,Oi.explorerWindow),children:y.jsxs("ul",{className:Oi.folderList,children:[y.jsx(nne,{customText:a??e}),d.rootFolderIds.map(x=>y.jsx($C,{dirId:x,writePermissions:o},x))]})}),y.jsxs("div",{className:oe(Oi.explorerWindow,Oi.fileList),...o&&dne(d)?_(d.activeFolder,{onFilesDrop:x=>g(x),ignoreInner:!0}):{},children:[y.jsxs("div",{className:Oi.dndText,children:[y.jsx(l,{icon:"file-upload",iconProps:{style:{marginRight:0}}}),y.jsx("span",{children:u.dropToUpload})]}),y.jsx($ne,{tableIdentifier:i,BnfTableComponent:r,writePermissions:o},(d.activeFolder==="root").toString())]}),o?y.jsx(Dne,{className:Oi.controls,entityType:e,entityId:t}):null,y.jsx(lne,{}),h!==null?y.jsx(Gg,{files:h,handleClose:()=>g(null),targetFolderId:d.activeFolder==="root"?void 0:d.activeFolder}):null]})})}),Gne=m.createContext(void 0);exports.AbstractModalHeader=Lx;exports.Alert=vm;exports.ApprovalState=eO;exports.AuthContext=bu;exports.AvatarIcon=f_;exports.Backdrop=C_;exports.BaseModal=jx;exports.BootstrapModalManager=Px;exports.Button=Rp;exports.Col=Pp;exports.ConfirmContext=n2;exports.ContextButton=Au;exports.CustomSelectInput=M_;exports.DelegationContext=u2;exports.Documents=Yne;exports.Dropdown=fm;exports.Dropdown$1=Ha;exports.DropdownDivider=Oh;exports.DropdownItem=Ii;exports.DropdownToggle=dm;exports.ENTERED=ri;exports.ENTERING=Ir;exports.EXITED=ni;exports.EXITING=ul;exports.FaMinus=wA;exports.FaPlus=CA;exports.FaSearch=TA;exports.Fade=di;exports.FileExtensionIcon=AC;exports.FileUploadContextButton=R$;exports.FloatingLabelInput=ju;exports.Form=Tr;exports.FormCheckInput=mu;exports.FormControl=xx;exports.FormDisabledContext=u_;exports.FormSelect=Hp;exports.FromToDatePickerDropdownToggle=kA;exports.GenIcon=rt;exports.HelmetContext=l_;exports.HookFormTextAreaInput=qg;exports.HookFormTextInput=to;exports.HtmlTooltip=p2;exports.IconButton=rc;exports.Ie=JE;exports.InputAnchorContainer=S_;exports.InvalidFeedback=Ru;exports.ListGroup=Ax;exports.ListGroupItem=gu;exports.LoadingContext=yu;exports.LoginState=c2;exports.LuminusComponentsContext=Kt;exports.MdCheck=zk;exports.MdCircle=Wk;exports.MdClear=Xs;exports.MdOutlineAddCircleOutline=Kk;exports.MdOutlineArrowOutward=Hk;exports.MdOutlineCameraAlt=tE;exports.MdOutlineChevronRight=aE;exports.MdOutlineClose=e2;exports.MdOutlineDelete=Qx;exports.MdOutlineEdit=nE;exports.MdOutlineExpand=qk;exports.MdOutlineFileUpload=Jx;exports.MdOutlineKeyboardArrowLeft=Jk;exports.MdOutlineKeyboardArrowRight=eE;exports.MdOutlineMenu=oE;exports.MdOutlinePhotoLibrary=rE;exports.MdOutlineStar=lE;exports.MdOutlineSubdirectoryArrowRight=cE;exports.MdSave=Uk;exports.MdSaveAs=Bk;exports.MdSearch=Fk;exports.MiniDetailWrapper=O_;exports.Modal=Mn;exports.ModalContext=Gp;exports.NoInputContainer=T_;exports.Oe=V;exports.PageContainer=Wte;exports.PrimaryButton=Ji;exports.PromptContext=r2;exports.Re=$te;exports.ResponsiveContextDropdown=w_;exports.ResponsiveContextDropdownItem=mm;exports.RowLabelInput=ic;exports.ShortcutLinksContext=Gne;exports.SideContentBar=wC;exports.SimpleDropdownToggle=um;exports.SimplePicker=p_;exports.SimpleTooltip=Jp;exports.Spinner=Xp;exports.TextInput=k_;exports.TransitionWrapper=Mb;exports.Typography=_n;exports.UserAvatarToggle=H$;exports.UserContext=l2;exports._=oG;exports._extends=ll;exports._inheritsLoose=_b;exports._objectWithoutPropertiesLoose=wp;exports.a=h_;exports.addLeadingZeros=wt;exports.atobUtf8=g2;exports.axios=Ut;exports.buildEmployeeNameString=vO;exports.buildOrgUnitString=yO;exports.buildVehicleNameString=gO;exports.cancelToken=C8;exports.capitalizeFirstLetter=mO;exports.classNames=oe;exports.classes=d_;exports.compareDate=_O;exports.compareDateTime=wO;exports.constructFrom=Ur;exports.context=hu;exports.differenceInCalendarDays=mb;exports.divWithClassName=Ep;exports.extractErrorsFromResponse=Qp;exports.extractFilename=x2;exports.extractPermissionsFromResponse=h2;exports.fixNameIdNulls=d2;exports.format=_p;exports.formatDate=hO;exports.formatDateTime=pO;exports.formatFileSize=Va;exports.getDateString=OO;exports.getDaysDifference=CO;exports.getDefaultExportFromCjs=Ht;exports.getFirstDayOfMonth=y2;exports.getFirstDayOfOffsetMonth=TO;exports.getFirstDayOfYear=kO;exports.getLastDayOfMonth=b2;exports.getLastDayOfOffsetMonth=SO;exports.getLastDayOfYear=EO;exports.getSharedManager=Ix;exports.getTimezoneOffsetInMilliseconds=Kf;exports.hasOnlyNullValues=f2;exports.hookFormSetServerErrors=nO;exports.invariant=Xf;exports.isExtensionOpenable=w2;exports.isFileOpenable=_2;exports.isISODate=v2;exports.isPast=yb;exports.isPrimitive=xl;exports.isValidDate=xO;exports.joinStrings=fs;exports.jsxRuntimeExports=y;exports.millisecondsInHour=ru;exports.millisecondsInMinute=bp;exports.millisecondsInWeek=yp;exports.msToStartOfNextDay=bO;exports.parseISO=au;exports.pe=OX;exports.replaceNullValuesOnlyObjectsWithNulls=tO;exports.requireReactIs=Tp;exports.saveFile=_l;exports.saveFileFromResponse=AO;exports.secondsInDay=xp;exports.secondsInHour=ub;exports.secondsInMinute=oT;exports.secondsInMonth=fb;exports.secondsInQuarter=cT;exports.secondsInWeek=sT;exports.secondsInYear=db;exports.shortenText=fO;exports.startOfDay=Zf;exports.startOfWeek=La;exports.stringContains=mh;exports.stringSearchWithin=em;exports.stringStartsWith=C2;exports.style=li;exports.t=Vd;exports.toDate=Sn;exports.transitionEndListener=Eb;exports.triggerBrowserReflow=Ob;exports.trimIsoDate=xu;exports.truncateText=m2;exports.urlfyArray=ph;exports.useAuth=G2;exports.useAxios=Eu;exports.useBootstrapBreakpoints=wb;exports.useBootstrapMinBreakpoint=Cb;exports.useBootstrapPrefix=nt;exports.useClickOutside=a_;exports.useClipboard=c_;exports.useCol=Lb;exports.useConfirm=sm;exports.useCookies=om;exports.useEventCallback=Bt;exports.useFormControlType=lm;exports.useFormDisabledContext=$u;exports.useIsomorphicEffect=ss;exports.useKeyPress=s_;exports.useNotifications=ku;exports.usePermissions=o_;exports.usePrompt=i2;exports.useSwipeable=gm;exports.useWindowSize=nc;exports.useZodSchemaTypes=Mu;exports.z=sn;
|