bmj-ui 1.0.7 → 1.0.8
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/README.md +164 -1
- package/dist/index.js +75 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/index.ts +9 -5
- package/src/index.ts +7 -0
- package/tsconfig.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,2 +1,76 @@
|
|
|
1
|
-
"use strict";Object.
|
|
1
|
+
"use strict";var e=require("react"),t=require("react-dom");function n(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var r=n(e),o=n(t);function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a,s={exports:{}},l={};var c,u,d={};
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.development.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/function f(){return c||(c=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===P?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case m:return"Fragment";case y:return"Profiler";case v:return"StrictMode";case w:return"Suspense";case E:return"SuspenseList";case k:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case h:return"Portal";case b:return e.displayName||"Context";case g:return(e._context.displayName||"Context")+".Consumer";case x:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case O:return null!==(n=e.displayName||null)?n:t(e.type)||"Memo";case S:n=e._payload,e=e._init;try{return t(e(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function o(e){if(e===m)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===S)return"<...>";try{var n=t(e);return n?"<"+n+">":"<...>"}catch(e){return"<...>"}}function i(){return Error("react-stack-top-frame")}function a(){var e=t(this.type);return M[e]||(M[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,n,o,i,s,c){var d,f=n.children;if(void 0!==f)if(i)if(T(f)){for(i=0;i<f.length;i++)l(f[i]);Object.freeze&&Object.freeze(f)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(f);if(j.call(n,"key")){f=t(e);var h=Object.keys(n).filter(function(e){return"key"!==e});i=0<h.length?"{key: someKey, "+h.join(": ..., ")+": ...}":"{key: someKey}",D[f+i]||(h=0<h.length?"{"+h.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,f,h,f),D[f+i]=!0)}if(f=null,void 0!==o&&(r(o),f=""+o),function(e){if(j.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),f=""+n.key),"key"in n)for(var m in o={},n)"key"!==m&&(o[m]=n[m]);else o=n;return f&&function(e,t){function n(){u||(u=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,t,n,r,o,i){var s=n.ref;return e={$$typeof:p,type:e,key:t,props:n,_owner:r},null!==(void 0!==s?s:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:a}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:o}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,f,o,null===(d=A.A)?null:d.getOwner(),s,c)}function l(e){c(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===S&&("fulfilled"===e._payload.status?c(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function c(e){return"object"==typeof e&&null!==e&&e.$$typeof===p}var u,f=e,p=Symbol.for("react.transitional.element"),h=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),b=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),E=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),P=Symbol.for("react.client.reference"),A=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,T=Array.isArray,C=console.createTask?console.createTask:function(){return null},M={},N=(f={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(f,i)(),I=C(o(i)),D={};d.Fragment=m,d.jsx=function(e,t,n){var r=1e4>A.recentlyCreatedOwnerStacks++;return s(e,t,n,!1,r?Error("react-stack-top-frame"):N,r?C(o(e)):I)},d.jsxs=function(e,t,n){var r=1e4>A.recentlyCreatedOwnerStacks++;return s(e,t,n,!0,r?Error("react-stack-top-frame"):N,r?C(o(e)):I)}}()),d}var p=(u||(u=1,"production"===process.env.NODE_ENV?s.exports=function(){if(a)return l;a=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return l.Fragment=t,l.jsx=n,l.jsxs=n,l}():s.exports=f()),s.exports),h=function(){return h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function m(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function v(e,t){return e&&!t?e:!e&&t?t:e||t?{...e,...t}:void 0}"function"==typeof SuppressedError&&SuppressedError;const y={};function g(e,t,n,r,o){let i={...E(e,y)};return t&&(i=b(i,t)),n&&(i=b(i,n)),r&&(i=b(i,r)),i}function b(e,t){return w(t)?t(e):function(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":e[n]=v(e.style,r);break;case"className":e[n]=k(e.className,r);break;default:x(n,r)?e[n]=O(e[n],r):e[n]=r}}return e}(e,t)}function x(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),o=e.charCodeAt(2);return 111===n&&110===r&&o>=65&&o<=90&&("function"==typeof t||void 0===t)}function w(e){return"function"==typeof e}function E(e,t){return w(e)?e(t):e??y}function O(e,t){return t?e?n=>{if(function(e){return null!=e&&"object"==typeof e&&"nativeEvent"in e}(n)){const r=n;S(r);const o=t(r);return r.baseUIHandlerPrevented||e?.(r),o}const r=t(n);return e?.(n),r}:t:e}function S(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function k(e,t){return t?e?t+" "+e:t:e}const P=function(e,t){return function(n,...r){const o=new URL(e);return o.searchParams.set("code",n.toString()),r.forEach(e=>o.searchParams.append("args[]",e)),`${t} error #${n}; visit ${o} for the full message.`}}("https://base-ui.com/production-error","Base UI"),A={};function j(e,t){const n=r.useRef(A);return n.current===A&&(n.current=e(t)),n}function T(e,t,n,r){const o=j(C).current;return function(e,t,n,r,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==o}(o,e,t,n,r)&&M(o,[e,t,n,r]),o.callback}function C(){return{callback:null,cleanup:null,refs:[]}}function M(e,t){e.refs=t,t.every(e=>null==e)?e.callback=null:e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),null!=n){const r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){const o=t[e];if(null!=o)switch(typeof o){case"function":{const t=o(n);"function"==typeof t&&(r[e]=t);break}case"object":o.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){const n=t[e];if(null!=n)switch(typeof n){case"function":{const t=r[e];"function"==typeof t?t():n(null);break}case"object":n.current=null}}}}}}const N=parseInt(r.version,10);function I(e){return N>=e}function D(e){if(!r.isValidElement(e))return null;const t=e,n=t.props;return(I(19)?n?.ref:t.ref)??null}let _;function R(){}"production"!==process.env.NODE_ENV&&(_=new Set);const L=Object.freeze([]),z=Object.freeze({}),V={style:{transition:"none"}},B={fallbackAxisSide:"none"},F={fallbackAxisSide:"end"},$={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function U(t,n,o={}){const i=n.render,a=function(e,t={}){const{className:n,style:r,render:o}=e,{state:i=z,ref:a,props:s,stateAttributesMapping:l,enabled:c=!0}=t,u=c?function(e,t){return"function"==typeof e?e(t):e}(n,i):void 0,d=c?function(e,t){return"function"==typeof e?e(t):e}(r,i):void 0,f=c?function(e,t){const n={};for(const r in e){const o=e[r];if(t?.hasOwnProperty(r)){const e=t[r](o);null!=e&&Object.assign(n,e);continue}!0===o?n[`data-${r.toLowerCase()}`]="":o&&(n[`data-${r.toLowerCase()}`]=o.toString())}return n}(i,l):z,p=c?v(f,Array.isArray(s)?function(e){if(0===e.length)return y;if(1===e.length)return E(e[0],y);let t={...E(e[0],y)};for(let n=1;n<e.length;n+=1)t=b(t,e[n]);return t}(s):s)??z:z;"undefined"!=typeof document&&(c?Array.isArray(a)?p.ref=function(e){const t=j(C).current;return function(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}(t,e)&&M(t,e),t.callback}([p.ref,D(o),...a]):p.ref=T(p.ref,D(o),a):T(null,null));if(!c)return z;void 0!==u&&(p.className=k(p.className,u));void 0!==d&&(p.style=v(p.style,d));return p}(n,o);if(!1===o.enabled)return null;return function(t,n,o,i){if(n){if("function"==typeof n)return"production"!==process.env.NODE_ENV&&function(e){const t=e.name;if(0===t.length)return;const n=t.charCodeAt(0);if(n<65||n>90)return;!function(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");_.has(t)||(_.add(t),console.warn(`Base UI: ${t}`))}}(`The \`render\` prop received a function named \`${t}\` that starts with an uppercase letter.`,"This usually means a React component was passed directly as `render={Component}`.","Base UI calls `render` as a plain function, which can break the Rules of Hooks during reconciliation.","If this is an intentional render callback, rename it to start with a lowercase letter.","Use `render={<Component />}` or `render={(props) => <Component {...props} />}` instead.","https://base-ui.com/r/invalid-render-prop")}(n),n(o,i);const e=g(o,n.props);e.ref=o.ref;let t=n;if(t?.$$typeof===W){t=r.Children.toArray(n)[0]}if("production"!==process.env.NODE_ENV&&!r.isValidElement(t))throw new Error(["Base UI: The `render` prop was provided an invalid React element as `React.isValidElement(render)` is `false`.","A valid React element must be provided to the `render` prop because it is cloned with props to replace the default element.","https://base-ui.com/r/invalid-render-prop"].join("\n"));return r.cloneElement(t,e)}if(t&&"string"==typeof t)return function(t,n){if("button"===t)return e.createElement("button",{type:"button",...n,key:n.key});if("img"===t)return e.createElement("img",{alt:"",...n,key:n.key});return r.createElement(t,n)}(t,o);throw new Error("production"!==process.env.NODE_ENV?"Base UI: Render element or function are not defined.":P(8))}(t,i,a,o.state??z)}const W=Symbol.for("react.lazy");function K(e){return U(e.defaultTagName??"div",e,e)}function H(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=H(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Y(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=H(e))&&(r&&(r+=" "),r+=t);return r}const q=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,G=Y,X=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return G(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==i?void 0:i[e];if(null===t)return null;const a=q(t)||q(r);return o[e][a]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...s}[t]):{...i,...s}[t]===n})?[...e,n,r]:e},[]);return G(e,a,l,null==n?void 0:n.class,null==n?void 0:n.className)};const Z=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),J="-",Q=[],ee=e=>{const t=re(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return ne(e);const n=e.split(J),r=""===n[0]&&n.length>1?1:0;return te(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],o=n[e];return t?o?((e,t)=>{const n=new Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(o,t):t:o||Q}return n[e]||Q}}},te=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const n=te(e,t+1,o);if(n)return n}const i=n.validators;if(null===i)return;const a=0===t?e.join(J):e.slice(t).join(J),s=i.length;for(let e=0;e<s;e++){const t=i[e];if(t.validator(a))return t.classGroupId}},ne=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),re=e=>{const{theme:t,classGroups:n}=e;return oe(n,t)},oe=(e,t)=>{const n=Z();for(const r in e){const o=e[r];ie(o,n,r,t)}return n},ie=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const o=e[i];ae(o,t,n,r)}},ae=(e,t,n,r)=>{"string"!=typeof e?"function"!=typeof e?ce(e,t,n,r):le(e,t,n,r):se(e,t,n)},se=(e,t,n)=>{(""===e?t:ue(t,e)).classGroupId=n},le=(e,t,n,r)=>{de(e)?ie(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},ce=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let e=0;e<i;e++){const[i,a]=o[e];ie(a,ue(t,i),n,r)}},ue=(e,t)=>{let n=e;const r=t.split(J),o=r.length;for(let e=0;e<o;e++){const t=r[e];let o=n.nextPart.get(t);o||(o=Z(),n.nextPart.set(t,o)),n=o}return n},de=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,fe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(o,i)=>{n[o]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(o(e,t),t):void 0},set(e,t){e in n?n[e]=t:o(e,t)}}},pe=[],he=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),me=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,o=0,i=0;const a=e.length;for(let s=0;s<a;s++){const a=e[s];if(0===r&&0===o){if(":"===a){t.push(e.slice(i,s)),i=s+1;continue}if("/"===a){n=s;continue}}"["===a?r++:"]"===a?r--:"("===a?o++:")"===a&&o--}const s=0===t.length?e:e.slice(i);let l=s,c=!1;s.endsWith("!")?(l=s.slice(0,-1),c=!0):s.startsWith("!")&&(l=s.slice(1),c=!0);return he(t,c,l,n&&n>i?n-i:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):he(pe,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},ve=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let o=0;o<e.length;o++){const i=e[o],a="["===i[0],s=t.has(i);a||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(i)):r.push(i)}return r.length>0&&(r.sort(),n.push(...r)),n}},ye=/\s+/,ge=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=ge(e[r]))&&(n&&(n+=" "),n+=t);return n},be=(e,...t)=>{let n,r,o,i;const a=e=>{const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,a=[],s=e.trim().split(ye);let l="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{isExternal:c,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(c){l=t+(l.length>0?" "+l:l);continue}let h=!!p,m=r(h?f.substring(0,p):f);if(!m){if(!h){l=t+(l.length>0?" "+l:l);continue}if(m=r(f),!m){l=t+(l.length>0?" "+l:l);continue}h=!1}const v=0===u.length?"":1===u.length?u[0]:i(u).join(":"),y=d?v+"!":v,g=y+m;if(a.indexOf(g)>-1)continue;a.push(g);const b=o(m,h);for(let e=0;e<b.length;++e){const t=b[e];a.push(y+t)}l=t+(l.length>0?" "+l:l)}return l})(e,n);return o(e,i),i};return i=s=>{const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:fe(e.cacheSize),parseClassName:me(e),sortModifiers:ve(e),...ee(e)}))(l),r=n.cache.get,o=n.cache.set,i=a,a(s)},(...e)=>i(((...e)=>{let t,n,r=0,o="";for(;r<e.length;)(t=e[r++])&&(n=ge(t))&&(o&&(o+=" "),o+=n);return o})(...e))},xe=[],we=e=>{const t=t=>t[e]||xe;return t.isThemeGetter=!0,t},Ee=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Oe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Se=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ae=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,je=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Te=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ce=e=>Se.test(e),Me=e=>!!e&&!Number.isNaN(Number(e)),Ne=e=>!!e&&Number.isInteger(Number(e)),Ie=e=>e.endsWith("%")&&Me(e.slice(0,-1)),De=e=>ke.test(e),_e=()=>!0,Re=e=>Pe.test(e)&&!Ae.test(e),Le=()=>!1,ze=e=>je.test(e),Ve=e=>Te.test(e),Be=e=>!$e(e)&&!Xe(e),Fe=e=>ot(e,lt,Le),$e=e=>Ee.test(e),Ue=e=>ot(e,ct,Re),We=e=>ot(e,ut,Me),Ke=e=>ot(e,ft,_e),He=e=>ot(e,dt,Le),Ye=e=>ot(e,at,Le),qe=e=>ot(e,st,Ve),Ge=e=>ot(e,pt,ze),Xe=e=>Oe.test(e),Ze=e=>it(e,ct),Je=e=>it(e,dt),Qe=e=>it(e,at),et=e=>it(e,lt),tt=e=>it(e,st),nt=e=>it(e,pt,!0),rt=e=>it(e,ft,!0),ot=(e,t,n)=>{const r=Ee.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},it=(e,t,n=!1)=>{const r=Oe.exec(e);return!!r&&(r[1]?t(r[1]):n)},at=e=>"position"===e||"percentage"===e,st=e=>"image"===e||"url"===e,lt=e=>"length"===e||"size"===e||"bg-size"===e,ct=e=>"length"===e,ut=e=>"number"===e,dt=e=>"family-name"===e,ft=e=>"number"===e||"weight"===e,pt=e=>"shadow"===e,ht=be(()=>{const e=we("color"),t=we("font"),n=we("text"),r=we("font-weight"),o=we("tracking"),i=we("leading"),a=we("breakpoint"),s=we("container"),l=we("spacing"),c=we("radius"),u=we("shadow"),d=we("inset-shadow"),f=we("text-shadow"),p=we("drop-shadow"),h=we("blur"),m=we("perspective"),v=we("aspect"),y=we("ease"),g=we("animate"),b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Xe,$e],x=()=>[Xe,$e,l],w=()=>[Ce,"full","auto",...x()],E=()=>[Ne,"none","subgrid",Xe,$e],O=()=>["auto",{span:["full",Ne,Xe,$e]},Ne,Xe,$e],S=()=>[Ne,"auto",Xe,$e],k=()=>["auto","min","max","fr",Xe,$e],P=()=>["auto",...x()],A=()=>[Ce,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],j=()=>[Ce,"screen","full","dvw","lvw","svw","min","max","fit",...x()],T=()=>[Ce,"screen","full","lh","dvh","lvh","svh","min","max","fit",...x()],C=()=>[e,Xe,$e],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",Qe,Ye,{position:[Xe,$e]}],N=()=>["auto","cover","contain",et,Fe,{size:[Xe,$e]}],I=()=>[Ie,Ze,Ue],D=()=>["","none","full",c,Xe,$e],_=()=>["",Me,Ze,Ue],R=()=>[Me,Ie,Qe,Ye],L=()=>["","none",h,Xe,$e],z=()=>["none",Me,Xe,$e],V=()=>["none",Me,Xe,$e],B=()=>[Me,Xe,$e],F=()=>[Ce,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[De],breakpoint:[De],color:[_e],container:[De],"drop-shadow":[De],ease:["in","out","in-out"],font:[Be],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[De],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[De],shadow:[De],spacing:["px",Me],text:[De],"text-shadow":[De],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ce,$e,Xe,v]}],container:["container"],columns:[{columns:[Me,$e,Xe,s]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:b()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[Ne,"auto",Xe,$e]}],basis:[{basis:[Ce,"full","auto",s,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Me,Ce,"auto","initial","none",$e]}],grow:[{grow:["",Me,Xe,$e]}],shrink:[{shrink:["",Me,Xe,$e]}],order:[{order:[Ne,"first","last","none",Xe,$e]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pbs:[{pbs:x()}],pbe:[{pbe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],"inline-size":[{inline:["auto",...j()]}],"min-inline-size":[{"min-inline":["auto",...j()]}],"max-inline-size":[{"max-inline":["none",...j()]}],"block-size":[{block:["auto",...T()]}],"min-block-size":[{"min-block":["auto",...T()]}],"max-block-size":[{"max-block":["none",...T()]}],w:[{w:[s,"screen",...A()]}],"min-w":[{"min-w":[s,"screen","none",...A()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[a]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,Ze,Ue]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,rt,Ke]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ie,$e]}],"font-family":[{font:[Je,He,t]}],"font-features":[{"font-features":[$e]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Xe,$e]}],"line-clamp":[{"line-clamp":[Me,"none",Xe,We]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",Xe,$e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Xe,$e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{decoration:[Me,"from-font","auto",Xe,Ue]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[Me,"auto",Xe,$e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xe,$e]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Xe,$e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:N()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ne,Xe,$e],radial:["",Xe,$e],conic:[Ne,Xe,$e]},tt,qe]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:I()}],"gradient-via-pos":[{via:I()}],"gradient-to-pos":[{to:I()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:D()}],"rounded-s":[{"rounded-s":D()}],"rounded-e":[{"rounded-e":D()}],"rounded-t":[{"rounded-t":D()}],"rounded-r":[{"rounded-r":D()}],"rounded-b":[{"rounded-b":D()}],"rounded-l":[{"rounded-l":D()}],"rounded-ss":[{"rounded-ss":D()}],"rounded-se":[{"rounded-se":D()}],"rounded-ee":[{"rounded-ee":D()}],"rounded-es":[{"rounded-es":D()}],"rounded-tl":[{"rounded-tl":D()}],"rounded-tr":[{"rounded-tr":D()}],"rounded-br":[{"rounded-br":D()}],"rounded-bl":[{"rounded-bl":D()}],"border-w":[{border:_()}],"border-w-x":[{"border-x":_()}],"border-w-y":[{"border-y":_()}],"border-w-s":[{"border-s":_()}],"border-w-e":[{"border-e":_()}],"border-w-bs":[{"border-bs":_()}],"border-w-be":[{"border-be":_()}],"border-w-t":[{"border-t":_()}],"border-w-r":[{"border-r":_()}],"border-w-b":[{"border-b":_()}],"border-w-l":[{"border-l":_()}],"divide-x":[{"divide-x":_()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":_()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[Me,Xe,$e]}],"outline-w":[{outline:["",Me,Ze,Ue]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,nt,Ge]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,nt,Ge]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[Me,Ue]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":_()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,nt,Ge]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[Me,Xe,$e]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Me]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Xe,$e]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[Me]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:N()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Xe,$e]}],filter:[{filter:["","none",Xe,$e]}],blur:[{blur:L()}],brightness:[{brightness:[Me,Xe,$e]}],contrast:[{contrast:[Me,Xe,$e]}],"drop-shadow":[{"drop-shadow":["","none",p,nt,Ge]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",Me,Xe,$e]}],"hue-rotate":[{"hue-rotate":[Me,Xe,$e]}],invert:[{invert:["",Me,Xe,$e]}],saturate:[{saturate:[Me,Xe,$e]}],sepia:[{sepia:["",Me,Xe,$e]}],"backdrop-filter":[{"backdrop-filter":["","none",Xe,$e]}],"backdrop-blur":[{"backdrop-blur":L()}],"backdrop-brightness":[{"backdrop-brightness":[Me,Xe,$e]}],"backdrop-contrast":[{"backdrop-contrast":[Me,Xe,$e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Me,Xe,$e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Me,Xe,$e]}],"backdrop-invert":[{"backdrop-invert":["",Me,Xe,$e]}],"backdrop-opacity":[{"backdrop-opacity":[Me,Xe,$e]}],"backdrop-saturate":[{"backdrop-saturate":[Me,Xe,$e]}],"backdrop-sepia":[{"backdrop-sepia":["",Me,Xe,$e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Xe,$e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Me,"initial",Xe,$e]}],ease:[{ease:["linear","initial",y,Xe,$e]}],delay:[{delay:[Me,Xe,$e]}],animate:[{animate:["none",g,Xe,$e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Xe,$e]}],"perspective-origin":[{"perspective-origin":b()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:V()}],"scale-x":[{"scale-x":V()}],"scale-y":[{"scale-y":V()}],"scale-z":[{"scale-z":V()}],"scale-3d":["scale-3d"],skew:[{skew:B()}],"skew-x":[{"skew-x":B()}],"skew-y":[{"skew-y":B()}],transform:[{transform:[Xe,$e,"","none","gpu","cpu"]}],"transform-origin":[{origin:b()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Xe,$e]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mbs":[{"scroll-mbs":x()}],"scroll-mbe":[{"scroll-mbe":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pbs":[{"scroll-pbs":x()}],"scroll-pbe":[{"scroll-pbe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Xe,$e]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[Me,Ze,Ue,We]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function mt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ht(Y(e))}function vt(){return"undefined"!=typeof window}function yt(e){return xt(e)?(e.nodeName||"").toLowerCase():"#document"}function gt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function bt(e){var t;return null==(t=(xt(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function xt(e){return!!vt()&&(e instanceof Node||e instanceof gt(e).Node)}function wt(e){return!!vt()&&(e instanceof Element||e instanceof gt(e).Element)}function Et(e){return!!vt()&&(e instanceof HTMLElement||e instanceof gt(e).HTMLElement)}function Ot(e){return!(!vt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof gt(e).ShadowRoot)}function St(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function kt(e){return/^(table|td|th)$/.test(yt(e))}function Pt(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}const At=/transform|translate|scale|rotate|perspective|filter/,jt=/paint|layout|strict|content/,Tt=e=>!!e&&"none"!==e;let Ct;function Mt(e){const t=wt(e)?Dt(e):e;return Tt(t.transform)||Tt(t.translate)||Tt(t.scale)||Tt(t.rotate)||Tt(t.perspective)||!Nt()&&(Tt(t.backdropFilter)||Tt(t.filter))||At.test(t.willChange||"")||jt.test(t.contain||"")}function Nt(){return null==Ct&&(Ct="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ct}function It(e){return/^(html|body|#document)$/.test(yt(e))}function Dt(e){return gt(e).getComputedStyle(e)}function _t(e){return wt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rt(e){if("html"===yt(e))return e;const t=e.assignedSlot||e.parentNode||Ot(e)&&e.host||bt(e);return Ot(t)?t.host:t}function Lt(e){const t=Rt(e);return It(t)?e.ownerDocument?e.ownerDocument.body:e.body:Et(t)&&St(t)?t:Lt(t)}function zt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Lt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=gt(o);if(i){const e=Vt(a);return t.concat(a,a.visualViewport||[],St(o)?o:[],e&&n?zt(e):[])}return t.concat(o,zt(o,[],n))}function Vt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Bt=r[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Ft=Bt&&Bt!==r.useLayoutEffect?Bt:e=>e();function $t(e){const t=j(Ut).current;return t.next=e,Ft(t.effect),t.trampoline}function Ut(){const e={next:void 0,callback:Wt,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function Wt(){if("production"!==process.env.NODE_ENV)throw new Error("Base UI: Cannot call an event handler while rendering.")}let Kt;function Ht(...e){if("production"!==process.env.NODE_ENV){const t=e.join(" ");Kt.has(t)||(Kt.add(t),console.error(`Base UI: ${t}`))}}"production"!==process.env.NODE_ENV&&(Kt=new Set);const Yt={...r},qt="undefined"!=typeof document?r.useLayoutEffect:()=>{},Gt=r.createContext(void 0);function Xt(e=!1){const t=r.useContext(Gt);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.":P(16));return t}function Zt(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:i=!0,composite:a}=e,s=r.useRef(null),l=Xt(!0),c=a??void 0!==l,{props:u}=function(e){const{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:i=0,isNativeButton:a}=e,s=o&&!1!==t,l=o&&!1===t;return{props:r.useMemo(()=>{const e={onKeyDown(e){n&&t&&"Tab"!==e.key&&e.preventDefault()}};return o||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||s)||!a&&n)&&(e["aria-disabled"]=n),!a||t&&!l||(e.disabled=n),e},[o,n,t,s,l,a,i])}}({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:o,isNativeButton:i});"production"!==process.env.NODE_ENV&&r.useEffect(()=>{if(!s.current)return;const e=Jt(s.current);if(i){if(!e){Ht(`${"A component that acts as a button expected a native <button> because the `nativeButton` prop is true. Rendering a non-<button> removes native button semantics, which can impact forms and accessibility. Use a real <button> in the `render` prop, or set `nativeButton` to `false`."}${Yt.captureOwnerStack?.()||""}`)}}else if(e){Ht(`${"A component that acts as a button expected a non-<button> because the `nativeButton` prop is false. Rendering a <button> keeps native behavior while Base UI applies non-native attributes and handlers, which can add unintended extra attributes (such as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set `nativeButton` to `true`."}${Yt.captureOwnerStack?.()||""}`)}},[i]);const d=r.useCallback(()=>{const e=s.current;Jt(e)&&c&&t&&void 0===u.disabled&&e.disabled&&(e.disabled=!1)},[t,u.disabled,c]);qt(d,[d]);return{getButtonProps:r.useCallback((e={})=>{const{onClick:n,onMouseDown:r,onKeyUp:o,onKeyDown:a,onPointerDown:s,...l}=e;return g({type:i?"button":void 0,onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t)return;if(S(e),a?.(e),e.baseUIHandlerPrevented)return;const r=e.target===e.currentTarget,o=e.currentTarget,s=Jt(o),l=!i&&(u=o,Boolean("A"===u?.tagName&&u?.href));var u;const d=r&&(i?s:!l),f="Enter"===e.key,p=" "===e.key,h=o.getAttribute("role"),m=h?.startsWith("menuitem")||"option"===h||"gridcell"===h;if(r&&c&&p){if(e.defaultPrevented&&m)return;return e.preventDefault(),void(l||i&&s?(o.click(),e.preventBaseUIHandler()):d&&(n?.(e),e.preventBaseUIHandler()))}d&&(i||!p&&!f||e.preventDefault(),!i&&f&&n?.(e))},onKeyUp(e){t||(S(e),o?.(e),e.target===e.currentTarget&&i&&c&&Jt(e.currentTarget)&&" "===e.key?e.preventDefault():e.baseUIHandlerPrevented||e.target!==e.currentTarget||i||c||" "!==e.key||n?.(e))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?void 0:{role:"button"},u,l)},[t,u,c,i]),buttonRef:$t(e=>{s.current=e,d()})}}function Jt(e){return Et(e)&&"BUTTON"===e.tagName}"production"!==process.env.NODE_ENV&&(Gt.displayName="CompositeRootContext");const Qt=r.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,focusableWhenDisabled:i=!1,nativeButton:a=!0,...s}=e,{getButtonProps:l,buttonRef:c}=Zt({disabled:o,focusableWhenDisabled:i,native:a});return U("button",e,{state:{disabled:o},ref:[t,c],props:[s,l]})});"production"!==process.env.NODE_ENV&&(Qt.displayName="Button");var en=X("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function tn(e){var t=e.className,n=e.variant,r=void 0===n?"default":n,o=e.size,i=void 0===o?"default":o,a=m(e,["className","variant","size"]);return p.jsx(Qt,h({"data-slot":"button",className:mt(en({variant:r,size:i,className:t}))},a))}let nn=function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e}({});const rn={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},on={disabled:!1,...rn},an={valid:e=>null===e?null:e?{[nn.valid]:""}:{[nn.invalid]:""}},sn=r.createContext({invalid:void 0,name:void 0,validityData:{state:{badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},errors:[],error:"",value:"",initialValue:null},setValidityData:R,disabled:void 0,touched:rn.touched,setTouched:R,dirty:rn.dirty,setDirty:R,filled:rn.filled,setFilled:R,focused:rn.focused,setFocused:R,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:on,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=z)=>e,getInputValidationProps:(e=z)=>e,inputRef:{current:null},commit:async()=>{}}});function ln(e=!0){const t=r.useContext(sn);if(t.setValidityData===R&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: FieldRootContext is missing. Field parts must be placed within <Field.Root>.":P(28));return t}"production"!==process.env.NODE_ENV&&(sn.displayName="FieldRootContext");const cn=r.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:R,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});"production"!==process.env.NODE_ENV&&(cn.displayName="FormContext");let un=0;const dn=Yt.useId;function fn(e,t){if(void 0!==dn){const n=dn();return e??(t?`${t}-${n}`:n)}return function(e,t="mui"){const[n,o]=r.useState(e),i=e||n;return r.useEffect(()=>{null==n&&(un+=1,o(`${t}-${un}`))},[n,t]),i}(e,t)}function pn(e){return fn(e,"base-ui")}const hn=r.createContext({controlId:void 0,registerControlId:R,labelId:void 0,setLabelId:R,messageIds:[],setMessageIds:R,getDescriptionProps:e=>e});function mn(){return r.useContext(hn)}"production"!==process.env.NODE_ENV&&(hn.displayName="LabelableContext");const vn=[];function yn(e){r.useEffect(e,vn)}class gn{static create(){return new gn}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear}function bn(){const e=j(gn.create).current;return yn(e.disposeEffect),e}function xn(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function wn(e){return e?.ownerDocument||document}const En="undefined"!=typeof navigator,On=function(){if(!En)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;if(e?.platform)return{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints};return{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),Sn=function(){if(!En)return"";const e=navigator.userAgentData;if(e?.platform)return e.platform;return navigator.platform??""}(),kn=function(){if(!En)return"";const e=navigator.userAgentData;if(e&&Array.isArray(e.brands))return e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" ");return navigator.userAgent}(),Pn=!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter:none"),An="MacIntel"===On.platform&&On.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(On.platform),jn=En&&/apple/i.test(navigator.vendor),Tn=En&&/android/i.test(Sn)||/android/i.test(kn),Cn=En&&Sn.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Mn=kn.includes("jsdom/");const Nn="data-base-ui-focusable",In="active",Dn="selected",_n="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Rn="ArrowLeft",Ln="ArrowRight",zn="ArrowUp",Vn="ArrowDown";function Bn(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function Fn(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ot(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $n(e,t){if(!wt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,e]of t.entries())if(Fn(e,n))return!e.hasAttribute("data-trigger-disabled");return!1}function Un(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Wn(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Kn(e){return Et(e)&&e.matches(_n)}function Hn(e){return!!e&&("combobox"===e.getAttribute("role")&&Kn(e))}function Yn(e){return e?e.hasAttribute(Nn)?e:e.querySelector(`[${Nn}]`)||e:null}function qn(e,t,n=!0){return e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...qn(e,t.id,n)])}function Gn(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){const t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Xn(e){e.preventDefault(),e.stopPropagation()}function Zn(e){return!(""!==e.pointerType||!e.isTrusted)||(Tn&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Jn(e){return!Mn&&(!Tn&&0===e.width&&0===e.height||Tn&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Qn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function er(e){const t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}const tr=["top","right","bottom","left"],nr=Math.min,rr=Math.max,or=Math.round,ir=Math.floor,ar=e=>({x:e,y:e}),sr={left:"right",right:"left",bottom:"top",top:"bottom"};function lr(e,t,n){return rr(e,nr(t,n))}function cr(e,t){return"function"==typeof e?e(t):e}function ur(e){return e.split("-")[0]}function dr(e){return e.split("-")[1]}function fr(e){return"x"===e?"y":"x"}function pr(e){return"y"===e?"height":"width"}function hr(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function mr(e){return fr(hr(e))}function vr(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const yr=["left","right"],gr=["right","left"],br=["top","bottom"],xr=["bottom","top"];function wr(e,t,n,r){const o=dr(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?gr:yr:t?yr:gr;case"left":case"right":return t?br:xr;default:return[]}}(ur(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(vr)))),i}function Er(e){const t=ur(e);return sr[t]+e.slice(t.length)}function Or(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Sr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function kr(e,t,n){return Math.floor(e/t)!==n}function Pr(e,t){return t<0||t>=e.current.length}function Ar(e,t){return Tr(e,{disabledIndices:t})}function jr(e,t){return Tr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Tr(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let i=t;do{i+=n?-o:o}while(i>=0&&i<=e.current.length-1&&Nr(e,i,r));return i}function Cr(e,t,n,r,o){if(-1===e)return-1;const i=n.indexOf(e),a=t[e];switch(o){case"tl":return i;case"tr":return a?i+a.width-1:i;case"bl":return a?i+(a.height-1)*r:i;case"br":return n.lastIndexOf(e);default:return-1}}function Mr(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function Nr(e,t,n){if("function"==typeof n?n(t):n?.includes(t)??!1)return!0;const r=e.current[t];return!!r&&(!Ir(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function Ir(e){return"none"!==Dt(e).display}
|
|
11
|
+
/*!
|
|
12
|
+
* tabbable 6.4.0
|
|
13
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
14
|
+
*/var Dr=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),_r="undefined"==typeof Element,Rr=_r?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Lr=!_r&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},zr=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):zr(e.parentNode))},Vr=function(e,t,n){if(zr(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Dr));return t&&Rr.call(e,Dr)&&r.unshift(e),r=r.filter(n)},Br=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var i=o.shift();if(!zr(i,!1))if("SLOT"===i.tagName){var a=i.assignedElements(),s=a.length?a:i.children,l=Br(s,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:i,candidates:l})}else{Rr.call(i,Dr)&&n.filter(i)&&(t||!e.includes(i))&&r.push(i);var c=i.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(i),u=!zr(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(c&&u){var d=Br(!0===c?i.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:i,candidates:d})}else o.unshift.apply(o,i.children)}}return r},Fr=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},$r=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Fr(e)?0:e.tabIndex},Ur=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Wr=function(e){return"INPUT"===e.tagName},Kr=function(e){return function(e){return Wr(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Lr(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},Hr=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},Yr=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=Rr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Rr.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Hr(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=Lr(e);if(a&&!a.shadowRoot&&!0===r(a))return Hr(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&Lr(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=Lr(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},qr=function(e,t){return!(t.disabled||function(e){return Wr(e)&&"hidden"===e.type}(t)||Yr(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Rr.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},Gr=function(e,t){return!(Kr(t)||$r(t)<0||!qr(e,t))},Xr=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Zr=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,i=o?e.scopeParent:e,a=function(e,t){var n=$r(e);return n<0&&t&&!Fr(e)?0:n}(i,o),s=o?Zr(e.candidates):i;0===a?o?t.push.apply(t,s):t.push(i):n.push({documentOrder:r,tabIndex:a,item:e,isScope:o,content:s})}),n.sort(Ur).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},Jr=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Br([e],t.includeContainer,{filter:Gr.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Xr}):Vr(e,t.includeContainer,Gr.bind(null,t)),Zr(n)},Qr=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Rr.call(e,Dr)&&Gr(t,e)};const eo=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function to(e,t){const n=Jr(e,eo()),r=n.length;if(0===r)return;const o=Bn(wn(e)),i=n.indexOf(o);return n[-1===i?1===t?0:r-1:i+t]}function no(e){return to(wn(e).body,1)||e}function ro(e){return to(wn(e).body,-1)||e}function oo(e,t){if(!e)return null;const n=Jr(wn(e).body,eo()),r=n.length;if(0===r)return null;const o=n.indexOf(e);if(-1===o)return null;return n[(o+t+r)%r]}function io(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Fn(n,r)}function ao(e){Jr(e,eo()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function so(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const lo=null;let co=globalThis.requestAnimationFrame;const uo=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){const t=this.nextId;this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1;const n="production"!==process.env.NODE_ENV&&co!==requestAnimationFrame&&(co=requestAnimationFrame,!0);return this.isScheduled&&!n||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}};class fo{static create(){return new fo}static request(e){return uo.request(e)}static cancel(e){return uo.cancel(e)}currentId=lo;request(e){this.cancel(),this.currentId=uo.request(()=>{this.currentId=lo,e()})}cancel=()=>{this.currentId!==lo&&(uo.cancel(this.currentId),this.currentId=lo)};disposeEffect=()=>this.cancel}function po(){const e=j(fo.create).current;return yn(e.disposeEffect),e}function ho(e){return null==e?e:"current"in e?e.current:e}let mo=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const vo={[mo.startingStyle]:""},yo={[mo.endingStyle]:""},go={transitionStatus:e=>"starting"===e?vo:"ending"===e?yo:null};function bo(e,t=!1,n=!0){const r=po();return $t((i,a=null)=>{function s(){o.flushSync(i)}r.cancel();const l=ho(e);if(null==l)return;const c=l;if("function"!=typeof c.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{function u(){const e=mo.startingStyle;if(!c.hasAttribute(e))return void r.request(d);const t=new MutationObserver(()=>{c.hasAttribute(e)||(t.disconnect(),d())});t.observe(c,{attributes:!0,attributeFilter:[e]}),a?.addEventListener("abort",()=>t.disconnect(),{once:!0})}function d(){Promise.all(c.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||s()}).catch(()=>{const e=c.getAnimations();if(n){if(a?.aborted)return;s()}else e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&d()})}if(t)return void u();r.request(d)}})}function xo(e){const{enabled:t=!0,open:n,ref:o,onComplete:i}=e,a=$t(i),s=bo(o,n,!1);r.useEffect(()=>{if(!t)return;const e=new AbortController;return s(a,e.signal),()=>{e.abort()}},[t,n,a,s])}function wo(e){const{enabled:t=!0,value:n,id:i,name:a,controlRef:s,commit:l}=e,{formRef:c}=r.useContext(cn),{invalid:u,markedDirtyRef:d,validityData:f,setValidityData:p}=ln(),h=$t(e.getValue);qt(()=>{if(!t)return;let e=n;void 0===e&&(e=h()),null===f.initialValue&&null!==e&&p(t=>({...t,initialValue:e}))},[t,p,n,f.initialValue,h]),qt(()=>{t&&i&&c.current.fields.set(i,{getValue:h,name:a,controlRef:s,validityData:xn(f,u),validate(e=!0){let t=n;void 0===t&&(t=h()),d.current=!0,e?o.flushSync(()=>l(t)):l(t)}})},[l,s,t,c,h,i,u,d,a,f,n]),qt(()=>{const e=c.current.fields;return()=>{i&&e.delete(i)}},[c,i])}const Eo="none",Oo="trigger-press",So="trigger-hover",ko="trigger-focus",Po="outside-press",Ao="item-press",jo="focus-out",To="escape-key",Co="list-navigation",Mo="sibling-open",No="imperative-action";function Io(e,t,n,r){let o=!1,i=!1;const a=z;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){i=!0},get isCanceled(){return o},get isPropagationAllowed(){return i},trigger:n,...a}}const Do=r.forwardRef(function(e,t){const{render:n,className:o,id:i,name:a,value:s,disabled:l=!1,onValueChange:c,defaultValue:u,autoFocus:d=!1,...f}=e,{state:p,name:h,disabled:m,setTouched:v,setDirty:y,validityData:g,setFocused:b,setFilled:x,validationMode:w,validation:E}=ln(),O=m||l,S=h??a,k={...p,disabled:O},{labelId:P}=mn(),A=function(e={}){const{id:t,implicit:n=!1,controlRef:o}=e,{controlId:i,registerControlId:a}=mn(),s=pn(t),l=n?i:void 0,c=j(()=>Symbol("labelable-control")),u=r.useRef(!1),d=r.useRef(null!=t),f=$t(()=>{u.current&&a!==R&&(u.current=!1,a(c.current,void 0))});return qt(()=>{if(a===R)return;let e;if(n){const n=o?.current;e=wt(n)&&null!=n.closest("label")?t??null:l??s}else if(null!=t)d.current=!0,e=t;else{if(!d.current)return void f();e=s}void 0!==e?(u.current=!0,a(c.current,e)):f()},[t,o,l,a,n,s,c,f]),r.useEffect(()=>f,[f]),i??s}({id:i});qt(()=>{const e=null!=s;E.inputRef.current?.value||e&&""!==s?x(!0):e&&""===s&&x(!1)},[E.inputRef,x,s]);const T=r.useRef(null);qt(()=>{d&&T.current===Bn(wn(T.current))&&b(!0)},[d,b]);const[C]=function({controlled:e,default:t,name:n,state:o="value"}){const{current:i}=r.useRef(void 0!==e),[a,s]=r.useState(t),l=i?e:a;if("production"!==process.env.NODE_ENV){r.useEffect(()=>{i!==(void 0!==e)&&console.error([`Base UI: A component is changing the ${i?"":"un"}controlled ${o} state of ${n} to be ${i?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join("\n"))},[o,n,e]);const{current:a}=r.useRef(t);r.useEffect(()=>{i||JSON.stringify(a)===JSON.stringify(t)||console.error([`Base UI: A component is changing the default ${o} state of an uncontrolled ${n} after being initialized. To suppress this warning opt to use a controlled ${n}.`].join("\n"))},[JSON.stringify(t)])}return[l,r.useCallback(e=>{i||s(e)},[])]}({controlled:s,default:u,name:"FieldControl",state:"value"}),M=void 0!==s,N=M?C:void 0;wo({id:A,name:S,commit:E.commit,value:N,getValue:()=>E.inputRef.current?.value,controlRef:E.inputRef});return U("input",e,{ref:[t,T],state:k,props:[{id:A,disabled:O,name:S,ref:E.inputRef,"aria-labelledby":P,autoFocus:d,...M?{value:N}:{defaultValue:u},onChange(e){const t=e.currentTarget.value;c?.(t,Io(Eo,e.nativeEvent)),y(t!==g.initialValue),x(""!==t)},onFocus(){b(!0)},onBlur(e){v(!0),b(!1),"onBlur"===w&&E.commit(e.currentTarget.value)},onKeyDown(e){"INPUT"===e.currentTarget.tagName&&"Enter"===e.key&&(v(!0),E.commit(e.currentTarget.value))}},E.getInputValidationProps(),f],stateAttributesMapping:an})});"production"!==process.env.NODE_ENV&&(Do.displayName="FieldControl");const _o=r.forwardRef(function(e,t){return p.jsx(Do,{ref:t,...e})});function Ro(e){var t=e.className,n=e.type,r=m(e,["className","type"]);return p.jsx(_o,h({type:n,"data-slot":"input",className:mt("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",t)},r))}"production"!==process.env.NODE_ENV&&(_o.displayName="Input");const Lo=r.forwardRef(function(e,t){const{className:n,render:r,orientation:o="horizontal",...i}=e;return U("div",e,{state:{orientation:o},ref:t,props:[{role:"separator","aria-orientation":o},i]})});"production"!==process.env.NODE_ENV&&(Lo.displayName="Separator");const zo=r.createContext(void 0);function Vo(e){const t=r.useContext(zo);if(!1===e&&void 0===t)throw new Error("production"!==process.env.NODE_ENV?"Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.":P(27));return t}"production"!==process.env.NODE_ENV&&(zo.displayName="DialogRootContext");let Bo=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=mo.startingStyle]="startingStyle",e[e.endingStyle=mo.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),Fo=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({});const $o={[Fo.popupOpen]:""},Uo={[Fo.popupOpen]:"",[Fo.pressed]:""},Wo={[Bo.open]:""},Ko={[Bo.closed]:""},Ho={[Bo.anchorHidden]:""},Yo={open:e=>e?$o:null},qo={open:e=>e?Uo:null},Go={open:e=>e?Wo:Ko,anchorHidden:e=>e?Ho:null},Xo={...Go,...go},Zo=r.forwardRef(function(e,t){const{render:n,className:r,forceRender:o=!1,...i}=e,{store:a}=Vo(),s=a.useState("open"),l=a.useState("nested"),c=a.useState("mounted");return U("div",e,{state:{open:s,transitionStatus:a.useState("transitionStatus")},ref:[a.context.backdropRef,t],stateAttributesMapping:Xo,props:[{role:"presentation",hidden:!c,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:o||!l})});"production"!==process.env.NODE_ENV&&(Zo.displayName="DialogBackdrop");const Jo=r.forwardRef(function(e,t){const{render:n,className:r,disabled:o=!1,nativeButton:i=!0,...a}=e,{store:s}=Vo(),l=s.useState("open");const{getButtonProps:c,buttonRef:u}=Zt({disabled:o,native:i});return U("button",e,{state:{disabled:o},ref:[t,u],props:[{onClick:function(e){l&&s.setOpen(!1,Io("close-press",e.nativeEvent))}},a,c]})});"production"!==process.env.NODE_ENV&&(Jo.displayName="DialogClose");const Qo=r.forwardRef(function(e,t){const{render:n,className:r,id:o,...i}=e,{store:a}=Vo(),s=pn(o);return a.useSyncedValueWithCleanup("descriptionElementId",s),U("p",e,{ref:t,props:[{id:s},i]})});function ei(e,t,n){const r=function(e,t){return null==t||Qn(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:r?.[t]}function ti(e){return"function"==typeof e?e():e}function ni(e,t){return t||"click"===e||"mousedown"===e}"production"!==process.env.NODE_ENV&&(Qo.displayName="DialogDescription");const ri=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new gn,currentIdRef:{current:null},currentContextRef:{current:null}});function oi(e){const t=j(ii,e).current;return t.next=e,qt(t.effect),t}function ii(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}"production"!==process.env.NODE_ENV&&(ri.displayName="FloatingDelayGroupContext");const ai={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1,position:"fixed",top:0,left:0},si=r.forwardRef(function(e,t){const[n,o]=r.useState();qt(()=>{jn&&o("button")},[]);const i={tabIndex:0,role:n};return p.jsx("span",{...e,ref:t,style:ai,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":""})});function li(e){return`data-base-ui-${e}`}"production"!==process.env.NODE_ENV&&(si.displayName="FocusGuard");let ci=0;function ui(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(ci);const i=()=>e?.focus({preventScroll:n});o?i():ci=requestAnimationFrame(i)}const di={inert:new WeakMap,"aria-hidden":new WeakMap},fi="data-base-ui-inert",pi={inert:new WeakSet,"aria-hidden":new WeakSet};let hi=new WeakMap,mi=0;function vi(e){return e?Ot(e)?e.host:vi(e.parentNode):null}const yi=(e,t)=>t.map(t=>{if(e.contains(t))return t;const n=vi(t);return e.contains(n)?n:null}).filter(e=>null!=e),gi=e=>{const t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},bi=(e,t,n)=>{const r=[],o=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{"script"!==yt(e)&&(t.has(e)?o(e):r.push(e))})};return o(e),r};function xi(e,t,n,r,{mark:o=!0,markerIgnoreElements:i=[]}){const a=r?"inert":n?"aria-hidden":null;let s=null,l=null;const c=yi(t,e),u=o?yi(t,i):[],d=new Set(u),f=o?bi(t,gi(c),new Set(c)).filter(e=>!d.has(e)):[],p=[],h=[];if(a){const e=di[a],n=function(e){return pi[e]}(a);l=n,s=e;const r=yi(t,Array.from(t.querySelectorAll("[aria-live]"))),o=c.concat(r);bi(t,gi(o),new Set(o)).forEach(t=>{const r=t.getAttribute(a),o=null!==r&&"false"!==r,i=(e.get(t)||0)+1;e.set(t,i),p.push(t),1===i&&o&&n.add(t),o||t.setAttribute(a,"inert"===a?"":"true")})}return o&&f.forEach(e=>{const t=(hi.get(e)||0)+1;hi.set(e,t),h.push(e),1===t&&e.setAttribute(fi,"")}),mi+=1,()=>{s&&p.forEach(e=>{const t=(s.get(e)||0)-1;s.set(e,t),t||(!l?.has(e)&&a&&e.removeAttribute(a),l?.delete(e))}),o&&h.forEach(e=>{const t=(hi.get(e)||0)-1;hi.set(e,t),t||e.removeAttribute(fi)}),mi-=1,mi||(di.inert=new WeakMap,di["aria-hidden"]=new WeakMap,pi.inert=new WeakSet,pi["aria-hidden"]=new WeakSet,hi=new WeakMap)}}function wi(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:o=!0,markerIgnoreElements:i=[]}=t;return xi(e,wn(e[0]).body,n,r,{mark:o,markerIgnoreElements:i})}const Ei=r.createContext(null);"production"!==process.env.NODE_ENV&&(Ei.displayName="PortalContext");const Oi=()=>r.useContext(Ei),Si=li("portal");function ki(e={}){const{ref:t,container:n,componentProps:i=z,elementProps:a}=e,s=fn(),l=Oi(),c=l?.portalNode,[u,d]=r.useState(null),[f,p]=r.useState(null),h=$t(e=>{null!==e&&p(e)}),m=r.useRef(null);qt(()=>{if(null===n)return void(m.current&&(m.current=null,p(null),d(null)));if(null==s)return;const e=(n&&(xt(n)?n:n.current))??c??document.body;null!=e?m.current!==e&&(m.current=e,p(null),d(e)):m.current&&(m.current=null,p(null),d(null))},[n,c,s]);const v=U("div",i,{ref:[t,h],props:[{id:s,[Si]:""},a]});return{portalNode:f,portalSubtree:u&&v?o.createPortal(v,u):null}}const Pi=r.forwardRef(function(e,t){const{children:n,container:i,className:a,render:s,renderGuards:l,...c}=e,{portalNode:u,portalSubtree:d}=ki({container:i,ref:t,componentProps:e,elementProps:c}),f=r.useRef(null),h=r.useRef(null),m=r.useRef(null),v=r.useRef(null),[y,g]=r.useState(null),b=y?.modal,x=y?.open,w="boolean"==typeof l?l:!!y&&!y.modal&&y.open&&!!u;r.useEffect(()=>{if(u&&!b)return u.addEventListener("focusin",e,!0),u.addEventListener("focusout",e,!0),()=>{u.removeEventListener("focusin",e,!0),u.removeEventListener("focusout",e,!0)};function e(e){if(u&&e.relatedTarget&&io(e)){("focusin"===e.type?so:ao)(u)}}},[u,b]),r.useEffect(()=>{u&&!x&&so(u)},[x,u]);const E=r.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:h,beforeInsideRef:m,afterInsideRef:v,portalNode:u,setFocusManagerState:g}),[u]);return p.jsxs(r.Fragment,{children:[d,p.jsxs(Ei.Provider,{value:E,children:[w&&u&&p.jsx(si,{"data-type":"outside",ref:f,onFocus:e=>{if(io(e,u))m.current?.focus();else{const e=ro(y?y.domReference:null);e?.focus()}}}),w&&u&&p.jsx("span",{"aria-owns":u.id,style:$}),u&&o.createPortal(n,u),w&&u&&p.jsx(si,{"data-type":"outside",ref:h,onFocus:e=>{if(io(e,u))v.current?.focus();else{const t=no(y?y.domReference:null);t?.focus(),y?.closeOnFocusOut&&y?.onOpenChange(!1,Io(jo,e.nativeEvent))}}})]})]})});function Ai(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}"production"!==process.env.NODE_ENV&&(Pi.displayName="FloatingPortal");class ji{nodesRef={current:[]};events=Ai();addNode(e){this.nodesRef.current.push(e)}removeNode(e){const t=this.nodesRef.current.findIndex(t=>t===e);-1!==t&&this.nodesRef.current.splice(t,1)}}const Ti=r.createContext(null);"production"!==process.env.NODE_ENV&&(Ti.displayName="FloatingNodeContext");const Ci=r.createContext(null);"production"!==process.env.NODE_ENV&&(Ci.displayName="FloatingTreeContext");const Mi=()=>r.useContext(Ti)?.id||null,Ni=e=>{const t=r.useContext(Ci);return e??t};function Ii(e){const t=fn(),n=Ni(e),r=Mi();return qt(()=>{if(!t)return;const e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Di(e){const{children:t,id:n}=e,o=Mi();return p.jsx(Ti.Provider,{value:r.useMemo(()=>({id:n,parentId:o}),[n,o]),children:t})}function _i(e){const{children:t,externalTree:n}=e,r=j(()=>n??new ji).current;return p.jsx(Ci.Provider,{value:r,children:t})}let Ri=[];function Li(){Ri=Ri.filter(e=>e.deref()?.isConnected)}function zi(){return Li(),Ri[Ri.length-1]?.deref()}function Vi(e,t){if(!t.current.includes("floating")&&!e.getAttribute("role")?.includes("dialog"))return;const n=eo(),r=function(e,t){return(t=t||{}).getShadowRoot?Br([e],t.includeContainer,{filter:qr.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):Vr(e,t.includeContainer,qr.bind(null,t))}(e,n),o=r.filter(e=>{const t=e.getAttribute("data-tabindex")||"";return Qr(e,n)||e.hasAttribute("data-tabindex")&&!t.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||0===o.length?"0"!==i&&e.setAttribute("tabindex","0"):("-1"!==i||e.hasAttribute("data-tabindex")&&"-1"!==e.getAttribute("data-tabindex"))&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function Bi(e){const{context:t,children:n,disabled:o=!1,initialFocus:i=!0,returnFocus:a=!0,restoreFocus:s=!1,modal:l=!0,closeOnFocusOut:c=!0,openInteractionType:u="",nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:h,externalTree:m,getInsideElements:v}=e,y="rootStore"in t?t.rootStore:t,g=y.useState("open"),b=y.useState("domReferenceElement"),x=y.useState("floatingElement"),{events:w,dataRef:E}=y.context,O=$t(()=>E.current.floatingContext?.nodeId),S=!1===i,k=Hn(b)&&S,P=r.useRef(["content"]),A=oi(i),j=oi(a),C=oi(u),M=Ni(m),N=Oi(),I=r.useRef(!1),D=r.useRef(!1),_=r.useRef(!1),R=r.useRef(-1),L=r.useRef(""),z=r.useRef(""),V=r.useRef(null),B=r.useRef(null),F=T(V,h,N?.beforeInsideRef),$=T(B,N?.afterInsideRef),U=bn(),W=bn(),K=po(),H=null!=N,Y=Yn(x),q=$t((e=Y)=>e?Jr(e,eo()):[]),G=$t(()=>v?.().filter(e=>null!=e)??[]),X=$t(e=>{const t=q(e);return P.current.map(()=>t).filter(Boolean).flat()});r.useEffect(()=>{if(o||!l)return;function e(e){"Tab"===e.key&&Fn(Y,Bn(wn(Y)))&&0===q().length&&!k&&Xn(e)}const t=wn(Y);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[o,b,Y,l,P,k,q,X]),r.useEffect(()=>{if(o||!g)return;const e=wn(Y);function t(){_.current=!1}function n(e){const t=Un(e),n=G(),r=Fn(x,t)||Fn(b,t)||Fn(N?.portalNode,t)||n.some(e=>e===t||Fn(e,t));_.current=!r,z.current=e.pointerType||"keyboard",t?.closest("[data-base-ui-click-trigger]")&&(D.current=!0)}function r(){z.current="keyboard"}return e.addEventListener("pointerdown",n,!0),e.addEventListener("pointerup",t,!0),e.addEventListener("pointercancel",t,!0),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("pointerdown",n,!0),e.removeEventListener("pointerup",t,!0),e.removeEventListener("pointercancel",t,!0),e.removeEventListener("keydown",r,!0)}},[o,x,b,Y,g,N,G]),r.useEffect(()=>{if(o||!c)return;const e=wn(Y);function t(){D.current=!0,W.start(0,()=>{D.current=!1})}function n(e){const t=Un(e),n=q().indexOf(t);-1!==n&&(R.current=n)}function r(t){const n=t.relatedTarget,r=t.currentTarget,o=Un(t);queueMicrotask(()=>{const i=O(),a=y.context.triggerElements,c=G(),u=n?.hasAttribute(li("focus-guard"))&&[V.current,B.current,N?.beforeInsideRef.current,N?.afterInsideRef.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,ho(f),ho(d)].includes(n),p=!(Fn(b,n)||Fn(x,n)||Fn(n,x)||Fn(N?.portalNode,n)||c.some(e=>e===n||Fn(e,n))||null!=n&&a.hasElement(n)||a.hasMatchingElement(e=>Fn(e,n))||u||M&&(qn(M.nodesRef.current,i).find(e=>Fn(e.context?.elements.floating,n)||Fn(e.context?.elements.domReference,n))||Gn(M.nodesRef.current,i).find(e=>[e.context?.elements.floating,Yn(e.context?.elements.floating)].includes(n)||e.context?.elements.domReference===n)));if(r===b&&Y&&Vi(Y,P),s&&r!==b&&!((h=o)&&h.isConnected&&("function"==typeof h.checkVisibility?h.checkVisibility():Ir(h)))&&Bn(e)===e.body){if(Et(Y)&&(Y.focus(),"popup"===s))return void K.request(()=>{Y.focus()});const e=R.current,t=q(),n=t[e]||t[t.length-1]||Y;Et(n)&&n.focus()}var h;E.current.insideReactTree?E.current.insideReactTree=!1:!k&&l||!n||!p||D.current||!k&&n===zi()||(I.current=!0,y.setOpen(!1,Io(jo,t)))})}function i(){_.current||(E.current.insideReactTree=!0,U.start(0,()=>{E.current.insideReactTree=!1}))}const a=Et(b)?b:null,u=[];return x||a?(a&&(a.addEventListener("focusout",r),a.addEventListener("pointerdown",t),u.push(()=>{a.removeEventListener("focusout",r),a.removeEventListener("pointerdown",t)})),x&&(x.addEventListener("focusin",n),x.addEventListener("focusout",r),N&&(x.addEventListener("focusout",i,!0),u.push(()=>{x.removeEventListener("focusout",i,!0)})),u.push(()=>{x.removeEventListener("focusin",n),x.removeEventListener("focusout",r)})),()=>{u.forEach(e=>{e()})}):void 0},[o,b,x,Y,l,M,N,y,c,s,q,k,O,P,E,U,W,K,d,f,G]),r.useEffect(()=>{if(o||!x||!g)return;const e=Array.from(N?.portalNode?.querySelectorAll(`[${li("portal")}]`)||[]),t=M?Gn(M.nodesRef.current,O()):[],n=t.find(e=>Hn(e.context?.elements.domReference||null))?.context?.elements.domReference,r=[...[x,...e,V.current,B.current,N?.beforeOutsideRef.current,N?.afterOutsideRef.current,...G()],n,ho(f),ho(d),k?b:null].filter(e=>null!=e),i=wi(r,{ariaHidden:l||k,mark:!1}),a=[x,...e].filter(e=>null!=e),s=wi(a);return()=>{s(),i()}},[g,o,b,x,l,P,N,k,M,O,d,f,G]),qt(()=>{if(!g||o||!Et(Y))return;const e=Bn(wn(Y));queueMicrotask(()=>{const t=X(Y),n=A.current,r="function"==typeof n?n(C.current||""):n;if(void 0===r||!1===r)return;let o;o=!0===r||null===r?t[0]||Y:ho(r),o=o||t[0]||Y;Fn(Y,e)||ui(o,{preventScroll:o===Y})})},[o,g,Y,S,X,A,C]),qt(()=>{if(o||!Y)return;const e=wn(Y),t=Bn(e);var n;function r(e){if(e.open||(L.current=function(e,t){const n=gt(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(0===e.detail?"keyboard":"mouse"):""}(e.nativeEvent,z.current)),e.reason===So&&"mouseleave"===e.nativeEvent.type&&(I.current=!0),e.reason===Po)if(e.nested)I.current=!1;else if(Zn(e.nativeEvent)||Jn(e.nativeEvent))I.current=!1;else{let e=!1;document.createElement("div").focus({get preventScroll(){return e=!0,!1}}),I.current=!e}}return n=t,Li(),n&&"body"!==yt(n)&&(Ri.push(new WeakRef(n)),Ri.length>20&&(Ri=Ri.slice(-20))),w.on("openchange",r),()=>{w.off("openchange",r);const t=Bn(e),n=G(),o=Fn(x,t)||n.some(e=>e===t||Fn(e,t))||M&&qn(M.nodesRef.current,O(),!1).some(e=>Fn(e.context?.elements.floating,t)),i=function(){const e=j.current;let t="function"==typeof e?e(L.current):e;if(void 0===t||!1===t)return null;if(null===t&&(t=!0),"boolean"==typeof t){const e=b||zi();return e&&e.isConnected?e:null}const n=b||zi();return ho(t)||n||null}();queueMicrotask(()=>{const n=function(e){if(!e)return null;const t=eo();return Qr(e,t)?e:Jr(e,t)[0]||e}(i),r="boolean"!=typeof j.current;j.current&&!I.current&&Et(n)&&(r||n===t||t===e.body||o)&&n.focus({preventScroll:!0}),I.current=!1})}},[o,x,Y,j,E,w,M,b,O,G]),qt(()=>{if(!Pn||g||!x)return;const e=Bn(wn(x));Et(e)&&Kn(e)&&Fn(x,e)&&e.blur()},[g,x]),qt(()=>{if(!o&&N)return N.setFocusManagerState({modal:l,closeOnFocusOut:c,open:g,onOpenChange:y.setOpen,domReference:b}),()=>{N.setFocusManagerState(null)}},[o,N,l,g,y,c,b]),qt(()=>{if(!o&&Y)return Vi(Y,P),()=>{queueMicrotask(Li)}},[o,Y,P]);const Z=!o&&(!l||!k)&&(H||l);return p.jsxs(r.Fragment,{children:[Z&&p.jsx(si,{"data-type":"inside",ref:F,onFocus:e=>{if(l){const e=X();ui(e[e.length-1])}else if(N?.portalNode)if(I.current=!1,io(e,N.portalNode)){const e=no(b);e?.focus()}else ho(f??N.beforeOutsideRef)?.focus()}}),n,Z&&p.jsx(si,{"data-type":"inside",ref:$,onFocus:e=>{if(l)ui(X()[0]);else if(N?.portalNode)if(c&&(I.current=!0),io(e,N.portalNode)){const e=ro(b);e?.focus()}else ho(d??N.afterOutsideRef)?.focus()}})]})}function Fi(e){return null!=e&&null!=e.clientX}const $i={intentional:"onClick",sloppy:"onPointerDown"};function Ui(){return!1}function Wi(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingElement"),{dataRef:a}=n.context,{enabled:s=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="sloppy",referencePress:d=Ui,referencePressEvent:f="sloppy",bubbles:p,externalTree:h}=t,m=Ni(h),v=$t("function"==typeof c?c:()=>!1),y="function"==typeof c?v:c,g=!1!==y,b=$t(()=>u),x=r.useRef(!1),w=r.useRef(!1),E=r.useRef(!1),{escapeKey:O,outsidePress:S}={escapeKey:"boolean"==typeof(k=p)?k:k?.escapeKey??!1,outsidePress:"boolean"==typeof k?k:k?.outsidePress??!0};var k;const P=r.useRef(null),A=bn(),j=bn(),T=$t(()=>{j.clear(),a.current.insideReactTree=!1}),C=r.useRef(!1),M=r.useRef(""),N=$t(d),I=$t(e=>{if(!o||!s||!l||"Escape"!==e.key)return;if(C.current)return;const t=a.current.floatingContext?.nodeId,r=m?qn(m.nodesRef.current,t):[];if(!O&&r.length>0){let e=!0;if(r.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}const i=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,c=Io(To,i);n.setOpen(!1,c),O||c.isPropagationAllowed||e.stopPropagation()}),D=$t(()=>{a.current.insideReactTree=!0,j.start(0,T)});r.useEffect(()=>{if(!o||!s)return;a.current.__escapeKeyBubbles=O,a.current.__outsidePressBubbles=S;const e=new gn,t=new gn;function r(){e.clear(),C.current=!0}function c(){e.start(Nt()?5:0,()=>{C.current=!1})}function u(){E.current=!0,t.start(0,()=>{E.current=!1})}function d(){x.current=!1,w.current=!1}function f(){const e=M.current,t="pen"!==e&&e?e:"mouse",n=b(),r="function"==typeof n?n():n;return"string"==typeof r?r:r[t]}function p(e){const t=a.current.floatingContext?.nodeId,r=m&&qn(m.nodesRef.current,t).some(t=>Wn(e,t.context?.elements.floating));return Wn(e,n.select("floatingElement"))||Wn(e,n.select("domReferenceElement"))||r}function h(e){if(function(e){const t=f();return"intentional"===t&&"click"!==e.type||"sloppy"===t&&"click"===e.type}(e))return void T();if(a.current.insideReactTree)return void T();const r=Un(e),o=`[${li("inert")}]`;let i=Array.from(wn(n.select("floatingElement")).querySelectorAll(o));const s=wt(r)?r.getRootNode():null;Ot(s)&&(i=i.concat(Array.from(s.querySelectorAll(o))));const l=n.context.triggerElements;if(r&&(l.hasElement(r)||l.hasMatchingElement(e=>Fn(e,r))))return;let c=wt(r)?r:null;for(;c&&!It(c);){const e=Rt(c);if(It(e)||!wt(e))break;c=e}if(i.length&&wt(r)&&!r.matches("html,body")&&!Fn(r,n.select("floatingElement"))&&i.every(e=>!Fn(c,e)))return;if(Et(r)&&!("touches"in e)){const t=It(r),n=Dt(r),o=/auto|scroll/,i=t||o.test(n.overflowX),a=t||o.test(n.overflowY),s=i&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,l=a&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(p(e))return;if("intentional"===f()&&E.current)return t.clear(),void(E.current=!1);if("function"==typeof y&&!y(e))return;const u=a.current.floatingContext?.nodeId,d=m?qn(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,Io(Po,e)),T()}function v(e){M.current="touch";const t=Un(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!n.select("open")||!s||Wn(e,n.select("floatingElement"))||Wn(e,n.select("domReferenceElement")))return;const t=e.touches[0];t&&(P.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},A.start(1e3,()=>{P.current&&(P.current.dismissOnTouchEnd=!1,P.current.dismissOnMouseDown=!1)}))}(e),t?.removeEventListener(e.type,r)})}function k(e){if(A.clear(),"pointerdown"===e.type&&(M.current=e.pointerType),"mousedown"===e.type&&P.current&&!P.current.dismissOnMouseDown)return;const t=Un(e);t?.addEventListener(e.type,function r(){"pointerdown"===e.type?function(e){"sloppy"===f()&&"touch"!==e.pointerType&&n.select("open")&&s&&!Wn(e,n.select("floatingElement"))&&!Wn(e,n.select("domReferenceElement"))&&h(e)}(e):h(e),t?.removeEventListener(e.type,r)})}function j(e){if(!x.current)return;const n=w.current;d(),"intentional"===f()&&("pointercancel"!==e.type?p(e)||(n?u():("function"!=typeof y||y(e))&&(t.clear(),E.current=!0,T())):n&&u())}function N(e){const t=Un(e);t?.addEventListener(e.type,function r(){!function(e){if("sloppy"!==f()||!P.current||Wn(e,n.select("floatingElement"))||Wn(e,n.select("domReferenceElement")))return;const t=e.touches[0];if(!t)return;const r=Math.abs(t.clientX-P.current.startX),o=Math.abs(t.clientY-P.current.startY),i=Math.sqrt(r*r+o*o);i>5&&(P.current.dismissOnTouchEnd=!0),i>10&&(h(e),A.clear(),P.current=null)}(e),t?.removeEventListener(e.type,r)})}function D(e){const t=Un(e);t?.addEventListener(e.type,function r(){!function(e){"sloppy"!==f()||!P.current||Wn(e,n.select("floatingElement"))||Wn(e,n.select("domReferenceElement"))||(P.current.dismissOnTouchEnd&&h(e),A.clear(),P.current=null)}(e),t?.removeEventListener(e.type,r)})}const _=wn(i);return l&&(_.addEventListener("keydown",I),_.addEventListener("compositionstart",r),_.addEventListener("compositionend",c)),g&&(_.addEventListener("click",k,!0),_.addEventListener("pointerdown",k,!0),_.addEventListener("pointerup",j,!0),_.addEventListener("pointercancel",j,!0),_.addEventListener("mousedown",k,!0),_.addEventListener("mouseup",j,!0),_.addEventListener("touchstart",v,!0),_.addEventListener("touchmove",N,!0),_.addEventListener("touchend",D,!0)),()=>{l&&(_.removeEventListener("keydown",I),_.removeEventListener("compositionstart",r),_.removeEventListener("compositionend",c)),g&&(_.removeEventListener("click",k,!0),_.removeEventListener("pointerdown",k,!0),_.removeEventListener("pointerup",j,!0),_.removeEventListener("pointercancel",j,!0),_.removeEventListener("mousedown",k,!0),_.removeEventListener("mouseup",j,!0),_.removeEventListener("touchstart",v,!0),_.removeEventListener("touchmove",N,!0),_.removeEventListener("touchend",D,!0)),e.clear(),t.clear(),d(),E.current=!1}},[a,i,l,g,y,o,s,O,S,I,T,b,m,n,A]),r.useEffect(T,[y,T]);const _=r.useMemo(()=>({onKeyDown:I,[$i[f]]:e=>{N()&&n.setOpen(!1,Io(Oo,e.nativeEvent))},..."intentional"!==f&&{onClick(e){N()&&n.setOpen(!1,Io(Oo,e.nativeEvent))}}}),[I,n,f,N]),R=$t(e=>{if(!o||!s||0!==e.button)return;const t=Un(e.nativeEvent);Fn(n.select("floatingElement"),t)&&(x.current||(x.current=!0,w.current=!1))}),L=$t(e=>{o&&s&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&x.current&&(w.current=!0)}),z=r.useMemo(()=>({onKeyDown:I,onPointerDown:L,onMouseDown:L,onClickCapture:D,onMouseDownCapture(e){D(),R(e)},onPointerDownCapture(e){D(),R(e)},onMouseUpCapture:D,onTouchEndCapture:D,onTouchMoveCapture:D}),[I,D,R,L]);return r.useMemo(()=>s?{reference:_,floating:z,trigger:_}:{},[s,_,z])}function Ki(e,t,n){let{reference:r,floating:o}=e;const i=hr(t),a=mr(t),s=pr(a),l=ur(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(dr(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function Hi(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=cr(t,e),h=Or(p),m=s[f?"floating"===d?"reference":"floating":d],v=Sr(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},x=Sr(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-x.top+h.top)/b.y,bottom:(x.bottom-v.bottom+h.bottom)/b.y,left:(v.left-x.left+h.left)/b.x,right:(x.right-v.right+h.right)/b.x}}function Yi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qi(e){return tr.some(t=>e[t]>=0)}const Gi=new Set(["left","top"]);function Xi(e){const t=Dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Et(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=or(n)!==i||or(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Zi(e){return wt(e)?e:e.contextElement}function Ji(e){const t=Zi(e);if(!Et(t))return ar(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Xi(t);let a=(i?or(n.width):n.width)/r,s=(i?or(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Qi=ar(0);function ea(e){const t=gt(e);return Nt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Qi}function ta(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Zi(e);let a=ar(1);t&&(r?wt(r)&&(a=Ji(r)):a=Ji(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==gt(e))&&t}(i,n,r)?ea(i):ar(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=gt(i),t=r&&wt(r)?gt(r):r;let n=e,o=Vt(n);for(;o&&r&&t!==n;){const e=Ji(o),t=o.getBoundingClientRect(),r=Dt(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=gt(o),o=Vt(n)}}return Sr({width:u,height:d,x:l,y:c})}function na(e,t){const n=_t(e).scrollLeft;return t?t.left+n:ta(bt(e)).left+n}function ra(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-na(e,n),y:n.top+t.scrollTop}}function oa(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=gt(e),r=bt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Nt();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=na(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=bt(e),n=_t(e),r=e.ownerDocument.body,o=rr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=rr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+na(e);const s=-n.scrollTop;return"rtl"===Dt(r).direction&&(a+=rr(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(bt(e));else if(wt(t))r=function(e,t){const n=ta(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Et(e)?Ji(e):ar(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ea(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Sr(r)}function ia(e,t){const n=Rt(e);return!(n===t||!wt(n)||It(n))&&("fixed"===Dt(n).position||ia(n,t))}function aa(e,t,n){const r=Et(t),o=bt(t),i="fixed"===n,a=ta(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=ar(0);function c(){l.x=na(o)}if(r||!r&&!i)if(("body"!==yt(t)||St(o))&&(s=_t(t)),r){const e=ta(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=!o||r||i?ar(0):ra(o,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function sa(e){return"static"===Dt(e).position}function la(e,t){if(!Et(e)||"fixed"===Dt(e).position)return null;if(t)return t(e);let n=e.offsetParent;return bt(e)===n&&(n=n.ownerDocument.body),n}function ca(e,t){const n=gt(e);if(Pt(e))return n;if(!Et(e)){let t=Rt(e);for(;t&&!It(t);){if(wt(t)&&!sa(t))return t;t=Rt(t)}return n}let r=la(e,t);for(;r&&kt(r)&&sa(r);)r=la(r,t);return r&&It(r)&&sa(r)&&!Mt(r)?n:r||function(e){let t=Rt(e);for(;Et(t)&&!It(t);){if(Mt(t))return t;if(Pt(t))return null;t=Rt(t)}return null}(e)||n}const ua={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=bt(r),s=!!t&&Pt(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ar(1);const u=ar(0),d=Et(r);if((d||!d&&!i)&&(("body"!==yt(r)||St(a))&&(l=_t(r)),d)){const e=ta(r);c=Ji(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?ar(0):ra(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:bt,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Pt(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=zt(e,[],!1).filter(e=>wt(e)&&"body"!==yt(e)),o=null;const i="fixed"===Dt(e).position;let a=i?Rt(e):e;for(;wt(a)&&!It(a);){const t=Dt(a),n=Mt(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||St(a)&&!n&&ia(e,a))?r=r.filter(e=>e!==a):o=t,a=Rt(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=oa(t,i[0],o);let s=a.top,l=a.right,c=a.bottom,u=a.left;for(let e=1;e<i.length;e++){const n=oa(t,i[e],o);s=rr(n.top,s),l=nr(n.right,l),c=nr(n.bottom,c),u=rr(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:ca,getElementRects:async function(e){const t=this.getOffsetParent||ca,n=this.getDimensions,r=await n(e.floating);return{reference:aa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Xi(e);return{width:t,height:n}},getScale:Ji,isElement:wt,isRTL:function(e){return"rtl"===Dt(e).direction}};function da(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fa(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Zi(e),u=o||i?[...c?zt(c):[],...t?zt(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=c&&s?function(e,t){let n,r=null;const o=bt(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-ir(d)+"px "+-ir(o.clientWidth-(u+f))+"px "+-ir(o.clientHeight-(d+p))+"px "+-ir(u)+"px",threshold:rr(0,nr(1,l))||1};let m=!0;function v(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||da(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(v,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,h)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&h&&t&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),c&&!l&&h.observe(c),t&&h.observe(t));let m=l?ta(e):null;return l&&function t(){const r=ta(e);m&&!da(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const pa=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=ur(n),s=dr(n),l="y"===hr(n),c=Gi.has(a)?-1:1,u=i&&l?-1:1,d=cr(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},ha=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=cr(e,t),u={x:n,y:r},d=await i.detectOverflow(t,c),f=hr(ur(o)),p=fr(f);let h=u[p],m=u[f];if(a){const e="y"===p?"bottom":"right";h=lr(h+d["y"===p?"top":"left"],h,h-d[e])}if(s){const e="y"===f?"bottom":"right";m=lr(m+d["y"===f?"top":"left"],m,m-d[e])}const v=l.fn({...t,[p]:h,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:a,[f]:s}}}}}},ma=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=cr(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=ur(o),g=hr(s),b=ur(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[Er(s)]:function(e){const t=Er(e);return[vr(e),t,vr(t)]}(s)),E="none"!==h;!f&&E&&w.push(...wr(s,m,h,x));const O=[s,...w],S=await l.detectOverflow(t,v),k=[];let P=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&k.push(S[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=dr(e),o=mr(e),i=pr(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Er(a)),[a,Er(a)]}(o,a,x);k.push(S[e[0]],S[e[1]])}if(P=[...P,{placement:o,overflows:k}],!k.every(e=>e<=0)){var A,j;const e=((null==(A=i.flip)?void 0:A.index)||0)+1,t=O[e];if(t){if(!("alignment"===d&&g!==hr(t))||P.every(e=>hr(e.placement)!==g||e.overflows[0]>0))return{data:{index:e,overflows:P},reset:{placement:t}}}let n=null==(j=P.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var T;const e=null==(T=P.filter(e=>{if(E){const t=hr(e.placement);return t===g||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:T[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},va=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=cr(e,t),u=await a.detectOverflow(t,c),d=ur(o),f=dr(o),p="y"===hr(o),{width:h,height:m}=i.floating;let v,y;"top"===d||"bottom"===d?(v=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,v="end"===f?"top":"bottom");const g=m-u.top-u.bottom,b=h-u.left-u.right,x=nr(m-u[v],g),w=nr(h-u[y],b),E=!t.middlewareData.shift;let O=x,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(O=g),E&&!f){const e=rr(u.left,0),t=rr(u.right,0),n=rr(u.top,0),r=rr(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:rr(u.left,u.right)):O=m-2*(0!==n||0!==r?n+r:rr(u.top,u.bottom))}await l({...t,availableWidth:S,availableHeight:O});const k=await a.getDimensions(s.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}},ya=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=cr(e,t);switch(o){case"referenceHidden":{const e=Yi(await r.detectOverflow(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:qi(e)}}}case"escaped":{const e=Yi(await r.detectOverflow(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:qi(e)}}}default:return{}}}}},ga=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=cr(e,t),u={x:n,y:r},d=hr(o),f=fr(d);let p=u[f],h=u[d];const m=cr(s,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+v.mainAxis,n=i.reference[f]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,g;const e="y"===f?"width":"height",t=Gi.has(ur(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:v.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(g=a.offset)?void 0:g[d])||0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},ba=(e,t,n)=>{const r=new Map,o={platform:ua,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:Hi},l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ki(c,r,l),f=r,p=0;const h={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:v,fn:y}=m,{x:g,y:b,data:x,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=b?b:d,h[v]={...h[v],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=Ki(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:i})};var xa="undefined"!=typeof document?e.useLayoutEffect:function(){};function wa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!wa(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!wa(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Ea(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Oa(e,t){const n=Ea(e);return Math.round(t*n)/n}function Sa(e){const t=r.useRef(e);return xa(()=>{t.current=e}),t}const ka=(e,t)=>{const n=pa(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Pa=(e,t,n)=>{if(1===t.length&&t[0]===n){let t=!1;try{const n={};e(n)===n&&(t=!0)}catch{}if(t){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("The result function returned its own inputs without modification. e.g\n`createSelector([state => state.todos], todos => todos)`\nThis could lead to inefficient memoization and unnecessary re-renders.\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.",{stack:e})}}},Aa=(e,t,n)=>{const{memoize:r,memoizeOptions:o}=t,{inputSelectorResults:i,inputSelectorResultsCopy:a}=e,s=r(()=>({}),...o);if(!(s.apply(null,i)===s.apply(null,a))){let e;try{throw new Error}catch(t){({stack:e}=t)}console.warn("An input selector returned a different result when passed same arguments.\nThis means your output selector will likely run more frequently than intended.\nAvoid returning a new reference inside your input selector, e.g.\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`",{arguments:n,firstInputs:i,secondInputs:a,stack:e})}},ja={inputStabilityCheck:"once",identityFunctionCheck:"once"},Ta=Symbol("NOT_FOUND");var Ca=e=>Array.isArray(e)?e:[e];function Ma(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){const n=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Na(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var Ia=(e,t)=>e===t;var Da="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}};function _a(){return{s:0,v:void 0,o:null,p:null}}function Ra(e,t={}){let n={s:0,v:void 0,o:null,p:null};const{resultEqualityCheck:r}=t;let o,i=0;function a(){let t=n;const{length:a}=arguments;for(let e=0,n=a;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const r=e.get(n);void 0===r?(t=_a(),e.set(n,t)):t=r}else{let e=t.p;null===e&&(t.p=e=new Map);const r=e.get(n);void 0===r?(t=_a(),e.set(n,t)):t=r}}const s=t;let l;if(1===t.s)l=t.v;else if(l=e.apply(null,arguments),i++,r){const e=o?.deref?.()??o;null!=e&&r(e,l)&&(l=e,0!==i&&i--);o="object"==typeof l&&null!==l||"function"==typeof l?new Da(l):l}return s.s=1,s.v=l,l}return a.clearCache=()=>{n={s:0,v:void 0,o:null,p:null},a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function La(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},a=e.pop();"object"==typeof a&&(i=a,a=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...i},{memoize:l,memoizeOptions:c=[],argsMemoize:u=Ra,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=Ca(c),h=Ca(d),m=Ma(e),v=l(function(){return r++,a.apply(null,arguments)},...p);let y=!0;const g=u(function(){o++;const e=Na(m,arguments);if(t=v.apply(null,e),"production"!==process.env.NODE_ENV){const{identityFunctionCheck:n,inputStabilityCheck:r}=((e,t)=>{const{identityFunctionCheck:n,inputStabilityCheck:r}={...ja,...t};return{identityFunctionCheck:{shouldRun:"always"===n||"once"===n&&e,run:Pa},inputStabilityCheck:{shouldRun:"always"===r||"once"===r&&e,run:Aa}}})(y,f);if(n.shouldRun&&n.run(a,e,t),r.shouldRun){const t=Na(m,arguments);r.run({inputSelectorResults:e,inputSelectorResultsCopy:t},{memoize:l,memoizeOptions:p},arguments)}y&&(y=!1)}return t},...h);return Object.assign(g,{resultFunc:a,memoizedResultFunc:v,dependencies:m,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:l,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var za=La(Ra),Va=Object.assign((e,t=za)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e),r=t(n.map(t=>e[t]),(...e)=>e.reduce((e,t,r)=>(e[n[r]]=t,e),{}));return r},{withTypes:()=>Va});La({memoize:function(e,t){const n="object"==typeof t?t:{equalityCheck:t},{equalityCheck:r=Ia,maxSize:o=1,resultEqualityCheck:i}=n,a=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;const{length:r}=t;for(let o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(r);let s=0;const l=o<=1?function(e){let t;return{get:n=>t&&e(t.key,n)?t.value:Ta,put(e,n){t={key:e,value:n}},getEntries:()=>t?[t]:[],clear(){t=void 0}}}(a):function(e,t){let n=[];function r(e){const r=n.findIndex(n=>t(e,n.key));if(r>-1){const e=n[r];return r>0&&(n.splice(r,1),n.unshift(e)),e.value}return Ta}return{get:r,put:function(t,o){r(t)===Ta&&(n.unshift({key:t,value:o}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(o,a);function c(){let t=l.get(arguments);if(t===Ta){if(t=e.apply(null,arguments),s++,i){const e=l.getEntries().find(e=>i(e.value,t));e&&(t=e.value,0!==s&&s--)}l.put(arguments,t)}return t}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c},memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const Ba=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("production"!==process.env.NODE_ENV?"Unsupported number of selectors":P(1));let s;if(!e)throw new Error("Missing arguments");return s=e,s};var Fa,$a={exports:{}},Ua={};var Wa,Ka,Ha={};
|
|
15
|
+
/**
|
|
16
|
+
* @license React
|
|
17
|
+
* use-sync-external-store-shim.development.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/function Ya(){return Ka||(Ka=1,"production"===process.env.NODE_ENV?$a.exports=function(){if(Fa)return Ua;Fa=1;var t=e,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useState,o=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=r({inst:{value:n,getSnapshot:t}}),c=l[0].inst,u=l[1];return i(function(){c.value=n,c.getSnapshot=t,s(c)&&u({inst:c})},[e,n,t]),o(function(){return s(c)&&u({inst:c}),e(function(){s(c)&&u({inst:c})})},[e]),a(n),n};return Ua.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:l,Ua}():$a.exports=(Wa||(Wa=1,"production"!==process.env.NODE_ENV&&function(){function t(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=e,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,i=n.useEffect,a=n.useLayoutEffect,s=n.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,u){l||void 0===n.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var f=u();r(d,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var p=(f=o({inst:{value:d,getSnapshot:u}}))[0].inst,h=f[1];return a(function(){p.value=d,p.getSnapshot=u,t(p)&&h({inst:p})},[e,d,u]),i(function(){return t(p)&&h({inst:p}),e(function(){t(p)&&h({inst:p})})},[e]),s(d),d};Ha.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ha)),$a.exports}var qa,Ga=Ya(),Xa={exports:{}},Za={};var Ja,Qa,es={};
|
|
24
|
+
/**
|
|
25
|
+
* @license React
|
|
26
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/var ts=(Qa||(Qa=1,"production"===process.env.NODE_ENV?Xa.exports=function(){if(qa)return Za;qa=1;var t=e,n=Ya(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;return Za.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!a){if(a=!0,o=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,c,u]);var p=o(e,d[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},Za}():Xa.exports=(Ja||(Ja=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=e,n=Ya(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=t.useRef,a=t.useEffect,s=t.useMemo,l=t.useDebugValue;es.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s(function(){function e(e){if(!a){if(a=!0,o=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]},[t,n,c,u]);var p=o(e,d[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),l(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),es)),Xa.exports);const ns=[];let rs;function os(e){const t=(t,n)=>{const r=j(as).current;let o;try{rs=r;for(const e of ns)e.before(r);o=e(t,n);for(const e of ns)e.after(r);r.didInitialize=!0}finally{rs=void 0}return o};return t.displayName=e.displayName||e.name,t}function is(e){return r.forwardRef(os(e))}function as(){return{didInitialize:!1}}const ss=I(19)?function(e,t,n,o,i){const a=rs;if(!a)return function(e,t,n,o,i){const a=r.useCallback(()=>t(e.getSnapshot(),n,o,i),[e,t,n,o,i]);return Ga.useSyncExternalStore(e.subscribe,a,a)}(e,t,n,o,i);const s=a.syncIndex;let l;a.syncIndex+=1,a.didInitialize?(l=a.syncHooks[s],l.store===e&&l.selector===t&&Object.is(l.a1,n)&&Object.is(l.a2,o)&&Object.is(l.a3,i)||(l.store!==e&&(a.didChangeStore=!0),l.store=e,l.selector=t,l.a1=n,l.a2=o,l.a3=i,l.didChange=!0)):(l={store:e,selector:t,a1:n,a2:o,a3:i,value:t(e.getSnapshot(),n,o,i),didChange:!1},a.syncHooks.push(l));return l.value}:function(e,t,n,r,o){return ts.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};function ls(e,t,n,r,o){return ss(e,t,n,r,o)}var cs;cs={before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);!r.didChange&&Object.is(r.value,o)||(t=!0,r.value=o,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const t of e.syncHooks)n.add(t.store);const r=[];for(const e of n)r.push(e.subscribe(t));return()=>{for(const e of r)e()}}),Ga.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}},ns.push(cs);class us{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const t=this.updateTick;for(const n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){const e={...this.state};this.setState(e)}use(e,t,n,r){return ls(this,e,t,n,r)}}class ds extends us{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){r.useDebugValue(e),qt(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){const n=this;qt(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){const t=this;if("production"!==process.env.NODE_ENV){r.useDebugValue(e,e=>Object.keys(e));const t=r.useRef(Object.keys(e)).current,n=Object.keys(e);(t.length!==n.length||t.some((e,t)=>e!==n[t]))&&console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.")}const n=Object.values(e);qt(()=>{t.update(e)},[t,...n])}useControlledProp(e,t){r.useDebugValue(e);const n=void 0!==t;if(qt(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n]),"production"!==process.env.NODE_ENV){const t=this.controlledValues??=new Map;t.has(e)||t.set(e,n);const r=t.get(e);void 0!==r&&r!==n&&console.error(`A component is changing the ${n?"":"un"}controlled state of ${e.toString()} to be ${n?"un":""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`)}}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,o){return r.useDebugValue(e),ls(this,this.selectors[e],t,n,o)}useContextCallback(e,t){r.useDebugValue(e);const n=$t(t??R);this.context[e]=n}useStateSetter(e){const t=r.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n="function"==typeof e?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{const o=n(e);if(!Object.is(r,o)){const e=r;r=o,t(o,e,this)}})}}const fs={open:Ba(e=>e.open),domReferenceElement:Ba(e=>e.domReferenceElement),referenceElement:Ba(e=>e.positionReference??e.referenceElement),floatingElement:Ba(e=>e.floatingElement),floatingId:Ba(e=>e.floatingId)};class ps extends ds{constructor(e){const{nested:t,noEmit:n,onOpenChange:r,triggerElements:o,...i}=e;super({...i,positionReference:i.referenceElement,domReferenceElement:i.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Ai(),nested:t,noEmit:n,triggerElements:o},fs)}setOpen=(e,t)=>{if(e&&this.state.open&&!er(t.event)||(this.context.dataRef.current.openEvent=e?t.event:void 0),!this.context.noEmit){const n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)}this.context.onOpenChange?.(e,t)}}function hs(e,t,n,o){const i=n.useState("isMountedByTrigger",e),a=function(e,t){const n=r.useRef(null),o=r.useRef(null);return r.useCallback(r=>{if(void 0!==e){if(null!==n.current){const e=n.current,r=o.current,i=t.context.triggerElements.getById(e);r&&i===r&&t.context.triggerElements.delete(e),n.current=null,o.current=null}null!==r&&(n.current=e,o.current=r,t.context.triggerElements.add(e,r))}},[t,e])}(e,n),s=$t(t=>{if(a(t),!t||!n.select("open"))return;const r=n.select("activeTriggerId");r!==e?null==r&&n.update({activeTriggerId:e,activeTriggerElement:t,...o}):n.update({activeTriggerElement:t,...o})});return qt(()=>{i&&n.update({activeTriggerElement:t.current,...o})},[i,n,t,...Object.values(o)]),{registerTrigger:s,isMountedByThisTrigger:i}}function ms(e){const t=e.useState("open");qt(()=>{if(t&&!e.select("activeTriggerId")&&1===e.context.triggerElements.size){const t=e.context.triggerElements.entries().next();if(!t.done){const[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function vs(e,t,n){const{mounted:o,setMounted:i,transitionStatus:a}=function(e,t=!1,n=!1){const[o,i]=r.useState(e&&t?"idle":void 0),[a,s]=r.useState(e);return e&&!a&&(s(!0),i("starting")),e||!a||"ending"===o||n||i("ending"),e||a||"ending"!==o||i(void 0),qt(()=>{if(!e&&a&&"ending"!==o&&n){const e=fo.request(()=>{i("ending")});return()=>{fo.cancel(e)}}},[e,a,o,n]),qt(()=>{if(!e||t)return;const n=fo.request(()=>{i(void 0)});return()=>{fo.cancel(n)}},[t,e]),qt(()=>{if(!e||!t)return;e&&a&&"idle"!==o&&i("starting");const n=fo.request(()=>{i("idle")});return()=>{fo.cancel(n)}},[t,e,a,i,o]),r.useMemo(()=>({mounted:a,setMounted:s,transitionStatus:o}),[a,o])}(e);t.useSyncedValues({mounted:o,transitionStatus:a});const s=$t(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return xo({enabled:!t.useState("preventUnmountingOnClose"),open:e,ref:t.context.popupRef,onComplete(){e||s()}}),{forceUnmount:s,transitionStatus:a}}class ys{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){const n=this.idMap.get(e);if(n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t),"production"!==process.env.NODE_ENV&&this.elementsSet.size!==this.idMap.size))throw new Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.")}delete(e){const t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(const t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function gs(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:new ps({open:!1,floatingElement:null,referenceElement:null,triggerElements:new ys,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0}),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:z,inactiveTriggerProps:z,popupProps:z}}const bs=Ba(e=>e.triggerIdProp??e.activeTriggerId),xs={open:Ba(e=>e.openProp??e.open),mounted:Ba(e=>e.mounted),transitionStatus:Ba(e=>e.transitionStatus),floatingRootContext:Ba(e=>e.floatingRootContext),preventUnmountingOnClose:Ba(e=>e.preventUnmountingOnClose),payload:Ba(e=>e.payload),activeTriggerId:bs,activeTriggerElement:Ba(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Ba((e,t)=>void 0!==t&&bs(e)===t),isOpenedByTrigger:Ba((e,t)=>void 0!==t&&bs(e)===t&&e.open),isMountedByTrigger:Ba((e,t)=>void 0!==t&&bs(e)===t&&e.mounted),triggerProps:Ba((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Ba(e=>e.popupProps),popupElement:Ba(e=>e.popupElement),positionerElement:Ba(e=>e.positionerElement)};function ws(e={}){const{nodeId:t,externalTree:n}=e,i=function(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=fn(),i=null!=Mi();if("production"!==process.env.NODE_ENV){const e=r.reference;e&&!wt(e)&&console.error("Cannot pass a virtual element to the `elements.reference` option,","as it must be a real DOM element. Use `context.setPositionReference()`","instead.")}const a=j(()=>new ps({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new ys,floatingId:o,nested:i,noEmit:!1})).current;return qt(()=>{const e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=wt(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),a.update(e)},[t,o,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=i,a.context.noEmit=!1,a}(e),a=e.rootContext||i,s={reference:a.useState("referenceElement"),floating:a.useState("floatingElement"),domReference:a.useState("domReferenceElement")},[l,c]=r.useState(null),u=r.useRef(null),d=Ni(n);qt(()=>{s.domReference&&(u.current=s.domReference)},[s.domReference]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:l}={},transform:c=!0,whileElementsMounted:u,open:d}=e,[f,p]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=r.useState(i);wa(h,i)||m(i);const[v,y]=r.useState(null),[g,b]=r.useState(null),x=r.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),w=r.useCallback(e=>{e!==k.current&&(k.current=e,b(e))},[]),E=s||v,O=l||g,S=r.useRef(null),k=r.useRef(null),P=r.useRef(f),A=null!=u,j=Sa(u),T=Sa(a),C=Sa(d),M=r.useCallback(()=>{if(!S.current||!k.current)return;const e={placement:t,strategy:n,middleware:h};T.current&&(e.platform=T.current),ba(S.current,k.current,e).then(e=>{const t={...e,isPositioned:!1!==C.current};N.current&&!wa(P.current,t)&&(P.current=t,o.flushSync(()=>{p(t)}))})},[h,t,n,T,C]);xa(()=>{!1===d&&P.current.isPositioned&&(P.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const N=r.useRef(!1);xa(()=>(N.current=!0,()=>{N.current=!1}),[]),xa(()=>{if(E&&(S.current=E),O&&(k.current=O),E&&O){if(j.current)return j.current(E,O,M);M()}},[E,O,M,j,A]);const I=r.useMemo(()=>({reference:S,floating:k,setReference:x,setFloating:w}),[x,w]),D=r.useMemo(()=>({reference:E,floating:O}),[E,O]),_=r.useMemo(()=>{const e={position:n,left:0,top:0};if(!D.floating)return e;const t=Oa(D.floating,f.x),r=Oa(D.floating,f.y);return c?{...e,transform:"translate("+t+"px, "+r+"px)",...Ea(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,c,D.floating,f.x,f.y]);return r.useMemo(()=>({...f,update:M,refs:I,elements:D,floatingStyles:_}),[f,M,I,D,_])}({...e,elements:{...s,...l&&{reference:l}}}),p=r.useCallback(e=>{const t=wt(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),[h,m]=r.useState(null),[v,y]=r.useState(null);a.useSyncedValue("referenceElement",h),a.useSyncedValue("domReferenceElement",wt(h)?h:null),a.useSyncedValue("floatingElement",v);const g=r.useCallback(e=>{(wt(e)||null===e)&&(u.current=e,m(e)),(wt(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!wt(e))&&f.refs.setReference(e)},[f.refs,m]),b=r.useCallback(e=>{y(e),f.refs.setFloating(e)},[f.refs]),x=r.useMemo(()=>({...f.refs,setReference:g,setFloating:b,setPositionReference:p,domReference:u}),[f.refs,g,b,p]),w=r.useMemo(()=>({...f.elements,domReference:s.domReference}),[f.elements,s.domReference]),E=a.useState("open"),O=a.useState("floatingId"),S=r.useMemo(()=>({...f,dataRef:a.context.dataRef,open:E,onOpenChange:a.setOpen,events:a.context.events,floatingId:O,refs:x,elements:w,nodeId:t,rootStore:a}),[f,x,w,t,a,E,O]);return qt(()=>{a.context.dataRef.current.floatingContext=S;const e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=S)}),r.useMemo(()=>({...f,context:S,refs:x,elements:w,rootStore:a}),[f,x,w,S,a])}function Es(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:o}=e,i=fn(),a=null!=Mi(),s=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(r?"popupElement":"positionerElement"),u=t.context.triggerElements,d=j(()=>new ps({open:s,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:o,floatingId:i,nested:a,noEmit:n})).current;return qt(()=>{const e={open:s,floatingId:i,referenceElement:l,floatingElement:c};wt(l)&&(e.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(e.positionReference=l),d.update(e)},[s,i,l,c,d]),d.context.onOpenChange=o,d.context.nested=a,d.context.noEmit=n,d}const Os=Cn&&jn;function Ss(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:o,dataRef:i}=n.context,{enabled:a=!0,delay:s}=t,l=r.useRef(!1),c=r.useRef(null),u=bn(),d=r.useRef(!0);r.useEffect(()=>{const e=n.select("domReferenceElement");if(!a)return;const t=gt(e);function r(){const e=n.select("domReferenceElement");!n.select("open")&&Et(e)&&e===Bn(wn(e))&&(l.current=!0)}function o(){d.current=!0}function i(){d.current=!1}return t.addEventListener("blur",r),Os&&(t.addEventListener("keydown",o,!0),t.addEventListener("pointerdown",i,!0)),()=>{t.removeEventListener("blur",r),Os&&(t.removeEventListener("keydown",o,!0),t.removeEventListener("pointerdown",i,!0))}},[n,a]),r.useEffect(()=>{if(a)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){if(e.reason===Oo||e.reason===To){const e=n.select("domReferenceElement");wt(e)&&(c.current=e,l.current=!0)}}},[o,a,n]);const f=r.useMemo(()=>({onMouseLeave(){l.current=!1,c.current=null},onFocus(e){const t=e.currentTarget;if(l.current){if(c.current===t)return;l.current=!1,c.current=null}const r=Un(e.nativeEvent);if(wt(r))if(Os&&!e.relatedTarget){if(!d.current&&!Kn(r))return}else if(!function(e){if(!e||Mn)return!0;try{return e.matches(":focus-visible")}catch(e){return!0}}(r))return;const o=$n(e.relatedTarget,n.context.triggerElements),{nativeEvent:i,currentTarget:a}=e,f="function"==typeof s?s():s;n.select("open")&&o||0===f||void 0===f?n.setOpen(!0,Io(ko,i,a)):u.start(f,()=>{l.current||n.setOpen(!0,Io(ko,i,a))})},onBlur(e){l.current=!1,c.current=null;const t=e.relatedTarget,r=e.nativeEvent,o=wt(t)&&t.hasAttribute(li("focus-guard"))&&"outside"===t.getAttribute("data-type");u.start(0,()=>{const e=n.select("domReferenceElement"),a=Bn(e?e.ownerDocument:document);if(!t&&a===e)return;if(Fn(i.current.floatingContext?.refs.floating.current,a)||Fn(e,a)||o)return;$n(t??a,n.context.triggerElements)||n.setOpen(!1,Io(ko,r))})}}),[i,n,u,s]);return r.useMemo(()=>a?{reference:f,trigger:f}:{},[a,f])}const ks=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${_n}`;class Ps{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new gn,this.restTimeout=new gn,this.handleCloseOptions=void 0}static create(){return new Ps}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}function As(e){e.performedPointerEventsMutation&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null)}function js(e){const t=j(Ps.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),yn(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Ts(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),{dataRef:s}=n.context,{enabled:l=!0,closeDelay:c=0}=t,u=js(n),d=Ni(),f=Mi(),p=$t(()=>ni(s.current.openEvent?.type,u.interactedInside)),h=$t(()=>{const e=s.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),m=$t(e=>$n(e,n.context.triggerElements)),v=r.useCallback(e=>{const t=ei(c,"close",u.pointerType),r=()=>{n.setOpen(!1,Io(So,e)),d?.events.emit("floating.closed",e)};t?u.openChangeTimeout.start(t,r):(u.openChangeTimeout.clear(),r())},[c,n,u,d]),y=$t(()=>{As(u)}),g=$t(e=>{const t=Un(e);var n;(n=t)&&Boolean(n.closest(ks))?u.interactedInside=null!=t?.closest("[aria-haspopup]"):u.interactedInside=!1});qt(()=>{o||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,y())},[o,u,y]),r.useEffect(()=>y,[y]),qt(()=>{if(l&&o&&u.handleCloseOptions?.blockPointerEvents&&h()&&wt(a)&&i){const e=a,t=i,n=wn(i),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;r&&(r.style.pointerEvents="");const o=u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??r??e.closest("[data-rootownerid]")??n.body;return function(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t;As(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}(u,{scopeElement:o,referenceElement:e,floatingElement:t}),()=>{y()}}},[l,o,a,i,u,h,d,f,y]);const b=bn();r.useEffect(()=>{if(!l)return;function e(){u.openChangeTimeout.clear(),b.clear(),d?.events.off("floating.closed",r),y()}function t(e){d&&f&&qn(d.nodesRef.current,f).length>0?d.events.on("floating.closed",r):m(e.relatedTarget)||(u.handler?u.handler(e):(y(),p()||v(e)))}function r(e){!d||!f||qn(d.nodesRef.current,f).length>0||b.start(0,()=>{d.events.off("floating.closed",r),n.setOpen(!1,Io(So,e)),d.events.emit("floating.closed",e)})}const o=i;return o&&(o.addEventListener("mouseenter",e),o.addEventListener("mouseleave",t),o.addEventListener("pointerdown",g,!0)),()=>{o&&(o.removeEventListener("mouseenter",e),o.removeEventListener("mouseleave",t),o.removeEventListener("pointerdown",g,!0)),d?.events.off("floating.closed",r)}},[l,i,n,s,p,m,v,y,g,u,d,f,b])}const Cs={current:null};function Ms(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:i,events:a}=n.context,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0,triggerElementRef:p=Cs,externalTree:h,isActiveTrigger:m=!0,getHandleCloseContext:v}=t,y=Ni(h),g=js(n),b=oi(c),x=oi(l),w=oi(d),E=oi(s);m&&(g.handleCloseOptions=b.current?.__options);const O=$t(()=>ni(i.current.openEvent?.type,g.interactedInside)),S=$t(e=>$n(e,n.context.triggerElements)),k=$t((e,t,r)=>{const o=n.context.triggerElements;if(o.hasElement(t))return!e||!Fn(e,t);if(!wt(r))return!1;const i=r;return o.hasMatchingElement(e=>Fn(e,i))&&(!e||!Fn(e,i))}),P=r.useCallback((e,t=!0)=>{const r=ei(x.current,"close",g.pointerType);r?g.openChangeTimeout.start(r,()=>{n.setOpen(!1,Io(So,e)),y?.events.emit("floating.closed",e)}):t&&(g.openChangeTimeout.clear(),n.setOpen(!1,Io(So,e)),y?.events.emit("floating.closed",e))},[x,n,g,y]),A=$t(()=>{if(!g.handler)return;wn(n.select("domReferenceElement")).removeEventListener("mousemove",g.handler),g.handler=void 0});r.useEffect(()=>A,[A]);const j=$t(()=>{As(g)});return r.useEffect(()=>{if(s)return a.on("openchange",e),()=>{a.off("openchange",e)};function e(e){e.open||(A(),g.openChangeTimeout.clear(),g.restTimeout.clear(),g.blockMouseMove=!0,g.restTimeoutPending=!1)}},[s,a,g,A]),r.useEffect(()=>{if(!s)return;const e=p.current??(m?n.select("domReferenceElement"):null);if(wt(e))return f&&e.addEventListener("mousemove",t,{once:!0}),e.addEventListener("mouseenter",t),e.addEventListener("mouseleave",r),()=>{f&&e.removeEventListener("mousemove",t),e.removeEventListener("mouseenter",t),e.removeEventListener("mouseleave",r)};function t(e){if(g.openChangeTimeout.clear(),g.blockMouseMove=!1,u&&!Qn(g.pointerType))return;if(ti(w.current)>0&&!ei(x.current,"open"))return;const t=ei(x.current,"open",g.pointerType),r=e.currentTarget??null,o=n.select("domReferenceElement"),i=null!=r&&k(o,r,e.target),a=n.select("open"),s=!a||i;i&&a?n.setOpen(!0,Io(So,e,r)):t?g.openChangeTimeout.start(t,()=>{s&&n.setOpen(!0,Io(So,e,r))}):s&&n.setOpen(!0,Io(So,e,r))}function r(e){if(O())return void j();A();const t=wn(n.select("domReferenceElement"));g.restTimeout.clear(),g.restTimeoutPending=!1;const r=i.current.floatingContext??v?.();if(S(e.relatedTarget))return;if(b.current&&r){n.select("open")||g.openChangeTimeout.clear();const o=p.current;return g.handler=b.current({...r,tree:y,x:e.clientX,y:e.clientY,onClose(){j(),A(),E.current&&!O()&&o===n.select("domReferenceElement")&&P(e,!0)}}),t.addEventListener("mousemove",g.handler),void g.handler(e)}("touch"!==g.pointerType||!Fn(n.select("floatingElement"),e.relatedTarget))&&P(e)}},[A,j,i,x,P,n,s,b,g,m,k,O,S,u,f,w,p,y,E,v]),r.useMemo(()=>{if(s)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e,r=e.currentTarget,i=n.select("domReferenceElement"),a=n.select("open"),s=k(i,r,e.target);if(u&&!Qn(g.pointerType))return;const l=ti(w.current);function c(){if(g.restTimeoutPending=!1,O())return;const e=n.select("open");g.blockMouseMove||e&&!s||n.setOpen(!0,Io(So,t,r))}a&&!s||0===l||!s&&g.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(g.restTimeout.clear(),"touch"===g.pointerType?o.flushSync(()=>{c()}):s&&a?c():(g.restTimeoutPending=!0,g.restTimeout.start(l,c)))}};function e(e){g.pointerType=e.pointerType}},[s,g,O,k,u,n,w])}function Ns(e=[]){const t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),o=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=r.useCallback(t=>Is(t,e,"reference"),t),s=r.useCallback(t=>Is(t,e,"floating"),n),l=r.useCallback(t=>Is(t,e,"item"),o),c=r.useCallback(t=>Is(t,e,"trigger"),i);return r.useMemo(()=>({getReferenceProps:a,getFloatingProps:s,getItemProps:l,getTriggerProps:c}),[a,s,l,c])}function Is(e,t,n){const r=new Map,o="item"===n,i={};"floating"===n&&(i.tabIndex=-1,i[Nn]="");for(const t in e)o&&e&&(t===In||t===Dn)||(i[t]=e[t]);for(let a=0;a<t.length;a+=1){let s;const l=t[a]?.[n];s="function"==typeof l?e?l(e):null:l,s&&Ds(i,s,o,r)}return Ds(i,e,o,r),i}function Ds(e,t,n,r){for(const o in t){const i=t[o];(!n||o!==In&&o!==Dn)&&(o.startsWith("on")?(r.has(o)||r.set(o,[]),"function"==typeof i&&(r.get(o)?.push(i),e[o]=(...e)=>r.get(o)?.map(t=>t(...e)).find(e=>void 0!==e))):e[o]=i)}}function _s(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Rs(e,t){return _s(t,e===zn||e===Vn,e===Rn||e===Ln)}function Ls(e,t,n){return _s(t,e===Vn,n?e===Rn:e===Ln)||"Enter"===e||" "===e||""===e}function zs(e,t){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),s=n.context.dataRef,{listRef:l,activeIndex:c,onNavigate:u=()=>{},enabled:d=!0,selectedIndex:f=null,allowEscape:p=!1,loopFocus:h=!1,nested:m=!1,rtl:v=!1,virtual:y=!1,focusItemOnOpen:g="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:x=!0,disabledIndices:w,orientation:E="vertical",parentOrientation:O,cols:S=1,id:k,resetOnPointerLeave:P=!0,externalTree:A}=t;"production"!==process.env.NODE_ENV&&(p&&(h||console.warn("`useListNavigation` looping must be enabled to allow escaping."),y||console.warn("`useListNavigation` must be virtual to allow escaping.")),"vertical"===E&&S>1&&console.warn("In grid list navigation mode (`cols` > 1), the `orientation` should",'be either "horizontal" or "both".'));const j=oi(Yn(i)),T=Mi(),C=Ni(A);qt(()=>{s.current.orientation=E},[s,E]);const M=Hn(a),N=r.useRef(g),I=r.useRef(f??-1),D=r.useRef(null),_=r.useRef(!0),R=$t(e=>{u(-1===I.current?null:I.current,e)}),L=r.useRef(R),z=r.useRef(!!i),V=r.useRef(o),B=r.useRef(!1),F=r.useRef(!1),$=oi(w),U=oi(o),W=oi(f),K=oi(P),H=$t(()=>{function e(e){y?C?.events.emit("virtualfocus",e):ui(e,{sync:B.current,preventScroll:!0})}const t=l.current[I.current],n=F.current;t&&e(t);(B.current?e=>e():requestAnimationFrame)(()=>{const r=l.current[I.current]||t;if(!r)return;t||e(r);q&&(n||!_.current)&&r.scrollIntoView?.({block:"nearest",inline:"nearest"})})});qt(()=>{d&&(o&&i?(I.current=f??-1,N.current&&null!=f&&(F.current=!0,R())):z.current&&(I.current=-1,L.current()))},[d,o,i,f,R]),qt(()=>{if(d)if(o){if(i)if(null==c){if(B.current=!1,null!=W.current)return;if(z.current&&(I.current=-1,H()),(!V.current||!z.current)&&N.current&&(null!=D.current||!0===N.current&&null==D.current)){let e=0;const t=()=>{if(null==l.current[0]){if(e<2){(e?requestAnimationFrame:queueMicrotask)(t)}e+=1}else I.current=null==D.current||Ls(D.current,E,v)||m?Ar(l):jr(l),D.current=null,R()};t()}}else Pr(l,c)||(I.current=c,H(),F.current=!1)}else B.current=!1},[d,o,i,c,W,m,l,E,v,R,H,$]),qt(()=>{if(!d||i||!C||y||!z.current)return;const e=C.nodesRef.current,t=e.find(e=>e.id===T)?.context?.elements.floating,n=Bn(wn(i)),r=e.some(e=>e.context&&Fn(e.context.elements.floating,n));t&&!r&&_.current&&t.focus({preventScroll:!0})},[d,i,C,T,y]),qt(()=>{L.current=R,V.current=o,z.current=!!i}),qt(()=>{o||(D.current=null,N.current=g)},[o,g]);const Y=null!=c,q=r.useMemo(()=>{function e(e){if(!U.current)return;const t=l.current.indexOf(e.currentTarget);-1!==t&&I.current!==t&&(I.current=t,R(e))}return{onFocus(t){B.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){B.current=!0,F.current=!1,b&&e(t)},onPointerLeave(e){if(!U.current||!_.current||"touch"===e.pointerType)return;B.current=!0;const t=e.relatedTarget;if(b&&!l.current.includes(t)&&K.current&&(ui(null,{sync:!0}),I.current=-1,R(e),!y)){const e=j.current,t=Bn(wn(e));e&&Fn(e,t)&&e.focus({preventScroll:!0})}}}},[U,j,b,l,R,K,y]),G=r.useCallback(()=>O??C?.nodesRef.current.find(e=>e.id===T)?.context?.dataRef?.current.orientation,[T,C,O]),X=$t(e=>{if(_.current=!1,B.current=!0,229===e.which)return;if(!U.current&&e.currentTarget===j.current)return;if(m&&function(e,t,n,r){return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:_s(t,n?e===Ln:e===Rn,e===zn)}(e.key,E,v,S))return Rs(e.key,G())||Xn(e),n.setOpen(!1,Io(Co,e.nativeEvent)),void(Et(a)&&(y?C?.events.emit("virtualfocus",a):a.focus()));const t=I.current,r=Ar(l,w),i=jr(l,w);if(M||("Home"===e.key&&(Xn(e),I.current=r,R(e)),"End"===e.key&&(Xn(e),I.current=i,R(e))),S>1){const t=Array.from({length:l.current.length},()=>({width:1,height:1})),n=function(e,t){const n=[];let r=0;return e.forEach(({width:e,height:o},i)=>{if(e>t&&"production"!==process.env.NODE_ENV)throw new Error(`[Floating UI]: Invalid grid - item width at index ${i} is greater than grid columns`);let a=!1;for(;!a;){const s=[];for(let n=0;n<e;n+=1)for(let e=0;e<o;e+=1)s.push(r+n+e*t);r%t+e<=t&&s.every(e=>null==n[e])?(s.forEach(e=>{n[e]=i}),a=!0):r+=1}}),[...n]}(t,S),o=n.findIndex(e=>null!=e&&!Nr(l,e,w)),a=n.reduce((e,t,n)=>null==t||Nr(l,t,w)?e:n,-1),s=n[function(e,{event:t,orientation:n,loopFocus:r,rtl:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}){let d,f=c;if(t.key===zn?d="up":t.key===Vn&&(d="down"),d){const n=[],o=[];let p=!1,h=0;{let t=null,r=-1;e.current.forEach((e,i)=>{if(null==e)return;h+=1;const a=e.closest('[role="row"]');a&&(p=!0),a===t&&-1!==r||(t=a,r+=1,n[r]=[]),n[r].push(i),o[i]=r})}let m=!1,v=0;if(p)for(const e of n){const t=e.length;t>v&&(v=t),t!==i&&(m=!0)}const y=m&&h<e.current.length,g=v||i,b=t=>{if(!m||-1===c)return;const i=o[c];if(null==i)return;const s=n[i].indexOf(c),l="up"===t?-1:1;for(let t=i+l,o=0;o<n.length;o+=1,t+=l){if(t<0||t>=n.length){if(!r||y)return;t=t<0?n.length-1:0}const o=n[t];for(let t=Math.min(s,o.length-1);t>=0;t-=1){const n=o[t];if(!Nr(e,n,a))return n}}},x=t=>{if(!y||-1===c)return;const n=c%g,o="up"===t?-g:g,i=l-l%g,s=ir(l/g)+1;for(let t=c-n+o,u=0;u<s;u+=1,t+=o){if(t<0||t>l){if(!r)return;t=t<0?i:0}const o=Math.min(t+g-1,l);for(let r=Math.min(t+n,o);r>=t;r-=1)if(!Nr(e,r,a))return r}};u&&Xn(t);const w=b(d)??x(d);if(void 0!==w)f=w;else if(-1===c)f="up"===d?l:s;else if(f=Tr(e,{startingIndex:c,amount:g,decrement:"up"===d,disabledIndices:a}),r){if("up"===d&&(c-g<s||f<0)){const e=c%g,t=l%g,n=l-(t-e);f=t===e?l:t>e?n:n-g}"down"===d&&c+g>l&&(f=Tr(e,{startingIndex:c%g-g,amount:g,disabledIndices:a}))}Pr(e,f)&&(f=c)}if("both"===n){const n=ir(c/i);t.key===(o?Rn:Ln)&&(u&&Xn(t),c%i!==i-1?(f=Tr(e,{startingIndex:c,disabledIndices:a}),r&&kr(f,i,n)&&(f=Tr(e,{startingIndex:c-c%i-1,disabledIndices:a}))):r&&(f=Tr(e,{startingIndex:c-c%i-1,disabledIndices:a})),kr(f,i,n)&&(f=c)),t.key===(o?Ln:Rn)&&(u&&Xn(t),c%i!==0?(f=Tr(e,{startingIndex:c,decrement:!0,disabledIndices:a}),r&&kr(f,i,n)&&(f=Tr(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):r&&(f=Tr(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),kr(f,i,n)&&(f=c));const s=ir(l/i)===n;Pr(e,f)&&(f=r&&s?t.key===(o?Ln:Rn)?l:Tr(e,{startingIndex:c-c%i-1,disabledIndices:a}):c)}return f}({current:n.map(e=>null!=e?l.current[e]:null)},{event:e,orientation:E,loopFocus:h,rtl:v,cols:S,disabledIndices:Mr([...("function"!=typeof w?w:null)||l.current.map((e,t)=>Nr(l,t,w)?t:void 0),void 0],n),minIndex:o,maxIndex:a,prevIndex:Cr(I.current>i?r:I.current,t,n,S,e.key===Vn?"bl":e.key===(v?Rn:Ln)?"tr":"tl"),stopEvent:!0})];if(null!=s&&(I.current=s,R(e)),"both"===E)return}if(Rs(e.key,E)){if(Xn(e),o&&!y&&Bn(e.currentTarget.ownerDocument)===e.currentTarget)return I.current=Ls(e.key,E,v)?r:i,void R(e);Ls(e.key,E,v)?h?t>=i?p&&t!==l.current.length?I.current=-1:(B.current=!1,I.current=r):I.current=Tr(l,{startingIndex:t,disabledIndices:w}):I.current=Math.min(i,Tr(l,{startingIndex:t,disabledIndices:w})):h?t<=r?p&&-1!==t?I.current=l.current.length:(B.current=!1,I.current=i):I.current=Tr(l,{startingIndex:t,decrement:!0,disabledIndices:w}):I.current=Math.max(r,Tr(l,{startingIndex:t,decrement:!0,disabledIndices:w})),Pr(l,I.current)&&(I.current=-1),R(e)}}),Z=r.useMemo(()=>y&&o&&Y&&{"aria-activedescendant":`${k}-${c}`},[y,o,Y,k,c]),J=r.useMemo(()=>({"aria-orientation":"both"===E?void 0:E,...M?{}:Z,onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&o&&!y){const t=Un(e.nativeEvent);if(t&&!Fn(j.current,t))return;return Xn(e),n.setOpen(!1,Io(jo,e.nativeEvent)),void(Et(a)&&a.focus())}X(e)},onPointerMove(){_.current=!0}}),[Z,X,j,E,M,n,o,y,a]),Q=r.useMemo(()=>{function e(e){"auto"===g&&Zn(e.nativeEvent)&&(N.current=!y)}function t(e){N.current=g,"auto"===g&&Jn(e.nativeEvent)&&(N.current=!0)}return{onKeyDown(e){const t=n.select("open");_.current=!1;const r=e.key.startsWith("Arrow"),o=function(e,t,n){return _s(t,n?e===Rn:e===Ln,e===Vn)}(e.key,G(),v),i=Rs(e.key,E),a=(m?o:i)||"Enter"===e.key||""===e.key.trim();if(y&&t)return X(e);if(t||x||!r){if(a){const t=Rs(e.key,G());D.current=m&&t?null:e.key}m?o&&(Xn(e),t?(I.current=Ar(l,$.current),R(e)):n.setOpen(!0,Io(Co,e.nativeEvent,e.currentTarget))):i&&(null!=W.current&&(I.current=W.current),Xn(e),!t&&x?n.setOpen(!0,Io(Co,e.nativeEvent,e.currentTarget)):X(e),t&&R(e))}},onFocus(e){n.select("open")&&!y&&(I.current=-1,R(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[X,$,g,l,m,R,n,x,E,G,v,W,y]),ee=r.useMemo(()=>({...Z,...Q}),[Z,Q]);return r.useMemo(()=>d?{reference:ee,floating:J,item:q,trigger:Q}:{},[d,ee,J,Q,q])}const Vs=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Bs(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingId"),a=n.useState("domReferenceElement"),s=n.useState("floatingElement"),{role:l="dialog"}=t,c=fn(),u=a?.id||c,d=r.useMemo(()=>Yn(s)?.id||i,[s,i]),f=Vs.get(l)??l,p=null!=Mi(),h=r.useMemo(()=>"tooltip"===f||"label"===l?z:{"aria-haspopup":"alertdialog"===f?"dialog":f,"aria-expanded":"false",..."listbox"===f&&{role:"combobox"},..."menu"===f&&p&&{role:"menuitem"},..."select"===l&&{"aria-autocomplete":"none"},..."combobox"===l&&{"aria-autocomplete":"list"}},[f,p,l]),m=r.useMemo(()=>{if("tooltip"===f||"label"===l)return{["aria-"+("label"===l?"labelledby":"describedby")]:o?d:void 0};return{...h,"aria-expanded":o?"true":"false","aria-controls":o?d:void 0,..."menu"===f&&{id:u}}},[f,d,o,u,l,h]),v=r.useMemo(()=>{const e={id:d,...f&&{role:f}};return"tooltip"===f||"label"===l?e:{...e,..."menu"===f&&{"aria-labelledby":u}}},[f,d,u,l]),y=r.useCallback(({active:e,selected:t})=>{const n={role:"option",...e&&{id:`${d}-fui-option`}};switch(l){case"select":case"combobox":return{...n,"aria-selected":t}}return{}},[d,l]);return r.useMemo(()=>({reference:m,floating:v,item:y,trigger:h}),[m,v,h,y])}const Fs=.1*.1,$s=.5;function Us(e,t,n,r,o,i){return r>=t!=i>=t&&e<=(o-n)*(t-r)/(i-r)+n}function Ws(e,t,n,r,o,i,a,s,l,c){let u=!1;return Us(e,t,n,r,o,i)&&(u=!u),Us(e,t,o,i,a,s)&&(u=!u),Us(e,t,a,s,l,c)&&(u=!u),Us(e,t,l,c,n,r)&&(u=!u),u}function Ks(e,t,n,r,o,i){const a=Math.min(n,o),s=Math.max(n,o),l=Math.min(r,i),c=Math.max(r,i);return e>=a&&e<=s&&t>=l&&t<=c}function Hs(e={}){const{blockPointerEvents:t=!1}=e,n=new gn,r=({x:e,y:t,placement:r,elements:o,onClose:i,nodeId:a,tree:s})=>{const l=r?.split("-")[0];let c=!1,u=null,d=null,f="undefined"!=typeof performance?performance.now():0;return function(r){n.clear();const p=o.domReference,h=o.floating;if(!p||!h||null==l||null==e||null==t)return;const{clientX:m,clientY:v}=r,y=Un(r),g="mouseleave"===r.type,b=Fn(h,y),x=Fn(p,y);if(b&&(c=!0,!g))return;if(x&&(c=!1,!g))return void(c=!0);if(g&&wt(r.relatedTarget)&&Fn(h,r.relatedTarget))return;function w(){return Boolean(s&&qn(s.nodesRef.current,a).length>0)}function E(){w()||(n.clear(),i())}if(w())return;const O=p.getBoundingClientRect(),S=h.getBoundingClientRect(),k=e>S.right-S.width/2,P=t>S.bottom-S.height/2,A=S.width>O.width,j=S.height>O.height,T=(A?O:S).left,C=(A?O:S).right,M=(j?O:S).top,N=(j?O:S).bottom;if("top"===l&&t>=O.bottom-1||"bottom"===l&&t<=O.top+1||"left"===l&&e>=O.right-1||"right"===l&&e<=O.left+1)return void E();let I=!1;switch(l){case"top":I=Ks(m,v,T,O.top+1,C,S.bottom-1);break;case"bottom":I=Ks(m,v,T,S.top+1,C,O.bottom-1);break;case"left":I=Ks(m,v,S.right-1,N,O.left+1,M);break;case"right":I=Ks(m,v,O.right-1,N,S.left+1,M)}if(I)return;if(c&&!function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}(m,v,O))return void E();if(!g&&function(e,t){const n=performance.now(),r=n-f;if(null===u||null===d||0===r)return u=e,d=t,f=n,!1;const o=e-u,i=t-d;return u=e,d=t,f=n,o*o+i*i<r*r*Fs}(m,v))return void E();let D=!1;switch(l){case"top":{const n=A?.25:2,r=A||k?e+n:e-n,o=A?e-n:k?e+n:e-n,i=t+$s+1,a=k||A?S.bottom-$s:S.top,s=k?A?S.bottom-$s:S.top:S.bottom-$s;D=Ws(m,v,r,i,o,i,S.left,a,S.right,s);break}case"bottom":{const n=A?.25:2,r=A||k?e+n:e-n,o=A?e-n:k?e+n:e-n,i=t-$s,a=k||A?S.top+$s:S.bottom,s=k?A?S.top+$s:S.bottom:S.top+$s;D=Ws(m,v,r,i,o,i,S.left,a,S.right,s);break}case"left":{const n=j?.25:2,r=j||P?t+n:t-n,o=j?t-n:P?t+n:t-n,i=e+$s+1,a=P||j?S.right-$s:S.left,s=P?j?S.right-$s:S.left:S.right-$s;D=Ws(m,v,a,S.top,s,S.bottom,i,r,i,o);break}case"right":{const n=j?.25:2,r=j||P?t+n:t-n,o=j?t-n:P?t+n:t-n,i=e-$s,a=P||j?S.left+$s:S.right,s=P?j?S.left+$s:S.right:S.left+$s;D=Ws(m,v,i,r,i,o,a,S.top,s,S.bottom);break}}D?c||n.start(40,E):E()}};return r.__options={blockPointerEvents:t},r}let Ys=function(e){return e.nestedDialogs="--nested-dialogs",e}({}),qs=function(e){return e[e.open=Bo.open]="open",e[e.closed=Bo.closed]="closed",e[e.startingStyle=Bo.startingStyle]="startingStyle",e[e.endingStyle=Bo.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e}({});const Gs=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(Gs.displayName="DialogPortalContext");const Xs="ArrowUp",Zs="ArrowDown",Js="ArrowLeft",Qs="ArrowRight",el="Home",tl=new Set([Js,Qs]),nl=new Set([Xs,Zs]),rl=new Set([...tl,...nl]);new Set([...rl,el,"End"]);const ol=new Set([Xs,Zs,Js,Qs,el,"End"]),il={...Go,...go,nestedDialogOpen:e=>e?{[qs.nestedDialogOpen]:""}:null},al=r.forwardRef(function(e,t){const{className:n,finalFocus:o,initialFocus:i,render:a,...s}=e,{store:l}=Vo(),c=l.useState("descriptionElementId"),u=l.useState("disablePointerDismissal"),d=l.useState("floatingRootContext"),f=l.useState("popupProps"),h=l.useState("modal"),m=l.useState("mounted"),v=l.useState("nested"),y=l.useState("nestedOpenDialogCount"),g=l.useState("open"),b=l.useState("openMethod"),x=l.useState("titleElementId"),w=l.useState("transitionStatus"),E=l.useState("role");!function(){const e=r.useContext(Gs);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Dialog.Portal> is missing.":P(26))}(),xo({open:g,ref:l.context.popupRef,onComplete(){g&&l.context.onOpenChangeComplete?.(!0)}});const O=void 0===i?function(e){return"touch"!==e||l.context.popupRef.current}:i,S=U("div",e,{state:{open:g,nested:v,transitionStatus:w,nestedDialogOpen:y>0},props:[f,{"aria-labelledby":x??void 0,"aria-describedby":c??void 0,role:E,tabIndex:-1,hidden:!m,onKeyDown(e){ol.has(e.key)&&e.stopPropagation()},style:{[Ys.nestedDialogs]:y}},s],ref:[t,l.context.popupRef,l.useStateSetter("popupElement")],stateAttributesMapping:il});return p.jsx(Bi,{context:d,openInteractionType:b,disabled:!m,closeOnFocusOut:!u,initialFocus:O,returnFocus:o,modal:!1!==h,restoreFocus:"popup",children:S})});function sl(e){return I(19)?e:e?"true":void 0}"production"!==process.env.NODE_ENV&&(al.displayName="DialogPopup");const ll=r.forwardRef(function(e,t){const{cutout:n,...r}=e;let o;if(n){const e=n?.getBoundingClientRect();o=`polygon(\n 0% 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%,\n 0% 0%,\n ${e.left}px ${e.top}px,\n ${e.left}px ${e.bottom}px,\n ${e.right}px ${e.bottom}px,\n ${e.right}px ${e.top}px,\n ${e.left}px ${e.top}px\n )`}return p.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});"production"!==process.env.NODE_ENV&&(ll.displayName="InternalBackdrop");const cl=r.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:o}=Vo(),i=o.useState("mounted"),a=o.useState("modal"),s=o.useState("open");return i||n?p.jsx(Gs.Provider,{value:n,children:p.jsxs(Pi,{ref:t,...r,children:[i&&!0===a&&p.jsx(ll,{ref:o.context.internalBackdropRef,inert:sl(!s)}),e.children]})}):null});function ul(e){const t=r.useRef(!0);t.current&&(t.current=!1,e())}"production"!==process.env.NODE_ENV&&(cl.displayName="DialogPortal");let dl={},fl={},pl="";function hl(e){const t=wn(e),n=t.documentElement,r=t.body,o=gt(n);let i=0,a=0,s=!1;const l=fo.create();if(Pn&&1!==(o.visualViewport?.scale??1))return()=>{};function c(){const t=o.getComputedStyle(n),l=o.getComputedStyle(r),c=(t.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";i=n.scrollTop,a=n.scrollLeft,dl={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},pl=n.style.scrollBehavior,fl={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f="scroll"===t.overflowY||"scroll"===l.overflowY,p="scroll"===t.overflowX||"scroll"===l.overflowX,h=Math.max(0,o.innerWidth-r.clientWidth),m=Math.max(0,o.innerHeight-r.clientHeight),v=parseFloat(l.marginTop)+parseFloat(l.marginBottom),y=parseFloat(l.marginLeft)+parseFloat(l.marginRight),g=St(n)?n:r;if(s=function(e){if("undefined"==typeof CSS||!CSS.supports||!CSS.supports("scrollbar-gutter","stable")||"undefined"==typeof document)return!1;const t=wn(e),n=t.documentElement,r=t.body,o=St(n)?n:r,i=o.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",o.style.overflowY="scroll";const s=o.offsetWidth;o.style.overflowY="hidden";const l=o.offsetWidth;return o.style.overflowY=i,n.style.scrollbarGutter=a,s===l}(e),s)return n.style.scrollbarGutter=c,g.style.overflowY="hidden",void(g.style.overflowX="hidden");Object.assign(n.style,{scrollbarGutter:c,overflowY:"hidden",overflowX:"hidden"}),(u||f)&&(n.style.overflowY="scroll"),(d||p)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:v||m?`calc(100dvh - ${v+m}px)`:"100dvh",width:y||h?`calc(100vw - ${y+h}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=i,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function u(){Object.assign(n.style,dl),Object.assign(r.style,fl),s||(n.scrollTop=i,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=pl)}function d(){u(),l.request(c)}return c(),o.addEventListener("resize",d),()=>{l.cancel(),u(),"function"==typeof o.removeEventListener&&o.removeEventListener("resize",d)}}const ml=new class{lockCount=0;restore=null;timeoutLock=gn.create();timeoutUnlock=gn.create();acquire(e){return this.lockCount+=1,1===this.lockCount&&null===this.restore&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{this.lockCount-=1,0===this.lockCount&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{0===this.lockCount&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(0===this.lockCount||null!==this.restore)return;const t=wn(e).documentElement,n=gt(t).getComputedStyle(t).overflowY;if("hidden"===n||"clip"===n)return void(this.restore=R);const r=An||!function(e){if("undefined"==typeof document)return!1;const t=wn(e);return gt(t).innerWidth-t.documentElement.clientWidth>0}(e);this.restore=r?function(e){const t=wn(e),n=t.documentElement,r=t.body,o=St(n)?n:r,i={overflowY:o.style.overflowY,overflowX:o.style.overflowX};return Object.assign(o.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(o.style,i)}}(e):hl(e)}};function vl(e=!0,t=null){qt(()=>{if(e)return ml.acquire(t)},[e,t])}function yl(e){const[t,n]=r.useState(null),o=$t((t,r)=>{e||n(r||(An?"touch":""))});!function(e,t){const n=r.useRef(e),o=$t(t);qt(()=>{n.current!==e&&o(n.current)},[e,o]),qt(()=>{n.current=e},[e])}(e,t=>{t&&!e&&n(null)});const{onClick:i,onPointerDown:a}=function(e){const t=r.useRef(""),n=r.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:r.useCallback(n=>{0!==n.detail?(e(n,"pointerType"in n?n.pointerType:t.current),t.current=""):e(n,"keyboard")},[e]),onPointerDown:n}}(o);return r.useMemo(()=>({openMethod:t,triggerProps:{onClick:i,onPointerDown:a}}),[t,i,a])}const gl={...xs,modal:Ba(e=>e.modal),nested:Ba(e=>e.nested),nestedOpenDialogCount:Ba(e=>e.nestedOpenDialogCount),disablePointerDismissal:Ba(e=>e.disablePointerDismissal),openMethod:Ba(e=>e.openMethod),descriptionElementId:Ba(e=>e.descriptionElementId),titleElementId:Ba(e=>e.titleElementId),viewportElement:Ba(e=>e.viewportElement),role:Ba(e=>e.role)};class bl extends ds{constructor(e){super(function(e={}){return{...gs(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}(e),{popupRef:r.createRef(),backdropRef:r.createRef(),internalBackdropRef:r.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new ys,onOpenChange:void 0,onOpenChangeComplete:void 0},gl)}setOpen=(e,t)=>{if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||null==this.state.activeTriggerId||(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;const n={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested};this.state.floatingRootContext.context.events?.emit("openchange",n);const r={open:e},o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)}}function xl(e){const{children:t,open:n,defaultOpen:o=!1,onOpenChange:i,onOpenChangeComplete:a,disablePointerDismissal:s=!1,modal:l=!0,actionsRef:c,handle:u,triggerId:d,defaultTriggerId:f=null}=e,h=Vo(!0),m=Boolean(h),v=j(()=>u?.store??new bl({open:o,openProp:n,activeTriggerId:f,triggerIdProp:d,modal:l,disablePointerDismissal:s,nested:m})).current;ul(()=>{void 0===n&&!1===v.state.open&&!0===o&&v.update({open:!0,activeTriggerId:f})}),v.useControlledProp("openProp",n),v.useControlledProp("triggerIdProp",d),v.useSyncedValues({disablePointerDismissal:s,nested:m,modal:l}),v.useContextCallback("onOpenChange",i),v.useContextCallback("onOpenChangeComplete",a);const y=v.useState("payload");!function(e){const{store:t,parentContext:n,actionsRef:o}=e,i=t.useState("open"),a=t.useState("disablePointerDismissal"),s=t.useState("modal"),l=t.useState("popupElement"),{openMethod:c,triggerProps:u}=yl(i);ms(t);const{forceUnmount:d}=vs(i,t),f=$t(e=>{const n=Io(e);return n.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},n}),p=r.useCallback(()=>{t.setOpen(!1,f(No))},[t,f]);r.useImperativeHandle(o,()=>({unmount:d,close:p}),[d,p]);const h=Es({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[m,v]=r.useState(0),y=0===m,g=Bs(h),b=Wi(h,{outsidePressEvent:()=>t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:"trap-focus"===s?"sloppy":"intentional",touch:"sloppy"},outsidePress(e){if(!t.context.outsidePressEnabledRef.current)return!1;if("button"in e&&0!==e.button)return!1;if("touches"in e&&1!==e.touches.length)return!1;const n=Un(e);if(y&&!a){const e=n;return!s||!t.context.internalBackdropRef.current&&!t.context.backdropRef.current||t.context.internalBackdropRef.current===e||t.context.backdropRef.current===e||Fn(e,l)&&!e?.hasAttribute("data-base-ui-portal")}return!1},escapeKey:y});vl(i&&!0===s,l);const{getReferenceProps:x,getFloatingProps:w,getTriggerProps:E}=Ns([g,b]);t.useContextCallback("onNestedDialogOpen",e=>{v(e+1)}),t.useContextCallback("onNestedDialogClose",()=>{v(0)}),r.useEffect(()=>(n?.onNestedDialogOpen&&i&&n.onNestedDialogOpen(m),n?.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n?.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,m]);const O=r.useMemo(()=>x(u),[x,u]),S=r.useMemo(()=>E(u),[E,u]),k=r.useMemo(()=>w(),[w]);t.useSyncedValues({openMethod:c,activeTriggerProps:O,inactiveTriggerProps:S,popupProps:k,floatingRootContext:h,nestedOpenDialogCount:m})}({store:v,actionsRef:c,parentContext:h?.store.context});const g=r.useMemo(()=>({store:v}),[v]);return p.jsx(zo.Provider,{value:g,children:"function"==typeof t?t({payload:y}):t})}const wl=r.forwardRef(function(e,t){const{render:n,className:r,id:o,...i}=e,{store:a}=Vo(),s=pn(o);return a.useSyncedValueWithCleanup("titleElementId",s),U("h2",e,{ref:t,props:[{id:s},i]})});"production"!==process.env.NODE_ENV&&(wl.displayName="DialogTitle")
|
|
33
|
+
/**
|
|
34
|
+
* @license lucide-react v1.8.0 - ISC
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the ISC license.
|
|
37
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/;const El=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),Ol=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Sl=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
39
|
+
/**
|
|
40
|
+
* @license lucide-react v1.8.0 - ISC
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the ISC license.
|
|
43
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* @license lucide-react v1.8.0 - ISC
|
|
47
|
+
*
|
|
48
|
+
* This source code is licensed under the ISC license.
|
|
49
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
+
*/
|
|
51
|
+
var kl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
|
|
52
|
+
/**
|
|
53
|
+
* @license lucide-react v1.8.0 - ISC
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the ISC license.
|
|
56
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/const Pl=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},Al=e.createContext({}),jl=e.forwardRef(({color:t,size:n,strokeWidth:r,absoluteStrokeWidth:o,className:i="",children:a,iconNode:s,...l},c)=>{const{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:h=""}=e.useContext(Al)??{},m=o??f?24*Number(r??d)/Number(n??u):r??d;return e.createElement("svg",{ref:c,...kl,width:n??u??kl.width,height:n??u??kl.height,stroke:t??p,strokeWidth:m,className:El("lucide",h,i),...!a&&!Pl(l)&&{"aria-hidden":"true"},...l},[...s.map(([t,n])=>e.createElement(t,n)),...Array.isArray(a)?a:[a]])}),Tl=(t,n)=>{const r=e.forwardRef(({className:r,...o},i)=>e.createElement(jl,{ref:i,iconNode:n,className:El(`lucide-${Ol(Sl(t))}`,`lucide-${t}`,r),...o}));return r.displayName=Sl(t),r},Cl=Tl("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),Ml=Tl("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),Nl=Tl("circle-question-mark",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Il=Tl("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),Dl=Tl("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),_l=Tl("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]),Rl=Tl("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]),Ll=Tl("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),zl=Tl("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]),Vl=Tl("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),Bl=Tl("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]),Fl=Tl("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),$l=Tl("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),Ul=Tl("trending-down",[["path",{d:"M16 17h6v-6",key:"t6n2it"}],["path",{d:"m22 17-8.5-8.5-5 5L2 7",key:"x473p"}]]),Wl=Tl("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]),Kl=Tl("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Hl=Tl("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),Yl=Tl("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ql=Tl("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Gl(e){var t=m(e,[]);return p.jsx(xl,h({"data-slot":"sheet"},t))}function Xl(e){var t=m(e,[]);return p.jsx(cl,h({"data-slot":"sheet-portal"},t))}function Zl(e){var t=e.className,n=m(e,["className"]);return p.jsx(Zo,h({"data-slot":"sheet-overlay",className:mt("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",t)},n))}function Jl(e){var t=e.className,n=e.children,r=e.side,o=void 0===r?"right":r,i=e.showCloseButton,a=void 0===i||i,s=m(e,["className","children","side","showCloseButton"]);return p.jsxs(Xl,{children:[p.jsx(Zl,{}),p.jsxs(al,h({"data-slot":"sheet-content","data-side":o,className:mt("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t)},s,{children:[n,a&&p.jsxs(Jo,{"data-slot":"sheet-close",render:p.jsx(tn,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[p.jsx(Yl,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]}))]})}function Ql(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"sheet-header",className:mt("flex flex-col gap-0.5 p-4",t)},n))}function ec(e){var t=e.className,n=m(e,["className"]);return p.jsx(wl,h({"data-slot":"sheet-title",className:mt("font-heading text-base font-medium text-foreground",t)},n))}function tc(e){var t=e.className,n=m(e,["className"]);return p.jsx(Qo,h({"data-slot":"sheet-description",className:mt("text-sm text-muted-foreground",t)},n))}function nc(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"skeleton",className:mt("animate-pulse rounded-md bg-muted",t)},n))}const rc=r.createContext(void 0);function oc(e){const t=r.useContext(rc);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.":P(72));return t}"production"!==process.env.NODE_ENV&&(rc.displayName="TooltipRootContext");const ic={...xs,disabled:Ba(e=>e.disabled),instantType:Ba(e=>e.instantType),isInstantPhase:Ba(e=>e.isInstantPhase),trackCursorAxis:Ba(e=>e.trackCursorAxis),disableHoverablePopup:Ba(e=>e.disableHoverablePopup),lastOpenChangeReason:Ba(e=>e.openChangeReason),closeOnClick:Ba(e=>e.closeOnClick),closeDelay:Ba(e=>e.closeDelay),hasViewport:Ba(e=>e.hasViewport)};class ac extends ds{constructor(e){super({...{...gs(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1},...e},{popupRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new ys},ic)}setOpen=(e,t)=>{const n=t.reason,r=n===So,i=e&&n===ko,a=!e&&(n===Oo||n===To);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;const s=()=>{const r={open:e,openChangeReason:n};i?r.instantType="focus":a?r.instantType="dismiss":n===So&&(r.instantType=void 0);const o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)};r?o.flushSync(s):s()};static useStore(e,t){const n=j(()=>new ac(t)).current,r=e??n,o=Es({popupStore:r,onOpenChange:r.setOpen});return r.state.floatingRootContext=o,r}}const sc=os(function(e){const{disabled:t=!1,defaultOpen:n=!1,open:o,disableHoverablePopup:i=!1,trackCursorAxis:a="none",actionsRef:s,onOpenChange:l,onOpenChangeComplete:c,handle:u,triggerId:d,defaultTriggerId:f=null,children:h}=e,m=ac.useStore(u?.store,{open:n,openProp:o,activeTriggerId:f,triggerIdProp:d});ul(()=>{void 0===o&&!1===m.state.open&&!0===n&&m.update({open:!0,activeTriggerId:f})}),m.useControlledProp("openProp",o),m.useControlledProp("triggerIdProp",d),m.useContextCallback("onOpenChange",l),m.useContextCallback("onOpenChangeComplete",c);const v=m.useState("open"),y=!t&&v,g=m.useState("activeTriggerId"),b=m.useState("payload");m.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),qt(()=>{v&&t&&m.setOpen(!1,Io("disabled"))},[v,t,m]),m.useSyncedValue("disabled",t),ms(m);const{forceUnmount:x,transitionStatus:w}=vs(y,m),E=m.useState("isInstantPhase"),O=m.useState("instantType"),S=m.useState("lastOpenChangeReason"),k=r.useRef(null);qt(()=>{"ending"===w&&S===Eo||"ending"!==w&&E?("delay"!==O&&(k.current=O),m.set("instantType","delay")):null!==k.current&&(m.set("instantType",k.current),k.current=null)},[w,E,S,O,m]),qt(()=>{y&&null==g&&m.set("payload",void 0)},[m,g,y]);const P=r.useCallback(()=>{m.setOpen(!1,function(e,t){const n=Io(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}(m,No))},[m]);r.useImperativeHandle(s,()=>({unmount:x,close:P}),[x,P]);const A=m.useState("floatingRootContext"),j=Wi(A,{enabled:!t,referencePress:()=>m.select("closeOnClick")}),T=function(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.useState("open"),i=n.useState("floatingElement"),a=n.useState("domReferenceElement"),s=n.context.dataRef,{enabled:l=!0,axis:c="both"}=t,u=r.useRef(!1),d=r.useRef(null),[f,p]=r.useState(),[h,m]=r.useState([]),v=$t((e,t,r)=>{u.current||s.current.openEvent&&!Fi(s.current.openEvent)||n.set("positionReference",function(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const i=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},a="x"===t.axis||"both"===t.axis,s="y"===t.axis||"both"===t.axis,l=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&"touch"!==t.pointerType;let c=i.width,u=i.height,d=i.x,f=i.y;return null==n&&t.x&&a&&(n=i.x-t.x),null==r&&t.y&&s&&(r=i.y-t.y),d-=n||0,f-=r||0,c=0,u=0,!o||l?(c="y"===t.axis?i.width:0,u="x"===t.axis?i.height:0,d=a&&null!=t.x?t.x:d,f=s&&null!=t.y?t.y:f):o&&!l&&(u="x"===t.axis?i.height:u,c="y"===t.axis?i.width:c),o=!0,{width:c,height:u,x:d,y:f,top:f,right:d+c,bottom:f+u,left:d}}}}(r??a,{x:e,y:t,axis:c,dataRef:s,pointerType:f}))}),y=$t(e=>{o?d.current||m([]):v(e.clientX,e.clientY,e.currentTarget)}),g=Qn(f)?i:o,b=r.useCallback(()=>{if(!g||!l)return;const e=gt(i);function t(n){const r=Un(n);Fn(i,r)?(e.removeEventListener("mousemove",t),d.current=null):v(n.clientX,n.clientY)}if(!s.current.openEvent||Fi(s.current.openEvent)){e.addEventListener("mousemove",t);const n=()=>{e.removeEventListener("mousemove",t),d.current=null};return d.current=n,n}n.set("positionReference",a)},[g,l,i,s,a,n,v]);r.useEffect(()=>b(),[b,h]),r.useEffect(()=>{l&&!i&&(u.current=!1)},[l,i]),r.useEffect(()=>{!l&&o&&(u.current=!0)},[l,o]);const x=r.useMemo(()=>{function e(e){p(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:y,onMouseEnter:y}},[y]);return r.useMemo(()=>l?{reference:x,trigger:x}:{},[l,x])}(A,{enabled:!t&&"none"!==a,axis:"none"===a?void 0:a}),{getReferenceProps:C,getFloatingProps:M,getTriggerProps:N}=Ns([j,T]),I=r.useMemo(()=>C(),[C]),D=r.useMemo(()=>N(),[N]),_=r.useMemo(()=>M(),[M]);return m.useSyncedValues({activeTriggerProps:I,inactiveTriggerProps:D,popupProps:_}),p.jsx(rc.Provider,{value:m,children:"function"==typeof h?h({payload:b}):h})});"production"!==process.env.NODE_ENV&&(sc.displayName="TooltipRoot");const lc=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(lc.displayName="TooltipProviderContext");let cc=function(e){return e[e.popupOpen=Fo.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e}({});const uc=is(function(e,t){const{className:n,render:o,handle:i,payload:a,disabled:s,delay:l,closeOnClick:c=!0,closeDelay:u,id:d,...f}=e,p=oc(!0),h=i?.store??p;if(!h)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.":P(82));const m=pn(d),v=h.useState("isTriggerActive",m),y=h.useState("isOpenedByTrigger",m),g=h.useState("floatingRootContext"),b=r.useRef(null),x=l??600,w=u??0,{registerTrigger:E,isMountedByThisTrigger:O}=hs(m,b,h,{payload:a,closeOnClick:c,closeDelay:w}),S=r.useContext(lc),{delayRef:k,isInstantPhase:A,hasProvider:j}=function(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,o=n.useState("floatingId"),{open:i}=t,a=r.useContext(ri),{currentIdRef:s,delayRef:l,timeoutMs:c,initialDelayRef:u,currentContextRef:d,hasProvider:f,timeout:p}=a,[h,m]=r.useState(!1);return qt(()=>{function e(){m(!1),d.current?.setIsInstantPhase(!1),s.current=null,d.current=null,l.current=u.current}if(s.current&&!i&&s.current===o){if(m(!1),c){const t=o;return p.start(c,()=>{n.select("open")||s.current&&s.current!==t||e()}),()=>{p.clear()}}e()}},[i,o,s,l,c,u,d,p,n]),qt(()=>{if(!i)return;const e=d.current,t=s.current;p.clear(),d.current={onOpenChange:n.setOpen,setIsInstantPhase:m},s.current=o,l.current={open:0,close:ei(u.current,"close")},null!==t&&t!==o?(m(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,Io(Eo))):(m(!1),e?.setIsInstantPhase(!1))},[i,o,n,s,l,c,u,d,p]),qt(()=>()=>{d.current=null},[d]),r.useMemo(()=>({hasProvider:f,delayRef:l,isInstantPhase:h}),[f,l,h])}(g,{open:y});h.useSyncedValue("isInstantPhase",A);const T=h.useState("disabled"),C=s??T,M=h.useState("trackCursorAxis");return U("button",e,{state:{open:y},ref:[t,E,b],props:[Ms(g,{enabled:!C,mouseOnly:!0,move:!1,handleClose:h.useState("disableHoverablePopup")||"both"===M?null:Hs(),restMs(){const e=S?.delay,t="object"==typeof k.current?k.current.open:void 0;let n=x;return j&&(n=0!==t?l??e??x:0),n},delay(){const e="object"==typeof k.current?k.current.close:void 0;let t=w;return null==u&&j&&(t=e),{close:t}},triggerElementRef:b,isActiveTrigger:v}),Ss(g,{enabled:!C}).reference,h.useState("triggerProps",O),{onPointerDown(){h.set("closeOnClick",c)},id:m,[cc.triggerDisabled]:C?"":void 0},f],stateAttributesMapping:Yo})});"production"!==process.env.NODE_ENV&&(uc.displayName="TooltipTrigger");const dc=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(dc.displayName="TooltipPortalContext");const fc=r.forwardRef(function(e,t){const{children:n,container:i,className:a,render:s,...l}=e,{portalNode:c,portalSubtree:u}=ki({container:i,ref:t,componentProps:e,elementProps:l});return u||c?p.jsxs(r.Fragment,{children:[u,c&&o.createPortal(n,c)]}):null});"production"!==process.env.NODE_ENV&&(fc.displayName="FloatingPortalLite");const pc=r.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return oc().useState("mounted")||n?p.jsx(dc.Provider,{value:n,children:p.jsx(fc,{ref:t,...r})}):null});"production"!==process.env.NODE_ENV&&(pc.displayName="TooltipPortal");const hc=r.createContext(void 0);function mc(){const e=r.useContext(hc);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.":P(71));return e}"production"!==process.env.NODE_ENV&&(hc.displayName="TooltipPositionerContext");const vc=r.createContext(void 0);function yc(){const e=r.useContext(vc);return e?.direction??"ltr"}"production"!==process.env.NODE_ENV&&(vc.displayName="DirectionContext");const gc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0,offsetParent:d="real"}=cr(e,t)||{};if(null==c)return{};const f=Or(u),p={x:n,y:r},h=mr(o),m=pr(h),v=await a.getDimensions(c),y="y"===h,g=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[h]-p[h]-i.floating[m],E=p[h]-i.reference[h],O="real"===d?await(a.getOffsetParent?.(c)):s.floating;let S=s.floating[x]||i.floating[m];S&&await(a.isElement?.(O))||(S=s.floating[x]||i.floating[m]);const k=w/2-E/2,P=S/2-v[m]/2-1,A=Math.min(f[g],P),j=Math.min(f[b],P),T=A,C=S-v[m]-j,M=S/2-v[m]/2+k,N=lr(T,M,C),I=!l.arrow&&null!=dr(o)&&M!==N&&i.reference[m]/2-(M<T?A:j)-v[m]/2<0,D=I?M<T?M-T:M-C:0;return{[h]:p[h]+D,data:{[h]:N,centerOffset:M-N-D,...I&&{alignmentOffset:D}},reset:I}}}),bc={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,i=0===t&&0===n&&0===r&&0===o,a=await((e,t)=>{const n=ya(e);return{name:n.name,fn:n.fn,options:[e,t]}})().fn(e);return{data:{referenceHidden:a.data?.referenceHidden||i}}}},xc={sideX:"left",sideY:"top"},wc={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:i,strategy:a,placement:s}=e,l=gt(o),c=l.getComputedStyle(o);if(!("0s"!==c.transitionDuration&&""!==c.transitionDuration))return{x:t,y:n,data:xc};const u=await(i.getOffsetParent?.(o));let d={width:0,height:0};if("fixed"===a&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(u===l){const e=wn(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(i.isElement?.(u))&&(d=await i.getDimensions(u));const f=ur(s);let p=t,h=n;"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(h=d.height-(n+r.height));return{x:p,y:h,data:{sideX:"left"===f?"right":xc.sideX,sideY:"top"===f?"bottom":xc.sideY}}}};function Ec(e,t,n){const r="inline-start"===e||"inline-end"===e;return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function Oc(e,t,n){const{rects:r,placement:o}=e;return{side:Ec(t,ur(o),n),align:dr(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Sc(e){const{anchor:t,positionMethod:n="absolute",side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,collisionBoundary:l,collisionPadding:c=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:h,mounted:m,collisionAvoidance:v,shiftCrossAxis:y=!1,nodeId:g,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:w}=e,[E,O]=r.useState(null);m||null===E||O(null);const S=v.side||"flip",k=v.align||"flip",P=v.fallbackAxisSide||"end",A="function"==typeof t?t:void 0,j=$t(A),T=A?j:t,C=oi(t),M="rtl"===yc(),N=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":M?"left":"right","inline-start":M?"right":"left"}[o],I="center"===a?N:`${N}-${a}`;let D=c;const _="bottom"===o?1:0,R="top"===o?1:0,L="right"===o?1:0,z="left"===o?1:0;"number"==typeof D?D={top:D+_,right:D+z,bottom:D+R,left:D+L}:D&&(D={top:(D.top||0)+_,right:(D.right||0)+z,bottom:(D.bottom||0)+R,left:(D.left||0)+L});const V={boundary:"clipping-ancestors"===l?"clippingAncestors":l,padding:D},B=r.useRef(null),F=oi(i),$=oi(s),U=[ka(e=>{const t=Oc(e,o,M),n="function"==typeof F.current?F.current(t):F.current,r="function"==typeof $.current?$.current(t):$.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},["function"!=typeof i?i:0,"function"!=typeof s?s:0,M,o])],W="none"===k&&"shift"!==S,K=!W&&(u||y||"shift"===S),H="none"===S?null:((e,t)=>{const n=ma(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,padding:{top:D.top+1,right:D.right+1,bottom:D.bottom+1,left:D.left+1},mainAxis:!y&&"flip"===S,crossAxis:"flip"===k&&"alignment",fallbackAxisSideDirection:P}),Y=W?null:((e,t)=>{const n=ha(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=wn(e.elements.floating).documentElement;return{...V,rootBoundary:y?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==k,crossAxis:K,limiter:u||y?void 0:(n=e=>{if(!B.current)return{};const{width:t,height:n}=B.current.getBoundingClientRect(),r=hr(ur(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?D.left+D.right:D.top+D.bottom)/2}},{fn:ga(n).fn,options:[n,r]})};var n,r},[V,u,y,D,k]);var q,G;"shift"===S||"shift"===k||"center"===a?U.push(Y,H):U.push(H,Y),U.push(((e,t)=>{const n=va(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){const o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${n}px`);const i=window.devicePixelRatio||1,{x:a,y:s,width:l,height:c}=r.reference,u=(Math.round((a+l)*i)-Math.round(a*i))/i,d=(Math.round((s+c)*i)-Math.round(s*i))/i;o.setProperty("--anchor-width",`${u}px`),o.setProperty("--anchor-height",`${d}px`)}}),(G=[d],{...gc(q=()=>({element:B.current||document.createElement("div"),padding:d,offsetParent:"floating"})),options:[q,G]}),{name:"transformOrigin",fn(e){const{elements:t,middlewareData:n,placement:r,rects:a,y:s}=e,l=ur(r),c=hr(l),u=B.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=d+(u?.clientWidth||0)/2,h=f+(u?.clientHeight||0)/2,m=Math.abs(n.shift?.y||0),v=a.reference.height/2,y="function"==typeof i?i(Oc(e,o,M)):i,g=m>y,b={top:`${p}px calc(100% + ${y}px)`,bottom:`${p}px ${-y}px`,left:`calc(100% + ${y}px) ${h}px`,right:`${-y}px ${h}px`}[l],x=`${p}px ${a.reference.y+v-s}px`;return t.floating.style.setProperty("--transform-origin",K&&"y"===c&&g?x:b),{}}},bc,b),qt(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[m,h]);const X=r.useMemo(()=>({elementResize:!f&&"undefined"!=typeof ResizeObserver,layoutShift:!f&&"undefined"!=typeof IntersectionObserver}),[f]),{refs:Z,elements:J,x:Q,y:ee,middlewareData:te,update:ne,placement:re,context:oe,isPositioned:ie,floatingStyles:ae}=ws({rootContext:h,placement:I,middleware:U,strategy:n,whileElementsMounted:p?void 0:(...e)=>fa(...e,X),nodeId:g,externalTree:w}),{sideX:se,sideY:le}=te.adaptiveOrigin||xc,ce=ie?n:"fixed",ue=r.useMemo(()=>{const e=b?{position:ce,[se]:Q,[le]:ee}:{position:ce,...ae};return ie||(e.opacity=0),e},[b,ce,se,Q,le,ee,ae,ie]),de=r.useRef(null);qt(()=>{if(!m)return;const e=C.current,t="function"==typeof e?e():e,n=(kc(t)?t.current:t)||null||null;n!==de.current&&(Z.setPositionReference(n),de.current=n)},[m,Z,T,C]),r.useEffect(()=>{if(!m)return;const e=C.current;"function"!=typeof e&&kc(e)&&e.current!==de.current&&(Z.setPositionReference(e.current),de.current=e.current)},[m,Z,T,C]),r.useEffect(()=>{if(p&&m&&J.domReference&&J.floating)return fa(J.domReference,J.floating,ne,X)},[p,m,J,ne,X]);const fe=ur(re),pe=Ec(o,fe,M),he=dr(re)||"center",me=Boolean(te.hide?.referenceHidden);qt(()=>{x&&m&&ie&&O(fe)},[x,m,ie,fe]);const ve=r.useMemo(()=>({position:"absolute",top:te.arrow?.y,left:te.arrow?.x}),[te.arrow]),ye=0!==te.arrow?.centerOffset;return r.useMemo(()=>({positionerStyles:ue,arrowStyles:ve,arrowRef:B,arrowUncentered:ye,side:pe,align:he,physicalSide:fe,anchorHidden:me,refs:Z,context:oe,isPositioned:ie,update:ne}),[ue,ve,B,ye,pe,he,fe,me,Z,oe,ie,ne])}function kc(e){return null!=e&&"current"in e}function Pc(e){return"starting"===e?V:z}const Ac=r.forwardRef(function(e,t){const{render:n,className:o,anchor:i,positionMethod:a="absolute",side:s="top",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:v=!1,collisionAvoidance:y=F,...g}=e,b=oc(),x=function(){const e=r.useContext(dc);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Tooltip.Portal> is missing.":P(70));return e}(),w=b.useState("open"),E=b.useState("mounted"),O=b.useState("trackCursorAxis"),S=b.useState("disableHoverablePopup"),k=b.useState("floatingRootContext"),A=b.useState("instantType"),j=b.useState("transitionStatus"),T=b.useState("hasViewport"),C=Sc({anchor:i,positionMethod:a,floatingRootContext:k,mounted:E,side:s,sideOffset:c,align:l,alignOffset:u,collisionBoundary:d,collisionPadding:f,sticky:m,arrowPadding:h,disableAnchorTracking:v,keepMounted:x,collisionAvoidance:y,adaptiveOrigin:T?wc:void 0}),M=r.useMemo(()=>{const e={};return w&&"both"!==O&&!S||(e.pointerEvents="none"),{role:"presentation",hidden:!E,style:{...C.positionerStyles,...e}}},[w,O,S,E,C.positionerStyles]),N=r.useMemo(()=>({open:w,side:C.side,align:C.align,anchorHidden:C.anchorHidden,instant:"none"!==O?"tracking-cursor":A}),[w,C.side,C.align,C.anchorHidden,O,A]),I=r.useMemo(()=>({...N,arrowRef:C.arrowRef,arrowStyles:C.arrowStyles,arrowUncentered:C.arrowUncentered}),[N,C.arrowRef,C.arrowStyles,C.arrowUncentered]),D=U("div",e,{state:N,props:[M,Pc(j),g],ref:[t,b.useStateSetter("positionerElement")],stateAttributesMapping:Go});return p.jsx(hc.Provider,{value:I,children:D})});"production"!==process.env.NODE_ENV&&(Ac.displayName="TooltipPositioner");const jc={...Go,...go},Tc=r.forwardRef(function(e,t){const{className:n,render:r,...o}=e,i=oc(),{side:a,align:s}=mc(),l=i.useState("open"),c=i.useState("instantType"),u=i.useState("transitionStatus"),d=i.useState("popupProps"),f=i.useState("floatingRootContext");xo({open:l,ref:i.context.popupRef,onComplete(){l&&i.context.onOpenChangeComplete?.(!0)}});Ts(f,{enabled:!i.useState("disabled"),closeDelay:i.useState("closeDelay")});return U("div",e,{state:{open:l,side:a,align:s,instant:c,transitionStatus:u},ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[d,Pc(u),o],stateAttributesMapping:jc})});"production"!==process.env.NODE_ENV&&(Tc.displayName="TooltipPopup");const Cc=r.forwardRef(function(e,t){const{className:n,render:r,...o}=e,i=oc().useState("instantType"),{open:a,arrowRef:s,side:l,align:c,arrowUncentered:u,arrowStyles:d}=mc();return U("div",e,{state:{open:a,side:l,align:c,uncentered:u,instant:i},ref:[t,s],props:[{style:d,"aria-hidden":!0},o],stateAttributesMapping:Go})});function Mc(e){var t=m(e,[]);return p.jsx(sc,h({"data-slot":"tooltip"},t))}function Nc(e){var t=m(e,[]);return p.jsx(uc,h({"data-slot":"tooltip-trigger"},t))}function Ic(e){var t=e.className,n=e.side,r=void 0===n?"top":n,o=e.sideOffset,i=void 0===o?4:o,a=e.align,s=void 0===a?"center":a,l=e.alignOffset,c=void 0===l?0:l,u=e.children,d=m(e,["className","side","sideOffset","align","alignOffset","children"]);return p.jsx(pc,{children:p.jsx(Ac,{align:s,alignOffset:c,side:r,sideOffset:i,className:"isolate z-50",children:p.jsxs(Tc,h({"data-slot":"tooltip-content",className:mt("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t)},d,{children:[u,p.jsx(Cc,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]}))})})}"production"!==process.env.NODE_ENV&&(Cc.displayName="TooltipArrow");var Dc=r.createContext(null);function _c(){var e=r.useContext(Dc);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Rc(e){var t=e.defaultOpen,n=void 0===t||t,o=e.open,i=e.onOpenChange,a=e.className,s=e.style,l=e.children,c=m(e,["defaultOpen","open","onOpenChange","className","style","children"]),u=function(){var e=r.useState(void 0),t=e[0],n=e[1];return r.useEffect(function(){var e=window.matchMedia("(max-width: ".concat(767,"px)")),t=function(){n(window.innerWidth<768)};return e.addEventListener("change",t),n(window.innerWidth<768),function(){return e.removeEventListener("change",t)}},[]),!!t}(),d=r.useState(!1),f=d[0],v=d[1],y=r.useState(n),g=y[0],b=y[1],x=null!=o?o:g,w=r.useCallback(function(e){var t="function"==typeof e?e(x):e;i?i(t):b(t),document.cookie="".concat("sidebar_state","=").concat(t,"; path=/; max-age=").concat(604800)},[i,x]),E=r.useCallback(function(){return u?v(function(e){return!e}):w(function(e){return!e})},[u,w,v]);r.useEffect(function(){var e=function(e){"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),E())};return window.addEventListener("keydown",e),function(){return window.removeEventListener("keydown",e)}},[E]);var O=x?"expanded":"collapsed",S=r.useMemo(function(){return{state:O,open:x,setOpen:w,isMobile:u,openMobile:f,setOpenMobile:v,toggleSidebar:E}},[O,x,w,u,f,v,E]);return p.jsx(Dc.Provider,{value:S,children:p.jsx("div",h({"data-slot":"sidebar-wrapper",style:h({"--sidebar-width":"16rem","--sidebar-width-icon":"3rem"},s),className:mt("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a)},c,{children:l}))})}function Lc(e){var t=e.side,n=void 0===t?"left":t,r=e.variant,o=void 0===r?"sidebar":r,i=e.collapsible,a=void 0===i?"offcanvas":i,s=e.className,l=e.children,c=e.dir,u=m(e,["side","variant","collapsible","className","children","dir"]),d=_c(),f=d.isMobile,v=d.state,y=d.openMobile,g=d.setOpenMobile;return"none"===a?p.jsx("div",h({"data-slot":"sidebar",className:mt("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",s)},u,{children:l})):f?p.jsx(Gl,h({open:y,onOpenChange:g},u,{children:p.jsxs(Jl,{dir:c,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":"18rem"},side:n,children:[p.jsxs(Ql,{className:"sr-only",children:[p.jsx(ec,{children:"Sidebar"}),p.jsx(tc,{children:"Displays the mobile sidebar."})]}),p.jsx("div",{className:"flex h-full w-full flex-col",children:l})]})})):p.jsxs("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":v,"data-collapsible":"collapsed"===v?a:"","data-variant":o,"data-side":n,"data-slot":"sidebar",children:[p.jsx("div",{"data-slot":"sidebar-gap",className:mt("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===o||"inset"===o?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),p.jsx("div",h({"data-slot":"sidebar-container","data-side":n,className:mt("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex","floating"===o||"inset"===o?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",s)},u,{children:p.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:l})}))]})}function zc(e){var t=e.className,n=e.onClick,r=m(e,["className","onClick"]),o=_c().toggleSidebar;return p.jsxs(tn,h({"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:mt(t),onClick:function(e){null==n||n(e),o()}},r,{children:[p.jsx(Vl,{}),p.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]}))}function Vc(e){var t=e.className,n=m(e,["className"]);return p.jsx("main",h({"data-slot":"sidebar-inset",className:mt("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t)},n))}function Bc(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"sidebar-header","data-sidebar":"header",className:mt("flex flex-col gap-2 p-2",t)},n))}function Fc(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"sidebar-footer","data-sidebar":"footer",className:mt("flex flex-col gap-2 p-2",t)},n))}function $c(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"sidebar-content","data-sidebar":"content",className:mt("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t)},n))}function Uc(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"sidebar-group","data-sidebar":"group",className:mt("relative flex w-full min-w-0 flex-col p-2",t)},n))}function Wc(e){var t=e.className,n=e.render,r=m(e,["className","render"]);return K({defaultTagName:"div",props:g({className:mt("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",t)},r),render:n,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function Kc(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:mt("w-full text-sm",t)},n))}function Hc(e){var t=e.className,n=m(e,["className"]);return p.jsx("ul",h({"data-slot":"sidebar-menu","data-sidebar":"menu",className:mt("flex w-full min-w-0 flex-col gap-0",t)},n))}function Yc(e){var t=e.className,n=m(e,["className"]);return p.jsx("li",h({"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:mt("group/menu-item relative",t)},n))}var qc=X("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Gc(e){var t=e.render,n=e.isActive,r=void 0!==n&&n,o=e.variant,i=void 0===o?"default":o,a=e.size,s=void 0===a?"default":a,l=e.tooltip,c=e.className,u=m(e,["render","isActive","variant","size","tooltip","className"]),d=_c(),f=d.isMobile,v=d.state,y=K({defaultTagName:"button",props:g({className:mt(qc({variant:i,size:s}),c)},u),render:l?p.jsx(Nc,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:s,active:r}});return l?("string"==typeof l&&(l={children:l}),p.jsxs(Mc,{children:[y,p.jsx(Ic,h({side:"right",align:"center",hidden:"collapsed"!==v||f},l))]})):y}const Xc=e.createContext({});function Zc(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const Jc="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Qc=e.createContext(null);function eu(e,t){-1===e.indexOf(t)&&e.push(t)}function tu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const nu=(e,t,n)=>n>t?t:n<e?e:n;function ru(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ou=()=>{},iu=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(ou=(e,t,n)=>{e||"undefined"==typeof console||console.warn(ru(t,n))},iu=(e,t,n)=>{if(!e)throw new Error(ru(t,n))});const au={},su=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function lu(e){return"object"==typeof e&&null!==e}const cu=e=>/^0[^.\s]+$/u.test(e);function uu(e){let t;return()=>(void 0===t&&(t=e()),t)}const du=e=>e,fu=(e,t)=>n=>t(e(n)),pu=(...e)=>e.reduce(fu),hu=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class mu{constructor(){this.subscriptions=[]}add(e){return eu(this.subscriptions,e),()=>tu(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vu=e=>1e3*e,yu=e=>e/1e3;function gu(e,t){return t?e*(1e3/t):0}const bu=new Set;function xu(e,t,n){e||bu.has(t)||(console.warn(ru(t,n)),bu.add(t))}const wu=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Eu(e,t,n,r){if(e===t&&n===r)return du;const o=t=>function(e,t,n,r,o){let i,a,s=0;do{a=t+(n-t)/2,i=wu(a,r,o)-e,i>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n);return e=>0===e||1===e?e:wu(o(e),t,r)}const Ou=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Su=e=>t=>1-e(1-t),ku=Eu(.33,1.53,.69,.99),Pu=Su(ku),Au=Ou(Pu),ju=e=>e>=1?1:(e*=2)<1?.5*Pu(e):.5*(2-Math.pow(2,-10*(e-1))),Tu=e=>1-Math.sin(Math.acos(e)),Cu=Su(Tu),Mu=Ou(Tu),Nu=Eu(.42,0,1,1),Iu=Eu(0,0,.58,1),Du=Eu(.42,0,.58,1),_u=e=>Array.isArray(e)&&"number"==typeof e[0],Ru={linear:du,easeIn:Nu,easeInOut:Du,easeOut:Iu,circIn:Tu,circInOut:Mu,circOut:Cu,backIn:Pu,backInOut:Au,backOut:ku,anticipate:ju},Lu=e=>{if(_u(e)){iu(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,o]=e;return Eu(t,n,r,o)}return"string"==typeof e?(iu(void 0!==Ru[e],`Invalid easing type '${e}'`,"invalid-easing-type"),Ru[e]):e},zu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Vu(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,a=zu.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}const l={schedule:(e,o=!1,a=!1)=>{const s=a&&r?t:n;return o&&i.add(e),s.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{if(a=e,r)return void(o=!0);r=!0;const i=t;t=n,n=i,t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e))}};return l}(i),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=a,m=()=>{const i=au.useManualTiming,a=i?o.timestamp:performance.now();n=!1,i||(o.delta=r?1e3/60:Math.max(Math.min(a-o.timestamp,40),1)),o.timestamp=a,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:zu.reduce((t,i)=>{const s=a[i];return t[i]=(t,i=!1,a=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,i,a)),t},{}),cancel:e=>{for(let t=0;t<zu.length;t++)a[zu[t]].cancel(e)},state:o,steps:a}}const{schedule:Bu,cancel:Fu,state:$u,steps:Uu}=Vu("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:du,!0);let Wu;function Ku(){Wu=void 0}const Hu={now:()=>(void 0===Wu&&Hu.set($u.isProcessing||au.useManualTiming?$u.timestamp:performance.now()),Wu),set:e=>{Wu=e,queueMicrotask(Ku)}},Yu=e=>t=>"string"==typeof t&&t.startsWith(e),qu=Yu("--"),Gu=Yu("var(--"),Xu=e=>!!Gu(e)&&Zu.test(e.split("/*")[0].trim()),Zu=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ju(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Qu={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},ed={...Qu,transform:e=>nu(0,1,e)},td={...Qu,default:1},nd=e=>Math.round(1e5*e)/1e5,rd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const od=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,id=(e,t)=>n=>Boolean("string"==typeof n&&od.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),ad=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,a,s]=r.match(rd);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(a),alpha:void 0!==s?parseFloat(s):1}},sd={...Qu,transform:e=>Math.round((e=>nu(0,255,e))(e))},ld={test:id("rgb","red"),parse:ad("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+sd.transform(e)+", "+sd.transform(t)+", "+sd.transform(n)+", "+nd(ed.transform(r))+")"};const cd={test:id("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:ld.transform},ud=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),dd=ud("deg"),fd=ud("%"),pd=ud("px"),hd=ud("vh"),md=ud("vw"),vd=(()=>({...fd,parse:e=>fd.parse(e)/100,transform:e=>fd.transform(100*e)}))(),yd={test:id("hsl","hue"),parse:ad("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+fd.transform(nd(t))+", "+fd.transform(nd(n))+", "+nd(ed.transform(r))+")"},gd={test:e=>ld.test(e)||cd.test(e)||yd.test(e),parse:e=>ld.test(e)?ld.parse(e):yd.test(e)?yd.parse(e):cd.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?ld.transform(e):yd.transform(e),getAnimatableNone:e=>{const t=gd.parse(e);return t.alpha=0,gd.transform(t)}},bd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const xd="number",wd="color",Ed=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Od(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const a=t.replace(Ed,e=>(gd.test(e)?(r.color.push(i),o.push(wd),n.push(gd.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(xd),n.push(parseFloat(e))),++i,"${}")).split("${}");return{values:n,split:a,indexes:r,types:o}}function Sd({split:e,types:t}){const n=e.length;return r=>{let o="";for(let i=0;i<n;i++)if(o+=e[i],void 0!==r[i]){const e=t[i];o+=e===xd?nd(r[i]):e===wd?gd.transform(r[i]):r[i]}return o}}const kd=(e,t)=>{return"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof(n=e)?0:gd.test(n)?gd.getAnimatableNone(n):n;var n};const Pd={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(rd)?.length||0)+(e.match(bd)?.length||0)>0},parse:function(e){return Od(e).values},createTransformer:function(e){return Sd(Od(e))},getAnimatableNone:function(e){const t=Od(e);return Sd(t)(t.values.map((e,n)=>kd(e,t.split[n])))}};function Ad(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function jd(e,t){return n=>n>0?t:e}const Td=(e,t,n)=>e+(t-e)*n,Cd=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Md=[cd,ld,yd];function Nd(e){const t=(n=e,Md.find(e=>e.test(n)));var n;if(ou(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(t))return!1;let r=t.parse(e);return t===yd&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,a=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=Ad(s,r,e+1/3),i=Ad(s,r,e),a=Ad(s,r,e-1/3)}else o=i=a=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*a),alpha:r}}(r)),r}const Id=(e,t)=>{const n=Nd(e),r=Nd(t);if(!n||!r)return jd(e,t);const o={...n};return e=>(o.red=Cd(n.red,r.red,e),o.green=Cd(n.green,r.green,e),o.blue=Cd(n.blue,r.blue,e),o.alpha=Td(n.alpha,r.alpha,e),ld.transform(o))},Dd=new Set(["none","hidden"]);function _d(e,t){return n=>Td(e,t,n)}function Rd(e){return"number"==typeof e?_d:"string"==typeof e?Xu(e)?jd:gd.test(e)?Id:Vd:Array.isArray(e)?Ld:"object"==typeof e?gd.test(e)?Id:zd:jd}function Ld(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>Rd(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function zd(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Rd(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Vd=(e,t)=>{const n=Pd.createTransformer(t),r=Od(e),o=Od(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Dd.has(e)&&!o.values.length||Dd.has(t)&&!r.values.length?function(e,t){return Dd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):pu(Ld(function(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const i=t.types[o],a=e.indexes[i][r[i]],s=e.values[a]??0;n[o]=s,r[i]++}return n}(r,o),o.values),n):(ou(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),jd(e,t))};function Bd(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return Td(e,t,n);return Rd(e)(e,t)}const Fd=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>Bu.update(t,e),stop:()=>Fu(t),now:()=>$u.isProcessing?$u.timestamp:Hu.now()}},$d=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=Math.round(1e4*e(t/(o-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Ud=2e4;function Wd(e){let t=0;let n=e.next(t);for(;!n.done&&t<Ud;)t+=50,n=e.next(t);return t>=Ud?1/0:t}const Kd=100,Hd=10,Yd=1,qd=0,Gd=800,Xd=.3,Zd=.3,Jd={granular:.01,default:2},Qd={granular:.005,default:.5},ef=.01,tf=10,nf=.05,rf=1;function of(e,t){return e*Math.sqrt(1-t*t)}const af=.001;const sf=["duration","bounce"],lf=["stiffness","damping","mass"];function cf(e,t){return t.some(t=>void 0!==e[t])}function uf(e){let t={velocity:qd,stiffness:Kd,damping:Hd,mass:Yd,isResolvedFromDuration:!1,...e};if(!cf(e,lf)&&cf(e,sf))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*nu(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Yd,stiffness:o,damping:i}}else{const n=function({duration:e=Gd,bounce:t=Xd,velocity:n=qd,mass:r=Yd}){let o,i;ou(e<=vu(tf),"Spring duration must be 10 seconds or less","spring-duration-limit");let a=1-t;a=nu(nf,rf,a),e=nu(ef,tf,yu(e)),a<1?(o=t=>{const r=t*a,o=r*e,i=r-n,s=of(t,a),l=Math.exp(-o);return af-i/s*l},i=t=>{const r=t*a*e,i=r*n+n,s=Math.pow(a,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=of(Math.pow(t,2),a);return(-o(t)+af>0?-1:1)*((i-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=vu(e),isNaN(s))return{stiffness:Kd,damping:Hd,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*a*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:Yd},t.isResolvedFromDuration=!0}return t}function df(e=Zd,t=Xd){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],s={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=uf({...n,velocity:-yu(n.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),v=a-i,y=yu(Math.sqrt(l/u)),g=Math.abs(v)<5;let b,x,w,E,O,S;if(r||(r=g?Jd.granular:Jd.default),o||(o=g?Qd.granular:Qd.default),m<1)w=of(y,m),E=(h+m*y*v)/w,b=e=>{const t=Math.exp(-m*y*e);return a-t*(E*Math.sin(w*e)+v*Math.cos(w*e))},O=m*y*E+v*w,S=m*y*v-E*w,x=e=>Math.exp(-m*y*e)*(O*Math.sin(w*e)+S*Math.cos(w*e));else if(1===m){b=e=>a-Math.exp(-y*e)*(v+(h+y*v)*e);const e=h+y*v;x=t=>Math.exp(-y*t)*(y*e*t-h)}else{const e=y*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*y*t),r=Math.min(e*t,300);return a-n*((h+m*y*v)*Math.sinh(r)+e*v*Math.cosh(r))/e};const t=(h+m*y*v)/e,n=m*y*t-v*e,r=m*y*v-t*e;x=t=>{const o=Math.exp(-m*y*t),i=Math.min(e*t,300);return o*(n*Math.sinh(i)+r*Math.cosh(i))}}const k={calculatedDuration:p&&d||null,velocity:e=>vu(x(e)),next:e=>{if(!p&&m<1){const t=Math.exp(-m*y*e),n=Math.sin(w*e),i=Math.cos(w*e),l=a-t*(E*n+v*i),c=vu(t*(O*n+S*i));return s.done=Math.abs(c)<=r&&Math.abs(a-l)<=o,s.value=s.done?a:l,s}const t=b(e);if(p)s.done=e>=d;else{const n=vu(x(e));s.done=Math.abs(n)<=r&&Math.abs(a-t)<=o}return s.value=s.done?a:t,s},toString:()=>{const e=Math.min(Wd(k),Ud),t=$d(t=>k.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return k}df.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Wd(r),Ud);return{type:"keyframes",ease:e=>r.next(o*e).value/t,duration:yu(o)}}(e,100,df);return e.ease=t.ease,e.duration=vu(t.duration),e.type="keyframes",e};function ff(e,t,n){const r=Math.max(t-5,0);return gu(n-e(r),t-r)}function pf({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:a,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,v=void 0===a?m:a(m);v!==m&&(h=v-d);const y=e=>-h*Math.exp(-e/r),g=e=>v+y(e),b=e=>{const t=y(e),n=g(e);f.done=Math.abs(t)<=c,f.value=f.done?v:n};let x,w;const E=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=df({keyframes:[f.value,p(f.value)],velocity:ff(g,e,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),E(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function hf(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(iu(i===t.length,"Both input and output ranges must be the same length","range-length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||au.mix||Bd,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||du:t;i=pu(e,i)}r.push(i)}return r}(t,r,o),l=s.length,c=n=>{if(a&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=hu(e[r],e[r+1],n);return s[r](o)};return n?t=>c(nu(e[0],e[i-1],t)):c}function mf(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=hu(0,t,r);e.push(Td(n,1,o))}}(t,e.length-1),t}function vf({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Lu):Lu(r),i={done:!1,value:t[0]},a=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:mf(t),e),s=hf(a,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map(()=>c||Du).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=s(t),i.done=t>=e,i)}}const yf=e=>null!==e;function gf(e,{repeat:t,repeatType:n="loop"},r,o=1){const i=e.filter(yf),a=o<0||t&&"loop"!==n&&t%2==1?0:i.length-1;return a&&void 0!==r?r:i[a]}const bf={decay:pf,inertia:pf,tween:vf,keyframes:vf,spring:df};function xf(e){"string"==typeof e.type&&(e.type=bf[e.type])}class wf{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Ef=e=>e/100;class Of extends wf{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==Hu.now()&&this.tick(Hu.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;xf(e);const{type:t=vf,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=e;let{keyframes:a}=e;const s=t||vf;"production"!==process.env.NODE_ENV&&s!==vf&&iu(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),s!==vf&&"number"!=typeof a[0]&&(this.mixKeyframes=pu(Ef,Bd(a[0],a[1])),a=[0,100]);const l=s({...e,keyframes:a});"mirror"===o&&(this.mirroredGenerator=s({...e,keyframes:[...a].reverse(),velocity:-i})),null===l.calculatedDuration&&(l.calculatedDuration=Wd(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:h,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const v=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>r;this.currentTime=Math.max(v,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let g,b=this.currentTime,x=n;if(u){const e=Math.min(this.currentTime,r)/a;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/a)):"mirror"===d&&(x=i)),b=nu(0,1,n)*a}y?(this.delayState.value=c[0],g=this.delayState):g=x.next(b),o&&!y&&(g.value=o(g.value));let{done:w}=g;y||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&p!==pf&&(g.value=gf(c,this.options,m,this.speed)),h&&h(g.value),E&&this.finish(),g}then(e,t){return this.finished.then(e,t)}get duration(){return yu(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+yu(e)}get time(){return yu(this.currentTime)}set time(e){e=vu(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return ff(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Hu.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=yu(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Fd,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Hu.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const Sf=e=>180*e/Math.PI,kf=e=>{const t=Sf(Math.atan2(e[1],e[0]));return Af(t)},Pf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:kf,rotateZ:kf,skewX:e=>Sf(Math.atan(e[1])),skewY:e=>Sf(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Af=e=>((e%=360)<0&&(e+=360),e),jf=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Tf=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Cf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:jf,scaleY:Tf,scale:e=>(jf(e)+Tf(e))/2,rotateX:e=>Af(Sf(Math.atan2(e[6],e[5]))),rotateY:e=>Af(Sf(Math.atan2(-e[2],e[0]))),rotateZ:kf,rotate:kf,skewX:e=>Sf(Math.atan(e[4])),skewY:e=>Sf(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Mf(e){return e.includes("scale")?1:0}function Nf(e,t){if(!e||"none"===e)return Mf(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=Cf,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Pf,o=t}if(!o)return Mf(t);const i=r[t],a=o[1].split(",").map(If);return"function"==typeof i?i(a):a[i]}function If(e){return parseFloat(e.trim())}const Df=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_f=(()=>new Set(Df))(),Rf=e=>e===Qu||e===pd,Lf=new Set(["x","y","z"]),zf=Df.filter(e=>!Lf.has(e));const Vf={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Nf(t,"x"),y:(e,{transform:t})=>Nf(t,"y")};Vf.translateX=Vf.x,Vf.translateY=Vf.y;const Bf=new Set;let Ff=!1,$f=!1,Uf=!1;function Wf(){if($f){const e=Array.from(Bf).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return zf.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}$f=!1,Ff=!1,Bf.forEach(e=>e.complete(Uf)),Bf.clear()}function Kf(){Bf.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&($f=!0)})}class Hf{constructor(e,t,n,r,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Bf.add(this),Ff||(Ff=!0,Bu.read(Kf),Bu.resolveKeyframes(Wf))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const o=r?.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Bf.delete(this)}cancel(){"scheduled"===this.state&&(Bf.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function Yf(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}const qf={};function Gf(e,t){const n=uu(e);return()=>qf[t]??n()}const Xf=Gf(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Zf=Gf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Jf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Qf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Jf([0,.65,.55,1]),circOut:Jf([.55,0,1,.45]),backIn:Jf([.31,.01,.66,-.59]),backOut:Jf([.33,1.53,.69,.99])};function ep(e,t){return e?"function"==typeof e?Zf()?$d(e,t):"ease-out":_u(e)?Jf(e):Array.isArray(e)?e.map(e=>ep(e,t)||Qf.easeOut):Qf[e]:void 0}function tp(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:a="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ep(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:"reverse"===a?"alternate":"normal"};c&&(f.pseudoElement=c);return e.animate(u,f)}function np(e){return"function"==typeof e&&"applyToOptions"in e}class rp extends wf{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:s}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=i,this.options=e,iu("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:e,...t}){return np(e)&&Zf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=tp(t,n,r,l,o),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=gf(r,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Yf(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return yu(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+yu(e)}get time(){return yu(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=vu(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Xf()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),du):r(this)}}const op={anticipate:ju,backInOut:Au,circInOut:Mu};function ip(e){"string"==typeof e.ease&&e.ease in op&&(e.ease=op[e.ease])}class ap extends rp{constructor(e){ip(e),xf(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:o,...i}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const a=new Of({...i,autoplay:!1}),s=Math.max(10,Hu.now()-this.startTime),l=nu(0,10,s-10),c=a.sample(s).value,{name:u}=this.options;o&&u&&Yf(o,u,c),t.setWithVelocity(a.sample(Math.max(0,s-l)).value,c,l),a.stop()}}const sp=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Pd.test(e)&&"0"!==e||e.startsWith("url(")));function lp(e){e.duration=0,e.type="keyframes"}const cp=new Set(["opacity","clipPath","filter","transform"]),up=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const dp=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),fp=uu(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function pp(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:a,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return fp()&&n&&(cp.has(n)||dp.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&up.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!u)&&!c&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}class hp extends wf{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:s,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Hu.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,name:s,motionValue:l,element:c,...u},f=c?.KeyframeResolver||Hf;this.keyframeResolver=new f(a,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=Hu.now();let u=!0;(function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],a=sp(o,t),s=sp(i,t);return ou(a===s,`You are trying to animate ${t} from "${o}" to "${i}". "${a?i:o}" is not an animatable value.`,"value-not-animatable"),!(!a||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||np(n))&&r)})(e,o,i,a)||(u=!1,!au.instantAnimations&&s||c?.(gf(e,n,t)),e[0]=e[e.length-1],lp(n),n.repeat=0);const d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!l&&pp(d),p=d.motionValue?.owner?.current;let h;if(f)try{h=new ap({...d,element:p})}catch{h=new Of(d)}else h=new Of(d);h.finished.then(()=>{this.notifyFinished()}).catch(du),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Uf=!0,Kf(),Wf(),Uf=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function mp(e,t,n,r=0,o=1){const i=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,s=(a-1)*r;return"function"==typeof n?n(i,a):1===o?i*r:s-i*r}const vp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function yp(e,t,n=1){iu(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,o]=function(e){const t=vp.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return su(e)?parseFloat(e):e}return Xu(o)?yp(o,t,n+1):o}const gp={type:"spring",stiffness:500,damping:25,restSpeed:10},bp={type:"keyframes",duration:.8},xp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wp=(e,{keyframes:t})=>t.length>2?bp:_f.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:gp:xp;function Ep(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function Op(e,t){const n=e?.[t]??e?.default??e;return n!==e?Ep(n,e):n}const Sp=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const kp=(e,t,n,r={},o,i)=>a=>{const s=Op(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=vu(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{a(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function(e){for(const t in e)if(!Sp.has(t))return!0;return!1})(s)||Object.assign(u,wp(e,u)),u.duration&&(u.duration=vu(u.duration)),u.repeatDelay&&(u.repeatDelay=vu(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(lp(u),0===u.delay&&(d=!0)),(au.instantAnimations||au.skipAnimations||o?.shouldSkipAnimations)&&(d=!0,lp(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!i&&void 0!==t.get()){const e=gf(u.keyframes,s);if(void 0!==e)return void Bu.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new Of(u):new hp(u)};function Pp(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Ap(e,t,n,r){if("function"==typeof t){const[o,i]=Pp(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=Pp(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function jp(e,t,n){const r=e.getProps();return Ap(r,t,void 0!==n?n:r.custom,e)}const Tp=new Set(["width","height","top","left","right","bottom",...Df]);class Cp{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Hu.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Hu.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&xu(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new mu);const n=this.events[e].add(t);return"change"===e?()=>{n(),Bu.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Hu.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return gu(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mp(e,t){return new Cp(e,t)}const Np=e=>Array.isArray(e);function Ip(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Mp(n))}function Dp(e){return Np(e)?e[e.length-1]||0:e}const _p=e=>Boolean(e&&e.getVelocity);function Rp(e,t){const n=e.getValue("willChange");if(r=n,Boolean(_p(r)&&r.add))return n.add(t);if(!n&&au.WillChange){const n=new au.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function Lp(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const zp="data-"+Lp("framerAppearId");function Vp(e){return e.props[zp]}function Bp({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Fp(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:i,transitionEnd:a,...s}=t;const l=e.getDefaultTransition();i=i?Ep(i,l):l;const c=i?.reduceMotion;r&&(i=r);const u=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const t in s){const r=e.getValue(t,e.latestValues[t]??null),o=s[t];if(void 0===o||d&&Bp(d,t))continue;const a={delay:n,...Op(i||{},t)},l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(o)&&o===l&&!a.velocity){Bu.update(()=>r.set(o));continue}let f=!1;if(window.MotionHandoffAnimation){const n=Vp(e);if(n){const e=window.MotionHandoffAnimation(n,t,Bu);null!==e&&(a.startTime=e,f=!0)}}Rp(e,t);const p=c??e.shouldReduceMotion;r.start(kp(t,r,o,p&&Tp.has(t)?{type:!1}:a,e,f));const h=r.animation;h&&u.push(h)}if(a){const t=()=>Bu.update(()=>{a&&function(e,t){const n=jp(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)Ip(e,t,Dp(i[t]))}(e,a)});u.length?Promise.all(u).then(t):t()}return u}function $p(e,t,n={}){const r=jp(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const i=r?()=>Promise.all(Fp(e,r,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:i=0,staggerChildren:a,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=0,i=1,a){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push($p(l,t,{...a,delay:n+("function"==typeof r?0:r)+mp(e.variantChildren,l,r,o,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,i,a,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[i,a]:[a,i];return e().then(()=>t())}return Promise.all([i(),a(n.delay)])}const Up=e=>t=>t.test(e),Wp=[Qu,pd,fd,dd,md,hd,{test:e=>"auto"===e,parse:e=>e}],Kp=e=>Wp.find(Up(e));function Hp(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||cu(e))}const Yp=new Set(["brightness","contrast","saturate","opacity"]);function qp(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(rd)||[];if(!r)return e;const o=n.replace(r,"");let i=Yp.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const Gp=/\b([a-z-]*)\(.*?\)/gu,Xp={...Pd,getAnimatableNone:e=>{const t=e.match(Gp);return t?t.map(qp).join(" "):e}},Zp={...Pd,getAnimatableNone:e=>{const t=Pd.parse(e);return Pd.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},Jp={...Qu,transform:Math.round},Qp={borderWidth:pd,borderTopWidth:pd,borderRightWidth:pd,borderBottomWidth:pd,borderLeftWidth:pd,borderRadius:pd,borderTopLeftRadius:pd,borderTopRightRadius:pd,borderBottomRightRadius:pd,borderBottomLeftRadius:pd,width:pd,maxWidth:pd,height:pd,maxHeight:pd,top:pd,right:pd,bottom:pd,left:pd,inset:pd,insetBlock:pd,insetBlockStart:pd,insetBlockEnd:pd,insetInline:pd,insetInlineStart:pd,insetInlineEnd:pd,padding:pd,paddingTop:pd,paddingRight:pd,paddingBottom:pd,paddingLeft:pd,paddingBlock:pd,paddingBlockStart:pd,paddingBlockEnd:pd,paddingInline:pd,paddingInlineStart:pd,paddingInlineEnd:pd,margin:pd,marginTop:pd,marginRight:pd,marginBottom:pd,marginLeft:pd,marginBlock:pd,marginBlockStart:pd,marginBlockEnd:pd,marginInline:pd,marginInlineStart:pd,marginInlineEnd:pd,fontSize:pd,backgroundPositionX:pd,backgroundPositionY:pd,...{rotate:dd,rotateX:dd,rotateY:dd,rotateZ:dd,scale:td,scaleX:td,scaleY:td,scaleZ:td,skew:dd,skewX:dd,skewY:dd,distance:pd,translateX:pd,translateY:pd,translateZ:pd,x:pd,y:pd,z:pd,perspective:pd,transformPerspective:pd,opacity:ed,originX:vd,originY:vd,originZ:pd},zIndex:Jp,fillOpacity:ed,strokeOpacity:ed,numOctaves:Jp},eh={...Qp,color:gd,backgroundColor:gd,outlineColor:gd,fill:gd,stroke:gd,borderColor:gd,borderTopColor:gd,borderRightColor:gd,borderBottomColor:gd,borderLeftColor:gd,filter:Xp,WebkitFilter:Xp,mask:Zp,WebkitMask:Zp},th=e=>eh[e],nh=new Set([Xp,Zp]);function rh(e,t){let n=th(e);return nh.has(n)||(n=Pd),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const oh=new Set(["auto","none","0"]);class ih extends Hf{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Xu(r))){const o=yp(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Tp.has(n)||2!==e.length)return;const[r,o]=e,i=Kp(r),a=Kp(o);if(Ju(r)!==Ju(o)&&Vf[n])this.needsMeasurement=!0;else if(i!==a)if(Rf(i)&&Rf(a))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else Vf[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||Hp(e[t]))&&n.push(t);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!oh.has(t)&&Od(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=rh(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Vf[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const o=n.length-1,i=n[o];n[o]=Vf[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}function ah(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=n?.[e]??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const sh=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function lh(e){return lu(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:ch}=Vu(queueMicrotask,!1),uh={x:!1,y:!1};function dh(){return uh.x||uh.y}function fh(e,t){const n=ah(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function ph(e,t,n={}){const[r,o,i]=fh(e,n);return r.forEach(e=>{let n,r=!1,i=!1;const a=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),i&&(i=!1,a(e))},l=e=>{"touch"!==e.pointerType&&(r?i=!0:a(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||dh())return;i=!1;const a=t(e,r);"function"==typeof a&&(n=a,e.addEventListener("pointerleave",l,o))},o),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",s,o)},o)}),i}const hh=(e,t)=>!!t&&(e===t||hh(e,t.parentElement)),mh=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,vh=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const yh=new Set(["INPUT","SELECT","TEXTAREA"]);const gh=new WeakSet;function bh(e){return t=>{"Enter"===t.key&&e(t)}}function xh(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function wh(e){return mh(e)&&!dh()}const Eh=new WeakSet;function Oh(e,t,n={}){const[r,o,i]=fh(e,n),a=e=>{const r=e.currentTarget;if(!wh(e))return;if(Eh.has(e))return;gh.add(r),n.stopPropagation&&Eh.add(e);const i=t(r,e),a=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),gh.has(r)&&gh.delete(r),wh(e)&&"function"==typeof i&&i(e,{success:t})},s=e=>{a(e,r===window||r===document||n.useGlobalTarget||hh(r,e.target))},l=e=>{a(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",a,o),lh(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=bh(()=>{if(gh.has(n))return;xh(n,"down");const e=bh(()=>{xh(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>xh(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o)),t=e,vh.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),i}function Sh(e){return lu(e)&&"ownerSVGElement"in e}const kh=new WeakMap;let Ph;const Ah=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:Sh(r)&&"getBBox"in r?r.getBBox()[t]:r[n],jh=Ah("inline","width","offsetWidth"),Th=Ah("block","height","offsetHeight");function Ch({target:e,borderBoxSize:t}){kh.get(e)?.forEach(n=>{n(e,{get width(){return jh(e,t)},get height(){return Th(e,t)}})})}function Mh(e){e.forEach(Ch)}function Nh(e,t){Ph||"undefined"!=typeof ResizeObserver&&(Ph=new ResizeObserver(Mh));const n=ah(e);return n.forEach(e=>{let n=kh.get(e);n||(n=new Set,kh.set(e,n)),n.add(t),Ph?.observe(e)}),()=>{n.forEach(e=>{const n=kh.get(e);n?.delete(t),n?.size||Ph?.unobserve(e)})}}const Ih=new Set;let Dh;function _h(e){return Ih.add(e),Dh||(Dh=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ih.forEach(t=>t(e))},window.addEventListener("resize",Dh)),()=>{Ih.delete(e),Ih.size||"function"!=typeof Dh||(window.removeEventListener("resize",Dh),Dh=void 0)}}function Rh(e,t){return"function"==typeof e?_h(e):Nh(e,t)}const Lh=[...Wp,gd,Pd],zh=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Vh=new WeakMap;function Bh(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function Fh(e){return"string"==typeof e||Array.isArray(e)}const $h=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Uh=["initial",...$h];function Wh(e){return Bh(e.animate)||Uh.some(t=>Fh(e[t]))}function Kh(e){return Boolean(Wh(e)||e.variants)}const Hh={current:null},Yh={current:!1},qh="undefined"!=typeof window;const Gh=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Xh={};function Zh(e){Xh=e}class Jh{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:i,visualState:a},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Hf,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Hu.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Bu.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=s,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=Wh(t),this.isVariantNode=Kh(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&_p(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,Vh.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(Yh.current||function(){if(Yh.current=!0,qh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Hh.current=e.matches;e.addEventListener("change",t),t()}else Hh.current=!1}(),this.shouldReduceMotion=Hh.current),"production"!==process.env.NODE_ENV&&xu(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Fu(this.notifyUpdate),Fu(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&cp.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:o,ease:i,duration:a}=t.accelerate,s=new rp({element:this.current,name:e,keyframes:r,times:o,ease:i,duration:vu(a)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=_f.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Bu.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Xh){const t=Xh[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<Gh.length;t++){const n=Gh[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(_p(o))e.addValue(r,o);else if(_p(i))e.addValue(r,Mp(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,Mp(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Mp(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(su(n)||cu(n))?n=parseFloat(n):(r=n,!Lh.find(Up(r))&&Pd.test(t)&&(n=rh(e,t))),this.setBaseTarget(e,_p(n)?n.get():n)),_p(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=Ap(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||_p(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new mu),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){ch.render(this.render)}}class Qh extends Jh{constructor(){super(...arguments),this.KeyframeResolver=ih}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;_p(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class em{constructor(e){this.isMounted=!1,this.node=e}update(){}}function tm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function nm(e){return void 0===e||1===e}function rm({scale:e,scaleX:t,scaleY:n}){return!nm(e)||!nm(t)||!nm(n)}function om(e){return rm(e)||im(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function im(e){return am(e.x)||am(e.y)}function am(e){return e&&"0%"!==e}function sm(e,t,n){return n+t*(e-n)}function lm(e,t,n,r,o){return void 0!==o&&(e=sm(e,o,r)),sm(e,n,r)+t}function cm(e,t=0,n=1,r,o){e.min=lm(e.min,t,n,r,o),e.max=lm(e.max,t,n,r,o)}function um(e,{x:t,y:n}){cm(e.x,t.translate,t.scale,t.originPoint),cm(e.y,n.translate,n.scale,n.originPoint)}const dm=.999999999999,fm=1.0000000000001;function pm(e,t){e.min+=t,e.max+=t}function hm(e,t,n,r,o=.5){cm(e,t,n,Td(e.min,e.max,o),r)}function mm(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function vm(e,t,n){const r=n??e;hm(e.x,mm(t.x,r.x),t.scaleX,t.scale,t.originX),hm(e.y,mm(t.y,r.y),t.scaleY,t.scale,t.originY)}function ym(e,t){return tm(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const gm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},bm=Df.length;function xm(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let a=!1,s=!1;for(const e in t){const n=t[e];if(_f.has(e))a=!0;else if(qu(e))o[e]=n;else{const t=sh(n,Qp[e]);e.startsWith("origin")?(s=!0,i[e]=t):r[e]=t}}if(t.transform||(a||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<bm;i++){const a=Df[i],s=e[a];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(a.startsWith("scale")?1:0);else{const e=parseFloat(s);l=a.startsWith("scale")?1===e:0===e}if(!l||n){const e=sh(s,Qp[a]);l||(o=!1,r+=`${gm[a]||a}(${e}) `),n&&(t[a]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}function wm(e,{style:t,vars:n},r,o){const i=e.style;let a;for(a in t)i[a]=t[a];for(a in o?.applyProjectionStyles(i,r),n)i.setProperty(a,n[a])}function Em(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Om={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!pd.test(e))return e;e=parseFloat(e)}return`${Em(e,t.target.x)}% ${Em(e,t.target.y)}%`}},Sm={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Pd.parse(e);if(o.length>5)return r;const i=Pd.createTransformer(e),a="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+a]/=s,o[1+a]/=l;const c=Td(s,l,.5);return"number"==typeof o[2+a]&&(o[2+a]/=c),"number"==typeof o[3+a]&&(o[3+a]/=c),i(o)}},km={borderRadius:{...Om,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Om,borderTopRightRadius:Om,borderBottomLeftRadius:Om,borderBottomRightRadius:Om,boxShadow:Sm};function Pm(e,{layout:t,layoutId:n}){return _f.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!km[e]||"opacity"===e)}function Am(e,t,n){const r=e.style,o=t?.style,i={};if(!r)return i;for(const t in r)(_p(r[t])||o&&_p(o[t])||Pm(t,e)||void 0!==n?.getValue(t)?.liveStyle)&&(i[t]=r[t]);return i}class jm extends Qh{constructor(){super(...arguments),this.type="html",this.renderInstance=wm}readValueFromInstance(e,t){if(_f.has(t))return this.projection?.isProjecting?Mf(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Nf(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),o=(qu(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return ym(e,t)}build(e,t,n){xm(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Am(e,t,n)}}const Tm={offset:"stroke-dashoffset",array:"stroke-dasharray"},Cm={offset:"strokeDashoffset",array:"strokeDasharray"};const Mm=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Nm(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:i=1,pathOffset:a=0,...s},l,c,u){if(xm(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const e of Mm)void 0!==d[e]&&(f[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==o&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Tm:Cm;e[i.offset]=""+-r,e[i.array]=`${t} ${n}`}(d,o,i,a,!1)}const Im=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Dm=e=>"string"==typeof e&&"svg"===e.toLowerCase();function _m(e,t,n){const r=Am(e,t,n);for(const n in e)if(_p(e[n])||_p(t[n])){r[-1!==Df.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]}return r}class Rm extends Qh{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=zh}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_f.has(t)){const e=th(t);return e&&e.default||0}return t=Im.has(t)?t:Lp(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return _m(e,t,n)}build(e,t,n){Nm(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){wm(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Im.has(n)?n:Lp(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Dm(e.tagName),super.mount(e)}}const Lm=Uh.length;function zm(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&zm(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Lm;n++){const r=Uh[n],o=e.props[r];(Fh(o)||!1===o)&&(t[r]=o)}return t}function Vm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Bm=[...$h].reverse(),Fm=$h.length;function $m(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>$p(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=$p(e,t,n);else{const o="function"==typeof t?jp(e,t,n.custom):t;r=Promise.all(Fp(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function Um(e){let t=$m(e),n=Hm(),r=!0,o=!1;const i=t=>(n,r)=>{const o=jp(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function a(a){const{props:s}=e,l=zm(e.parent)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<Fm;t++){const p=Bm[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],v=Fh(m),y=p===a?h.isActive:null;!1===y&&(f=t);let g=m===l[p]&&m!==s[p]&&v;if(g&&(r||o)&&e.manuallyAnimateOnMount&&(g=!1),h.protectedKeys={...d},!h.isActive&&null===y||!m&&!h.prevProp||Bh(m)||"boolean"==typeof m)continue;if("exit"===p&&h.isActive&&!0!==y){h.prevResolvedValues&&(d={...d,...h.prevResolvedValues});continue}const b=Wm(h.prevProp,m);let x=b||p===a&&h.isActive&&!g&&v||t>f&&v,w=!1;const E=Array.isArray(m)?m:[m];let O=E.reduce(i(p),{});!1===y&&(O={});const{prevResolvedValues:S={}}=h,k={...S,...O},P=t=>{x=!0,u.has(t)&&(w=!0,u.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in k){const t=O[e],n=S[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Np(t)&&Np(n)?!Vm(t,n):t!==n,r?null!=t?P(e):u.add(e):void 0!==t&&u.has(e)?P(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=O,h.isActive&&(d={...d,...O}),(r||o)&&e.blockInitialAnimation&&(x=!1);const A=g&&b;x&&(!A||w)&&c.push(...E.map(t=>{const n={type:p};if("string"==typeof t&&(r||o)&&!A&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,o=jp(r,t);if(r.enteringChildren&&o){const{delayChildren:t}=o.transition||{};n.delay=mp(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof s.initial){const n=jp(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let p=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,o=!1,p?t(c):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const o=a(t);for(const e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Hm(),o=!0}}}function Wm(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Vm(t,e)}function Km(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Hm(){return{animate:Km(!0),whileInView:Km(),whileHover:Km(),whileTap:Km(),whileDrag:Km(),whileFocus:Km(),exit:Km()}}function Ym(e,t){e.min=t.min,e.max=t.max}function qm(e,t){Ym(e.x,t.x),Ym(e.y,t.y)}function Gm(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Xm(e){return e.max-e.min}function Zm(e,t,n,r=.5){e.origin=r,e.originPoint=Td(t.min,t.max,e.origin),e.scale=Xm(n)/Xm(t),e.translate=Td(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Jm(e,t,n,r){Zm(e.x,t.x,n.x,r?r.originX:void 0),Zm(e.y,t.y,n.y,r?r.originY:void 0)}function Qm(e,t,n,r=0){const o=r?Td(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+Xm(t)}function ev(e,t,n,r=0){const o=r?Td(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+Xm(t)}function tv(e,t,n,r){ev(e.x,t.x,n.x,r?.x),ev(e.y,t.y,n.y,r?.y)}function nv(e,t,n,r,o){return e=sm(e-=t,1/n,r),void 0!==o&&(e=sm(e,1/o,r)),e}function rv(e,t,[n,r,o],i,a){!function(e,t=0,n=1,r=.5,o,i=e,a=e){fd.test(t)&&(t=parseFloat(t),t=Td(a.min,a.max,t/100)-a.min);if("number"!=typeof t)return;let s=Td(i.min,i.max,r);e===i&&(s-=t),e.min=nv(e.min,t,n,s,o),e.max=nv(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,i,a)}const ov=["x","scaleX","originX"],iv=["y","scaleY","originY"];function av(e,t,n,r){rv(e.x,t,ov,n?n.x:void 0,r?r.x:void 0),rv(e.y,t,iv,n?n.y:void 0,r?r.y:void 0)}function sv(e){return 0===e.translate&&1===e.scale}function lv(e){return sv(e.x)&&sv(e.y)}function cv(e,t){return e.min===t.min&&e.max===t.max}function uv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function dv(e,t){return uv(e.x,t.x)&&uv(e.y,t.y)}function fv(e){return Xm(e.x)/Xm(e.y)}function pv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function hv(e){return[e("x"),e("y")]}const mv=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],vv=mv.length,yv=e=>"string"==typeof e?parseFloat(e):e,gv=e=>"number"==typeof e||pd.test(e);function bv(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const xv=Ev(0,.5,Cu),wv=Ev(.5,.95,du);function Ev(e,t,n){return r=>r<e?0:r>t?1:n(hu(e,t,r))}function Ov(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Sv=(e,t)=>e.depth-t.depth;class kv{constructor(){this.children=[],this.isDirty=!1}add(e){eu(this.children,e),this.isDirty=!0}remove(e){tu(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Sv),this.isDirty=!1,this.children.forEach(e)}}function Pv(e){return _p(e)?e.get():e}class Av{constructor(){this.members=[]}add(e){eu(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(tu(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(tu(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent&&!1!==e.instance?.isConnected)return this.promote(e),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:o}=e.options;void 0!==r&&r===o||(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const jv={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Tv=["","X","Y","Z"];let Cv=0;function Mv(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Nv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Vp(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Bu,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Nv(r)}function Iv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=t?.()){this.id=Cv++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Rv),this.nodes.forEach(Kv),this.nodes.forEach(Hv),this.nodes.forEach(Lv)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new kv)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new mu),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=Sh(t)&&!(Sh(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const o=()=>this.root.updateBlockedByResize=!1;Bu.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Hu.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Fu(r),e(i-t))};return Bu.setup(r,!0),()=>Fu(r)}(o,250),jv.hasAnimatedSinceResize&&(jv.hasAnimatedSinceResize=!1,this.nodes.forEach(Wv)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&i&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||Jv,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!dv(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...Op(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c)}else t||Wv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Fu(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Yv),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,"string"!=typeof t.latestValues.x&&"string"!=typeof t.latestValues.y||(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Bv),void this.nodes.forEach(Vv)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Fv);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach($v),this.nodes.forEach(Uv),this.nodes.forEach(Dv),this.nodes.forEach(_v)):this.nodes.forEach(Fv),this.clearAllSnapshots();const e=Hu.now();$u.delta=nu(0,1e3/60,e-$u.timestamp),$u.timestamp=e,$u.isProcessing=!0,Uu.update.process($u),Uu.preRender.process($u),Uu.render.process($u),$u.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ch.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zv),this.sharedNodes.forEach(qv)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Bu.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Bu.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Xm(this.snapshot.measuredBox.x)||Xm(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++){this.path[e].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!lv(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||om(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),ty((r=n).x),ty(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(ry))){const{scroll:e}=this.root;e&&(pm(t.x,e.offset.x),pm(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(qm(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&qm(t,e),pm(t.x,o.offset.x),pm(t.y,o.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};qm(r,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(pm(r.x,-n.scroll.offset.x),pm(r.y,-n.scroll.offset.y)),om(n.latestValues)&&vm(r,n.latestValues,n.layout?.layoutBox)}return om(this.latestValues)&&vm(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};qm(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!om(n.latestValues))continue;let r;n.instance&&(rm(n.latestValues)&&n.updateSnapshot(),r=zh(),qm(r,n.measurePageBox())),av(t,n.latestValues,n.snapshot?.layoutBox,r)}return om(this.latestValues)&&av(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$u.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(!this.layout||!r&&!o)return;this.resolvedRelativeTargetAt=$u.timestamp;const i=this.getClosestProjectingParent();var a,s,l,c;(i&&this.linkedParentVersion!==i.layoutVersion&&!i.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&i&&i.layout?this.createRelativeTarget(i,this.layout.layoutBox,i.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),a=this.target,s=this.relativeTarget,l=this.relativeParent.target,c=this.options.layoutAnchor||void 0,Qm(a.x,s.x,l.x,c?.x),Qm(a.y,s.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):qm(this.target,this.layout.layoutBox),um(this.target,this.targetDelta)):qm(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target&&1!==this.animationProgress?this.createRelativeTarget(i,this.target,i.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!rm(this.parent.latestValues)&&!im(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},tv(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),qm(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===$u.timestamp&&(n=!1),n)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;qm(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,a;t.x=t.y=1;for(let s=0;s<o;s++){i=n[s],a=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(pm(e.x,-i.scroll.offset.x),pm(e.y,-i.scroll.offset.y)),a&&(t.x*=a.x.scale,t.y*=a.y.scale,um(e,a)),r&&om(i.latestValues)&&vm(e,i.latestValues,i.layout?.layoutBox))}t.x<fm&&t.x>dm&&(t.x=1),t.y<fm&&t.y>dm&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(Gm(this.prevProjectionDelta.x,this.projectionDelta.x),Gm(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Jm(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===i&&this.treeScale.y===a&&pv(this.projectionDelta.x,this.prevProjectionDelta.x)&&pv(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const a={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Zv));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Gv(i.x,e.x,n),Gv(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(tv(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(e,t,n,r){Xv(e.x,t.x,n.x,r),Xv(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,a,n),d&&function(e,t){return cv(e.x,t.x)&&cv(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),qm(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Td(0,n.opacity??1,xv(r)),e.opacityExit=Td(t.opacity??1,0,wv(r))):i&&(e.opacity=Td(t.opacity??1,n.opacity??1,r));for(let o=0;o<vv;o++){const i=mv[o];let a=bv(t,i),s=bv(n,i);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||gv(a)===gv(s)?(e[i]=Math.max(Td(yv(a),yv(s),r),0),(fd.test(s)||fd.test(a))&&(e[i]+="%")):e[i]=s)}(t.rotate||n.rotate)&&(e.rotate=Td(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Fu(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Bu.update(()=>{jv.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mp(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=_p(e)?e:Mp(e);return r.start(kp("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ny(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Xm(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Xm(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}qm(t,n),vm(t,o),Jm(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Av);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&Mv("z",e,r,this.animationValues);for(let t=0;t<Tv.length;t++)Mv(`rotate${Tv[t]}`,e,r,this.animationValues),Mv(`skew${Tv[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=Pv(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Pv(t?.pointerEvents)||""),void(this.hasProjected&&!om(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const o=r.animationValues||r.latestValues;this.applyTransformsToTarget();let i=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,a=n?.z||0;if((o||i||a)&&(r=`translate3d(${o}px, ${i}px, ${a}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:a,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),a&&(r+=`skewX(${a}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,o);n&&(i=n(o,i)),e.transform=i;const{x:a,y:s}=this.projectionDelta;e.transformOrigin=`${100*a.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=r===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const t in km){if(void 0===o[t])continue;const{correct:n,applyTo:a,isCSSVariable:s}=km[t],l="none"===i?o[t]:n(o[t],r);if(a){const t=a.length;for(let n=0;n<t;n++)e[a[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?Pv(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Vv),this.root.sharedNodes.clear()}}}function Dv(e){e.updateLayout()}function _v(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,i=t.source!==e.layout.source;if("size"===o)hv(e=>{const r=i?t.measuredBox[e]:t.layoutBox[e],o=Xm(r);r.min=n[e].min,r.max=r.min+o});else if("x"===o||"y"===o){const e="x"===o?"y":"x";Ym(i?t.measuredBox[e]:t.layoutBox[e],n[e])}else ny(o,t.layoutBox,n)&&hv(r=>{const o=i?t.measuredBox[r]:t.layoutBox[r],a=Xm(n[r]);o.max=o.min+a,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+a)});const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Jm(a,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Jm(s,e.applyTransform(r,!0),t.measuredBox):Jm(s,n,t.layoutBox);const l=!lv(a);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const a=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};tv(s,t.layoutBox,o.layoutBox,a);const l={x:{min:0,max:0},y:{min:0,max:0}};tv(l,n,i.layoutBox,a),dv(s,l)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:a,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Rv(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Lv(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function zv(e){e.clearSnapshot()}function Vv(e){e.clearMeasurements()}function Bv(e){e.isLayoutDirty=!0,e.updateLayout()}function Fv(e){e.isLayoutDirty=!1}function $v(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Uv(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Kv(e){e.resolveTargetDelta()}function Hv(e){e.calcProjection()}function Yv(e){e.resetSkewAndRotation()}function qv(e){e.removeLeadSnapshot()}function Gv(e,t,n){e.translate=Td(t.translate,0,n),e.scale=Td(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Xv(e,t,n,r){e.min=Td(t.min,n.min,r),e.max=Td(t.max,n.max,r)}function Zv(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Jv={duration:.45,ease:[.4,0,.1,1]},Qv=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),ey=Qv("applewebkit/")&&!Qv("chrome/")?Math.round:du;function ty(e){e.min=ey(e.min),e.max=ey(e.max)}function ny(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=fv(t),o=fv(n),i=.2,!(Math.abs(r-o)<=i));var r,o,i}function ry(e){return e!==e.root&&e.scroll?.wasRoot}const oy=Iv({attachResizeListener:(e,t)=>Ov(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),iy={current:void 0},ay=Iv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!iy.current){const e=new oy({});e.mount(window),e.setOptions({layoutScroll:!0}),iy.current=e}return iy.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),sy=e.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function ly(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function cy(...e){return r.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=ly(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():ly(e[t],null)}}}}(...e),e)}class uy extends r.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(lh(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=lh(e)&&e.offsetWidth||0,r=lh(e)&&e.offsetHeight||0,o=getComputedStyle(t),i=this.props.sizeRef.current;i.height=parseFloat(o.height),i.width=parseFloat(o.width),i.top=t.offsetTop,i.left=t.offsetLeft,i.right=n-i.width-i.left,i.bottom=r-i.height-i.top}return null}componentDidUpdate(){}render(){return this.props.children}}function dy({children:t,isPresent:n,anchorX:o,anchorY:i,root:a,pop:s}){const l=e.useId(),c=e.useRef(null),u=e.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:d}=e.useContext(sy),f=t.props?.ref??t?.ref,h=cy(c,f);return e.useInsertionEffect(()=>{const{width:e,height:t,top:r,left:f,right:p,bottom:h}=u.current;if(n||!1===s||!c.current||!e||!t)return;const m="left"===o?`left: ${f}`:`right: ${p}`,v="bottom"===i?`bottom: ${h}`:`top: ${r}`;c.current.dataset.motionPopId=l;const y=document.createElement("style");d&&(y.nonce=d);const g=a??document.head;return g.appendChild(y),y.sheet&&y.sheet.insertRule(`\n [data-motion-pop-id="${l}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n ${m}px !important;\n ${v}px !important;\n }\n `),()=>{c.current?.removeAttribute("data-motion-pop-id"),g.contains(y)&&g.removeChild(y)}},[n]),p.jsx(uy,{isPresent:n,childRef:c,sizeRef:u,pop:s,children:!1===s?t:r.cloneElement(t,{ref:h})})}const fy=({children:t,initial:n,isPresent:o,onExitComplete:i,custom:a,presenceAffectsLayout:s,mode:l,anchorX:c,anchorY:u,root:d})=>{const f=Zc(py),h=e.useId();let m=!0,v=e.useMemo(()=>(m=!1,{id:h,initial:n,isPresent:o,custom:a,onExitComplete:e=>{f.set(e,!0);for(const e of f.values())if(!e)return;i&&i()},register:e=>(f.set(e,!1),()=>f.delete(e))}),[o,f,i]);return s&&m&&(v={...v}),e.useMemo(()=>{f.forEach((e,t)=>f.set(t,!1))},[o]),r.useEffect(()=>{!o&&!f.size&&i&&i()},[o]),t=p.jsx(dy,{pop:"popLayout"===l,isPresent:o,anchorX:c,anchorY:u,root:d,children:t}),p.jsx(Qc.Provider,{value:v,children:t})};function py(){return new Map}function hy(t=!0){const n=e.useContext(Qc);if(null===n)return[!0,null];const{isPresent:r,onExitComplete:o,register:i}=n,a=e.useId();e.useEffect(()=>{if(t)return i(a)},[t]);const s=e.useCallback(()=>t&&o&&o(a),[a,o,t]);return!r&&o?[!1,s]:[!0]}const my=e=>e.key||"";function vy(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const yy=({children:t,custom:n,initial:r=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync",propagate:s=!1,anchorX:l="left",anchorY:c="top",root:u})=>{const[d,f]=hy(s),h=e.useMemo(()=>vy(t),[t]),m=s&&!d?[]:h.map(my),v=e.useRef(!0),y=e.useRef(h),g=Zc(()=>new Map),b=e.useRef(new Set),[x,w]=e.useState(h),[E,O]=e.useState(h);Jc(()=>{v.current=!1,y.current=h;for(let e=0;e<E.length;e++){const t=my(E[e]);m.includes(t)?(g.delete(t),b.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[E,m.length,m.join("-")]);const S=[];if(h!==x){let e=[...h];for(let t=0;t<E.length;t++){const n=E[t],r=my(n);m.includes(r)||(e.splice(t,0,n),S.push(n))}return"wait"===a&&S.length&&(e=S),O(vy(e)),w(h),null}"production"!==process.env.NODE_ENV&&"wait"===a&&E.length>1&&console.warn('You\'re attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.');const{forceRender:k}=e.useContext(Xc);return p.jsx(p.Fragment,{children:E.map(e=>{const t=my(e),x=!(s&&!d)&&(h===E||m.includes(t));return p.jsx(fy,{isPresent:x,initial:!(v.current&&!r)&&void 0,custom:n,presenceAffectsLayout:i,mode:a,root:u,onExitComplete:x?void 0:()=>{if(b.current.has(t))return;if(!g.has(t))return;b.current.add(t),g.set(t,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(k?.(),O(y.current),s&&f?.(),o&&o())},anchorX:l,anchorY:c,children:e},t)})})},gy=e.createContext({strict:!1}),by={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let xy=!1;function wy(){return function(){if(xy)return;const e={};for(const t in by)e[t]={isEnabled:e=>by[t].some(t=>!!e[t])};Zh(e),xy=!0}(),Xh}const Ey=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Oy(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Ey.has(e)}let Sy=e=>!Oy(e);try{"function"==typeof(ky=require("@emotion/is-prop-valid").default)&&(Sy=e=>e.startsWith("on")?!Oy(e):ky(e))}catch{}var ky;const Py=e.createContext({});function Ay(t){const{initial:n,animate:r}=function(e,t){if(Wh(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Fh(t)?t:void 0,animate:Fh(n)?n:void 0}}return!1!==e.inherit?t:{}}(t,e.useContext(Py));return e.useMemo(()=>({initial:n,animate:r}),[jy(n),jy(r)])}function jy(e){return Array.isArray(e)?e.join(" "):e}const Ty=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cy(e,t,n){for(const r in t)_p(t[r])||Pm(r,n)||(e[r]=t[r])}function My(t,n){const r={};return Cy(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return xm(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),r}function Ny(e,t){const n={},r=My(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const Iy=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Dy(t,n,r,o){const i=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Nm(e,n,Dm(o),t.transformTemplate,t.style),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Cy(e,t.style,t),i.style={...e,...i.style}}return i}const _y=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ry(e){return"string"==typeof e&&!e.includes("-")&&!!(_y.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ly(t,n,r,{latestValues:o},i,a=!1,s){const l=(s??Ry(t)?Dy:Ny)(n,o,i,t),c=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||_p(e[o])||(Sy(o)||!0===n&&Oy(o)||!t&&!Oy(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,a),u=t!==e.Fragment?{...c,...l,ref:r}:{},{children:d}=n,f=e.useMemo(()=>_p(d)?d.get():d,[d]);return e.createElement(t,{...u,children:f})}function zy(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=Pv(i[e]);let{initial:a,animate:s}=e;const l=Wh(e),c=Kh(e);t&&c&&!l&&!1!==e.inherit&&(void 0===a&&(a=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===a;const d=u?s:a;if(d&&"boolean"!=typeof d&&!Bh(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=Ap(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];if(Array.isArray(t)){t=t[u?t.length-1:0]}null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const Vy=t=>(n,r)=>{const o=e.useContext(Py),i=e.useContext(Qc),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:zy(n,r,o,e),renderState:t()}}(t,n,o,i);return r?a():Zc(a)},By=Vy({scrapeMotionValuesFromProps:Am,createRenderState:Ty}),Fy=Vy({scrapeMotionValuesFromProps:_m,createRenderState:Iy}),$y=Symbol.for("motionComponentSymbol");function Uy(t,n,r){const o=e.useRef(r);e.useInsertionEffect(()=>{o.current=r});const i=e.useRef(null);return e.useCallback(e=>{e&&t.onMount?.(e);const r=o.current;if("function"==typeof r)if(e){const t=r(e);"function"==typeof t&&(i.current=t)}else i.current?(i.current(),i.current=null):r(e);else r&&(r.current=e);n&&(e?n.mount(e):n.unmount())},[n])}const Wy=e.createContext({});function Ky(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Hy(t,n,r,o,i,a){const{visualElement:s}=e.useContext(Py),l=e.useContext(gy),c=e.useContext(Qc),u=e.useContext(sy),d=u.reducedMotion,f=u.skipAnimations,p=e.useRef(null),h=e.useRef(!1);o=o||l.renderer,!p.current&&o&&(p.current=o(t,{visualState:n,parent:s,props:r,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:d,skipAnimations:f,isSVG:a}),h.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));const m=p.current,v=e.useContext(Wy);!m||m.projection||!i||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:a,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Yy(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&Ky(s),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}(p.current,r,i,v);const y=e.useRef(!1);e.useInsertionEffect(()=>{m&&y.current&&m.update(r,c)});const g=r[zp],b=e.useRef(Boolean(g)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return Jc(()=>{h.current=!0,m&&(y.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),e.useEffect(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),b.current=!1),m.enteringChildren=void 0)}),m}function Yy(e){if(e)return!1!==e.options.allowProjection?e.projection:Yy(e.parent)}function qy(t,{forwardMotionProps:n=!1,type:r}={},o,i){o&&function(e){const t=wy();for(const n in e)t[n]={...t[n],...e[n]};Zh(t)}(o);const a=r?"svg"===r:Ry(t),s=a?Fy:By;function l(r,l){let c;const u={...e.useContext(sy),...r,layoutId:Gy(r)},{isStatic:d}=u,f=Ay(r),h=s(r,d);if(!d&&"undefined"!=typeof window){!function(t,n){const r=e.useContext(gy).strict;if("production"!==process.env.NODE_ENV&&n&&r){const e="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?ou(!1,e,"lazy-strict-mode"):iu(!1,e,"lazy-strict-mode")}}(u,o);const n=function(e){const t=wy(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(u);c=n.MeasureLayout,f.visualElement=Hy(t,h,u,i,n.ProjectionNode,a)}return p.jsxs(Py.Provider,{value:f,children:[c&&f.visualElement?p.jsx(c,{visualElement:f.visualElement,...u}):null,Ly(t,r,Uy(h,f.visualElement,l),h,d,n,a)]})}l.displayName=`motion.${"string"==typeof t?t:`create(${t.displayName??t.name??""})`}`;const c=e.forwardRef(l);return c[$y]=t,c}function Gy({layoutId:t}){const n=e.useContext(Xc).id;return n&&void 0!==t?n+"-"+t:t}function Xy(e,t){if("undefined"==typeof Proxy)return qy;const n=new Map,r=(n,r)=>qy(n,r,e,t);return new Proxy((e,t)=>("production"!==process.env.NODE_ENV&&xu(!1,"motion() is deprecated. Use motion.create() instead."),r(e,t)),{get:(o,i)=>"create"===i?r:(n.has(i)||n.set(i,qy(i,void 0,e,t)),n.get(i))})}const Zy=(t,n)=>n.isSVG??Ry(t)?new Rm(n):new jm(n,{allowProjection:t!==e.Fragment});let Jy=0;const Qy={animation:{Feature:class extends em{constructor(e){super(e),e.animationState||(e.animationState=Um(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Bh(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends em{constructor(){super(...arguments),this.id=Jy++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){const{initial:e,custom:t}=this.node.getProps();if("string"==typeof e){const n=jp(this.node,e,t);if(n){const{transition:e,transitionEnd:t,...r}=n;for(const e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function eg(e){return{point:{x:e.pageX,y:e.pageY}}}function tg(e,t,n,r){return Ov(e,t,(e=>t=>mh(t)&&e(t,eg(t)))(n),r)}const ng=({current:e})=>e?e.ownerDocument.defaultView:null,rg=(e,t)=>Math.abs(e-t);const og=new Set(["auto","scroll"]);class ig{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:i=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ag(this.lastRawMoveEventInfo,this.transformPagePoint));const e=lg(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=rg(e.x,t.x),r=rg(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=$u;this.history.push({...r,timestamp:o});const{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=ag(t,this.transformPagePoint),Bu.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=lg("pointercancel"===e.type?this.lastMoveEventInfo:ag(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!mh(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=r||window;const s=ag(eg(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=$u;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,lg(s,this.history)),this.removeListeners=pu(tg(this.contextWindow,"pointermove",this.handlePointerMove),tg(this.contextWindow,"pointerup",this.handlePointerUp),tg(this.contextWindow,"pointercancel",this.handlePointerUp)),a&&this.startScrollTracking(a)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(og.has(e.overflowX)||og.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o=r.x-t.x,i=r.y-t.y;0===o&&0===i||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=i):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=i),this.scrollPositions.set(e,r),Bu.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Fu(this.updatePoint)}}function ag(e,t){return t?{point:t(e.point)}:e}function sg(e,t){return{x:e.x-t.x,y:e.y-t.y}}function lg({point:e},t){return{point:e,delta:sg(e,ug(t)),offset:sg(e,cg(t)),velocity:dg(t,.1)}}function cg(e){return e[0]}function ug(e){return e[e.length-1]}function dg(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ug(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>vu(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>2*vu(t)&&(r=e[1]);const i=yu(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function fg(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function pg(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const hg=.35;function mg(e,t,n){return{min:vg(e,t),max:vg(e,n)}}function vg(e,t){return"number"==typeof e?e:e[t]||0}const yg=new WeakMap;class gg{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new ig(e,{onSessionStart:e=>{t&&this.snapToCursor(eg(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?uh[i]?null:(uh[i]=!0,()=>{uh[i]=!1}):uh.x||uh.y?null:(uh.x=uh.y=!0,()=>{uh.x=uh.y=!1}),!this.openDragLock))return;var i;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),hv(e=>{let t=this.getAxisMotionValue(e).get()||0;if(fd.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Xm(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),o&&Bu.update(()=>o(e,t),!1,!0),Rp(this.visualElement,"transform");const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:a}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(a),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,a),this.updateAxis("y",t.point,a),this.visualElement.render(),i&&Bu.update(()=>i(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:ng(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&Bu.postRender(()=>a(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!xg(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Td(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Td(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Ky(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:fg(e.x,n,o),y:fg(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=hg){return!1===e?e=0:!0===e&&(e=hg),{x:mg(e,"left","right"),y:mg(e,"top","bottom")}}(t),r!==this.constraints&&!Ky(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&hv(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ky(e))return!1;const n=e.current;iu(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=ym(e,n),{scroll:o}=t;return o&&(pm(r.x,o.offset.x),pm(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:pg(e.x,t.x),y:pg(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=tm(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),s=this.constraints||{},l=hv(a=>{if(!xg(a,t,this.currentDirection))return;let l=s&&s[a]||{};!0!==i&&i!==a||(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[a]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(a,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return Rp(this.visualElement,e),n.start(kp(e,n,0,t,this.visualElement,!1))}stopAnimation(){hv(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){hv(t=>{const{drag:n}=this.getProps();if(!xg(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t],a=o.get()||0;o.set(e[t]-Td(n,i,.5)+a)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ky(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};hv(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Xm(e),o=Xm(t);return o>r?n=hu(t.min,t.max-r,e.min):r>o&&(n=hu(e.min,e.max-o,t.min)),nu(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),hv(t=>{if(!xg(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Td(o,i,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;yg.set(this.visualElement,this);const e=this.visualElement.current,t=tg(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),o=t.target,i=o!==e&&function(e){return yh.has(e.tagName)||!0===e.isContentEditable}(o);n&&r&&!i&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Ky(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=Rh(e,bg(n)),o=Rh(t,bg(n));return()=>{r(),o()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,i=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),Bu.read(r);const a=Ov(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(hv(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{a(),t(),i(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=hg,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:a}}}function bg(e){let t=!0;return()=>{t?t=!1:e()}}function xg(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const wg=e=>(t,n)=>{e&&Bu.update(()=>e(t,n),!1,!0)};let Eg=!1;class Og extends e.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),Eg&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),jv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,{projection:i}=n;return i?(i.isPresent=o,e.layoutDependency!==t&&i.setOptions({...i.options,layoutDependency:t}),Eg=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Bu.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),ch.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Eg=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Sg(t){const[n,r]=hy(),o=e.useContext(Xc);return p.jsx(Og,{...t,layoutGroup:o,switchLayoutGroup:e.useContext(Wy),isPresent:n,safeToRemove:r})}const kg={pan:{Feature:class extends em{constructor(){super(...arguments),this.removePointerDownListener=du}onPointerDown(e){this.session=new ig(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ng(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:wg(e),onStart:wg(t),onMove:wg(n),onEnd:(e,t)=>{delete this.session,r&&Bu.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=tg(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends em{constructor(e){super(e),this.removeGroupControls=du,this.removeListeners=du,this.controls=new gg(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||du}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:ay,MeasureLayout:Sg}};function Pg(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&Bu.postRender(()=>o(t,eg(t)))}function Ag(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&Bu.postRender(()=>o(t,eg(t)))}const jg=new WeakMap,Tg=new WeakMap,Cg=e=>{const t=jg.get(e.target);t&&t(e)},Mg=e=>{e.forEach(Cg)};function Ng(e,t,n){const r=function({root:e,...t}){const n=e||document;Tg.has(n)||Tg.set(n,{});const r=Tg.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(Mg,{root:e,...t})),r[o]}(t);return jg.set(e,n),r.observe(e),()=>{jg.delete(e),r.unobserve(e)}}const Ig={some:0,all:1};const Dg={inView:{Feature:class extends em{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Ig[r]};this.stopObserver=Ng(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends em{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Oh(e,(e,t)=>(Ag(this.node,t,"Start"),(e,{success:t})=>Ag(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends em{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pu(Ov(this.node.current,"focus",()=>this.onFocus()),Ov(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends em{mount(){const{current:e}=this.node;e&&(this.unmount=ph(e,(e,t)=>(Pg(this.node,t,"Start"),e=>Pg(this.node,e,"End"))))}unmount(){}}}},_g=Xy({...Qy,...Dg,...kg,...{layout:{ProjectionNode:ay,MeasureLayout:Sg}}},Zy);var Rg=[{title:"Dashboard",icon:Dl,url:"#"},{title:"Analytics",icon:Ml,url:"#"},{title:"Products",icon:zl,url:"#"},{title:"Customers",icon:Hl,url:"#"},{title:"Tasks",icon:_l,url:"#"},{title:"Settings",icon:Fl,url:"#"},{title:"Help",icon:Nl,url:"#"}];function Lg(e){var t=e.items,n=void 0===t?Rg:t,r=e.onItemClick,o=e.activeItem,i="collapsed"===_c().state;return p.jsxs(Lc,{variant:"inset",collapsible:"icon",children:[p.jsx(Bc,{className:"h-16 flex items-center px-6 border-b border-border/50",children:p.jsxs("div",{className:"flex items-center gap-2 font-bold text-xl tracking-tight",children:[p.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-primary-foreground shrink-0",children:"B"}),p.jsx(yy,{mode:"wait",children:!i&&p.jsx(_g.span,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2},className:"whitespace-nowrap",children:"BMJ UI"})})]})}),p.jsx($c,{children:p.jsxs(Uc,{children:[p.jsx(Wc,{children:p.jsx(yy,{mode:"wait",children:!i&&p.jsx(_g.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:"Main Menu"})})}),p.jsx(Kc,{children:p.jsx(Hc,{children:n.map(function(e){return p.jsx(Yc,{children:p.jsx(Gc,{tooltip:e.title,isActive:o===e.title,onClick:function(){return null==r?void 0:r(e.title)},className:"transition-all duration-200 hover:bg-primary/5 hover:text-primary",render:p.jsxs("button",{type:"button",className:"flex items-center w-full",children:[p.jsx(e.icon,{className:"shrink-0"}),p.jsx(yy,{mode:"wait",children:!i&&p.jsx(_g.span,{initial:{opacity:0,width:0,marginLeft:0},animate:{opacity:1,width:"auto",marginLeft:8},exit:{opacity:0,width:0,marginLeft:0},transition:{duration:.2},className:"overflow-hidden whitespace-nowrap",children:e.title})})]})})},e.title)})})})]})}),p.jsx(Fc,{className:"p-4 border-t border-border/50",children:p.jsxs("div",{className:"flex items-center gap-3 min-h-10",children:[p.jsx("div",{className:"w-8 h-8 rounded-full bg-muted shrink-0"}),p.jsx(yy,{mode:"wait",children:!i&&p.jsxs(_g.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.2},className:"flex flex-col overflow-hidden whitespace-nowrap",children:[p.jsx("span",{className:"text-sm font-medium",children:"Bahry Jarbou"}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"Admin"})]})})]})})]})}function zg(e){var t=e.className,n=r.useState(function(){if("undefined"!=typeof window){var e=localStorage.getItem("bmj-ui-theme");return"light"===e||"dark"===e?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return"light"}),o=n[0],i=n[1];r.useEffect(function(){var e=window.document.documentElement;e.classList.remove("light","dark"),e.classList.add(o),localStorage.setItem("bmj-ui-theme",o)},[o]);return p.jsx(tn,{variant:"ghost",size:"icon",onClick:function(){i(function(e){return"light"===e?"dark":"light"})},className:t,"aria-label":"Toggle theme",children:"light"===o?p.jsx(Ll,{className:"w-5 h-5 transition-all"}):p.jsx($l,{className:"w-5 h-5 transition-all"})})}Array(12).fill(0);let Vg=1;const Bg=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:Vg++,i=this.toasts.find(e=>e.id===o),a=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),i?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:a,title:n}):t):this.addToast({title:n,...r,dismissible:a,id:o}),o},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(t,n)=>{if(!n)return;let r;void 0!==n.loading&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let i,a=void 0!==r;const s=o.then(async t=>{i=["resolve",t];if(e.isValidElement(t))a=!1,this.create({id:r,type:"default",message:t});else if(Fg(t)&&!t.ok){a=!1;const o="function"==typeof n.error?await n.error(`HTTP error! status: ${t.status}`):n.error,i="function"==typeof n.description?await n.description(`HTTP error! status: ${t.status}`):n.description,s="object"==typeof o&&!e.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:i,...s})}else if(t instanceof Error){a=!1;const o="function"==typeof n.error?await n.error(t):n.error,i="function"==typeof n.description?await n.description(t):n.description,s="object"==typeof o&&!e.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:i,...s})}else if(void 0!==n.success){a=!1;const o="function"==typeof n.success?await n.success(t):n.success,i="function"==typeof n.description?await n.description(t):n.description,s="object"==typeof o&&!e.isValidElement(o)?o:{message:o};this.create({id:r,type:"success",description:i,...s})}}).catch(async t=>{if(i=["reject",t],void 0!==n.error){a=!1;const o="function"==typeof n.error?await n.error(t):n.error,i="function"==typeof n.description?await n.description(t):n.description,s="object"==typeof o&&!e.isValidElement(o)?o:{message:o};this.create({id:r,type:"error",description:i,...s})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),null==n.finally||n.finally.call(n)}),l=()=>new Promise((e,t)=>s.then(()=>"reject"===i[0]?t(i[1]):e(i[1])).catch(t));return"string"!=typeof r&&"number"!=typeof r?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||Vg++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Fg=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,$g=(e,t)=>{const n=(null==t?void 0:t.id)||Vg++;return Bg.addToast({title:e,...t,id:n}),n},Ug=Object.assign($g,{success:Bg.success,info:Bg.info,warning:Bg.warning,error:Bg.error,custom:Bg.custom,message:Bg.message,promise:Bg.promise,dismiss:Bg.dismiss,loading:Bg.loading},{getHistory:()=>Bg.toasts,getToasts:()=>Bg.getActiveToasts()});!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const Wg=r.createContext(void 0);function Kg(e){const t=r.useContext(Wg);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.":P(33));return t}"production"!==process.env.NODE_ENV&&(Wg.displayName="MenuPositionerContext");const Hg=r.createContext(void 0);function Yg(e){const t=r.useContext(Hg);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.":P(36));return t}"production"!==process.env.NODE_ENV&&(Hg.displayName="MenuRootContext");const qg=r.createContext(void 0);function Gg(e=!0){const t=r.useContext(qg);if(void 0===t&&!e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.":P(25));return t}"production"!==process.env.NODE_ENV&&(qg.displayName="ContextMenuRootContext");const Xg={type:"regular-item"};function Zg(e){const{closeOnClick:t,disabled:n=!1,highlighted:o,id:i,store:a,typingRef:s=a.context.typingRef,nativeButton:l,itemMetadata:c,nodeId:u}=e,d=r.useRef(null),{getButtonProps:f,buttonRef:p}=Zt({disabled:n,focusableWhenDisabled:!0,native:l,composite:!0}),h=function(e){const{closeOnClick:t,highlighted:n,id:o,nodeId:i,store:a,typingRef:s,itemRef:l,itemMetadata:c}=e,{events:u}=a.useState("floatingTreeRoot"),d=Gg(!0),f=void 0!==d;return r.useMemo(()=>({id:o,role:"menuitem",tabIndex:n?0:-1,onKeyDown(e){" "===e.key&&s?.current&&e.preventDefault()},onMouseMove(e){i&&u.emit("itemhover",{nodeId:i,target:e.currentTarget})},onClick(e){t&&u.emit("close",{domEvent:e,reason:Ao})},onMouseUp(e){if(d){const t=d.initialCursorPointRef.current;if(d.initialCursorPointRef.current=null,f&&t&&Math.abs(e.clientX-t.x)<=1&&Math.abs(e.clientY-t.y)<=1)return;if(f&&!Cn&&2===e.button)return}!l.current||!a.context.allowMouseUpTriggerRef.current||f&&2!==e.button||c&&"regular-item"!==c.type||l.current.click()}}),[t,n,o,u,i,a,s,l,d,f,c])}({closeOnClick:t,highlighted:o,id:i,nodeId:u,store:a,typingRef:s,itemRef:d,itemMetadata:c}),m=r.useCallback(e=>g(h,{onMouseEnter(){"submenu-trigger"===c.type&&c.setActive()}},e,f),[h,f,c]),v=T(d,p);return r.useMemo(()=>({getItemProps:m,itemRef:v}),[m,v])}const Jg=r.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});"production"!==process.env.NODE_ENV&&(Jg.displayName="CompositeListContext");let Qg=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function eb(e={}){const{label:t,metadata:n,textRef:o,indexGuessBehavior:i,index:a}=e,{register:s,unregister:l,subscribeMapChange:c,elementsRef:u,labelsRef:d,nextIndexRef:f}=r.useContext(Jg),p=r.useRef(-1),[h,m]=r.useState(a??(i===Qg.GuessFromOrder?()=>{if(-1===p.current){const e=f.current;f.current+=1,p.current=e}return p.current}:-1)),v=r.useRef(null),y=r.useCallback(e=>{if(v.current=e,-1!==h&&null!==e&&(u.current[h]=e,d)){const n=void 0!==t;d.current[h]=n?t:o?.current?.textContent??e.textContent}},[h,u,d,t,o]);return qt(()=>{if(null!=a)return;const e=v.current;return e?(s(e,n),()=>{l(e)}):void 0},[a,s,l,n]),qt(()=>{if(null==a)return c(e=>{const t=v.current?e.get(v.current)?.index:null;null!=t&&m(t)})},[a,c,m]),r.useMemo(()=>({ref:y,index:h}),[h,y])}const tb=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(tb.displayName="MenuGroupContext");const nb=r.forwardRef(function(e,t){const{render:n,className:o,...i}=e,[a,s]=r.useState(void 0),l=r.useMemo(()=>({setLabelId:s}),[s]),c=U("div",e,{ref:t,props:{role:"group","aria-labelledby":a,...i}});return p.jsx(tb.Provider,{value:l,children:c})});"production"!==process.env.NODE_ENV&&(nb.displayName="MenuGroup");const rb=r.forwardRef(function(e,t){const{className:n,render:o,id:i,...a}=e,s=pn(i),{setLabelId:l}=function(){const e=r.useContext(tb);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.":P(31));return e}();return qt(()=>(l(s),()=>{l(void 0)}),[l,s]),U("div",e,{ref:t,props:{id:s,role:"presentation",...a}})});"production"!==process.env.NODE_ENV&&(rb.displayName="MenuGroupLabel");const ob=r.forwardRef(function(e,t){const{render:n,className:r,id:o,label:i,nativeButton:a=!1,disabled:s=!1,closeOnClick:l=!0,...c}=e,u=eb({label:i}),d=Kg(!0),f=pn(o),{store:p}=Yg(),h=p.useState("isActive",u.index),m=p.useState("itemProps"),{getItemProps:v,itemRef:y}=Zg({closeOnClick:l,disabled:s,highlighted:h,id:f,store:p,nativeButton:a,nodeId:d?.nodeId,itemMetadata:Xg});return U("div",e,{state:{disabled:s,highlighted:h},props:[m,c,v],ref:[y,t,u.ref]})});"production"!==process.env.NODE_ENV&&(ob.displayName="MenuItem");const ib=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(ib.displayName="ToolbarRootContext");const ab={...Go,...go},sb=r.forwardRef(function(e,t){const{render:n,className:o,finalFocus:i,...a}=e,{store:s}=Yg(),{side:l,align:c}=Kg(),u=null!=r.useContext(ib),d=s.useState("open"),f=s.useState("transitionStatus"),h=s.useState("popupProps"),m=s.useState("mounted"),v=s.useState("instantType"),y=s.useState("activeTriggerElement"),g=s.useState("parent"),b=s.useState("lastOpenChangeReason"),x=s.useState("rootId"),w=s.useState("floatingRootContext"),E=s.useState("floatingTreeRoot"),O=s.useState("closeDelay"),S=s.useState("activeTriggerElement"),k="context-menu"===g.type;xo({open:d,ref:s.context.popupRef,onComplete(){d&&s.context.onOpenChangeComplete?.(!0)}}),r.useEffect(()=>{function e(e){s.setOpen(!1,Io(e.reason,e.domEvent))}return E.events.on("close",e),()=>{E.events.off("close",e)}},[E.events,s]);const P=s.useState("hoverEnabled"),A=s.useState("disabled");Ts(w,{enabled:P&&!A&&!k&&"menubar"!==g.type,closeDelay:O});const j={transitionStatus:f,side:l,align:c,open:d,nested:"menu"===g.type,instant:v},T=r.useCallback(e=>{s.set("popupElement",e)},[s]),C=U("div",e,{state:j,ref:[t,s.context.popupRef,T],stateAttributesMapping:ab,props:[h,{onKeyDown(e){u&&ol.has(e.key)&&e.stopPropagation()}},Pc(f),a,{"data-rootownerid":x}]});let M=void 0===g.type||k;return(y||"menubar"===g.type&&b!==Po)&&(M=!0),p.jsx(Bi,{context:w,modal:k,disabled:!m,returnFocus:void 0===i?M:i,initialFocus:"menu"!==g.type,restoreFocus:!0,externalTree:"menubar"!==g.type?E:void 0,previousFocusableElement:S,nextFocusableElement:void 0===g.type?s.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:void 0===g.type?s.context.beforeContentFocusGuardRef:void 0,children:C})});"production"!==process.env.NODE_ENV&&(sb.displayName="MenuPopup");const lb=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(lb.displayName="MenuPortalContext");const cb=r.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:o}=Yg();return o.useState("mounted")||n?p.jsx(lb.Provider,{value:n,children:p.jsx(Pi,{ref:t,...r})}):null});function ub(e){const{children:t,elementsRef:n,labelsRef:o,onMapChange:i}=e,a=$t(i),s=r.useRef(0),l=j(fb).current,c=j(db).current,[u,d]=r.useState(0),f=r.useRef(u),h=$t((e,t)=>{c.set(e,t??null),f.current+=1,d(f.current)}),m=$t(e=>{c.delete(e),f.current+=1,d(f.current)}),v=r.useMemo(()=>{const e=new Map;return Array.from(c.keys()).filter(e=>e.isConnected).sort(pb).forEach((t,n)=>{const r=c.get(t)??{};e.set(t,{...r,index:n})}),e},[c,u]);qt(()=>{if("function"!=typeof MutationObserver||0===v.size)return;const e=new MutationObserver(e=>{const t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(f.current+=1,d(f.current))});return v.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[v]),qt(()=>{f.current===u&&(n.current.length!==v.size&&(n.current.length=v.size),o&&o.current.length!==v.size&&(o.current.length=v.size),s.current=v.size),a(v)},[a,v,n,o,u]),qt(()=>()=>{n.current=[]},[n]),qt(()=>()=>{o&&(o.current=[])},[o]);const y=$t(e=>(l.add(e),()=>{l.delete(e)}));qt(()=>{l.forEach(e=>e(v))},[l,v]);const g=r.useMemo(()=>({register:h,unregister:m,subscribeMapChange:y,elementsRef:n,labelsRef:o,nextIndexRef:s}),[h,m,y,n,o,s]);return p.jsx(Jg.Provider,{value:g,children:t})}function db(){return new Map}function fb(){return new Set}function pb(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}"production"!==process.env.NODE_ENV&&(cb.displayName="MenuPortal");const hb=r.forwardRef(function(e,t){const{anchor:n,positionMethod:o="absolute",className:i,render:a,side:s,align:l,sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:h=5,sticky:m=!1,disableAnchorTracking:v=!1,collisionAvoidance:y=B,...g}=e,{store:b}=Yg(),x=function(){const e=r.useContext(lb);if(void 0===e)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Menu.Portal> is missing.":P(32));return e}(),w=Gg(!0),E=b.useState("parent"),O=b.useState("floatingRootContext"),S=b.useState("floatingTreeRoot"),k=b.useState("mounted"),A=b.useState("open"),j=b.useState("modal"),T=b.useState("activeTriggerElement"),C=b.useState("transitionStatus"),M=b.useState("positionerElement"),N=b.useState("instantType"),I=b.useState("hasViewport"),D=b.useState("lastOpenChangeReason"),_=b.useState("floatingNodeId"),R=b.useState("floatingParentNodeId"),L=O.useState("domReferenceElement"),z=r.useRef(null),V=bo(M,!1,!1);let $=n,W=c,K=u,H=l,Y=y;"context-menu"===E.type&&($=n??E.context?.anchor,H=H??"start",s||"center"===H||(K=e.alignOffset??2,W=e.sideOffset??-5));let q=s,G=H;"menu"===E.type?(q=q??"inline-end",G=G??"start",Y=e.collisionAvoidance??F):"menubar"===E.type&&(q=q??"bottom",G=G??"start");const X="context-menu"===E.type,Z=Sc({anchor:$,floatingRootContext:O,positionMethod:w?"fixed":o,mounted:k,side:q,sideOffset:W,align:G,alignOffset:K,arrowPadding:X?0:h,collisionBoundary:d,collisionPadding:f,sticky:m,nodeId:_,keepMounted:x,disableAnchorTracking:v,collisionAvoidance:Y,shiftCrossAxis:X&&!("side"in Y&&"flip"===Y.side),externalTree:S,adaptiveOrigin:I?wc:void 0}),J=r.useMemo(()=>{const e={};return A||(e.pointerEvents="none"),{role:"presentation",hidden:!k,style:{...Z.positionerStyles,...e}}},[A,k,Z.positionerStyles]);r.useEffect(()=>{function e(e){e.open&&(e.parentNodeId===_&&b.set("hoverEnabled",!1),e.nodeId!==_&&e.parentNodeId===b.select("floatingParentNodeId")&&b.setOpen(!1,Io(Mo)))}return S.events.on("menuopenchange",e),()=>{S.events.off("menuopenchange",e)}},[b,S.events,_]),r.useEffect(()=>{if(null!=b.select("floatingParentNodeId"))return S.events.on("menuopenchange",e),()=>{S.events.off("menuopenchange",e)};function e(e){if(e.open||e.nodeId!==b.select("floatingParentNodeId"))return;const t=e.reason??Mo;b.setOpen(!1,Io(t))}},[S.events,b]);const Q=bn();r.useEffect(()=>{A||Q.clear()},[A,Q]),r.useEffect(()=>{function e(e){if(A&&e.nodeId===b.select("floatingParentNodeId"))if(e.target&&T&&T!==e.target){const e=b.select("closeDelay");e>0?Q.isStarted()||Q.start(e,()=>{b.setOpen(!1,Io(Mo))}):b.setOpen(!1,Io(Mo))}else Q.clear()}return S.events.on("itemhover",e),()=>{S.events.off("itemhover",e)}},[S.events,A,T,b,Q]),r.useEffect(()=>{const e={open:A,nodeId:_,parentNodeId:R,reason:b.select("lastOpenChangeReason")};S.events.emit("menuopenchange",e)},[S.events,A,b,_,R]),qt(()=>{const e=L,t=z.current;if(e&&(z.current=e),t&&e&&e!==t){b.set("instantType",void 0);const e=new AbortController;return V(()=>{b.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[L,V,b]);const ee={open:A,side:Z.side,align:Z.align,anchorHidden:Z.anchorHidden,nested:"menu"===E.type,instant:N},te=r.useMemo(()=>({side:Z.side,align:Z.align,arrowRef:Z.arrowRef,arrowUncentered:Z.arrowUncentered,arrowStyles:Z.arrowStyles,nodeId:Z.context.nodeId}),[Z.side,Z.align,Z.arrowRef,Z.arrowUncentered,Z.arrowStyles,Z.context.nodeId]),ne=U("div",e,{state:ee,stateAttributesMapping:Go,ref:[t,b.useStateSetter("positionerElement")],props:[J,Pc(C),g]}),re=k&&"menu"!==E.type&&("menubar"!==E.type&&j&&D!==So||"menubar"===E.type&&E.context.modal);let oe=null;return"menubar"===E.type?oe=E.context.contentElement:void 0===E.type&&(oe=T),p.jsxs(Wg.Provider,{value:te,children:[re&&p.jsx(ll,{ref:"context-menu"===E.type||"nested-context-menu"===E.type?E.context.internalBackdropRef:null,inert:sl(!A),cutout:oe}),p.jsx(Di,{id:_,children:p.jsx(ub,{elementsRef:b.context.itemDomElements,labelsRef:b.context.itemLabels,children:ne})})]})});"production"!==process.env.NODE_ENV&&(hb.displayName="MenuPositioner");const mb=r.createContext(null);function vb(e){return r.useContext(mb)}"production"!==process.env.NODE_ENV&&(mb.displayName="MenubarContext");const yb={...xs,disabled:Ba(e=>"menubar"===e.parent.type&&e.parent.context.disabled||e.disabled),modal:Ba(e=>(void 0===e.parent.type||"context-menu"===e.parent.type)&&(e.modal??!0)),allowMouseEnter:Ba(e=>e.allowMouseEnter),stickIfOpen:Ba(e=>e.stickIfOpen),parent:Ba(e=>e.parent),rootId:Ba(e=>"menu"===e.parent.type?e.parent.store.select("rootId"):void 0!==e.parent.type?e.parent.context.rootId:e.rootId),activeIndex:Ba(e=>e.activeIndex),isActive:Ba((e,t)=>e.activeIndex===t),hoverEnabled:Ba(e=>e.hoverEnabled),instantType:Ba(e=>e.instantType),lastOpenChangeReason:Ba(e=>e.openChangeReason),floatingTreeRoot:Ba(e=>"menu"===e.parent.type?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:Ba(e=>e.floatingNodeId),floatingParentNodeId:Ba(e=>e.floatingParentNodeId),itemProps:Ba(e=>e.itemProps),closeDelay:Ba(e=>e.closeDelay),hasViewport:Ba(e=>e.hasViewport),keyboardEventRelay:Ba(e=>e.keyboardEventRelay?e.keyboardEventRelay:"menu"===e.parent.type?e.parent.store.select("keyboardEventRelay"):void 0)};class gb extends ds{constructor(e){super({...{...gs(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new ji,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:z,keyboardEventRelay:void 0,closeDelay:0,hasViewport:!1},...e},{positionerRef:r.createRef(),popupRef:r.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:r.createRef(),beforeContentFocusGuardRef:r.createRef(),onOpenChangeComplete:void 0,triggerElements:new ys},yb),this.unsubscribeParentListener=this.observe("parent",e=>{if(this.unsubscribeParentListener?.(),"menu"===e.type){let t=e.store.select("rootId"),n=e.store.select("floatingTreeRoot"),r=e.store.select("keyboardEventRelay");return this.unsubscribeParentListener=e.store.subscribe(()=>{const o=e.store.select("rootId"),i=e.store.select("floatingTreeRoot"),a=e.store.select("keyboardEventRelay");t===o&&n===i&&r===a||(t=o,n=i,r=a,this.notifyAll())}),void(this.context.allowMouseUpTriggerRef=e.store.context.allowMouseUpTriggerRef)}void 0!==e.type&&(this.context.allowMouseUpTriggerRef=e.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(e,t){this.state.floatingRootContext.context.events.emit("setOpen",{open:e,eventDetails:t})}static useStore(e,t){const n=j(()=>new gb(t)).current;return e??n}unsubscribeParentListener=null}const bb=r.createContext(void 0);"production"!==process.env.NODE_ENV&&(bb.displayName="MenuSubmenuRootContext");const xb=os(function(e){const{children:t,open:n,onOpenChange:o,onOpenChangeComplete:i,defaultOpen:a=!1,disabled:s=!1,modal:l,loopFocus:c=!0,orientation:u="vertical",actionsRef:d,closeParentOnEsc:f=!1,handle:h,triggerId:m,defaultTriggerId:v=null,highlightItemOnHover:y=!0}=e,b=Gg(!0),x=Yg(!0),w=vb(),E=r.useContext(bb),O=r.useMemo(()=>E&&x?{type:"menu",store:x.store}:w?{type:"menubar",context:w}:b&&!x?{type:"context-menu",context:b}:{type:void 0},[b,x,w,E]),S=gb.useStore(h?.store,{open:a,openProp:n,activeTriggerId:v,triggerIdProp:m,parent:O});ul(()=>{void 0===n&&!1===S.state.open&&!0===a&&S.update({open:!0,activeTriggerId:v})}),S.useControlledProp("openProp",n),S.useControlledProp("triggerIdProp",m),S.useContextCallback("onOpenChangeComplete",i);const k=S.useState("floatingTreeRoot"),P=Ii(k),A=Mi();qt(()=>{b&&!x?S.update({parent:{type:"context-menu",context:b},floatingNodeId:P,floatingParentNodeId:A}):x&&S.update({floatingNodeId:P,floatingParentNodeId:A})},[b,x,P,A,S]);const j=S.useState("open"),T=S.useState("activeTriggerElement"),C=S.useState("positionerElement"),M=S.useState("hoverEnabled"),N=S.useState("modal"),I=S.useState("disabled"),D=S.useState("lastOpenChangeReason"),_=S.useState("parent"),R=S.useState("activeIndex"),z=S.useState("payload"),V=S.useState("floatingParentNodeId"),B=r.useRef(null),F=null!=V;let $;"production"!==process.env.NODE_ENV&&void 0!==_.type&&void 0!==l&&console.warn("Base UI: The `modal` prop is not supported on nested menus. It will be ignored."),S.useSyncedValues({disabled:s,modal:void 0===_.type?l:void 0,rootId:fn()});const{openMethod:U,triggerProps:W}=yl(j);ms(S);const{forceUnmount:K}=vs(j,S,()=>{S.update({allowMouseEnter:!1,stickIfOpen:!0})}),H=r.useRef("context-menu"!==_.type),Y=bn();r.useEffect(()=>{if(j||(B.current=null),"context-menu"===_.type)return j?void Y.start(500,()=>{H.current=!0}):(Y.clear(),void(H.current=!1))},[Y,j,_.type]),vl(j&&N&&D!==So&&"touch"!==U,C),qt(()=>{j||M||S.set("hoverEnabled",!0)},[j,M,S]);const q=r.useRef(!0),G=bn(),X=$t((e,t)=>{const n=t.reason;if(j===e&&t.trigger===T&&D===n)return;if(t.preventUnmountOnClose=()=>{S.set("preventUnmountingOnClose",!0)},e||null!=t.trigger||(t.trigger=T??void 0),o?.(e,t),t.isCanceled)return;const r={open:e,nativeEvent:t.event,reason:t.reason,nested:F};$?.emit("openchange",r);const i=t.event;if(!1===e&&"click"===i?.type&&"touch"===i.pointerType&&!q.current)return;if(!e&&null!==R){const e=S.context.itemDomElements.current[R];queueMicrotask(()=>{e?.setAttribute("tabindex","-1")})}e&&n===ko?(q.current=!1,G.start(300,()=>{q.current=!0})):(q.current=!0,G.clear());const a=(n===Oo||n===Ao)&&0===i.detail&&i?.isTrusted,s=!e&&(n===To||null==n),l={open:e,openChangeReason:n};B.current=t.event??null;const c=t.trigger?.id??null;(c||e)&&(l.activeTriggerId=c,l.activeTriggerElement=t.trigger??null),S.update(l),"menubar"!==_.type||n!==ko&&n!==jo&&n!==So&&n!==Co&&n!==Mo?a||s?S.set("instantType",a?"click":"dismiss"):S.set("instantType",void 0):S.set("instantType","group")}),Z=r.useCallback(e=>{const t=Io(e);return t.preventUnmountOnClose=()=>{S.set("preventUnmountingOnClose",!0)},t},[S]),J=r.useCallback(()=>{S.setOpen(!1,Z(No))},[S,Z]);let Q;r.useImperativeHandle(d,()=>({unmount:K,close:J}),[K,J]),"context-menu"===_.type&&(Q=_.context),r.useImperativeHandle(Q?.positionerRef,()=>C,[C]),r.useImperativeHandle(Q?.actionsRef,()=>({setOpen:X}),[X]);const ee=Es({popupStore:S,onOpenChange:X});$=ee.context.events,r.useEffect(()=>{const e=({open:e,eventDetails:t})=>X(e,t);return $.on("setOpen",e),()=>{$?.off("setOpen",e)}},[$,X]);const te=Wi(ee,{enabled:!I,bubbles:{escapeKey:f&&"menu"===_.type},outsidePress:()=>"context-menu"!==_.type||"contextmenu"===B.current?.type||H.current,externalTree:F?k:void 0}),ne=Bs(ee,{role:"menu"}),re=yc(),oe=r.useCallback(e=>{S.select("activeIndex")!==e&&S.set("activeIndex",e)},[S]),ie=zs(ee,{enabled:!I,listRef:S.context.itemDomElements,activeIndex:R,nested:void 0!==_.type,loopFocus:c,orientation:u,parentOrientation:"menubar"===_.type?_.context.orientation:void 0,rtl:"rtl"===re,disabledIndices:L,onNavigate:oe,openOnArrowKeyDown:"context-menu"!==_.type,externalTree:F?k:void 0,focusItemOnHover:y}),ae=r.useCallback(e=>{S.context.typingRef.current=e},[S]),se=function(e,t){const n="rootStore"in e?e.rootStore:e,o=n.context.dataRef,i=n.useState("open"),{listRef:a,elementsRef:s,activeIndex:l,onMatch:c,onTypingChange:u,enabled:d=!0,resetMs:f=750,selectedIndex:p=null}=t,h=bn(),m=r.useRef(""),v=r.useRef(p??l??-1),y=r.useRef(null);qt(()=>{(i||null===p)&&(h.clear(),y.current=null,""!==m.current&&(m.current=""))},[i,p,h]),qt(()=>{i&&""===m.current&&(v.current=p??l??-1)},[i,p,l]);const g=$t(e=>{e?o.current.typing||(o.current.typing=e,u?.(e)):o.current.typing&&(o.current.typing=e,u?.(e))}),b=$t(e=>{function t(e){const t=s?.current[e];return!t||Ir(t)}function n(e,n,r=0){if(0===e.length)return-1;const o=(r%e.length+e.length)%e.length,i=n.toLocaleLowerCase();for(let n=0;n<e.length;n+=1){const r=(o+n)%e.length,a=e[r];if(a?.toLocaleLowerCase().startsWith(i)&&t(r))return r}return-1}const r=a.current;if(m.current.length>0&&" "===e.key&&(Xn(e),g(!0)),m.current.length>0&&" "!==m.current[0]&&-1===n(r,m.current)&&" "!==e.key&&g(!1),null==r||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;i&&" "!==e.key&&(Xn(e),g(!0));const o=""===m.current;o&&(v.current=p??l??-1),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&m.current===e.key&&(m.current="",v.current=y.current),m.current+=e.key,h.start(f,()=>{m.current="",v.current=y.current,g(!1)});const u=((o?p??l??-1:v.current)??0)+1,d=n(r,m.current,u);-1!==d?(c?.(d),y.current=d):" "!==e.key&&(m.current="",g(!1))}),x=$t(e=>{const t=e.relatedTarget,r=n.select("domReferenceElement"),o=n.select("floatingElement"),i=Fn(r,t),a=Fn(o,t);i||a||(h.clear(),m.current="",v.current=y.current,g(!1))}),w=r.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]),E=r.useMemo(()=>({onKeyDown:b,onBlur:x}),[b,x]);return r.useMemo(()=>d?{reference:w,floating:E}:{},[d,w,E])}(ee,{listRef:S.context.itemLabels,elementsRef:S.context.itemDomElements,activeIndex:R,resetMs:500,onMatch:e=>{j&&e!==R&&S.set("activeIndex",e)},onTypingChange:ae}),{getReferenceProps:le,getFloatingProps:ce,getItemProps:ue,getTriggerProps:de}=Ns([te,ne,ie,se]),fe=r.useMemo(()=>{const e=g(le(),{onMouseMove(){S.set("allowMouseEnter",!0)}},W);return delete e.role,e},[le,S,W]),pe=r.useMemo(()=>{const e=de();if(!e)return e;const t=g(e,W);return delete t.role,delete t["aria-controls"],t},[de,W]),he=r.useMemo(()=>ce({onMouseMove(){S.set("allowMouseEnter",!0),"menu"===_.type&&S.set("hoverEnabled",!1)},onClick(){S.select("hoverEnabled")&&S.set("hoverEnabled",!1)},onKeyDown(e){const t=S.select("keyboardEventRelay");t&&!e.isPropagationStopped()&&t(e)}}),[ce,_.type,S]),me=r.useMemo(()=>ue(),[ue]);S.useSyncedValues({floatingRootContext:ee,activeTriggerProps:fe,inactiveTriggerProps:pe,popupProps:he,itemProps:me});const ve=r.useMemo(()=>({store:S,parent:O}),[S,O]),ye=p.jsx(Hg.Provider,{value:ve,children:"function"==typeof t?t({payload:z}):t});return void 0===_.type||"context-menu"===_.type?p.jsx(_i,{externalTree:k,children:ye}):ye});function wb(e){const{render:t,className:n,state:o=z,props:i=L,refs:a=L,metadata:s,stateAttributesMapping:l,tag:c="div",...u}=e,{compositeProps:d,compositeRef:f}=function(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:o}=Xt(),{ref:i,index:a}=eb(e),s=n===a,l=r.useRef(null),c=T(i,l),u=r.useMemo(()=>({tabIndex:s?0:-1,onFocus(){o(a)},onMouseMove(){const e=l.current;if(!t||!e)return;const n=e.hasAttribute("disabled")||"true"===e.ariaDisabled;s||n||e.focus()}}),[s,o,a,t]);return{compositeProps:u,compositeRef:c,index:a}}({metadata:s});return U(c,e,{state:o,ref:[...a,f],props:[d,...i,u],stateAttributesMapping:l})}function Eb(e){return Et(e)&&e.hasAttribute("data-rootownerid")?e.getAttribute("data-rootownerid")??void 0:It(e)?void 0:Eb(Rt(e))}"production"!==process.env.NODE_ENV&&(xb.displayName="MenuRoot");const Ob=is(function(e,t){const{render:n,className:i,disabled:a=!1,nativeButton:s=!0,id:l,openOnHover:c,delay:u=100,closeDelay:d=0,handle:f,payload:h,...m}=e,v=Yg(!0),y=f?.store??v?.store;if(!y)throw new Error("production"!==process.env.NODE_ENV?"Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.":P(85));const g=pn(l),b=y.useState("isTriggerActive",g),x=y.useState("floatingRootContext"),w=y.useState("isOpenedByTrigger",g),E=r.useRef(null),O=function(){const e=Gg(!0),t=Yg(!0),n=vb(),o=r.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n]);return o}(),S=Xt(!0),k=Ni(),A=r.useMemo(()=>k??new ji,[k]),j=Ii(A),T=Mi(),{registerTrigger:C,isMountedByThisTrigger:M}=hs(g,E,y,{payload:h,closeDelay:d,parent:O,floatingTreeRoot:A,floatingNodeId:j,floatingParentNodeId:T,keyboardEventRelay:S?.relayKeyboardEvent}),N="menubar"===O.type,I=y.useState("disabled"),D=a||I||N&&O.context.disabled,{getButtonProps:_,buttonRef:R}=Zt({disabled:D,native:s});r.useEffect(()=>{w||void 0!==O.type||(y.context.allowMouseUpTriggerRef.current=!1)},[y,w,O.type]);const L=r.useRef(null),V=bn(),B=$t(e=>{if(!L.current)return;V.clear(),y.context.allowMouseUpTriggerRef.current=!1;const t=e.target;if(Fn(L.current,t)||Fn(y.select("positionerElement"),t)||t===L.current)return;if(null!=t&&Eb(t)===y.select("rootId"))return;const n=function(e){const t=e.getBoundingClientRect();if("production"!==process.env.NODE_ENV)return t;const n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if("none"===n.content&&"none"===r.content)return t;const o=parseFloat(n.width)||0,i=parseFloat(n.height)||0,a=parseFloat(r.width)||0,s=parseFloat(r.height)||0,l=Math.max(t.width,o,a),c=Math.max(t.height,i,s),u=l-t.width,d=c-t.height;return{left:t.left-u/2,right:t.right+u/2,top:t.top-d/2,bottom:t.bottom+d/2}}(L.current);e.clientX>=n.left-2&&e.clientX<=n.right+2&&e.clientY>=n.top-2&&e.clientY<=n.bottom+2||A.events.emit("close",{domEvent:e,reason:"cancel-open"})});r.useEffect(()=>{if(w&&y.select("lastOpenChangeReason")===So){wn(L.current).addEventListener("mouseup",B,{once:!0})}},[w,B,y]);const F=N&&O.context.hasSubmenuOpen,$=Ms(x,{enabled:(c??F)&&!D&&"context-menu"!==O.type&&(!N||F&&!M),handleClose:Hs({blockPointerEvents:!N}),mouseOnly:!0,move:!1,restMs:void 0===O.type?u:void 0,delay:{close:d},triggerElementRef:E,externalTree:A,isActiveTrigger:b}),W=function(e,t){const n=bn(),[o,i]=r.useState(!1);return qt(()=>{e&&"trigger-hover"===t?(i(!0),n.start(500,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),o}(w,y.select("lastOpenChangeReason")),K=function(e,t={}){const n="rootStore"in e?e.rootStore:e,o=n.context.dataRef,{enabled:i=!0,event:a="click",toggle:s=!0,ignoreMouse:l=!1,stickIfOpen:c=!0,touchOpenDelay:u=0,reason:d=Oo}=t,f=r.useRef(void 0),p=po(),h=bn(),m=r.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current,r=e.nativeEvent,i=n.select("open");if(0!==e.button||"click"===a||Qn(t,!0)&&l)return;const m=o.current.openEvent,v=m?.type,y=n.select("domReferenceElement")!==e.currentTarget,g=i&&y||!(i&&s&&(!m||!c||"click"===v||"mousedown"===v));if(Kn(r.target)){const e=Io(d,r,r.target);return void(g&&"touch"===t&&u>0?h.start(u,()=>{n.setOpen(!0,e)}):n.setOpen(g,e))}const b=e.currentTarget;p.request(()=>{const e=Io(d,r,b);g&&"touch"===t&&u>0?h.start(u,()=>{n.setOpen(!0,e)}):n.setOpen(g,e)})},onClick(e){if("mousedown-only"===a)return;const t=f.current;if("mousedown"===a&&t)return void(f.current=void 0);if(Qn(t,!0)&&l)return;const r=n.select("open"),i=o.current.openEvent,p=n.select("domReferenceElement")!==e.currentTarget,m=r&&p||!(r&&s&&(!i||!c||er(i))),v=Io(d,e.nativeEvent,e.currentTarget);m&&"touch"===t&&u>0?h.start(u,()=>{n.setOpen(!0,v)}):n.setOpen(m,v)},onKeyDown(){f.current=void 0}}),[o,a,l,n,c,s,p,h,u,d]);return r.useMemo(()=>i?{reference:m}:z,[i,m])}(x,{enabled:!D&&"context-menu"!==O.type,event:w&&N?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:void 0===O.type&&W}),H=Ss(x,{enabled:!D&&F}),Y=function(e){const{enabled:t=!0,mouseDownAction:n,open:o}=e,i=r.useRef(!1);return r.useMemo(()=>t?{onMouseDown:e=>{("open"===n&&!o||"close"===n&&o)&&(i.current=!0,wn(e.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:e=>{i.current&&(i.current=!1,e.preventBaseUIHandler())}}:z,[t,n,o])}({open:w,enabled:N,mouseDownAction:"open"}),q=Ns([K,H]),G={disabled:D,open:w},X=y.useState("triggerProps",M),Z=[L,t,R,C,E],J=[q.getReferenceProps(),$??z,X,{"aria-haspopup":"menu",id:g,onMouseDown:e=>{if(y.select("open"))return;V.start(200,()=>{y.context.allowMouseUpTriggerRef.current=!0});wn(e.currentTarget).addEventListener("mouseup",B,{once:!0})}},N?{role:"menuitem"}:{},Y,m,_],Q=r.useRef(null),ee=$t(e=>{o.flushSync(()=>{y.setOpen(!1,Io(jo,e.nativeEvent,e.currentTarget))});const t=oo(Q.current,-1);t?.focus()}),te=$t(e=>{const t=y.select("positionerElement");if(t&&io(e,t))y.context.beforeContentFocusGuardRef.current?.focus();else{o.flushSync(()=>{y.setOpen(!1,Io(jo,e.nativeEvent,e.currentTarget))});let n=oo(y.context.triggerFocusTargetRef.current||E.current,1);for(;null!==n&&Fn(t,n);){const e=n;if(n=no(n),n===e)break}n?.focus()}}),ne=U("button",e,{enabled:!N,stateAttributesMapping:qo,state:G,ref:Z,props:J});return N?p.jsx(wb,{tag:"button",render:n,className:i,state:G,refs:Z,props:J,stateAttributesMapping:qo}):w?p.jsxs(r.Fragment,{children:[p.jsx(si,{ref:Q,onFocus:ee},`${g}-pre-focus-guard`),p.jsx(r.Fragment,{children:ne},g),p.jsx(si,{ref:y.context.triggerFocusTargetRef,onFocus:te},`${g}-post-focus-guard`)]}):p.jsx(r.Fragment,{children:ne},g)});function Sb(e){var t=m(e,[]);return p.jsx(xb,h({"data-slot":"dropdown-menu"},t))}function kb(e){var t=m(e,[]);return p.jsx(Ob,h({"data-slot":"dropdown-menu-trigger"},t))}function Pb(e){var t=e.align,n=void 0===t?"start":t,r=e.alignOffset,o=void 0===r?0:r,i=e.side,a=void 0===i?"bottom":i,s=e.sideOffset,l=void 0===s?4:s,c=e.className,u=m(e,["align","alignOffset","side","sideOffset","className"]);return p.jsx(cb,{children:p.jsx(hb,{className:"isolate z-50 outline-none",align:n,alignOffset:o,side:a,sideOffset:l,children:p.jsx(sb,h({"data-slot":"dropdown-menu-content",className:mt("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95",c)},u))})})}function Ab(e){var t=m(e,[]);return p.jsx(nb,h({"data-slot":"dropdown-menu-group"},t))}function jb(e){var t=e.className,n=e.inset,r=m(e,["className","inset"]);return p.jsx(rb,h({"data-slot":"dropdown-menu-label","data-inset":n,className:mt("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",t)},r))}function Tb(e){var t=e.className,n=e.inset,r=e.variant,o=void 0===r?"default":r,i=m(e,["className","inset","variant"]);return p.jsx(ob,h({"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":o,className:mt("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",t)},i))}function Cb(e){var t=e.className,n=m(e,["className"]);return p.jsx(Lo,h({"data-slot":"dropdown-menu-separator",className:mt("-mx-1 my-1 h-px bg-border",t)},n))}function Mb(){var e=function(e){Ug.info("".concat(e," clicked"),{description:"This feature will be implemented soon."})};return p.jsxs("header",{className:"h-16 border-b border-border/50 flex items-center justify-between px-4 sm:px-6 bg-background/80 backdrop-blur-md sticky top-0 z-30",children:[p.jsxs("div",{className:"flex items-center gap-2 sm:gap-4 flex-1",children:[p.jsx(zc,{}),p.jsxs("div",{className:"relative w-full max-w-md hidden md:block",children:[p.jsx(Bl,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),p.jsx(Ro,{placeholder:"Search dashboard...",className:"pl-10 bg-muted/50 border-none focus-visible:ring-1 focus-visible:ring-primary/20"})]}),p.jsx(tn,{variant:"ghost",size:"icon",className:"md:hidden",children:p.jsx(Bl,{className:"w-5 h-5"})})]}),p.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[p.jsx("div",{className:"hidden xs:block",children:p.jsx(zg,{})}),p.jsxs(tn,{variant:"ghost",size:"icon",className:"relative",children:[p.jsx(Cl,{className:"w-5 h-5"}),p.jsx("span",{className:"absolute top-2 right-2 w-2 h-2 bg-primary rounded-full border-2 border-background"})]}),p.jsxs(Sb,{children:[p.jsx(kb,{render:p.jsx(tn,{variant:"ghost",size:"icon",className:"rounded-full"}),children:p.jsx(Kl,{className:"w-5 h-5"})}),p.jsx(Pb,{align:"end",className:"w-56",children:p.jsxs(Ab,{children:[p.jsx(jb,{children:"My Account"}),p.jsx(Cb,{}),p.jsxs(Tb,{onClick:function(){return e("Profile")},children:[p.jsx(Kl,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Profile"})]}),p.jsxs(Tb,{onClick:function(){return e("Billing")},children:[p.jsx(Il,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Billing"})]}),p.jsxs(Tb,{onClick:function(){return e("Team")},children:[p.jsx(Hl,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Team"})]}),p.jsxs(Tb,{onClick:function(){return e("Subscription")},children:[p.jsx(ql,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Subscription"})]}),p.jsx(Cb,{}),p.jsxs(Tb,{variant:"destructive",onClick:function(){return e("Log out")},children:[p.jsx(Rl,{className:"mr-2 h-4 w-4"}),p.jsx("span",{children:"Log out"})]})]})})]})]})]})}function Nb(e){var t=e.className,n=e.size,r=void 0===n?"default":n,o=m(e,["className","size"]);return p.jsx("div",h({"data-slot":"card","data-size":r,className:mt("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",t)},o))}function Ib(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"card-header",className:mt("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",t)},n))}function Db(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"card-title",className:mt("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",t)},n))}function _b(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"card-description",className:mt("text-sm text-muted-foreground",t)},n))}function Rb(e){var t=e.className,n=m(e,["className"]);return p.jsx("div",h({"data-slot":"card-content",className:mt("px-4 group-data-[size=sm]/card:px-3",t)},n))}"production"!==process.env.NODE_ENV&&(Ob.displayName="MenuTrigger");var Lb=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function zb(e){return"string"==typeof e&&Lb.includes(e)}var Vb=new Set(["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"]);function Bb(e){return"string"==typeof e&&Vb.has(e)}function Fb(e){return"string"==typeof e&&e.startsWith("data-")}function $b(e){if("object"!=typeof e||null===e)return{};var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Bb(n)||Fb(n))&&(t[n]=e[n]);return t}function Ub(t){return null==t?null:e.isValidElement(t)&&"object"==typeof t.props&&null!==t.props?$b(t.props):"object"!=typeof t||Array.isArray(t)?null:$b(t)}function Wb(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(Bb(n)||Fb(n)||zb(n))&&(t[n]=e[n]);return t}var Kb=["children","width","height","viewBox","className","style","title","desc"];function Hb(){return Hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hb.apply(null,arguments)}var Yb=e.forwardRef((e,t)=>{var{children:n,width:o,height:i,viewBox:a,className:s,style:l,title:c,desc:u}=e,d=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Kb),f=a||{width:o,height:i,x:0,y:0},p=Y("recharts-surface",s);return r.createElement("svg",Hb({},Wb(d),{className:p,width:o,height:i,style:l,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),r.createElement("title",null,c),r.createElement("desc",null,u),n)}),qb=["children","className"];function Gb(){return Gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gb.apply(null,arguments)}var Xb=r.forwardRef((e,t)=>{var{children:n,className:o}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,qb),a=Y("recharts-layer",o);return r.createElement("g",Gb({className:a},Wb(i),{ref:t}),n)}),Zb=e.createContext(null);function Jb(e){return function(){return e}}const Qb=Math.cos,ex=Math.sin,tx=Math.sqrt,nx=Math.PI,rx=2*nx,ox=Math.PI,ix=2*ox,ax=1e-6,sx=ix-ax;function lx(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class cx{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?lx:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return lx;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,i){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+i}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let i=this._x1,a=this._y1,s=n-e,l=r-t,c=i-e,u=a-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>ax)if(Math.abs(u*s-l*c)>ax&&o){let f=n-i,p=r-a,h=s*s+l*l,m=f*f+p*p,v=Math.sqrt(h),y=Math.sqrt(d),g=o*Math.tan((ox-Math.acos((h+d-m)/(2*v*y)))/2),b=g/y,x=g/v;Math.abs(b-1)>ax&&this._append`L${e+b*c},${t+b*u}`,this._append`A${o},${o},0,0,${+(u*f>c*p)},${this._x1=e+x*s},${this._y1=t+x*l}`}else this._append`L${this._x1=e},${this._y1=t}`;else;}arc(e,t,n,r,o,i){if(e=+e,t=+t,i=!!i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let a=n*Math.cos(r),s=n*Math.sin(r),l=e+a,c=t+s,u=1^i,d=i?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>ax||Math.abs(this._y1-c)>ax)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%ix+ix),d>sx?this._append`A${n},${n},0,1,${u},${e-a},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>ax&&this._append`A${n},${n},0,${+(d>=ox)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function ux(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new cx(t)}function dx(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function fx(e){this._context=e}function px(e){return new fx(e)}function hx(e){return e[0]}function mx(e){return e[1]}function vx(e,t){var n=Jb(!0),r=null,o=px,i=null,a=ux(s);function s(s){var l,c,u,d=(s=dx(s)).length,f=!1;for(null==r&&(i=o(u=a())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?i.lineStart():i.lineEnd()),f&&i.point(+e(c,l,s),+t(c,l,s));if(u)return i=null,u+""||null}return e="function"==typeof e?e:void 0===e?hx:Jb(e),t="function"==typeof t?t:void 0===t?mx:Jb(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:Jb(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:Jb(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:Jb(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(i=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=i=null:i=o(r=e),s):r},s}function yx(e,t,n){var r=null,o=Jb(!0),i=null,a=px,s=null,l=ux(c);function c(c){var u,d,f,p,h,m=(c=dx(c)).length,v=!1,y=new Array(m),g=new Array(m);for(null==i&&(s=a(h=l())),u=0;u<=m;++u){if(!(u<m&&o(p=c[u],u,c))===v)if(v=!v)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],g[f]);s.lineEnd(),s.areaEnd()}v&&(y[u]=+e(p,u,c),g[u]=+t(p,u,c),s.point(r?+r(p,u,c):y[u],n?+n(p,u,c):g[u]))}if(h)return s=null,h+""||null}function u(){return vx().defined(o).curve(a).context(i)}return e="function"==typeof e?e:void 0===e?hx:Jb(+e),t="function"==typeof t?t:Jb(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?mx:Jb(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:Jb(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:Jb(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Jb(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:Jb(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:Jb(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Jb(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:Jb(!!e),c):o},c.curve=function(e){return arguments.length?(a=e,null!=i&&(s=a(i)),c):a},c.context=function(e){return arguments.length?(null==e?i=s=null:s=a(i=e),c):i},c}fx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}};class gx{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}var bx={draw(e,t){const n=tx(t/nx);e.moveTo(n,0),e.arc(0,0,n,0,rx)}},xx={draw(e,t){const n=tx(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};const wx=tx(1/3),Ex=2*wx;var Ox={draw(e,t){const n=tx(t/Ex),r=n*wx;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Sx={draw(e,t){const n=tx(t),r=-n/2;e.rect(r,r,n,n)}};const kx=ex(nx/10)/ex(7*nx/10),Px=ex(rx/10)*kx,Ax=-Qb(rx/10)*kx;var jx={draw(e,t){const n=tx(.8908130915292852*t),r=Px*n,o=Ax*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const i=rx*t/5,a=Qb(i),s=ex(i);e.lineTo(s*n,-a*n),e.lineTo(a*r-s*o,s*r+a*o)}e.closePath()}};const Tx=tx(3);var Cx={draw(e,t){const n=-tx(t/(3*Tx));e.moveTo(0,2*n),e.lineTo(-Tx*n,-n),e.lineTo(Tx*n,-n),e.closePath()}};const Mx=-.5,Nx=tx(3)/2,Ix=1/tx(12),Dx=3*(Ix/2+1);var _x={draw(e,t){const n=tx(t/Dx),r=n/2,o=n*Ix,i=r,a=n*Ix+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Mx*r-Nx*o,Nx*r+Mx*o),e.lineTo(Mx*i-Nx*a,Nx*i+Mx*a),e.lineTo(Mx*s-Nx*l,Nx*s+Mx*l),e.lineTo(Mx*r+Nx*o,Mx*o-Nx*r),e.lineTo(Mx*i+Nx*a,Mx*a-Nx*i),e.lineTo(Mx*s+Nx*l,Mx*l-Nx*s),e.closePath()}};function Rx(){}function Lx(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 zx(e){this._context=e}function Vx(e){this._context=e}function Bx(e){this._context=e}function Fx(e){this._context=e}function $x(e){return e<0?-1:1}function Ux(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return($x(i)+$x(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function Wx(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Kx(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function Hx(e){this._context=e}function Yx(e){this._context=new qx(e)}function qx(e){this._context=e}function Gx(e){this._context=e}function Xx(e){var t,n,r=e.length-1,o=new Array(r),i=new Array(r),a=new Array(r);for(o[0]=0,i[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,i[t]=4,a[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,i[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/i[t-1],i[t]-=n,a[t]-=n*a[t-1];for(o[r-1]=a[r-1]/i[r-1],t=r-2;t>=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-o[t+1];return[o,i]}function Zx(e,t){this._context=e,this._t=t}function Jx(e,t){if((o=e.length)>1)for(var n,r,o,i=1,a=e[t[0]],s=a.length;i<o;++i)for(r=a,a=e[t[i]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Qx(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function ew(e,t){return e[t]}function tw(e){const t=[];return t.key=e,t}zx.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:Lx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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:Lx(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Vx.prototype={areaStart:Rx,areaEnd:Rx,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)}},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:Lx(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Bx.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||0!==this._line&&3===this._point)&&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:Lx(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},Fx.prototype={areaStart:Rx,areaEnd:Rx,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))}},Hx.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:Kx(this,this._t0,Wx(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+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,Kx(this,Wx(this,n=Ux(this,e,t)),n);break;default:Kx(this,this._t0,n=Ux(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(Yx.prototype=Object.create(Hx.prototype)).point=function(e,t){Hx.prototype.point.call(this,t,e)},qx.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,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}},Gx.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]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=Xx(e),o=Xx(t),i=0,a=1;a<n;++i,++a)this._context.bezierCurveTo(r[0][i],o[0][i],r[1][i],o[1][i],e[a],t[a]);(this._line||0!==this._line&&1===n)&&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)}},Zx.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&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)}}this._x=e,this._y=t}};var nw,rw={},ow={};function iw(){return nw||(nw=1,e=ow,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isUnsafeProperty=function(e){return"__proto__"===e}),ow;var e}var aw,sw={};function lw(){return aw||(aw=1,e=sw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isDeepKey=function(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}),sw;var e}var cw,uw={};function dw(){return cw||(cw=1,e=uw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toKey=function(e){return"string"==typeof e||"symbol"==typeof e?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}),uw;var e}var fw,pw,hw,mw,vw,yw={},gw={};function bw(){return fw||(fw=1,e=gw,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.toString=function e(t){if(null==t)return"";if("string"==typeof t)return t;if(Array.isArray(t))return t.map(e).join(",");const n=String(t);return"0"===n&&Object.is(Number(t),-0)?"-0":n}),gw;var e}function xw(){return pw||(pw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bw(),n=dw();e.toPath=function(e){if(Array.isArray(e))return e.map(n.toKey);if("symbol"==typeof e)return[e];const r=[],o=(e=t.toString(e)).length;if(0===o)return r;let i=0,a="",s="",l=!1;for(46===e.charCodeAt(0)&&(r.push(""),i++);i<o;){const t=e[i];s?"\\"===t&&i+1<o?(i++,a+=e[i]):t===s?s="":a+=t:l?'"'===t||"'"===t?s=t:"]"===t?(l=!1,r.push(a),a=""):a+=t:"["===t?(l=!0,a&&(r.push(a),a="")):"."===t?a&&(r.push(a),a=""):a+=t,i++}return a&&r.push(a),r}}(yw)),yw}function ww(){return hw||(hw=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iw(),n=lw(),r=dw(),o=xw();e.get=function e(i,a,s){if(null==i)return s;switch(typeof a){case"string":{if(t.isUnsafeProperty(a))return s;const r=i[a];return void 0===r?n.isDeepKey(a)?e(i,o.toPath(a),s):s:r}case"number":case"symbol":{"number"==typeof a&&(a=r.toKey(a));const e=i[a];return void 0===e?s:e}default:{if(Array.isArray(a))return function(e,n,r){if(0===n.length)return r;let o=e;for(let e=0;e<n.length;e++){if(null==o)return r;if(t.isUnsafeProperty(n[e]))return r;o=o[n[e]]}if(void 0===o)return r;return o}(i,a,s);if(a=Object.is(a?.valueOf(),-0)?"-0":String(a),t.isUnsafeProperty(a))return s;const e=i[a];return void 0===e?s:e}}}}(rw)),rw}function Ew(){return vw?mw:(vw=1,mw=ww().get)}var Ow=i(Ew());function Sw(e){var t=10**(arguments.length>1&&void 0!==arguments[1]?arguments[1]:4),n=Math.round(e*t)/t;return Object.is(n,-0)?0:n}function kw(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.reduce((e,t,r)=>{var o=n[r-1];return"string"==typeof o?e+o+t:void 0!==o?e+Sw(o)+t:e+t},"")}var Pw=e=>0===e?0:e>0?1:-1,Aw=e=>"number"==typeof e&&e!=+e,jw=e=>"string"==typeof e&&e.indexOf("%")===e.length-1,Tw=e=>("number"==typeof e||e instanceof Number)&&!Aw(e),Cw=e=>Tw(e)||"string"==typeof e,Mw=0,Nw=e=>{var t=++Mw;return"".concat(e||"").concat(t)},Iw=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Tw(e)&&"string"!=typeof e)return r;if(jw(e)){if(null==t)return r;var i=e.indexOf("%");n=t*parseFloat(e.slice(0,i))/100}else n=+e;return Aw(n)&&(n=r),o&&null!=t&&n>t&&(n=t),n},Dw=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[String(e[r])])return!0;n[String(e[r])]=!0}return!1};function _w(e,t,n){return Tw(e)&&Tw(t)?Sw(e+n*(t-e)):t}function Rw(e,t,n){if(e&&e.length)return e.find(e=>e&&("function"==typeof t?t(e):Ow(e,t))===n)}var Lw=e=>null==e,zw=e=>Lw(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Vw(e){return null!=e}function Bw(){}var Fw=["type","size","sizeType"];function $w(){return $w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$w.apply(null,arguments)}function Uw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ww(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uw(Object(n),!0).forEach(function(t){Kw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hw={symbolCircle:bx,symbolCross:xx,symbolDiamond:Ox,symbolSquare:Sx,symbolStar:jx,symbolTriangle:Cx,symbolWye:_x},Yw=Math.PI/180,qw=e=>{var{type:t="circle",size:n=64,sizeType:o="area"}=e,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Fw),a=Ww(Ww({},i),{},{type:t,size:n,sizeType:o}),s="circle";"string"==typeof t&&(s=t);var{className:l,cx:c,cy:u}=a,d=Wb(a);return Tw(c)&&Tw(u)&&Tw(n)?r.createElement("path",$w({},d,{className:Y("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:(()=>{var e=(e=>{var t="symbol".concat(zw(e));return Hw[t]||bx})(s),t=function(e,t){let n=null,r=ux(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:Jb(e||bx),t="function"==typeof t?t:Jb(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:Jb(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:Jb(+e),o):t},o.context=function(e){return arguments.length?(n=null==e?null:e,o):n},o}().type(e).size(((e,t,n)=>{if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*Yw;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.tan(r)**2);case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}})(n,o,s)),r=t();if(null!==r)return r})()})):null};qw.registerSymbol=(e,t)=>{Hw["symbol".concat(zw(e))]=t};var Gw=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Xw=(t,n)=>{if(!t||"function"==typeof t||"boolean"==typeof t)return null;var r=t;if(e.isValidElement(t)&&(r=t.props),"object"!=typeof r&&"function"!=typeof r)return null;var o={};return Object.keys(r).forEach(e=>{zb(e)&&"function"==typeof r[e]&&(o[e]=t=>r[e](r,t))}),o},Zw=(e,t,n)=>{if(null===e||"object"!=typeof e&&"function"!=typeof e)return null;var r=null;return Object.keys(e).forEach(o=>{var i=e[o];zb(o)&&"function"==typeof i&&(r||(r={}),r[o]=((e,t,n)=>r=>(e(t,n,r),null))(i,t,n))}),r};function Jw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eE(e,t){var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jw(Object(n),!0).forEach(function(t){Qw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e),r=t;return Object.keys(t).reduce((e,t)=>(void 0===e[t]&&void 0!==r[t]&&(e[t]=r[t]),e),n)}var tE,nE={},rE={};function oE(){return tE||(tE=1,e=rE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.uniqBy=function(e,t){const n=new Map;for(let r=0;r<e.length;r++){const o=e[r],i=t(o,r,e);n.has(i)||n.set(i,o)}return Array.from(n.values())}),rE;var e}var iE,aE={};function sE(){return iE||(iE=1,e=aE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.ary=function(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}),aE;var e}var lE,cE={};function uE(){return lE||(lE=1,e=cE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.identity=function(e){return e}),cE;var e}var dE,fE,pE={},hE={},mE={};function vE(){return dE||(dE=1,e=mE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isLength=function(e){return Number.isSafeInteger(e)&&e>=0}),mE;var e}function yE(){return fE||(fE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vE();e.isArrayLike=function(e){return null!=e&&"function"!=typeof e&&t.isLength(e.length)}}(hE)),hE}var gE,bE,xE={};function wE(){return gE||(gE=1,e=xE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObjectLike=function(e){return"object"==typeof e&&null!==e}),xE;var e}function EE(){return bE||(bE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yE(),n=wE();e.isArrayLikeObject=function(e){return n.isObjectLike(e)&&t.isArrayLike(e)}}(pE)),pE}var OE,SE={},kE={};function PE(){return OE||(OE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ww();e.property=function(e){return function(n){return t.get(n,e)}}}(kE)),kE}var AE,jE={},TE={},CE={},ME={};function NE(){return AE||(AE=1,e=ME,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isObject=function(e){return null!==e&&("object"==typeof e||"function"==typeof e)}),ME;var e}var IE,DE={};function _E(){return IE||(IE=1,e=DE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPrimitive=function(e){return null==e||"object"!=typeof e&&"function"!=typeof e}),DE;var e}var RE,LE,zE,VE={};function BE(){return RE||(RE=1,e=VE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isEqualsSameValueZero=function(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}),VE;var e}function FE(){return LE||(LE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NE(),n=_E(),r=BE();function o(e,s,l,c){if(s===e)return!0;switch(typeof s){case"object":return function(e,t,r,o){if(null==t)return!0;if(Array.isArray(t))return i(e,t,r,o);if(t instanceof Map)return function(e,t,n,r){if(0===t.size)return!0;if(!(e instanceof Map))return!1;for(const[o,i]of t.entries()){if(!1===n(e.get(o),i,o,e,t,r))return!1}return!0}(e,t,r,o);if(t instanceof Set)return a(e,t,r,o);const s=Object.keys(t);if(null==e||n.isPrimitive(e))return 0===s.length;if(0===s.length)return!0;if(o?.has(t))return o.get(t)===e;o?.set(t,e);try{for(let i=0;i<s.length;i++){const a=s[i];if(!n.isPrimitive(e)&&!(a in e))return!1;if(void 0===t[a]&&void 0!==e[a])return!1;if(null===t[a]&&null!==e[a])return!1;if(!r(e[a],t[a],a,e,t,o))return!1}return!0}finally{o?.delete(t)}}(e,s,l,c);case"function":return Object.keys(s).length>0?o(e,{...s},l,c):r.isEqualsSameValueZero(e,s);default:return t.isObject(e)?"string"!=typeof s||""===s:r.isEqualsSameValueZero(e,s)}}function i(e,t,n,r){if(0===t.length)return!0;if(!Array.isArray(e))return!1;const o=new Set;for(let i=0;i<t.length;i++){const a=t[i];let s=!1;for(let l=0;l<e.length;l++){if(o.has(l))continue;let c=!1;if(n(e[l],a,i,e,t,r)&&(c=!0),c){o.add(l),s=!0;break}}if(!s)return!1}return!0}function a(e,t,n,r){return 0===t.size||e instanceof Set&&i([...e],[...t],n,r)}e.isMatchWith=function e(t,n,r){return"function"!=typeof r?e(t,n,()=>{}):o(t,n,function e(t,n,i,a,s,l){const c=r(t,n,i,a,s,l);return void 0!==c?Boolean(c):o(t,n,e,l)},new Map)},e.isSetMatch=a}(CE)),CE}function $E(){return zE||(zE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=FE();e.isMatch=function(e,n){return t.isMatchWith(e,n,()=>{})}}(TE)),TE}var UE,WE={},KE={},HE={};function YE(){return UE||(UE=1,e=HE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getSymbols=function(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}),HE;var e}var qE,GE={};function XE(){return qE||(qE=1,e=GE,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.getTag=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}),GE;var e}var ZE,JE={};function QE(){return ZE||(ZE=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.argumentsTag="[object Arguments]",e.arrayBufferTag="[object ArrayBuffer]",e.arrayTag="[object Array]",e.bigInt64ArrayTag="[object BigInt64Array]",e.bigUint64ArrayTag="[object BigUint64Array]",e.booleanTag="[object Boolean]",e.dataViewTag="[object DataView]",e.dateTag="[object Date]",e.errorTag="[object Error]",e.float32ArrayTag="[object Float32Array]",e.float64ArrayTag="[object Float64Array]",e.functionTag="[object Function]",e.int16ArrayTag="[object Int16Array]",e.int32ArrayTag="[object Int32Array]",e.int8ArrayTag="[object Int8Array]",e.mapTag="[object Map]",e.numberTag="[object Number]",e.objectTag="[object Object]",e.regexpTag="[object RegExp]",e.setTag="[object Set]",e.stringTag="[object String]",e.symbolTag="[object Symbol]",e.uint16ArrayTag="[object Uint16Array]",e.uint32ArrayTag="[object Uint32Array]",e.uint8ArrayTag="[object Uint8Array]",e.uint8ClampedArrayTag="[object Uint8ClampedArray]"}(JE)),JE}var eO,tO,nO,rO,oO={};function iO(){return eO||(eO=1,e=oO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isTypedArray=function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}),oO;var e}function aO(){return tO||(tO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YE(),n=XE(),r=QE(),o=_E(),i=iO();function a(e,t,l,c=new Map,u=void 0){const d=u?.(e,t,l,c);if(void 0!==d)return d;if(o.isPrimitive(e))return e;if(c.has(e))return c.get(e);if(Array.isArray(e)){const t=new Array(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=a(e[n],n,l,c,u);return Object.hasOwn(e,"index")&&(t.index=e.index),Object.hasOwn(e,"input")&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){const t=new Map;c.set(e,t);for(const[n,r]of e)t.set(n,a(r,n,l,c,u));return t}if(e instanceof Set){const t=new Set;c.set(e,t);for(const n of e)t.add(a(n,void 0,l,c,u));return t}if("undefined"!=typeof Buffer&&Buffer.isBuffer(e))return e.subarray();if(i.isTypedArray(e)){const t=new(Object.getPrototypeOf(e).constructor)(e.length);c.set(e,t);for(let n=0;n<e.length;n++)t[n]=a(e[n],n,l,c,u);return t}if(e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return c.set(e,t),s(t,e,l,c,u),t}if("undefined"!=typeof File&&e instanceof File){const t=new File([e],e.name,{type:e.type});return c.set(e,t),s(t,e,l,c,u),t}if("undefined"!=typeof Blob&&e instanceof Blob){const t=new Blob([e],{type:e.type});return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof Error){const t=structuredClone(e);return c.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,s(t,e,l,c,u),t}if(e instanceof Boolean){const t=new Boolean(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof Number){const t=new Number(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if(e instanceof String){const t=new String(e.valueOf());return c.set(e,t),s(t,e,l,c,u),t}if("object"==typeof e&&function(e){switch(n.getTag(e)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}(e)){const t=Object.create(Object.getPrototypeOf(e));return c.set(e,t),s(t,e,l,c,u),t}return e}function s(e,n,r=e,o,i){const s=[...Object.keys(n),...t.getSymbols(n)];for(let t=0;t<s.length;t++){const l=s[t],c=Object.getOwnPropertyDescriptor(e,l);(null==c||c.writable)&&(e[l]=a(n[l],l,r,o,i))}}e.cloneDeepWith=function(e,t){return a(e,void 0,e,new Map,t)},e.cloneDeepWithImpl=a,e.copyProperties=s}(KE)),KE}function sO(){return nO||(nO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aO();e.cloneDeep=function(e){return t.cloneDeepWithImpl(e,void 0,e,new Map,void 0)}}(WE)),WE}function lO(){return rO||(rO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$E(),n=sO();e.matches=function(e){return e=n.cloneDeep(e),n=>t.isMatch(n,e)}}(jE)),jE}var cO,uO,dO={},fO={},pO={};function hO(){return cO||(cO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aO(),n=XE(),r=QE();e.cloneDeepWith=function(e,o){return t.cloneDeepWith(e,(i,a,s,l)=>{const c=o?.(i,a,s,l);if(void 0!==c)return c;if("object"==typeof e){if(n.getTag(e)===r.objectTag&&"function"!=typeof e.constructor){const n={};return l.set(e,n),t.copyProperties(n,e,s,l),n}switch(Object.prototype.toString.call(e)){case r.numberTag:case r.stringTag:case r.booleanTag:{const n=new e.constructor(e?.valueOf());return t.copyProperties(n,e),n}case r.argumentsTag:{const n={};return t.copyProperties(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}}(pO)),pO}function mO(){return uO||(uO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hO();e.cloneDeep=function(e){return t.cloneDeepWith(e)}}(fO)),fO}var vO,yO={},gO={};function bO(){return vO||(vO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;e.isIndex=function(e,n=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<n;case"symbol":return!1;case"string":return t.test(e)}}}(gO)),gO}var xO,wO,EO,OO,SO,kO,PO,AO={};function jO(){return xO||(xO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XE();e.isArguments=function(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===t.getTag(e)}}(AO)),AO}function TO(){return wO||(wO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=lw(),n=bO(),r=jO(),o=xw();e.has=function(e,i){let a;if(a=Array.isArray(i)?i:"string"==typeof i&&t.isDeepKey(i)&&null==e?.[i]?o.toPath(i):[i],0===a.length)return!1;let s=e;for(let e=0;e<a.length;e++){const t=a[e];if(null==s||!Object.hasOwn(s,t)){if(!((Array.isArray(s)||r.isArguments(s))&&n.isIndex(t)&&t<s.length))return!1}s=s[t]}return!0}}(yO)),yO}function CO(){return EO||(EO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$E(),n=dw(),r=mO(),o=ww(),i=TO();e.matchesProperty=function(e,a){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=n.toKey(e)}return a=r.cloneDeep(a),function(n){const r=o.get(n,e);return void 0===r?i.has(n,e):void 0===a?void 0===r:t.isMatch(r,a)}}}(dO)),dO}function MO(){return OO||(OO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=uE(),n=PE(),r=lO(),o=CO();e.iteratee=function(e){if(null==e)return t.identity;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&2===e.length?o.matchesProperty(e[0],e[1]):r.matches(e);case"string":case"symbol":case"number":return n.property(e)}}}(SE)),SE}function NO(){return SO||(SO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oE(),n=sE(),r=uE(),o=EE(),i=MO();e.uniqBy=function(e,a=r.identity){return o.isArrayLikeObject(e)?t.uniqBy(Array.from(e),n.ary(i.iteratee(a),1)):[]}}(nE)),nE}function IO(){return PO?kO:(PO=1,kO=NO().uniqBy)}var DO=i(IO());var _O=e.createContext(null),RO=e=>e,LO=()=>{var t=e.useContext(_O);return t?t.store.dispatch:RO},zO=()=>{},VO=()=>zO,BO=(e,t)=>e===t;function FO(t){var n=e.useContext(_O),r=e.useMemo(()=>n?e=>{if(null!=e)return t(e)}:zO,[n,t]);return ts.useSyncExternalStoreWithSelector(n?n.subscription.addNestedSub:VO,n?n.store.getState:zO,n?n.store.getState:zO,r,BO)}var $O,UO={},WO={},KO={};function HO(){return $O||($O=1,function(e){function t(e){return"symbol"==typeof e?1:null===e?2:void 0===e?3:e!=e?4:0}Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});e.compareValues=(e,n,r)=>{if(e!==n){const o=t(e),i=t(n);if(o===i&&0===o){if(e<n)return"desc"===r?1:-1;if(e>n)return"desc"===r?-1:1}return"desc"===r?i-o:o-i}return 0}}(KO)),KO}var YO,qO,GO,XO={},ZO={};function JO(){return YO||(YO=1,e=ZO,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isSymbol=function(e){return"symbol"==typeof e||e instanceof Symbol}),ZO;var e}function QO(){return qO||(qO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JO(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;e.isKey=function(e,o){return!Array.isArray(e)&&(!("number"!=typeof e&&"boolean"!=typeof e&&null!=e&&!t.isSymbol(e))||("string"==typeof e&&(r.test(e)||!n.test(e))||null!=o&&Object.hasOwn(o,e)))}}(XO)),XO}function eS(){return GO||(GO=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HO(),n=QO(),r=xw();e.orderBy=function(e,o,i,a){if(null==e)return[];i=a?void 0:i,Array.isArray(e)||(e=Object.values(e)),Array.isArray(o)||(o=null==o?[null]:[o]),0===o.length&&(o=[null]),Array.isArray(i)||(i=null==i?[]:[i]),i=i.map(e=>String(e));const s=(e,t)=>{let n=e;for(let e=0;e<t.length&&null!=n;++e)n=n[t[e]];return n},l=o.map(e=>(Array.isArray(e)&&1===e.length&&(e=e[0]),null==e||"function"==typeof e||Array.isArray(e)||n.isKey(e)?e:{key:e,path:r.toPath(e)})),c=e.map(e=>({original:e,criteria:l.map(t=>((e,t)=>null==t||null==e?t:"object"==typeof e&&"key"in e?Object.hasOwn(t,e.key)?t[e.key]:s(t,e.path):"function"==typeof e?e(t):Array.isArray(e)?s(t,e):"object"==typeof t?t[e]:t)(t,e))}));return c.slice().sort((e,n)=>{for(let r=0;r<l.length;r++){const o=t.compareValues(e.criteria[r],n.criteria[r],i[r]);if(0!==o)return o}return 0}).map(e=>e.original)}}(WO)),WO}var tS,nS={};function rS(){return tS||(tS=1,e=nS,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.flatten=function(e,t=1){const n=[],r=Math.floor(t),o=(e,t)=>{for(let i=0;i<e.length;i++){const a=e[i];Array.isArray(a)&&t<r?o(a,t+1):n.push(a)}};return o(e,0),n}),nS;var e}var oS,iS,aS,sS,lS={};function cS(){return oS||(oS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bO(),n=yE(),r=NE(),o=BE();e.isIterateeCall=function(e,i,a){return!!r.isObject(a)&&(!!("number"==typeof i&&n.isArrayLike(a)&&t.isIndex(i)&&i<a.length||"string"==typeof i&&i in a)&&o.isEqualsSameValueZero(a[i],e))}}(lS)),lS}function uS(){return iS||(iS=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eS(),n=rS(),r=cS();e.sortBy=function(e,...o){const i=o.length;return i>1&&r.isIterateeCall(e,o[0],o[1])?o=[]:i>2&&r.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(e,n.flatten(o),["asc"])}}(UO)),UO}function dS(){return sS?aS:(sS=1,aS=uS().sortBy)}var fS=i(dS()),pS=e=>e.legend.settings;za([e=>e.legend.payload,pS],(e,t)=>{var{itemSorter:n}=t,r=e.flat(1);return n?fS(r,n):r});function hS(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var mS=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")(),vS=()=>Math.random().toString(36).substring(7).split("").join("."),yS={INIT:`@@redux/INIT${vS()}`,REPLACE:`@@redux/REPLACE${vS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${vS()}`};function gS(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function bS(e){if(void 0===e)return"undefined";if(null===e)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(function(e){return e instanceof Date||"function"==typeof e.toDateString&&"function"==typeof e.getDate&&"function"==typeof e.setDate}(e))return"date";if(function(e){return e instanceof Error||"string"==typeof e.message&&e.constructor&&"number"==typeof e.constructor.stackTraceLimit}(e))return"error";const n=function(e){return"function"==typeof e.constructor?e.constructor.name:null}(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function xS(e){let t=typeof e;return"production"!==process.env.NODE_ENV&&(t=bS(e)),t}function wS(e,t,n){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?hS(2):`Expected the root reducer to be a function. Instead, received: '${xS(e)}'`);if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("production"===process.env.NODE_ENV?hS(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("production"===process.env.NODE_ENV?hS(1):`Expected the enhancer to be a function. Instead, received: '${xS(n)}'`);return n(wS)(e,t)}let r=e,o=t,i=new Map,a=i,s=0,l=!1;function c(){a===i&&(a=new Map,i.forEach((e,t)=>{a.set(t,e)}))}function u(){if(l)throw new Error("production"===process.env.NODE_ENV?hS(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?hS(4):`Expected the listener to be a function. Instead, received: '${xS(e)}'`);if(l)throw new Error("production"===process.env.NODE_ENV?hS(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let t=!0;c();const n=s++;return a.set(n,e),function(){if(t){if(l)throw new Error("production"===process.env.NODE_ENV?hS(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");t=!1,c(),a.delete(n),i=null}}}function f(e){if(!gS(e))throw new Error("production"===process.env.NODE_ENV?hS(7):`Actions must be plain objects. Instead, the actual type was: '${xS(e)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(void 0===e.type)throw new Error("production"===process.env.NODE_ENV?hS(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if("string"!=typeof e.type)throw new Error("production"===process.env.NODE_ENV?hS(17):`Action "type" property must be a string. Instead, the actual type was: '${xS(e.type)}'. Value was: '${e.type}' (stringified)`);if(l)throw new Error("production"===process.env.NODE_ENV?hS(9):"Reducers may not dispatch actions.");try{l=!0,o=r(o,e)}finally{l=!1}return(i=a).forEach(e=>{e()}),e}f({type:yS.INIT});const p={dispatch:f,subscribe:d,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error("production"===process.env.NODE_ENV?hS(10):`Expected the nextReducer to be a function. Instead, received: '${xS(e)}`);r=e,f({type:yS.REPLACE})},[mS]:function(){const e=d;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error("production"===process.env.NODE_ENV?hS(11):`Expected the observer to be an object. Instead, received: '${xS(t)}'`);function n(){const e=t;e.next&&e.next(u())}n();return{unsubscribe:e(n)}},[mS](){return this}}}};return p}function ES(e){"undefined"!=typeof console&&"function"==typeof console.error&&console.error(e);try{throw new Error(e)}catch(e){}}function OS(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"production"!==process.env.NODE_ENV&&void 0===e[o]&&ES(`No reducer provided for key "${o}"`),"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o,i;"production"!==process.env.NODE_ENV&&(o={});try{!function(e){Object.keys(e).forEach(t=>{const n=e[t];if(void 0===n(void 0,{type:yS.INIT}))throw new Error("production"===process.env.NODE_ENV?hS(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(void 0===n(void 0,{type:yS.PROBE_UNKNOWN_ACTION()}))throw new Error("production"===process.env.NODE_ENV?hS(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${yS.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}(n)}catch(e){i=e}return function(e={},t){if(i)throw i;if("production"!==process.env.NODE_ENV){const r=function(e,t,n,r){const o=Object.keys(t),i=n&&n.type===yS.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(0===o.length)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!gS(e))return`The ${i} has unexpected type of "${xS(e)}". Expected argument to be an object with the following keys: "${o.join('", "')}"`;const a=Object.keys(e).filter(e=>!t.hasOwnProperty(e)&&!r[e]);return a.forEach(e=>{r[e]=!0}),n&&n.type===yS.REPLACE?void 0:a.length>0?`Unexpected ${a.length>1?"keys":"key"} "${a.join('", "')}" found in ${i}. Expected to find one of the known reducer keys instead: "${o.join('", "')}". Unexpected keys will be ignored.`:void 0}(e,n,t,o);r&&ES(r)}let a=!1;const s={};for(let o=0;o<r.length;o++){const i=r[o],l=n[i],c=e[i],u=l(c,t);if(void 0===u){const e=t&&t.type;throw new Error("production"===process.env.NODE_ENV?hS(14):`When called with an action of type ${e?`"${String(e)}"`:"(unknown type)"}, the slice reducer for key "${i}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}s[i]=u,a=a||u!==c}return a=a||r.length!==Object.keys(e).length,a?s:e}}function SS(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function kS(e){return gS(e)&&"type"in e&&"string"==typeof e.type}var PS=Symbol.for("immer-nothing"),AS=Symbol.for("immer-draftable"),jS=Symbol.for("immer-state"),TS="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function CS(e,...t){if("production"!==process.env.NODE_ENV){const n=TS[e],r=QS(n)?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var MS=Object,NS=MS.getPrototypeOf,IS="constructor",DS="prototype",_S="configurable",RS="enumerable",LS="writable",zS="value",VS=e=>!!e&&!!e[jS];function BS(e){return!!e&&(US(e)||GS(e)||!!e[AS]||!!e[IS]?.[AS]||XS(e)||ZS(e))}var FS=MS[DS][IS].toString(),$S=new WeakMap;function US(e){if(!e||!JS(e))return!1;const t=NS(e);if(null===t||t===MS[DS])return!0;const n=MS.hasOwnProperty.call(t,IS)&&t[IS];if(n===Object)return!0;if(!QS(n))return!1;let r=$S.get(n);return void 0===r&&(r=Function.toString.call(n),$S.set(n,r)),r===FS}function WS(e,t,n=!0){if(0===KS(e)){(n?Reflect.ownKeys(e):MS.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function KS(e){const t=e[jS];return t?t.type_:GS(e)?1:XS(e)?2:ZS(e)?3:0}var HS=(e,t,n=KS(e))=>2===n?e.has(t):MS[DS].hasOwnProperty.call(e,t),YS=(e,t,n=KS(e))=>2===n?e.get(t):e[t],qS=(e,t,n,r=KS(e))=>{2===r?e.set(t,n):3===r?e.add(n):e[t]=n};var GS=Array.isArray,XS=e=>e instanceof Map,ZS=e=>e instanceof Set,JS=e=>"object"==typeof e,QS=e=>"function"==typeof e,ek=e=>"boolean"==typeof e;var tk=e=>e.copy_||e.base_,nk=e=>e.modified_?e.copy_:e.base_;function rk(e,t){if(XS(e))return new Map(e);if(ZS(e))return new Set(e);if(GS(e))return Array[DS].slice.call(e);const n=US(e);if(!0===t||"class_only"===t&&!n){const t=MS.getOwnPropertyDescriptors(e);delete t[jS];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i[LS]&&(i[LS]=!0,i[_S]=!0),(i.get||i.set)&&(t[o]={[_S]:!0,[LS]:!0,[RS]:i[RS],[zS]:e[o]})}return MS.create(NS(e),t)}{const t=NS(e);if(null!==t&&n)return{...e};const r=MS.create(t);return MS.assign(r,e)}}function ok(e,t=!1){return ak(e)||VS(e)||!BS(e)||(KS(e)>1&&MS.defineProperties(e,{set:ik,add:ik,clear:ik,delete:ik}),MS.freeze(e),t&&WS(e,(e,t)=>{ok(t,!0)},!1)),e}var ik={[zS]:function(){CS(2)}};function ak(e){return null===e||!JS(e)||MS.isFrozen(e)}var sk="MapSet",lk="Patches",ck="ArrayMethods",uk={};function dk(e){const t=uk[e];return t||CS(0,e),t}var fk,pk=e=>!!uk[e],hk=()=>fk;function mk(e,t){t&&(e.patchPlugin_=dk(lk),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function vk(e){yk(e),e.drafts_.forEach(bk),e.drafts_=null}function yk(e){e===fk&&(fk=e.parent_)}var gk=e=>fk={drafts_:[],parent_:fk,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:pk(sk)?dk(sk):void 0,arrayMethodsPlugin_:pk(ck)?dk(ck):void 0};function bk(e){const t=e[jS];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function xk(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(void 0!==e&&e!==n){n[jS].modified_&&(vk(t),CS(4)),BS(e)&&(e=wk(t,e));const{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[jS].base_,e,t)}else e=wk(t,n);return function(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&ok(t,n)}(t,e,!0),vk(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==PS?e:void 0}function wk(e,t){if(ak(t))return t;const n=t[jS];if(!n){return Ak(t,e.handledSet_,e)}if(!Ok(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:t}=n;if(t)for(;t.length>0;){t.pop()(e)}Pk(n,e)}return n.copy_}function Ek(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ok=(e,t)=>e.scope_===t,Sk=[];function kk(e,t,n,r){const o=tk(e),i=e.type_;if(void 0!==r){if(YS(o,r,i)===t)return void qS(o,r,n,i)}if(!e.draftLocations_){const t=e.draftLocations_=new Map;WS(o,(e,n)=>{if(VS(n)){const r=t.get(n)||[];r.push(e),t.set(n,r)}})}const a=e.draftLocations_.get(t)??Sk;for(const e of a)qS(o,e,n,i)}function Pk(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:n}=t;if(n){const r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Ek(e)}}function Ak(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||VS(e)||t.has(e)||!BS(e)||ak(e)||(t.add(e),WS(e,(r,o)=>{if(VS(o)){const t=o[jS];if(Ok(t,n)){const n=nk(t);qS(e,r,n,e.type_),Ek(t)}}else BS(o)&&Ak(o,t,n)})),e}var jk={get(e,t){if(t===jS)return e;let n=e.scope_.arrayMethodsPlugin_;const r=1===e.type_&&"string"==typeof t;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const o=tk(e);if(!HS(o,t,e.type_))return function(e,t,n){const r=Mk(t,n);return r?zS in r?r[zS]:r.get?.call(e.draft_):void 0}(e,o,t);const i=o[t];if(e.finalized_||!BS(i))return i;if(r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&function(e){const t=+e;return Number.isInteger(t)&&String(t)===e}(t))return i;if(i===Ck(e.base_,t)){Ik(e);const n=1===e.type_?+t:t,r=Dk(e.scope_,i,e,n);return e.copy_[n]=r}return i},has:(e,t)=>t in tk(e),ownKeys:e=>Reflect.ownKeys(tk(e)),set(e,t,n){const r=Mk(tk(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Ck(tk(e),t),o=r?.[jS];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||HS(e.base_,t,e.type_)))return!0;Ik(e),Nk(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),function(e,t,n){const{scope_:r}=e;if(VS(n)){const o=n[jS];Ok(o,r)&&o.callbacks_.push(function(){Ik(e);const r=nk(o);kk(e,n,r,t)})}else BS(n)&&e.callbacks_.push(function(){const o=tk(e);3===e.type_?o.has(n)&&Ak(n,r.handledSet_,r):YS(o,t,e.type_)===n&&r.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&Ak(YS(e.copy_,t,e.type_),r.handledSet_,r)})}(e,t,n)),!0},deleteProperty:(e,t)=>(Ik(e),void 0!==Ck(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),Nk(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=tk(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{[LS]:!0,[_S]:1!==e.type_||"length"!==t,[RS]:r[RS],[zS]:n[t]}:r},defineProperty(){CS(11)},getPrototypeOf:e=>NS(e.base_),setPrototypeOf(){CS(12)}},Tk={};for(let e in jk){let t=jk[e];Tk[e]=function(){const e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function Ck(e,t){const n=e[jS];return(n?tk(n):e)[t]}function Mk(e,t){if(!(t in e))return;let n=NS(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=NS(n)}}function Nk(e){e.modified_||(e.modified_=!0,e.parent_&&Nk(e.parent_))}function Ik(e){e.copy_||(e.assigned_=new Map,e.copy_=rk(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Tk.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&CS(13),Tk.set.call(this,e,t,void 0)},Tk.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&CS(14),jk.set.call(this,e[0],t,n,e[0])};function Dk(e,t,n,r){const[o,i]=XS(t)?dk(sk).proxyMap_(t,n):ZS(t)?dk(sk).proxySet_(t,n):function(e,t){const n=GS(e),r={type_:n?1:0,scope_:t?t.scope_:hk(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let o=r,i=jk;n&&(o=[r],i=Tk);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,[s,r]}(t,n);return(n?.scope_??hk()).drafts_.push(o),i.callbacks_=n?.callbacks_??[],i.key_=r,n&&void 0!==r?function(e,t,n){e.callbacks_.push(function(r){const o=t;if(!o||!Ok(o,r))return;r.mapSetPlugin_?.fixSetContents(o);const i=nk(o);kk(e,o.draft_??o,i,n),Pk(o,r)})}(n,i,r):i.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(i);const{patchPlugin_:t}=e;i.modified_&&t&&t.generatePatches_(i,[],e)}),o}function _k(e){return VS(e)||CS(10,e),Rk(e)}function Rk(e){if(!BS(e)||ak(e))return e;const t=e[jS];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=rk(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=rk(e,!0);return WS(n,(e,t)=>{qS(n,e,Rk(t))},r),t&&(t.finalized_=!1),n}var Lk=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(QS(e)&&!QS(t)){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if(QS(t)||CS(6),void 0===n||QS(n)||CS(7),BS(e)){const o=gk(this),i=Dk(o,e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?vk(o):yk(o)}return mk(o,n),xk(r,o)}if(!e||!JS(e)){if(r=t(e),void 0===r&&(r=e),r===PS&&(r=void 0),this.autoFreeze_&&ok(r,!0),n){const t=[],o=[];dk(lk).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:o}),n(t,o)}return r}CS(1,e)},this.produceWithPatches=(e,t)=>{if(QS(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},ek(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),ek(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),ek(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){BS(e)||CS(8),VS(e)&&(e=_k(e));const t=gk(this),n=Dk(t,e,void 0);return n[jS].isManual_=!0,yk(t),n}finishDraft(e,t){const n=e&&e[jS];n&&n.isManual_||CS(9);const{scope_:r}=n;return mk(r,t),xk(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=dk(lk).applyPatches_;return VS(e)?r(e,t):this.produce(e,e=>r(e,t))}},zk=Lk.produce;function Vk(e){return({dispatch:t,getState:n})=>r=>o=>"function"==typeof o?o(t,n,e):r(o)}var Bk=Vk(),Fk=Vk,$k="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?SS:SS.apply(null,arguments)};function Uk(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error("production"===process.env.NODE_ENV?qP(0):"prepareAction did not return an object");return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>kS(t)&&t.type===e,n}function Wk(e){return"function"==typeof e&&"type"in e&&((t=e)&&"function"==typeof t.match);var t}function Kk(e,t){let n=0;return{measureTime(e){const t=Date.now();try{return e()}finally{const e=Date.now();n+=e-t}},warnIfExceeded(){n>e&&console.warn(`${t} took ${n}ms, which is more than the warning threshold of ${e}ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.`)}}}var Hk=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function Yk(e){return BS(e)?zk(e,()=>{}):e}function qk(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Gk(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function Xk(e,t,n){const r=Zk(e,t,n);return{detectMutations:()=>Jk(e,t,r,n)}}function Zk(e,t=[],n,r="",o=new Set){const i={value:n};if(!e(n)&&!o.has(n)){o.add(n),i.children={};const a=t.length>0;for(const o in n){const s=r?r+"."+o:o;if(a){if(t.some(e=>e instanceof RegExp?e.test(s):s===e))continue}i.children[o]=Zk(e,t,n[o],s)}}return i}function Jk(e,t=[],n,r,o=!1,i=""){const a=n?n.value:void 0,s=a===r;if(o&&!s&&!Number.isNaN(r))return{wasMutated:!0,path:i};if(e(a)||e(r))return{wasMutated:!1};const l={};for(let e in n.children)l[e]=!0;for(let e in r)l[e]=!0;const c=t.length>0;for(let o in l){const a=i?i+"."+o:o;if(c){if(t.some(e=>e instanceof RegExp?e.test(a):a===e))continue}const l=Jk(e,t,n.children[o],r[o],s,a);if(l.wasMutated)return l}return{wasMutated:!1}}function Qk(e){const t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||gS(e)}function eP(e,t="",n=Qk,r,o=[],i){let a;if(!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;if(i?.has(e))return!1;const s=null!=r?r(e):Object.entries(e),l=o.length>0;for(const[e,c]of s){const s=t?t+"."+e:e;if(l){if(o.some(e=>e instanceof RegExp?e.test(s):s===e))continue}if(!n(c))return{keyPath:s,value:c};if("object"==typeof c&&(a=eP(c,s,n,r,o,i),a))return a}return i&&tP(e)&&i.add(e),!1}function tP(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if("object"==typeof t&&null!==t&&!tP(t))return!1;return!0}function nP(e){return"boolean"==typeof e}var rP=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:o=!0}=e??{};let i=new Hk;if(t&&(nP(t)?i.push(Bk):i.push(Fk(t.extraArgument))),"production"!==process.env.NODE_ENV){if(n){let e={};nP(n)||(e=n),i.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{let t=function(e,t,r,o){return JSON.stringify(e,n(t,o),r)},n=function(e,t){let n=[],r=[];return t||(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(o,i){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,o):r.push(o),~n.indexOf(i)&&(i=t.call(this,o,i))}else n.push(i);return null==e?i:e.call(this,o,i)}},{isImmutable:r=Gk,ignoredPaths:o,warnAfter:i=32}=e;const a=Xk.bind(null,r,o);return({getState:e})=>{let n,r=e(),o=a(r);return s=>l=>{const c=Kk(i,"ImmutableStateInvariantMiddleware");c.measureTime(()=>{if(r=e(),n=o.detectMutations(),o=a(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?qP(19):`A state mutation was detected between dispatches, in the path '${n.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const u=s(l);return c.measureTime(()=>{if(r=e(),n=o.detectMutations(),o=a(r),n.wasMutated)throw new Error("production"===process.env.NODE_ENV?qP(20):`A state mutation was detected inside a dispatch, in the path: ${n.path||""}. Take a look at the reducer(s) handling the action ${t(l)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),c.warnIfExceeded(),u}}}}(e))}if(r){let e={};nP(r)||(e=r),i.push(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);{const{isSerializable:t=Qk,getEntries:n,ignoredActions:r=[],ignoredActionPaths:o=["meta.arg","meta.baseQueryMeta"],ignoredPaths:i=[],warnAfter:a=32,ignoreState:s=!1,ignoreActions:l=!1,disableCache:c=!1}=e,u=!c&&WeakSet?new WeakSet:void 0;return e=>c=>d=>{if(!kS(d))return c(d);const f=c(d),p=Kk(a,"SerializableStateInvariantMiddleware");return l||r.length&&-1!==r.indexOf(d.type)||p.measureTime(()=>{const e=eP(d,"",t,n,o,u);if(e){const{keyPath:t,value:n}=e;console.error(`A non-serializable value was detected in an action, in the path: \`${t}\`. Value:`,n,"\nTake a look at the logic that dispatched this action: ",d,"\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)","\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)")}}),s||(p.measureTime(()=>{const r=eP(e.getState(),"",t,n,i,u);if(r){const{keyPath:e,value:t}=r;console.error(`A non-serializable value was detected in the state, in the path: \`${e}\`. Value:`,t,`\nTake a look at the reducer(s) handling this action type: ${d.type}.\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),f}}}(e))}if(o){let e={};nP(o)||(e=o),i.unshift(function(e={}){if("production"===process.env.NODE_ENV)return()=>e=>t=>e(t);const{isActionCreator:t=Wk}=e;return()=>e=>n=>(t(n)&&console.warn(function(e){const t=e?`${e}`.split("/"):[],n=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. \`dispatch(${n}())\` instead of \`dispatch(${n})\`. This is necessary even if the action has no payload.`}(n.type)),e(n))}(e))}}return i},oP="RTK_autoBatch",iP=()=>e=>({payload:e,meta:{[oP]:!0}}),aP=e=>t=>{setTimeout(t,e)},sP=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let o=!0,i=!1,a=!1;const s=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame:aP(10):"callback"===e.type?e.queueNotification:aP(e.timeout),c=()=>{a=!1,i&&(i=!1,s.forEach(e=>e()))};return Object.assign({},r,{subscribe(e){const t=r.subscribe(()=>o&&e());return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){try{return o=!e?.meta?.[oP],i=!o,i&&(a||(a=!0,l(c))),r.dispatch(e)}finally{o=!0}}})};function lP(e){const t=rP(),{reducer:n,middleware:r,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a,enhancers:s}=e||{};let l,c;if("function"==typeof n)l=n;else{if(!gS(n))throw new Error("production"===process.env.NODE_ENV?qP(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");l=OS(n)}if("production"!==process.env.NODE_ENV&&r&&"function"!=typeof r)throw new Error("production"===process.env.NODE_ENV?qP(2):"`middleware` field must be a callback");if("function"==typeof r){if(c=r(t),"production"!==process.env.NODE_ENV&&!Array.isArray(c))throw new Error("production"===process.env.NODE_ENV?qP(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if("production"!==process.env.NODE_ENV&&c.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?qP(4):"each middleware provided to configureStore must be a function");if("production"!==process.env.NODE_ENV&&i){let e=new Set;c.forEach(t=>{if(e.has(t))throw new Error("production"===process.env.NODE_ENV?qP(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");e.add(t)})}let u=SS;o&&(u=$k({trace:"production"!==process.env.NODE_ENV,..."object"==typeof o&&o}));const d=function(...e){return t=>(n,r)=>{const o=t(n,r);let i=()=>{throw new Error("production"===process.env.NODE_ENV?hS(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const a={getState:o.getState,dispatch:(e,...t)=>i(e,...t)},s=e.map(e=>e(a));return i=SS(...s)(o.dispatch),{...o,dispatch:i}}}(...c),f=(e=>function(t){const{autoBatch:n=!0}=t??{};let r=new Hk(e);return n&&r.push(sP("object"==typeof n?n:void 0)),r})(d);if("production"!==process.env.NODE_ENV&&s&&"function"!=typeof s)throw new Error("production"===process.env.NODE_ENV?qP(5):"`enhancers` field must be a callback");let p="function"==typeof s?s(f):f();if("production"!==process.env.NODE_ENV&&!Array.isArray(p))throw new Error("production"===process.env.NODE_ENV?qP(6):"`enhancers` callback must return an array");if("production"!==process.env.NODE_ENV&&p.some(e=>"function"!=typeof e))throw new Error("production"===process.env.NODE_ENV?qP(7):"each enhancer provided to configureStore must be a function");"production"!==process.env.NODE_ENV&&c.length&&!p.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");return wS(l,a,u(...p))}function cP(e){const t={},n=[];let r;const o={addCase(e,i){if("production"!==process.env.NODE_ENV){if(n.length>0)throw new Error("production"===process.env.NODE_ENV?qP(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error("production"===process.env.NODE_ENV?qP(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const a="string"==typeof e?e:e.type;if(!a)throw new Error("production"===process.env.NODE_ENV?qP(28):"`builder.addCase` cannot be called with an empty action type");if(a in t)throw new Error("production"===process.env.NODE_ENV?qP(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${a}'`);return t[a]=i,o},addAsyncThunk(e,i){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?qP(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return i.pending&&(t[e.pending.type]=i.pending),i.rejected&&(t[e.rejected.type]=i.rejected),i.fulfilled&&(t[e.fulfilled.type]=i.fulfilled),i.settled&&n.push({matcher:e.settled,reducer:i.settled}),o},addMatcher(e,t){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?qP(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:e,reducer:t}),o},addDefaultCase(e){if("production"!==process.env.NODE_ENV&&r)throw new Error("production"===process.env.NODE_ENV?qP(31):"`builder.addDefaultCase` can only be called once");return r=e,o}};return e(o),[t,n,r]}var uP=(e=21)=>{let t="",n=e;for(;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},dP=Symbol.for("rtk-slice-createasyncthunk");function fP(e,t){return`${e}/${t}`}function pP({creators:e}={}){const t=e?.asyncThunk?.[dP];return function(e){const{name:n,reducerPath:r=n}=e;if(!n)throw new Error("production"===process.env.NODE_ENV?qP(11):"`name` is a required option for createSlice");"undefined"!=typeof process&&"development"===process.env.NODE_ENV&&void 0===e.initialState&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},i=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error("production"===process.env.NODE_ENV?qP(12):"`context.addCase` cannot be called with an empty action type");if(n in a.sliceCaseReducersByType)throw new Error("production"===process.env.NODE_ENV?qP(13):"`context.addCase` cannot be called with two reducers for the same action type: "+n);return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function l(){if("production"!==process.env.NODE_ENV&&"object"==typeof e.extraReducers)throw new Error("production"===process.env.NODE_ENV?qP(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[t={},n=[],r]="function"==typeof e.extraReducers?cP(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return function(e,t){if("production"!==process.env.NODE_ENV&&"object"==typeof t)throw new Error("production"===process.env.NODE_ENV?qP(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let n,[r,o,i]=cP(t);if(function(e){return"function"==typeof e}(e))n=()=>Yk(e());else{const t=Yk(e);n=()=>t}function a(e=n(),t){let a=[r[t.type],...o.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===a.filter(e=>!!e).length&&(a=[i]),a.reduce((e,n)=>{if(n){if(VS(e)){const r=n(e,t);return void 0===r?e:r}if(BS(e))return zk(e,e=>n(e,t));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}}return e},e)}return a.getInitialState=n,a}(e.initialState,e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)})}i.forEach(r=>{const i=o[r],a={reducerName:r,type:fP(n,r),createNotation:"function"==typeof e.reducers};!function(e){return"asyncThunk"===e._reducerDefinitionType}(i)?function({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!function(e){return"reducerWithPrepare"===e._reducerDefinitionType}(r))throw new Error("production"===process.env.NODE_ENV?qP(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?Uk(e,a):Uk(e))}(a,i,s):function({type:e,reducerName:t},n,r,o){if(!o)throw new Error("production"===process.env.NODE_ENV?qP(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:i,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=o(e,i,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a);s&&r.addCase(d.pending,s);l&&r.addCase(d.rejected,l);c&&r.addMatcher(d.settled,c);r.exposeCaseReducer(t,{fulfilled:a||vP,pending:s||vP,rejected:l||vP,settled:c||vP})}(a,i,s,t)});const c=e=>e,u=new Map,d=new WeakMap;let f;function p(e,t){return f||(f=l()),f(e,t)}function h(){return f||(f=l()),f.getInitialState()}function m(t,n=!1){function r(e){let o=e[t];if(void 0===o)if(n)o=qk(d,r,h);else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?qP(15):"selectSlice returned undefined for an uninjected slice reducer");return o}function o(t=c){const r=qk(u,n,()=>new WeakMap);return qk(r,t,()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=hP(i,t,()=>qk(d,t,h),n);return r})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const v={name:n,reducer:p,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:h,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:p},n),{...v,...m(o,!0)}}};return v}}function hP(e,t,n,r){function o(o,...i){let a=t(o);if(void 0===a)if(r)a=n();else if("production"!==process.env.NODE_ENV)throw new Error("production"===process.env.NODE_ENV?qP(16):"selectState returned undefined for an uninjected slice reducer");return e(a,...i)}return o.unwrapped=e,o}var mP=pP();function vP(){}var yP="listener",gP="completed",bP="cancelled",xP=`task-${bP}`,wP=`task-${gP}`,EP=`${yP}-${bP}`,OP=`${yP}-${gP}`,SP=class{constructor(e){this.code=e,this.message=`task ${bP} (reason: ${e})`}name="TaskAbortError";message},kP=(e,t)=>{if("function"!=typeof e)throw new TypeError("production"===process.env.NODE_ENV?qP(32):`${t} is not a function`)},PP=()=>{},AP=(e,t=PP)=>(e.catch(t),e),jP=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),TP=e=>{if(e.aborted)throw new SP(e.reason)};function CP(e,t){let n=PP;return new Promise((r,o)=>{const i=()=>o(new SP(e.reason));e.aborted?i():(n=jP(e,i),t.finally(()=>n()).then(r,o))}).finally(()=>{n=PP})}var MP=e=>t=>AP(CP(e,t).then(t=>(TP(e),t))),NP=e=>{const t=MP(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:IP}=Object,DP={},_P="listenerMiddleware",RP=(e,t)=>(n,r)=>{kP(n,"taskExecutor");const o=new AbortController;var i;i=o,jP(e,()=>i.abort(e.reason));const a=(async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(e){return{status:e instanceof SP?"cancelled":"rejected",error:e}}finally{t?.()}})(async()=>{TP(e),TP(o.signal);const t=await n({pause:MP(o.signal),delay:NP(o.signal),signal:o.signal});return TP(o.signal),t},()=>o.abort(wP));return r?.autoJoin&&t.push(a.catch(PP)),{result:MP(e)(a),cancel(){o.abort(xP)}}},LP=(e,t)=>(n,r)=>AP((async(n,r)=>{TP(t);let o=()=>{};const i=[new Promise((t,r)=>{let i=e({predicate:n,effect:(e,n)=>{n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}});o=()=>{i(),r()}})];null!=r&&i.push(new Promise(e=>setTimeout(e,r,null)));try{const e=await CP(t,Promise.race(i));return TP(t),e}finally{o()}})(n,r)),zP=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=Uk(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("production"===process.env.NODE_ENV?qP(21):"Creating or removing a listener requires one of the known fields for matching an action");return kP(i,"options.listener"),{predicate:o,type:t,effect:i}},VP=IP(e=>{const{type:t,predicate:n,effect:r}=zP(e);return{id:uP(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error("production"===process.env.NODE_ENV?qP(22):"Unsubscribe not initialized")}}},{withTypes:()=>VP}),BP=(e,t)=>{const{type:n,effect:r,predicate:o}=zP(t);return Array.from(e.values()).find(e=>("string"==typeof n?e.type===n:e.predicate===o)&&e.effect===r)},FP=e=>{e.pending.forEach(e=>{e.abort(EP)})},$P=(e,t,n)=>{try{e(t,n)}catch(e){setTimeout(()=>{throw e},0)}},UP=IP(Uk(`${_P}/add`),{withTypes:()=>UP}),WP=Uk(`${_P}/removeAll`),KP=IP(Uk(`${_P}/remove`),{withTypes:()=>KP}),HP=(...e)=>{console.error(`${_P}/error`,...e)},YP=(e={})=>{const t=new Map,n=new Map,{extra:r,onError:o=HP}=e;kP(o,"onError");const i=e=>(e=>(e.unsubscribe=()=>t.delete(e.id),t.set(e.id,e),t=>{e.unsubscribe(),t?.cancelActive&&FP(e)}))(BP(t,e)??VP(e));IP(i,{withTypes:()=>i});const a=e=>{const n=BP(t,e);return n&&(n.unsubscribe(),e.cancelActive&&FP(n)),!!n};IP(a,{withTypes:()=>a});const s=async(e,a,s,l)=>{const c=new AbortController,u=LP(i,c.signal),d=[];try{e.pending.add(c),(e=>{const t=n.get(e)??0;n.set(e,t+1)})(e),await Promise.resolve(e.effect(a,IP({},s,{getOriginalState:l,condition:(e,t)=>u(e,t).then(Boolean),take:u,delay:NP(c.signal),pause:MP(c.signal),extra:r,signal:c.signal,fork:RP(c.signal,d),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,n)=>{e!==c&&(e.abort(EP),n.delete(e))})},cancel:()=>{c.abort(EP),e.pending.delete(c)},throwIfCancelled:()=>{TP(c.signal)}})))}catch(e){e instanceof SP||$P(o,e,{raisedBy:"effect"})}finally{await Promise.all(d),c.abort(OP),(e=>{const t=n.get(e)??1;1===t?n.delete(e):n.set(e,t-1)})(e),e.pending.delete(c)}},l=((e,t)=>()=>{for(const e of t.keys())FP(e);e.clear()})(t,n);return{middleware:e=>n=>r=>{if(!kS(r))return n(r);if(UP.match(r))return i(r.payload);if(WP.match(r))return void l();if(KP.match(r))return a(r.payload);let c=e.getState();const u=()=>{if(c===DP)throw new Error("production"===process.env.NODE_ENV?qP(23):`${_P}: getOriginalState can only be called synchronously`);return c};let d;try{if(d=n(r),t.size>0){const n=e.getState(),i=Array.from(t.values());for(const t of i){let i=!1;try{i=t.predicate(r,n,c)}catch(e){i=!1,$P(o,e,{raisedBy:"predicate"})}i&&s(t,r,e,u)}}}finally{c=DP}return d},startListening:i,stopListening:a,clearListeners:l}};function qP(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var GP=mP({name:"chartLayout",initialState:{layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var n,r,o,i;e.margin.top=null!==(n=t.payload.top)&&void 0!==n?n:0,e.margin.right=null!==(r=t.payload.right)&&void 0!==r?r:0,e.margin.bottom=null!==(o=t.payload.bottom)&&void 0!==o?o:0,e.margin.left=null!==(i=t.payload.left)&&void 0!==i?i:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:XP,setLayout:ZP,setChartSize:JP,setScale:QP}=GP.actions,eA=GP.reducer;function tA(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function nA(e){return Number.isFinite(e)}function rA(e){return"number"==typeof e&&e>0&&Number.isFinite(e)}function oA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oA(Object(n),!0).forEach(function(t){aA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function aA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sA(e,t,n){return Lw(e)||Lw(t)?n:Cw(t)?Ow(e,t,n):"function"==typeof t?t(e):n}var lA=(e,t)=>"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t,cA=(e,t,n,r)=>{if(r)return e.map(e=>e.coordinate);var o,i,a=e.map(e=>(e.coordinate===t&&(o=!0),e.coordinate===n&&(i=!0),e.coordinate));return o||a.push(t),i||a.push(n),a},uA=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:o,range:i,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!a)return null;var h="scaleBand"===s&&a.bandwidth?a.bandwidth()/2:2,m="category"===o&&a.bandwidth?a.bandwidth()/h:0;if(m="angleAxis"===p&&i&&i.length>=2?2*Pw(i[0]-i[1])*m:m,d||f){var v=(d||f||[]).map((e,t)=>{var n=r?r.indexOf(e):e,o=a.map(n);return nA(o)?{coordinate:o+m,value:e,offset:m,index:t}:null}).filter(Vw);return v}return l&&c?c.map((e,t)=>{var n=a.map(e);return nA(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(Vw):a.ticks&&null!=u?a.ticks(u).map((e,t)=>{var n=a.map(e);return nA(n)?{coordinate:n+m,value:e,index:t,offset:m}:null}).filter(Vw):a.domain().map((e,t)=>{var n=a.map(e);return nA(n)?{coordinate:n+m,value:r?r[e]:e,index:t,offset:m}:null}).filter(Vw)},dA={sign:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var o=0;o<r;++o)for(var i=0,a=0,s=0;s<n;++s){var l=e[s],c=null==l?void 0:l[o];if(null!=c){var u=c[1],d=c[0],f=Aw(u)?d:u;f>=0?(c[0]=i,i+=f,c[1]=i):(c[0]=a,a+=f,c[1]=a)}}}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,i=0,a=e[0].length;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Jx(e,t)}},none:Jx,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],i=o.length;r<i;++r){for(var a=0,s=0;a<n;++a)s+=e[a][r][1]||0;o[r][1]+=o[r][0]=-s/2}Jx(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,i=0,a=1;a<r;++a){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[a][1]||0,f=(d-(u[a-1][1]||0))/2,p=0;p<s;++p){var h=e[t[p]];f+=(h[a][1]||0)-(h[a-1][1]||0)}l+=d,c+=f*d}n[a-1][1]+=n[a-1][0]=i,l&&(i-=c/l)}n[a-1][1]+=n[a-1][0]=i,Jx(e,t)}},positive:e=>{var t,n=e.length;if(!(n<=0)){var r=null===(t=e[0])||void 0===t?void 0:t.length;if(!(null==r||r<=0))for(var o=0;o<r;++o)for(var i=0,a=0;a<n;++a){var s=e[a],l=null==s?void 0:s[o];if(null!=l){var c=Aw(l[1])?l[0]:l[1];c>=0?(l[0]=i,i+=c,l[1]=i):(l[0]=0,l[1]=0)}}}}},fA=(e,t,n)=>{var r,o=null!==(r=dA[n])&&void 0!==r?r:Jx,i=function(){var e=Jb([]),t=Qx,n=Jx,r=ew;function o(o){var i,a,s=Array.from(e.apply(this,arguments),tw),l=s.length,c=-1;for(const e of o)for(i=0,++c;i<l;++i)(s[i][c]=[0,+r(e,s[i].key,c,o)]).data=e;for(i=0,a=dx(t(s));i<l;++i)s[a[i]].index=i;return n(s,a),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:Jb(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:Jb(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?Qx:"function"==typeof e?e:Jb(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?Jx:e,o):n},o}().keys(t).value((e,t)=>Number(sA(e,t,0))).order(Qx).offset(o),a=i(e);return a.forEach((n,r)=>{n.forEach((n,o)=>{var i=sA(e[o],t[r],0);Array.isArray(i)&&2===i.length&&Tw(i[0])&&Tw(i[1])&&(n[0]=i[0],n[1]=i[1])})}),a};function pA(e){return null==e?void 0:String(e)}function hA(e){var{axis:t,ticks:n,bandSize:r,entry:o,index:i,dataKey:a}=e;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Lw(o[t.dataKey])){var s=Rw(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return null!=n&&n[i]?n[i].coordinate+r/2:null}var l=sA(o,Lw(a)?t.dataKey:a),c=t.scale.map(l);return Tw(c)?c:null}var mA=e=>{var{axis:t,ticks:n,offset:r,bandSize:o,entry:i,index:a}=e;if("category"===t.type)return n[a]?n[a].coordinate+r:null;var s=sA(i,t.dataKey,t.scale.domain()[a]);if(Lw(s))return null;var l=t.scale.map(s);return Tw(l)?l-o/2+r:null},vA=(e,t,n)=>{var r;if(null!=e)return r=Object.keys(e).reduce((r,o)=>{var i=e[o];if(!i)return r;var{stackedData:a}=i,s=a.reduce((e,r)=>{var o,i=tA(r,t,n),a=(o=i.flat(2).filter(Tw),[Math.min(...o),Math.max(...o)]);return nA(a[0])&&nA(a[1])?[Math.min(e[0],a[0]),Math.max(e[1],a[1])]:e},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]),[r[0]===1/0?0:r[0],r[1]===-1/0?0:r[1]]},yA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,gA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bA=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=fS(t,e=>e.coordinate),i=1/0,a=1,s=o.length;a<s;a++){var l=o[a],c=o[a-1];i=Math.min(((null==l?void 0:l.coordinate)||0)-((null==c?void 0:c.coordinate)||0),i)}return i===1/0?0:i}return n?void 0:0};function xA(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:o,name:i}=e;return iA(iA({},t),{},{dataKey:n,payload:r,value:o,name:i})}function wA(e,t){return e?String(e):"string"==typeof t?t:void 0}var EA=e=>e.layout.width,OA=e=>e.layout.height,SA=e=>e.layout.scale,kA=e=>e.layout.margin,PA=za(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),AA=za(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),jA="data-recharts-item-id";function TA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function CA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?TA(Object(n),!0).forEach(function(t){MA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MA(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var NA,IA,DA,_A,RA,LA=za([EA,OA,kA,e=>e.brush.height,function(e){return AA(e).reduce((e,t)=>"left"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return AA(e).reduce((e,t)=>"right"!==t.orientation||t.mirror||t.hide?e:e+("number"==typeof t.width?t.width:60),0)},function(e){return PA(e).reduce((e,t)=>"top"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},function(e){return PA(e).reduce((e,t)=>"bottom"!==t.orientation||t.mirror||t.hide?e:e+t.height,0)},pS,e=>e.legend.size],(e,t,n,r,o,i,a,s,l,c)=>{var u={left:(n.left||0)+o,right:(n.right||0)+i},d=CA(CA({},{top:(n.top||0)+a,bottom:(n.bottom||0)+s}),u),f=d.bottom;d.bottom+=r,d=((e,t,n)=>{if(t&&n){var{width:r,height:o}=n,{align:i,verticalAlign:a,layout:s}=t;if(("vertical"===s||"horizontal"===s&&"middle"===a)&&"center"!==i&&Tw(e[i]))return iA(iA({},e),{},{[i]:e[i]+(r||0)});if(("horizontal"===s||"vertical"===s&&"center"===i)&&"middle"!==a&&Tw(e[a]))return iA(iA({},e),{},{[a]:e[a]+(o||0)})}return e})(d,l,c);var p=e-d.left-d.right,h=t-d.top-d.bottom;return CA(CA({brushBottom:f},d),{},{width:Math.max(p,0),height:Math.max(h,0)})}),zA=za(LA,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),VA=za(EA,OA,(e,t)=>({x:0,y:0,width:e,height:t})),BA=e.createContext(null),FA=()=>null!=e.useContext(BA),$A=e=>e.brush,UA=za([$A,LA,kA],(e,t,n)=>({height:e.height,x:Tw(e.x)?e.x:t.left,y:Tw(e.y)?e.y:t.top+t.height+t.brushBottom-((null==n?void 0:n.bottom)||0),width:Tw(e.width)?e.width:t.width})),WA={},KA={},HA={};function YA(){return NA||(NA=1,e=HA,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.debounce=function(e,t,{signal:n,edges:r}={}){let o,i=null;const a=null!=r&&r.includes("leading"),s=null==r||r.includes("trailing"),l=()=>{null!==i&&(e.apply(o,i),o=void 0,i=null)};let c=null;const u=()=>{null!=c&&clearTimeout(c),c=setTimeout(()=>{c=null,s&&l(),d()},t)},d=()=>{null!==c&&(clearTimeout(c),c=null),o=void 0,i=null},f=function(...e){if(n?.aborted)return;o=this,i=e;const t=null==c;u(),a&&t&&l()};return f.schedule=u,f.cancel=d,f.flush=()=>{l()},n?.addEventListener("abort",d,{once:!0}),f}),HA;var e}function qA(){return IA||(IA=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YA();e.debounce=function(e,n=0,r={}){"object"!=typeof r&&(r={});const{leading:o=!1,trailing:i=!0,maxWait:a}=r,s=Array(2);let l;o&&(s[0]="leading"),i&&(s[1]="trailing");let c=null;const u=t.debounce(function(...t){l=e.apply(this,t),c=null},n,{edges:s}),d=function(...t){return null!=a&&(null===c&&(c=Date.now()),Date.now()-c>=a)?(l=e.apply(this,t),c=Date.now(),u.cancel(),u.schedule(),l):(u.apply(this,t),l)};return d.cancel=u.cancel,d.flush=()=>(u.flush(),l),d}}(KA)),KA}function GA(){return DA||(DA=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qA();e.throttle=function(e,n=0,r={}){const{leading:o=!0,trailing:i=!0}=r;return t.debounce(e,n,{leading:o,maxWait:n,trailing:i})}}(WA)),WA}function XA(){return RA?_A:(RA=1,_A=GA().throttle)}var ZA=i(XA()),JA=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if("undefined"!=typeof console&&console.warn&&(void 0===t&&console.warn("LogUtils requires an error message argument"),!e))if(void 0===t)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var i=0;console.warn(t.replace(/%s/g,()=>r[i++]))}},QA={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},ej=(e,t,n)=>{var{width:r=QA.width,height:o=QA.height,aspect:i,maxHeight:a}=n,s=jw(r)?e:Number(r),l=jw(o)?t:Number(o);return i&&i>0&&(s?l=s/i:l&&(s=l*i),a&&null!=l&&l>a&&(l=a)),{calculatedWidth:s,calculatedHeight:l}},tj={width:0,height:0,overflow:"visible"},nj={width:0,overflowX:"visible"},rj={height:0,overflowY:"visible"},oj={},ij=e=>{var{width:t,height:n}=e,r=jw(t),o=jw(n);return r&&o?tj:r?nj:o?rj:oj};function aj(){return aj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aj.apply(null,arguments)}function sj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sj(Object(n),!0).forEach(function(t){cj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uj=e.createContext(QA.initialDimension);function dj(t){var{children:n,width:o,height:i}=t,a=e.useMemo(()=>({width:o,height:i}),[o,i]);return function(e){return rA(e.width)&&rA(e.height)}(a)?r.createElement(uj.Provider,{value:a},n):null}var fj=()=>e.useContext(uj),pj=e.forwardRef((t,n)=>{var{aspect:o,initialDimension:i=QA.initialDimension,width:a,height:s,minWidth:l=QA.minWidth,minHeight:c,maxHeight:u,children:d,debounce:f=QA.debounce,id:p,className:h,onResize:m,style:v={}}=t,y=e.useRef(null),g=e.useRef();g.current=m,e.useImperativeHandle(n,()=>y.current);var[b,x]=e.useState({containerWidth:i.width,containerHeight:i.height}),w=e.useCallback((e,t)=>{x(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]);e.useEffect(()=>{if(null==y.current||"undefined"==typeof ResizeObserver)return Bw;var e=e=>{var t,n=e[0];if(null!=n){var{width:r,height:o}=n.contentRect;w(r,o),null===(t=g.current)||void 0===t||t.call(g,r,o)}};f>0&&(e=ZA(e,f,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),{width:n,height:r}=y.current.getBoundingClientRect();return w(n,r),t.observe(y.current),()=>{t.disconnect()}},[w,f]);var{containerWidth:E,containerHeight:O}=b;JA(!o||o>0,"The aspect(%s) must be greater than zero.",o);var{calculatedWidth:S,calculatedHeight:k}=ej(E,O,{width:a,height:s,aspect:o,maxHeight:u});return JA(null!=S&&S>0||null!=k&&k>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",S,k,a,s,l,c,o),r.createElement("div",{id:p?"".concat(p):void 0,className:Y("recharts-responsive-container",h),style:lj(lj({},v),{},{width:a,height:s,minWidth:l,minHeight:c,maxHeight:u}),ref:y},r.createElement("div",{style:ij({width:a,height:s})},r.createElement(dj,{width:S,height:k},d)))}),hj=e.forwardRef((e,t)=>{var n=fj();if(rA(n.width)&&rA(n.height))return e.children;var{width:o,height:i}=function(e){var{width:t,height:n,aspect:r}=e,o=t,i=n;return void 0===o&&void 0===i?(o=QA.width,i=QA.height):void 0===o?o=r&&r>0?void 0:QA.width:void 0===i&&(i=r&&r>0?void 0:QA.height),{width:o,height:i}}({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:a,calculatedHeight:s}=ej(void 0,void 0,{width:o,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return Tw(a)&&Tw(s)?r.createElement(dj,{width:a,height:s},e.children):r.createElement(pj,aj({},e,{width:o,height:i,ref:t}))});function mj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var vj=()=>{var e,t=FA(),n=FO(zA),r=FO(UA),o=null===(e=FO($A))||void 0===e?void 0:e.padding;return t&&r&&o?{width:r.width-o.left-o.right,height:r.height-o.top-o.bottom,x:o.left,y:o.top}:n},yj={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},gj=()=>{var e;return null!==(e=FO(LA))&&void 0!==e?e:yj},bj=()=>FO(EA),xj=()=>FO(OA),wj=e=>e.layout.layoutType,Ej=()=>FO(wj),Oj=()=>{var e=Ej();if("horizontal"===e||"vertical"===e)return e},Sj=e=>{var t=e.layout.layoutType;if("centric"===t||"radial"===t)return t},kj=t=>{var n=LO(),r=FA(),{width:o,height:i}=t,a=fj(),s=o,l=i;return a&&(s=a.width>0?a.width:o,l=a.height>0?a.height:i),e.useEffect(()=>{!r&&rA(s)&&rA(l)&&n(JP({width:s,height:l}))},[n,r,s,l]),null},Pj=Symbol.for("immer-nothing"),Aj=Symbol.for("immer-draftable"),jj=Symbol.for("immer-state"),Tj="production"!==process.env.NODE_ENV?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function Cj(e,...t){if("production"!==process.env.NODE_ENV){const n=Tj[e],r="function"==typeof n?n.apply(null,t):n;throw new Error(`[Immer] ${r}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Mj=Object.getPrototypeOf;function Nj(e){return!!e&&!!e[jj]}function Ij(e){return!!e&&(Rj(e)||Array.isArray(e)||!!e[Aj]||!!e.constructor?.[Aj]||Fj(e)||$j(e))}var Dj=Object.prototype.constructor.toString(),_j=new WeakMap;function Rj(e){if(!e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);if(null===t||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if("function"!=typeof n)return!1;let r=_j.get(n);return void 0===r&&(r=Function.toString.call(n),_j.set(n,r)),r===Dj}function Lj(e,t,n=!0){if(0===zj(e)){(n?Reflect.ownKeys(e):Object.keys(e)).forEach(n=>{t(n,e[n],e)})}else e.forEach((n,r)=>t(r,n,e))}function zj(e){const t=e[jj];return t?t.type_:Array.isArray(e)?1:Fj(e)?2:$j(e)?3:0}function Vj(e,t){return 2===zj(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Bj(e,t,n){const r=zj(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function Fj(e){return e instanceof Map}function $j(e){return e instanceof Set}function Uj(e){return e.copy_||e.base_}function Wj(e,t){if(Fj(e))return new Map(e);if($j(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Rj(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[jj];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){const o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Mj(e),t)}{const t=Mj(e);if(null!==t&&n)return{...e};const r=Object.create(t);return Object.assign(r,e)}}function Kj(e,t=!1){return Yj(e)||Nj(e)||!Ij(e)||(zj(e)>1&&Object.defineProperties(e,{set:Hj,add:Hj,clear:Hj,delete:Hj}),Object.freeze(e),t&&Object.values(e).forEach(e=>Kj(e,!0))),e}var Hj={value:function(){Cj(2)}};function Yj(e){return null===e||"object"!=typeof e||Object.isFrozen(e)}var qj,Gj={};function Xj(e){const t=Gj[e];return t||Cj(0,e),t}function Zj(){return qj}function Jj(e,t){t&&(Xj("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Qj(e){eT(e),e.drafts_.forEach(nT),e.drafts_=null}function eT(e){e===qj&&(qj=e.parent_)}function tT(e){return qj={drafts_:[],parent_:qj,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function nT(e){const t=e[jj];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function rT(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[jj].modified_&&(Qj(t),Cj(4)),Ij(e)&&(e=oT(t,e),t.parent_||aT(t,e)),t.patches_&&Xj("Patches").generateReplacementPatches_(n[jj].base_,e,t.patches_,t.inversePatches_)):e=oT(t,n,[]),Qj(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Pj?e:void 0}function oT(e,t,n){if(Yj(t))return t;const r=e.immer_.shouldUseStrictIteration(),o=t[jj];if(!o)return Lj(t,(r,i)=>iT(e,o,t,r,i,n),r),t;if(o.scope_!==e)return t;if(!o.modified_)return aT(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let i=t,a=!1;3===o.type_&&(i=new Set(t),t.clear(),a=!0),Lj(i,(r,i)=>iT(e,o,t,r,i,n,a),r),aT(e,t,!1),n&&e.patches_&&Xj("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function iT(e,t,n,r,o,i,a){if(null==o)return;if("object"!=typeof o&&!a)return;const s=Yj(o);if(!s||a){if("production"!==process.env.NODE_ENV&&o===n&&Cj(5),Nj(o)){const a=oT(e,o,i&&t&&3!==t.type_&&!Vj(t.assigned_,r)?i.concat(r):void 0);if(Bj(n,r,a),!Nj(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(Ij(o)&&!s){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;if(t&&t.base_&&t.base_[r]===o&&s)return;oT(e,o),t&&t.scope_.parent_||"symbol"==typeof r||!(Fj(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))||aT(e,o)}}}function aT(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Kj(t,n)}var sT={get(e,t){if(t===jj)return e;const n=Uj(e);if(!Vj(n,t))return function(e,t,n){const r=uT(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}(e,n,t);const r=n[t];return e.finalized_||!Ij(r)?r:r===cT(e.base_,t)?(fT(e),e.copy_[t]=pT(r,e)):r},has:(e,t)=>t in Uj(e),ownKeys:e=>Reflect.ownKeys(Uj(e)),set(e,t,n){const r=uT(Uj(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=cT(Uj(e),t),o=r?.[jj];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,r)&&(void 0!==n||Vj(e.base_,t)))return!0;fT(e),dT(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==cT(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,fT(e),dT(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Uj(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty(){Cj(11)},getPrototypeOf:e=>Mj(e.base_),setPrototypeOf(){Cj(12)}},lT={};function cT(e,t){const n=e[jj];return(n?Uj(n):e)[t]}function uT(e,t){if(!(t in e))return;let n=Mj(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Mj(n)}}function dT(e){e.modified_||(e.modified_=!0,e.parent_&&dT(e.parent_))}function fT(e){e.copy_||(e.copy_=Wj(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Lj(sT,(e,t)=>{lT[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),lT.deleteProperty=function(e,t){return"production"!==process.env.NODE_ENV&&isNaN(parseInt(t))&&Cj(13),lT.set.call(this,e,t,void 0)},lT.set=function(e,t,n){return"production"!==process.env.NODE_ENV&&"length"!==t&&isNaN(parseInt(t))&&Cj(14),sT.set.call(this,e[0],t,n,e[0])};function pT(e,t){const n=Fj(e)?Xj("MapSet").proxyMap_(e,t):$j(e)?Xj("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Zj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=sT;n&&(o=[r],i=lT);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,s}(e,t);return(t?t.scope_:Zj()).drafts_.push(n),n}function hT(e){if(!Ij(e)||Yj(e))return e;const t=e[jj];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wj(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Wj(e,!0);return Lj(n,(e,t)=>{Bj(n,e,hT(t))},r),t&&(t.finalized_=!1),n}var mT=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,e=>t.call(this,e,...o))}}let r;if("function"!=typeof t&&Cj(6),void 0!==n&&"function"!=typeof n&&Cj(7),Ij(e)){const o=tT(this),i=pT(e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?Qj(o):eT(o)}return Jj(o,n),rT(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===Pj&&(r=void 0),this.autoFreeze_&&Kj(r,!0),n){const t=[],o=[];Xj("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}Cj(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),"boolean"==typeof e?.useStrictIteration&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Ij(e)||Cj(8),Nj(e)&&(e=function(e){Nj(e)||Cj(10,e);return hT(e)}(e));const t=tT(this),n=pT(e,void 0);return n[jj].isManual_=!0,eT(t),n}finishDraft(e,t){const n=e&&e[jj];n&&n.isManual_||Cj(9);const{scope_:r}=n;return Jj(r,t),rT(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Xj("Patches").applyPatches_;return Nj(e)?r(e,t):this.produce(e,e=>r(e,t))}};mT.produce;var vT,yT=mP({name:"legend",initialState:{settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:iP()},replaceLegendPayload:{reducer(e,t){var{prev:n,next:r}=t.payload,o=_k(e).payload.indexOf(n);o>-1&&(e.payload[o]=r)},prepare:iP()},removeLegendPayload:{reducer(e,t){var n=_k(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)},prepare:iP()}}}),{setLegendSize:gT,setLegendSettings:bT,addLegendPayload:xT,replaceLegendPayload:wT,removeLegendPayload:ET}=yT.actions,OT=yT.reducer,ST={exports:{}},kT={};var PT,AT,jT={};
|
|
58
|
+
/**
|
|
59
|
+
* @license React
|
|
60
|
+
* use-sync-external-store-with-selector.development.js
|
|
61
|
+
*
|
|
62
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
63
|
+
*
|
|
64
|
+
* This source code is licensed under the MIT license found in the
|
|
65
|
+
* LICENSE file in the root directory of this source tree.
|
|
66
|
+
*/AT||(AT=1,"production"===process.env.NODE_ENV?ST.exports=function(){if(vT)return kT;vT=1;var t=e,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,s=t.useDebugValue;return kT.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a(function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,o=a)}var r,o,i=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,l,c,u]);var p=r(e,d[0],d[1]);return i(function(){f.hasValue=!0,f.value=p},[p]),s(p),p},kT}():ST.exports=(PT||(PT=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=e,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=t.useSyncExternalStore,o=t.useRef,i=t.useEffect,a=t.useMemo,s=t.useDebugValue;jT.useSyncExternalStoreWithSelector=function(e,t,l,c,u){var d=o(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=a(function(){function e(e){if(!i){if(i=!0,r=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return o=t}return o=e}if(t=o,n(r,e))return t;var a=c(e);return void 0!==u&&u(t,a)?(r=e,t):(r=e,o=a)}var r,o,i=!1,a=void 0===l?null:l;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,l,c,u]);var p=r(e,d[0],d[1]);return i(function(){f.hasValue=!0,f.value=p},[p]),s(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),jT)),ST.exports;var TT={notify(){},get:()=>[]};var CT=(()=>!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement))(),MT=(()=>"undefined"!=typeof navigator&&"ReactNative"===navigator.product)(),NT=(()=>CT||MT?r.useLayoutEffect:r.useEffect)();function IT(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function DT(e,t){if(IT(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!IT(e[n[r]],t[n[r]]))return!1;return!0}var _T=Symbol.for("react-redux-context"),RT="undefined"!=typeof globalThis?globalThis:{};function LT(){if(!r.createContext)return{};const e=RT[_T]??=new Map;let t=e.get(r.createContext);return t||(t=r.createContext(null),"production"!==process.env.NODE_ENV&&(t.displayName="ReactRedux"),e.set(r.createContext,t)),t}var zT=LT();var VT=function(e){const{children:t,context:n,serverState:o,store:i}=e,a=r.useMemo(()=>{const t=function(e){let t,n=TT,r=0,o=!1;function i(){l.onStateChange&&l.onStateChange()}function a(){r++,t||(t=e.subscribe(i),n=function(){let e=null,t=null;return{clear(){e=null,t=null},notify(){var t;t=()=>{let t=e;for(;t;)t.callback(),t=t.next},t()},get(){const t=[];let n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0;const o=t={callback:n,next:null,prev:t};return o.prev?o.prev.next=o:e=o,function(){r&&null!==e&&(r=!1,o.next?o.next.prev=o.prev:t=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}function s(){r--,t&&0===r&&(t(),t=void 0,n.clear(),n=TT)}const l={addNestedSub:function(e){a();const t=n.subscribe(e);let r=!1;return()=>{r||(r=!0,t(),s())}},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:i,isSubscribed:function(){return o},trySubscribe:function(){o||(o=!0,a())},tryUnsubscribe:function(){o&&(o=!1,s())},getListeners:()=>n};return l}(i),n={store:i,subscription:t,getServerState:o?()=>o:void 0};if("production"===process.env.NODE_ENV)return n;{const{identityFunctionCheck:t="once",stabilityCheck:r="once"}=e;return Object.assign(n,{stabilityCheck:r,identityFunctionCheck:t})}},[i,o]),s=r.useMemo(()=>i.getState(),[i]);NT(()=>{const{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),s!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,s]);const l=n||zT;return r.createElement(l.Provider,{value:a},t)},BT=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function FT(e,t){return null==e&&null==t||("number"==typeof e&&"number"==typeof t?e===t||e!=e&&t!=t:e===t)}function $T(e,t){var n=new Set([...Object.keys(e),...Object.keys(t)]);for(var r of n)if(BT.has(r)){if(null==e[r]&&null==t[r])continue;if(!DT(e[r],t[r]))return!1}else if(!FT(e[r],t[r]))return!1;return!0}function UT(){return UT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UT.apply(null,arguments)}function WT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function KT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?WT(Object(n),!0).forEach(function(t){HT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function HT(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YT(e){return Array.isArray(e)&&Cw(e[0])&&Cw(e[1])?e.join(" ~ "):e}var qT={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};var GT=e=>{var{separator:t=qT.separator,contentStyle:n,itemStyle:o,labelStyle:i=qT.labelStyle,payload:a,formatter:s,itemSorter:l,wrapperClassName:c,labelClassName:u,label:d,labelFormatter:f,accessibilityLayer:p=qT.accessibilityLayer}=e,h=KT(KT({},qT.contentStyle),n),m=KT({margin:0},i),v=!Lw(d),y=v?d:"",g=Y("recharts-default-tooltip",c),b=Y("recharts-tooltip-label",u);v&&f&&null!=a&&(y=f(d,a));var x=p?{role:"status","aria-live":"assertive"}:{};return r.createElement("div",UT({className:g,style:h},x),r.createElement("p",{className:b,style:m},r.isValidElement(y)?y:"".concat(y)),(()=>{if(a&&a.length){var e=function(e,t){return null==t?e:fS(e,t)}(a,l),n=e.map((e,n)=>{if(!e||"none"===e.type)return null;var i=e.formatter||s||YT,{value:l,name:c}=e,u=l,d=c;if(i){var f=i(l,c,e,n,a);if(Array.isArray(f))[u,d]=f;else{if(null==f)return null;u=f}}var p=KT(KT({},qT.itemStyle),{},{color:e.color||qT.itemStyle.color},o);return r.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(n),style:p},Cw(d)?r.createElement("span",{className:"recharts-tooltip-item-name"},d):null,Cw(d)?r.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,r.createElement("span",{className:"recharts-tooltip-item-value"},u),r.createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return r.createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},n)}return null})())},XT="recharts-tooltip-wrapper",ZT={visibility:"hidden"};function JT(e){var{coordinate:t,translateX:n,translateY:r}=e;return Y(XT,{["".concat(XT,"-right")]:Tw(n)&&t&&Tw(t.x)&&n>=t.x,["".concat(XT,"-left")]:Tw(n)&&t&&Tw(t.x)&&n<t.x,["".concat(XT,"-bottom")]:Tw(r)&&t&&Tw(t.y)&&r>=t.y,["".concat(XT,"-top")]:Tw(r)&&t&&Tw(t.y)&&r<t.y})}function QT(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offset:o,position:i,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(i&&Tw(i[r]))return i[r];var u=n[r]-s-(o>0?o:0),d=n[r]+o;if(t[r])return a[r]?u:d;var f=l[r];return null==f?0:a[r]?u<f?Math.max(d,f):Math.max(u,f):null==c?0:d+s>f+c?Math.max(u,f):Math.max(d,f)}var eC=!("undefined"!=typeof window&&window.document&&Boolean(window.document.createElement)&&window.setTimeout);function tC(){var[t,n]=e.useState(()=>!eC&&(!!window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches));return e.useEffect(()=>{if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion: reduce)"),t=()=>{n(e.matches)};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}}},[]),t}function nC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nC(Object(n),!0).forEach(function(t){oC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iC(e){if(!e.prefersReducedMotion||"auto"!==e.isAnimationActive)return e.isAnimationActive&&e.active?"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing):void 0}function aC(e){var t,n,o,i,a,s,l=tC(),[c,u]=r.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));r.useEffect(()=>{var t=t=>{var n,r,o,i;"Escape"===t.key&&u({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(i=e.coordinate)||void 0===i?void 0:i.y)&&void 0!==o?o:0}})};return document.addEventListener("keydown",t),()=>{document.removeEventListener("keydown",t)}},[null===(t=e.coordinate)||void 0===t?void 0:t.x,null===(n=e.coordinate)||void 0===n?void 0:n.y]),!c.dismissed||(null!==(o=null===(i=e.coordinate)||void 0===i?void 0:i.x)&&void 0!==o?o:0)===c.dismissedAtCoordinate.x&&(null!==(a=null===(s=e.coordinate)||void 0===s?void 0:s.y)&&void 0!==a?a:0)===c.dismissedAtCoordinate.y||u(rC(rC({},c),{},{dismissed:!1}));var{cssClasses:d,cssProperties:f}=function(e){var t,n,r,{allowEscapeViewBox:o,coordinate:i,offsetTop:a,offsetLeft:s,position:l,reverseDirection:c,tooltipBox:u,useTranslate3d:d,viewBox:f}=e;return t=u.height>0&&u.width>0&&i?function(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:n=QT({allowEscapeViewBox:o,coordinate:i,key:"x",offset:s,position:l,reverseDirection:c,tooltipDimension:u.width,viewBox:f,viewBoxDimension:f.width}),translateY:r=QT({allowEscapeViewBox:o,coordinate:i,key:"y",offset:a,position:l,reverseDirection:c,tooltipDimension:u.height,viewBox:f,viewBoxDimension:f.height}),useTranslate3d:d}):ZT,{cssProperties:t,cssClasses:JT({translateX:n,translateY:r,coordinate:i})}}({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:"number"==typeof e.offset?e.offset:e.offset.x,offsetTop:"number"==typeof e.offset?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),p=e.hasPortalFromProps?{}:rC(rC({transition:iC({prefersReducedMotion:l,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},f),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),h=rC(rC({},p),{},{visibility:!c.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return r.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:d,style:h,ref:e.innerRef},e.children)}var sC=r.memo(aC),lC=()=>{var e;return null===(e=FO(e=>e.rootProps.accessibilityLayer))||void 0===e||e};function cC(){return cC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cC.apply(null,arguments)}function uC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uC(Object(n),!0).forEach(function(t){fC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pC={curveBasisClosed:function(e){return new Vx(e)},curveBasisOpen:function(e){return new Bx(e)},curveBasis:function(e){return new zx(e)},curveBumpX:function(e){return new gx(e,!0)},curveBumpY:function(e){return new gx(e,!1)},curveLinearClosed:function(e){return new Fx(e)},curveLinear:px,curveMonotoneX:function(e){return new Hx(e)},curveMonotoneY:function(e){return new Yx(e)},curveNatural:function(e){return new Gx(e)},curveStep:function(e){return new Zx(e,.5)},curveStepAfter:function(e){return new Zx(e,1)},curveStepBefore:function(e){return new Zx(e,0)}},hC=e=>nA(e.x)&&nA(e.y),mC=e=>null!=e.base&&hC(e.base)&&hC(e),vC=e=>e.x,yC=e=>e.y,gC={connectNulls:!1,type:"linear"},bC=e=>{var{type:t=gC.type,points:n=[],baseLine:r,layout:o,connectNulls:i=gC.connectNulls}=e,a=((e,t)=>{if("function"==typeof e)return e;var n="curve".concat(zw(e));if(("curveMonotone"===n||"curveBump"===n)&&t){var r=pC["".concat(n).concat("vertical"===t?"Y":"X")];if(r)return r}return pC[n]||px})(t,o),s=i?n.filter(hC):n;if(Array.isArray(r)){var l=n.map((e,t)=>dC(dC({},e),{},{base:r[t]}));return("vertical"===o?yx().y(yC).x1(vC).x0(e=>e.base.x):yx().x(vC).y1(yC).y0(e=>e.base.y)).defined(mC).curve(a)(i?l.filter(mC):l)}return("vertical"===o&&Tw(r)?yx().y(yC).x1(vC).x0(r):Tw(r)?yx().x(vC).y1(yC).y0(r):vx().x(vC).y(yC)).defined(hC).curve(a)(s)},xC=e=>{var{className:t,points:n,path:o,pathRef:i}=e,a=Ej();if(!(n&&n.length||o))return null;var s={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},l=n&&n.length?bC(s):o;return r.createElement("path",cC({},$b(e),Xw(e),{className:Y("recharts-curve",t),d:null===l?void 0:l,ref:i}))},wC=["x","y","top","left","width","height","className"];function EC(){return EC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EC.apply(null,arguments)}function OC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kC=(e,t,n,r,o,i)=>"M".concat(e,",").concat(o,"v").concat(r,"M").concat(i,",").concat(t,"h").concat(n),PC=e=>{var{x:t=0,y:n=0,top:o=0,left:i=0,width:a=0,height:s=0,className:l}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,wC),u=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OC(Object(n),!0).forEach(function(t){SC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:t,y:n,top:o,left:i,width:a,height:s},c);return Tw(t)&&Tw(n)&&Tw(a)&&Tw(s)&&Tw(o)&&Tw(i)?r.createElement("path",EC({},Wb(u),{className:Y("recharts-cross",l),d:kC(t,n,a,s,o,i)})):null};function AC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function jC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AC(Object(n),!0).forEach(function(t){TC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var CC=(e,t,n)=>e.map(e=>{return"".concat((r=e,r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())))," ").concat(t,"ms ").concat(n);var r}).join(","),MC=(e,t)=>Object.keys(t).reduce((n,r)=>jC(jC({},n),{},{[r]:e(r,t[r])}),{});function NC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function IC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NC(Object(n),!0).forEach(function(t){DC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DC(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _C=(e,t,n)=>e+(t-e)*n,RC=e=>{var{from:t,to:n}=e;return t!==n},LC=(e,t,n)=>{var r=MC((t,n)=>{if(RC(n)){var[r,o]=e(n.from,n.to,n.velocity);return IC(IC({},n),{},{from:r,velocity:o})}return n},t);return n<1?MC((e,t)=>RC(t)&&null!=r[e]?IC(IC({},t),{},{velocity:_C(t.velocity,r[e].velocity,n),from:_C(t.from,r[e].from,n)}):t,t):LC(e,r,n-1)};function zC(e,t,n,r,o,i){var a,s=r.reduce((n,r)=>IC(IC({},n),{},{[r]:{from:e[r],velocity:0,to:t[r]}}),{}),l=null,c=r=>{a||(a=r);var u=(r-a)/n.dt;s=LC(n,s,u),o(IC(IC(IC({},e),t),MC((e,t)=>t.from,s))),a=r,Object.values(s).filter(RC).length&&(l=i.setTimeout(c))};return()=>(l=i.setTimeout(c),()=>{var e;null===(e=l)||void 0===e||e()})}var VC=(e,t,n,r,o,i)=>{var a,s,l=(a=e,s=t,[Object.keys(a),Object.keys(s)].reduce((e,t)=>e.filter(e=>t.includes(e))));return null==n?()=>(o(IC(IC({},e),t)),()=>{}):!0===n.isStepper?zC(e,t,n,l,o,i):function(e,t,n,r,o,i,a){var s,l=null,c=o.reduce((n,r)=>{var o=e[r],i=t[r];return null==o||null==i?n:IC(IC({},n),{},{[r]:[o,i]})},{}),u=o=>{s||(s=o);var d=(o-s)/r,f=MC((e,t)=>_C(...t,n(d)),c);if(i(IC(IC(IC({},e),t),f)),d<1)l=a.setTimeout(u);else{var p=MC((e,t)=>_C(...t,n(1)),c);i(IC(IC(IC({},e),t),p))}};return()=>(l=a.setTimeout(u),()=>{var e;null===(e=l)||void 0===e||e()})}(e,t,n,r,l,o,i)},BC=1e-4,FC=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],$C=(e,t)=>e.map((e,n)=>e*t**n).reduce((e,t)=>e+t),UC=(e,t)=>n=>{var r=FC(e,t);return $C(r,n)},WC=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(1===t.length)switch(t[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:var r=(e=>{var t,n=e.split("(");if(2!==n.length||"cubic-bezier"!==n[0])return null;var r=null===(t=n[1])||void 0===t||null===(t=t.split(")")[0])||void 0===t?void 0:t.split(",");if(null==r||4!==r.length)return null;var o=r.map(e=>parseFloat(e));return[o[0],o[1],o[2],o[3]]})(t[0]);if(r)return r}return 4===t.length?t:[0,0,1,1]},KC=(e,t,n,r)=>{var o,i,a=UC(e,n),s=UC(t,r),l=(o=e,i=n,e=>{var t=[...FC(o,i).map((e,t)=>e*t).slice(1),0];return $C(t,e)}),c=e=>e>1?1:e<0?0:e,u=e=>{for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=a(n)-t,i=l(n);if(Math.abs(o-t)<BC||i<BC)return s(n);n=c(n-o/i)}return s(n)};return u.isStepper=!1,u},HC=function(){return KC(...WC(...arguments))},YC=e=>{if("string"==typeof e)switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return HC(e);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{stiff:t=100,damping:n=8,dt:r=17}=e,o=(e,o,i)=>{var a=i+(-(e-o)*t-i*n)*r/1e3,s=i*r/1e3+e;return Math.abs(s-o)<BC&&Math.abs(a)<BC?[o,0]:[s,a]};return o.isStepper=!0,o.dt=r,o}();default:if("cubic-bezier"===e.split("(")[0])return HC(e)}return"function"==typeof e?e:null};class qC{setTimeout(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=performance.now(),r=null,o=i=>{i-n>=t?e(i):"function"==typeof requestAnimationFrame&&(r=requestAnimationFrame(o))};return r=requestAnimationFrame(o),()=>{null!=r&&cancelAnimationFrame(r)}}}function GC(){return function(e){var t=()=>null,n=!1,r=null,o=i=>{if(!n){if(Array.isArray(i)){if(!i.length)return;var a=i,[s,...l]=a;return"number"==typeof s?void(r=e.setTimeout(o.bind(null,l),s)):(o(s),void(r=e.setTimeout(o.bind(null,l))))}"string"==typeof i&&t(i),"object"==typeof i&&t(i),"function"==typeof i&&i()}};return{stop:()=>{n=!0},start:e=>{n=!1,r&&(r(),r=null),o(e)},subscribe:e=>(t=e,()=>{t=()=>null}),getTimeoutController:()=>e}}(new qC)}var XC=e.createContext(GC);var ZC={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},JC={t:0},QC={t:1};function eM(t){var n,r,o,i=eE(t,ZC),{isActive:a,canBegin:s,duration:l,easing:c,begin:u,onAnimationEnd:d,onAnimationStart:f,children:p}=i,h=tC(),m="auto"===a?!eC&&!h:a,v=(n=i.animationId,r=i.animationManager,o=e.useContext(XC),e.useMemo(()=>null!=r?r:o(n),[n,r,o])),[y,g]=e.useState(m?JC:QC),b=e.useRef(null);return e.useEffect(()=>{m||g(QC)},[m]),e.useEffect(()=>{if(!m||!s)return Bw;var e=VC(JC,QC,YC(c),l,g,v.getTimeoutController());return v.start([f,u,()=>{b.current=e()},l,d]),()=>{v.stop(),b.current&&b.current(),d()}},[m,s,l,c,u,f,d,v]),p(y.t)}function tM(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"animation-",r=e.useRef(Nw(n)),o=e.useRef(t);return o.current!==t&&(r.current=Nw(n),o.current=t),r.current}var nM,rM,oM,iM,aM,sM,lM,cM,uM,dM,fM=["radius"],pM=["radius"];function hM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function mM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hM(Object(n),!0).forEach(function(t){vM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yM(){return yM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yM.apply(null,arguments)}function gM(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function bM(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var xM=(e,t,n,r,o)=>{var i,a=Sw(n),s=Sw(r),l=Math.min(Math.abs(a)/2,Math.abs(s)/2),c=s>=0?1:-1,u=a>=0?1:-1,d=s>=0&&a>=0||s<0&&a<0?1:0;if(l>0&&Array.isArray(o)){for(var f=[0,0,0,0],p=0;p<4;p++){var h,m=null!==(h=o[p])&&void 0!==h?h:0;f[p]=m>l?l:m}i=kw(nM||(nM=bM(["M",",",""])),e,t+c*f[0]),f[0]>0&&(i+=kw(rM||(rM=bM(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,e+u*f[0],t)),i+=kw(oM||(oM=bM(["L ",",",""])),e+n-u*f[1],t),f[1]>0&&(i+=kw(iM||(iM=bM(["A ",",",",0,0,",",\n ",",",""])),f[1],f[1],d,e+n,t+c*f[1])),i+=kw(aM||(aM=bM(["L ",",",""])),e+n,t+r-c*f[2]),f[2]>0&&(i+=kw(sM||(sM=bM(["A ",",",",0,0,",",\n ",",",""])),f[2],f[2],d,e+n-u*f[2],t+r)),i+=kw(lM||(lM=bM(["L ",",",""])),e+u*f[3],t+r),f[3]>0&&(i+=kw(cM||(cM=bM(["A ",",",",0,0,",",\n ",",",""])),f[3],f[3],d,e,t+r-c*f[3])),i+="Z"}else if(l>0&&o===+o&&o>0){var v=Math.min(l,o);i=kw(uM||(uM=bM(["M ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",",","\n L ",",","\n A ",",",",0,0,",",",","," Z"])),e,t+c*v,v,v,d,e+u*v,t,e+n-u*v,t,v,v,d,e+n,t+c*v,e+n,t+r-c*v,v,v,d,e+n-u*v,t+r,e+u*v,t+r,v,v,d,e,t+r-c*v)}else i=kw(dM||(dM=bM(["M ",","," h "," v "," h "," Z"])),e,t,n,r,-n);return i},wM={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},EM=t=>{var n=eE(t,wM),o=e.useRef(null),[i,a]=e.useState(-1);e.useEffect(()=>{if(o.current&&o.current.getTotalLength)try{var e=o.current.getTotalLength();e&&a(e)}catch(e){}},[]);var{x:s,y:l,width:c,height:u,radius:d,className:f}=n,{animationEasing:p,animationDuration:h,animationBegin:m,isAnimationActive:v,isUpdateAnimationActive:y}=n,g=e.useRef(c),b=e.useRef(u),x=e.useRef(s),w=e.useRef(l),E=tM(e.useMemo(()=>({x:s,y:l,width:c,height:u,radius:d}),[s,l,c,u,d]),"rectangle-");if(s!==+s||l!==+l||c!==+c||u!==+u||0===c||0===u)return null;var O=Y("recharts-rectangle",f);if(!y){var S=Wb(n),{radius:k}=S,P=gM(S,fM);return r.createElement("path",yM({},P,{x:Sw(s),y:Sw(l),width:Sw(c),height:Sw(u),radius:"number"==typeof d?d:void 0,className:O,d:xM(s,l,c,u,d)}))}var A=g.current,j=b.current,T=x.current,C=w.current,M="0px ".concat(-1===i?1:i,"px"),N="".concat(i,"px ").concat(i,"px"),I=CC(["strokeDasharray"],h,"string"==typeof p?p:wM.animationEasing);return r.createElement(eM,{animationId:E,key:E,canBegin:i>0,duration:h,easing:p,isActive:y,begin:m},e=>{var t,i=_w(A,c,e),a=_w(j,u,e),f=_w(T,s,e),p=_w(C,l,e);o.current&&(g.current=i,b.current=a,x.current=f,w.current=p),t=v?e>0?{transition:I,strokeDasharray:N}:{strokeDasharray:M}:{strokeDasharray:N};var h=Wb(n),{radius:m}=h,y=gM(h,pM);return r.createElement("path",yM({},y,{radius:"number"==typeof d?d:void 0,className:O,d:xM(f,p,i,a,d),ref:o,style:mM(mM({},t),n.style)}))})};function OM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function SM(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OM(Object(n),!0).forEach(function(t){kM(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OM(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function kM(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var PM,AM,jM,TM,CM,MM,NM,IM=Math.PI/180,DM=e=>180*e/Math.PI,_M=(e,t,n,r)=>({x:e+Math.cos(-IM*r)*n,y:t+Math.sin(-IM*r)*n}),RM=(e,t)=>{var{x:n,y:r}=e,{cx:o,cy:i}=t,a=((e,t)=>{var{x:n,y:r}=e,{x:o,y:i}=t;return Math.sqrt((n-o)**2+(r-i)**2)})({x:n,y:r},{x:o,y:i});if(a<=0)return{radius:a,angle:0};var s=(n-o)/a,l=Math.acos(s);return r>i&&(l=2*Math.PI-l),{radius:a,angle:DM(l),angleInRadian:l}},LM=(e,t)=>{var{startAngle:n,endAngle:r}=t,o=Math.floor(n/360),i=Math.floor(r/360);return e+360*Math.min(o,i)},zM=(e,t)=>{var{relativeX:n,relativeY:r}=e,{radius:o,angle:i}=RM({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(o<a||o>s)return null;if(0===o)return null;var l,{startAngle:c,endAngle:u}=(e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),o=Math.floor(n/360),i=Math.min(r,o);return{startAngle:t-360*i,endAngle:n-360*i}})(t),d=i;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;l=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;l=d>=u&&d<=c}return l?SM(SM({},t),{},{radius:o,angle:LM(d,t)}):null};function VM(e){var{cx:t,cy:n,radius:r,startAngle:o,endAngle:i}=e;return{points:[_M(t,n,r,o),_M(t,n,r,i)],cx:t,cy:n,radius:r,startAngle:o,endAngle:i}}function BM(){return BM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BM.apply(null,arguments)}function FM(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var $M=e=>{var{cx:t,cy:n,radius:r,angle:o,sign:i,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,c=s*(a?1:-1)+r,u=Math.asin(s/c)/IM,d=l?o:o+i*u,f=l?o-i*u:o;return{center:_M(t,n,c,d),circleTangency:_M(t,n,r,d),lineTangency:_M(t,n,c*Math.cos(u*IM),f),theta:u}},UM=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:i,endAngle:a}=e,s=((e,t)=>Pw(t-e)*Math.min(Math.abs(t-e),359.999))(i,a),l=i+s,c=_M(t,n,o,i),u=_M(t,n,o,l),d=kw(PM||(PM=FM(["M ",",","\n A ",",",",0,\n ",",",",\n ",",","\n "])),c.x,c.y,o,o,+(Math.abs(s)>180),+(i>l),u.x,u.y);if(r>0){var f=_M(t,n,r,i),p=_M(t,n,r,l);d+=kw(AM||(AM=FM(["L ",",","\n A ",",",",0,\n ",",",",\n ",","," Z"])),p.x,p.y,r,r,+(Math.abs(s)>180),+(i<=l),f.x,f.y)}else d+=kw(jM||(jM=FM(["L ",","," Z"])),t,n);return d},WM={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},KM=e=>{var t=eE(e,WM),{cx:n,cy:o,innerRadius:i,outerRadius:a,cornerRadius:s,forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d,className:f}=t;if(a<i||u===d)return null;var p,h=Y("recharts-sector",f),m=a-i,v=Iw(s,m,0,!0);return p=v>0&&Math.abs(u-d)<360?(e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:o,cornerRadius:i,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=Pw(c-l),{circleTangency:d,lineTangency:f,theta:p}=$M({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:i,cornerIsExternal:s}),{circleTangency:h,lineTangency:m,theta:v}=$M({cx:t,cy:n,radius:o,angle:c,sign:-u,cornerRadius:i,cornerIsExternal:s}),y=s?Math.abs(l-c):Math.abs(l-c)-p-v;if(y<0)return a?kw(TM||(TM=FM(["M ",",","\n a",",",",0,0,1,",",0\n a",",",",0,0,1,",",0\n "])),f.x,f.y,i,i,2*i,i,i,2*-i):UM({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var g=kw(CM||(CM=FM(["M ",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","\n "])),f.x,f.y,i,i,+(u<0),d.x,d.y,o,o,+(y>180),+(u<0),h.x,h.y,i,i,+(u<0),m.x,m.y);if(r>0){var{circleTangency:b,lineTangency:x,theta:w}=$M({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),{circleTangency:E,lineTangency:O,theta:S}=$M({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:i,cornerIsExternal:s}),k=s?Math.abs(l-c):Math.abs(l-c)-w-S;if(k<0&&0===i)return"".concat(g,"L").concat(t,",").concat(n,"Z");g+=kw(MM||(MM=FM(["L",",","\n A",",",",0,0,",",",",","\n A",",",",0,",",",",",",","\n A",",",",0,0,",",",",","Z"])),O.x,O.y,i,i,+(u<0),E.x,E.y,r,r,+(k>180),+(u>0),b.x,b.y,i,i,+(u<0),x.x,x.y)}else g+=kw(NM||(NM=FM(["L",",","Z"])),t,n);return g})({cx:n,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):UM({cx:n,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),r.createElement("path",BM({},Wb(t),{className:h,d:p}))};function HM(e,t,n){if("horizontal"===e)return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if("vertical"===e)return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(Gw(t)){if("centric"===e){var{cx:r,cy:o,innerRadius:i,outerRadius:a,angle:s}=t,l=_M(r,o,i,s),c=_M(r,o,a,s);return[{x:l.x,y:l.y},{x:c.x,y:c.y}]}return VM(t)}}var YM,qM,GM,XM,ZM,JM={},QM={},eN={};function tN(){return YM||(YM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JO();e.toNumber=function(e){return t.isSymbol(e)?NaN:Number(e)}}(eN)),eN}function nN(){return qM||(qM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tN();e.toFinite=function(e){if(!e)return 0===e?e:0;if((e=t.toNumber(e))===1/0||e===-1/0){return(e<0?-1:1)*Number.MAX_VALUE}return e==e?e:0}}(QM)),QM}function rN(){return GM||(GM=1,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cS(),n=nN();e.range=function(e,r,o){o&&"number"!=typeof o&&t.isIterateeCall(e,r,o)&&(r=o=void 0),e=n.toFinite(e),void 0===r?(r=e,e=0):r=n.toFinite(r),o=void 0===o?e<r?1:-1:n.toFinite(o);const i=Math.max(Math.ceil((r-e)/(o||1)),0),a=new Array(i);for(let t=0;t<i;t++)a[t]=e,e+=o;return a}}(JM)),JM}function oN(){return ZM?XM:(ZM=1,XM=rN().range)}var iN=i(oN()),aN=e=>e.chartData,sN=za([aN],e=>{var t=null!=e.chartData?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),lN=(e,t,n,r)=>r?sN(e):aN(e),cN=(e,t,n)=>n?sN(e):aN(e),uN=za([lN],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});za([sN],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});var dN=za([aN],e=>{var{chartData:t,dataStartIndex:n,dataEndIndex:r}=e;return null!=t?t.slice(n,r+1):[]});function fN(e){if(Array.isArray(e)&&2===e.length){var[t,n]=e;if(nA(t)&&nA(n))return!0}return!1}function pN(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function hN(e,t){if(t&&"function"!=typeof e&&Array.isArray(e)&&2===e.length){var n,r,[o,i]=e;if(nA(o))n=o;else if("function"==typeof o)return;if(nA(i))r=i;else if("function"==typeof i)return;var a=[n,r];if(fN(a))return a}}var mN,vN=1e9,yN=!0,gN="[DecimalError] ",bN=gN+"Invalid argument: ",xN=gN+"Exponent out of range: ",wN=Math.floor,EN=Math.pow,ON=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,SN=1e7,kN=9007199254740991,PN=wN(1286742750677284.5),AN={};function jN(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),yN?zN(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),i>(s=(a=Math.ceil(d/7))>s?a+1:s+1)&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((s=l.length)-(i=c.length)<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/SN|0,l[i]%=SN;for(n&&(l.unshift(n),++o),s=l.length;0==l[--s];)l.pop();return t.d=l,t.e=o,yN?zN(t,d):t}function TN(e,t,n){if(e!==~~e||e<t||e>n)throw Error(bN+e)}function CN(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(i+=_N(n)),i+=r;(n=7-(r=(a=e[t])+"").length)&&(i+=_N(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return i+a}AN.absoluteValue=AN.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},AN.comparedTo=AN.cmp=function(e){var t,n,r,o,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(t=0,n=(r=i.d.length)<(o=e.d.length)?r:o;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1},AN.decimalPlaces=AN.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},AN.dividedBy=AN.div=function(e){return MN(this,new this.constructor(e))},AN.dividedToIntegerBy=AN.idiv=function(e){var t=this.constructor;return zN(MN(this,new t(e),0,1),t.precision)},AN.equals=AN.eq=function(e){return!this.cmp(e)},AN.exponent=function(){return IN(this)},AN.greaterThan=AN.gt=function(e){return this.cmp(e)>0},AN.greaterThanOrEqualTo=AN.gte=function(e){return this.cmp(e)>=0},AN.isInteger=AN.isint=function(){return this.e>this.d.length-2},AN.isNegative=AN.isneg=function(){return this.s<0},AN.isPositive=AN.ispos=function(){return this.s>0},AN.isZero=function(){return 0===this.s},AN.lessThan=AN.lt=function(e){return this.cmp(e)<0},AN.lessThanOrEqualTo=AN.lte=function(e){return this.cmp(e)<1},AN.logarithm=AN.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(mN))throw Error(gN+"NaN");if(n.s<1)throw Error(gN+(n.s?"NaN":"-Infinity"));return n.eq(mN)?new r(0):(yN=!1,t=MN(RN(n,i),RN(e,i),i),yN=!0,zN(t,o))},AN.minus=AN.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?VN(t,e):jN(t,(e.s=-e.s,e))},AN.modulo=AN.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(gN+"NaN");return n.s?(yN=!1,t=MN(n,e,0,1).times(e),yN=!0,n.minus(t)):zN(new r(n),o)},AN.naturalExponential=AN.exp=function(){return NN(this)},AN.naturalLogarithm=AN.ln=function(){return RN(this)},AN.negated=AN.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},AN.plus=AN.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?jN(t,e):VN(t,(e.s=-e.s,e))},AN.precision=AN.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(bN+e);if(t=IN(o)+1,n=7*(r=o.d.length-1)+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},AN.squareRoot=AN.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(gN+"NaN")}for(e=IN(s),yN=!1,0==(o=Math.sqrt(+s))||o==1/0?(((t=CN(s.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=wN((e+1)/2)-(e<0||e%2),r=new l(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new l(o.toString()),o=a=(n=l.precision)+3;;)if(r=(i=r).plus(MN(s,i,a+2)).times(.5),CN(i.d).slice(0,a)===(t=CN(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&"4999"==t){if(zN(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if("9999"!=t)break;a+=4}return yN=!0,zN(r,n)},AN.times=AN.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,(l=f.length)<(c=p.length)&&(i=f,f=p,p=i,a=l,l=c,c=a),i=[],r=a=l+c;r--;)i.push(0);for(r=c;--r>=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%SN|0,t=s/SN|0;i[o]=(i[o]+t)%SN|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,yN?zN(e,d.precision):e},AN.toDecimalPlaces=AN.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(TN(e,0,vN),void 0===t?t=r.rounding:TN(t,0,8),zN(n,e+IN(n)+1,t))},AN.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=BN(r,!0):(TN(e,0,vN),void 0===t?t=o.rounding:TN(t,0,8),n=BN(r=zN(new o(r),e+1,t),!0,e+1)),n},AN.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?BN(o):(TN(e,0,vN),void 0===t?t=i.rounding:TN(t,0,8),n=BN((r=zN(new i(o),e+IN(o)+1,t)).abs(),!1,e+IN(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},AN.toInteger=AN.toint=function(){var e=this,t=e.constructor;return zN(new t(e),IN(e)+1,t.rounding)},AN.toNumber=function(){return+this},AN.toPower=AN.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=+(e=new l(e));if(!e.s)return new l(mN);if(!(s=new l(s)).s){if(e.s<1)throw Error(gN+"Infinity");return s}if(s.eq(mN))return s;if(r=l.precision,e.eq(mN))return zN(s,r);if(a=(t=e.e)>=(n=e.d.length-1),i=s.s,a){if((n=c<0?-c:c)<=kN){for(o=new l(mN),t=Math.ceil(r/7+4),yN=!1;n%2&&FN((o=o.times(s)).d,t),0!==(n=wN(n/2));)FN((s=s.times(s)).d,t);return yN=!0,e.s<0?new l(mN).div(o):zN(o,r)}}else if(i<0)throw Error(gN+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,s.s=1,yN=!1,o=e.times(RN(s,r+12)),yN=!0,(o=NN(o)).s=i,o},AN.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?r=BN(o,(n=IN(o))<=i.toExpNeg||n>=i.toExpPos):(TN(e,1,vN),void 0===t?t=i.rounding:TN(t,0,8),r=BN(o=zN(new i(o),e,t),e<=(n=IN(o))||n<=i.toExpNeg,e)),r},AN.toSignificantDigits=AN.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(TN(e,1,vN),void 0===t?t=n.rounding:TN(t,0,8)),zN(new n(this),e,t)},AN.toString=AN.valueOf=AN.val=AN.toJSON=AN[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=IN(e),n=e.constructor;return BN(e,t<=n.toExpNeg||t>=n.toExpPos)};var MN=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%SN|0,r=n/SN|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*SN+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,h,m,v,y,g,b,x,w,E,O,S,k=r.constructor,P=r.s==o.s?1:-1,A=r.d,j=o.d;if(!r.s)return new k(r);if(!o.s)throw Error(gN+"Division by zero");for(l=r.e-o.e,O=j.length,w=A.length,h=(p=new k(P)).d=[],c=0;j[c]==(A[c]||0);)++c;if(j[c]>(A[c]||0)&&--l,(g=null==i?i=k.precision:a?i+(IN(r)-IN(o))+1:i)<0)return new k(0);if(g=g/7+2|0,c=0,1==O)for(u=0,j=j[0],g++;(c<w||u)&&g--;c++)b=u*SN+(A[c]||0),h[c]=b/j|0,u=b%j|0;else{for((u=SN/(j[0]+1)|0)>1&&(j=e(j,u),A=e(A,u),O=j.length,w=A.length),x=O,v=(m=A.slice(0,O)).length;v<O;)m[v++]=0;(S=j.slice()).unshift(0),E=j[0],j[1]>=SN/2&&++E;do{u=0,(s=t(j,m,O,v))<0?(y=m[0],O!=v&&(y=y*SN+(m[1]||0)),(u=y/E|0)>1?(u>=SN&&(u=SN-1),1==(s=t(d=e(j,u),m,f=d.length,v=m.length))&&(u--,n(d,O<f?S:j,f))):(0==u&&(s=u=1),d=j.slice()),(f=d.length)<v&&d.unshift(0),n(m,d,v),-1==s&&(s=t(j,m,O,v=m.length))<1&&(u++,n(m,O<v?S:j,v)),v=m.length):0===s&&(u++,m=[0]),h[c++]=u,s&&m[0]?m[v++]=A[x]||0:(m=[A[x]],v=1)}while((x++<w||void 0!==m[0])&&g--)}return h[0]||h.shift(),p.e=l,zN(p,a?i+IN(p)+1:i)}}();function NN(e,t){var n,r,o,i,a,s=0,l=0,c=e.constructor,u=c.precision;if(IN(e)>16)throw Error(xN+IN(e));if(!e.s)return new c(mN);for(yN=!1,a=u,i=new c(.03125);e.abs().gte(.1);)e=e.times(i),l+=5;for(a+=Math.log(EN(2,l))/Math.LN10*2+5|0,n=r=o=new c(mN),c.precision=a;;){if(r=zN(r.times(e),a),n=n.times(++s),CN((i=o.plus(MN(r,n,a))).d).slice(0,a)===CN(o.d).slice(0,a)){for(;l--;)o=zN(o.times(o),a);return c.precision=u,null==t?(yN=!0,zN(o,u)):o}o=i}}function IN(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function DN(e,t,n){if(t>e.LN10.sd())throw yN=!0,n&&(e.precision=n),Error(gN+"LN10 precision limit exceeded");return zN(new e(e.LN10),t)}function _N(e){for(var t="";e--;)t+="0";return t}function RN(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=e,p=f.d,h=f.constructor,m=h.precision;if(f.s<1)throw Error(gN+(f.s?"NaN":"-Infinity"));if(f.eq(mN))return new h(0);if(null==t?(yN=!1,c=m):c=t,f.eq(10))return null==t&&(yN=!0),DN(h,c);if(c+=10,h.precision=c,r=(n=CN(p)).charAt(0),i=IN(f),!(Math.abs(i)<15e14))return l=DN(h,c+2,m).times(i+""),f=RN(new h(r+"."+n.slice(1)),c-10).plus(l),h.precision=m,null==t?(yN=!0,zN(f,m)):f;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=CN((f=f.times(e)).d)).charAt(0),d++;for(i=IN(f),r>1?(f=new h("0."+n),i++):f=new h(r+"."+n.slice(1)),s=a=f=MN(f.minus(mN),f.plus(mN),c),u=zN(f.times(f),c),o=3;;){if(a=zN(a.times(u),c),CN((l=s.plus(MN(a,new h(o),c))).d).slice(0,c)===CN(s.d).slice(0,c))return s=s.times(2),0!==i&&(s=s.plus(DN(h,c+2,m).times(i+""))),s=MN(s,new h(d),c),h.precision=m,null==t?(yN=!0,zN(s,m)):s;s=l,o+=2}}function LN(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=wN(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),yN&&(e.e>PN||e.e<-PN))throw Error(xN+n)}else e.s=0,e.e=0,e.d=[0];return e}function zN(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if((r=t-a)<0)r+=7,o=t,c=d[u=0];else{if((u=Math.ceil((r+1)/7))>=(i=d.length))return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;o=(r%=7)-7+a}if(void 0!==n&&(s=c/(i=EN(10,a-o-1))%10|0,l=t<0||void 0!==d[u+1]||c%i,l=n<4?(s||l)&&(0==n||n==(e.s<0?3:2)):s>5||5==s&&(4==n||l||6==n&&(r>0?o>0?c/EN(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=IN(e),d.length=1,t=t-i-1,d[0]=EN(10,(7-t%7)%7),e.e=wN(-t/7)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(0==r?(d.length=u,i=1,u--):(d.length=u+1,i=EN(10,7-r),d[u]=o>0?(c/EN(10,a-o)%EN(10,o)|0)*i:0),l)for(;;){if(0==u){(d[0]+=i)==SN&&(d[0]=1,++e.e);break}if(d[u]+=i,d[u]!=SN)break;d[u--]=0,i=1}for(r=d.length;0===d[--r];)d.pop();if(yN&&(e.e>PN||e.e<-PN))throw Error(xN+IN(e));return e}function VN(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),yN?zN(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r){for((u=a<0)?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),a>(o=Math.max(Math.ceil(p/7),s)+2)&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for((u=(o=l.length)<(s=d.length))&&(s=o),o=0;o<s;o++)if(l[o]!=d[o]){u=l[o]<d[o];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,o=d.length-s;o>0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]<d[o]){for(i=o;i&&0===l[--i];)l[i]=SN-1;--l[i],l[o]+=SN}l[o]-=d[o]}for(;0===l[--s];)l.pop();for(;0===l[0];l.shift())--r;return l[0]?(t.d=l,t.e=r,yN?zN(t,p):t):new f(0)}function BN(e,t,n){var r,o=IN(e),i=CN(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+_N(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+_N(-o-1)+i,n&&(r=n-a)>0&&(i+=_N(r))):o>=a?(i+=_N(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+_N(r))):((r=o+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(o+1===a&&(i+="."),i+=_N(r))),e.s<0?"-"+i:i}function FN(e,t){if(e.length>t)return e.length=t,!0}function $N(e){if(!e||"object"!=typeof e)throw Error(gN+"Object expected");var t,n,r,o=["precision",1,vN,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(!(wN(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(bN+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(bN+n+": "+r);this[n]=new this(r)}return this}var UN=function e(t){var n,r,o;function i(e){var t=this;if(!(t instanceof i))return new i(e);if(t.constructor=i,e instanceof i)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(bN+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):LN(t,e.toString())}if("string"!=typeof e)throw Error(bN+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!ON.test(e))throw Error(bN+e);LN(t,e)}if(i.prototype=AN,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=e,i.config=i.set=$N,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return i.config(t),i}({precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"});mN=new UN(1);var WN=UN;function KN(e){return 0===e?1:Math.floor(new WN(e).abs().log(10).toNumber())+1}function HN(e,t,n){for(var r=new WN(e),o=0,i=[];r.lt(t)&&o<1e5;)i.push(r.toNumber()),r=r.add(n),o++;return i}var YN=e=>{var[t,n]=e,[r,o]=[t,n];return t>n&&([r,o]=[n,t]),[r,o]},qN=(e,t,n)=>{if(e.lte(0))return new WN(0);var r=KN(e.toNumber()),o=new WN(10).pow(r),i=e.div(o),a=1!==r?.05:.1,s=new WN(Math.ceil(i.div(a).toNumber())).add(n).mul(a).mul(o);return new WN(t?s.toNumber():Math.ceil(s.toNumber()))},GN=(e,t,n)=>{var r;if(e.lte(0))return new WN(0);var o=[1,2,2.5,5],i=e.toNumber(),a=Math.floor(new WN(i).abs().log(10).toNumber()),s=new WN(10).pow(a),l=e.div(s).toNumber(),c=o.findIndex(e=>e>=l-1e-10);if(-1===c&&(s=s.mul(10),c=0),(c+=n)>=o.length){var u=Math.floor(c/o.length);c%=o.length,s=s.mul(new WN(10).pow(u))}var d=null!==(r=o[c])&&void 0!==r?r:1,f=new WN(d).mul(s);return t?f:new WN(Math.ceil(f.toNumber()))},XN=function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:qN;if(!Number.isFinite((t-e)/(n-1)))return{step:new WN(0),tickMin:new WN(0),tickMax:new WN(0)};var a,s=i(new WN(t).sub(e).div(n-1),r,o);a=e<=0&&t>=0?new WN(0):(a=new WN(e).add(t).div(2)).sub(new WN(a).mod(s));var l=Math.ceil(a.sub(e).div(s).toNumber()),c=Math.ceil(new WN(t).sub(a).div(s).toNumber()),u=l+c+1;return u>n?XN(e,t,n,r,o+1,i):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:s,tickMin:a.sub(new WN(l).mul(s)),tickMax:a.add(new WN(c).mul(s))})},ZN=function(e){var[t,n]=e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",a=Math.max(r,2),[s,l]=YN([t,n]);if(s===-1/0||l===1/0){var c=l===1/0?[s,...Array(r-1).fill(1/0)]:[...Array(r-1).fill(-1/0),l];return t>n?c.reverse():c}if(s===l)return((e,t,n)=>{var r=new WN(1),o=new WN(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new WN(10).pow(KN(e)-1),o=new WN(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new WN(Math.floor(e)))}else 0===e?o=new WN(Math.floor((t-1)/2)):n||(o=new WN(Math.floor(e)));for(var a=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(o.add(new WN(l-a).mul(r)).toNumber());return s})(s,r,o);var u="snap125"===i?GN:qN,{step:d,tickMin:f,tickMax:p}=XN(s,l,a,o,0,u),h=HN(f,p.add(new WN(.1).mul(d)),d);return t>n?h.reverse():h},JN=function(e,t){var[n,r]=e,o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"auto",[a,s]=YN([n,r]);if(a===-1/0||s===1/0)return[n,r];if(a===s)return[a];var l="snap125"===i?GN:qN,c=Math.max(t,2),u=l(new WN(s).sub(a).div(c-1),o,0),d=[...HN(new WN(a),new WN(s),u),s];return!1===o&&(d=d.map(e=>Math.round(e))),n>r?d.reverse():d},QN=e=>e.rootProps.maxBarSize,eI=e=>e.rootProps.barCategoryGap,tI=e=>e.rootProps.stackOffset,nI=e=>e.rootProps.reverseStackOrder,rI=e=>e.options.chartName,oI=e=>e.rootProps.syncId,iI=e=>e.rootProps.syncMethod,aI=e=>e.options.eventEmitter,sI={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},lI=(e,t)=>{if(e&&t)return null!=e&&e.reversed?[t[1],t[0]]:t};function cI(e,t,n){return"auto"!==n?n:null!=e?lA(e,t)?"category":"number":void 0}function uI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dI(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uI(Object(n),!0).forEach(function(t){fI(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uI(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fI(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:void 0,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},hI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,dataKey:void 0,domain:void 0,id:0,includeHidden:!1,name:void 0,reversed:!1,scale:"auto",tick:!0,tickCount:5,ticks:void 0,type:"auto",unit:void 0,niceTicks:"auto"},mI=za([(e,t)=>{if(null!=t)return e.polarAxis.angleAxis[t]},Sj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=cI(t,"angleAxis",pI.type))&&void 0!==n?n:"category";return dI(dI({},pI),{},{type:r})}),vI=za([(e,t)=>e.polarAxis.radiusAxis[t],Sj],(e,t)=>{var n;if(null!=e)return e;var r=null!==(n=cI(t,"radiusAxis",hI.type))&&void 0!==n?n:"category";return dI(dI({},hI),{},{type:r})}),yI=e=>e.polarOptions,gI=za([EA,OA,LA],function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(e-(n.left||0)-(n.right||0)),Math.abs(t-(n.top||0)-(n.bottom||0)))/2}),bI=za([yI,gI],(e,t)=>{if(null!=e)return Iw(e.innerRadius,t,0)}),xI=za([yI,gI],(e,t)=>{if(null!=e)return Iw(e.outerRadius,t,.8*t)}),wI=za([yI],e=>{if(null==e)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]});za([mI,wI],lI);var EI=za([gI,bI,xI],(e,t,n)=>{if(null!=e&&null!=t&&null!=n)return[t,n]});za([vI,EI],lI);var OI=za([wj,yI,bI,xI,EA,OA],(e,t,n,r,o,i)=>{if(("centric"===e||"radial"===e)&&null!=t&&null!=n&&null!=r){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:Iw(a,o,o/2),cy:Iw(s,i,i/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),SI=(e,t)=>t,kI=(e,t,n)=>n;function PI(e){return null==e?void 0:e.id}function AI(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:o,dataKey:i}=n,a=new Map;return e.forEach(e=>{var t,n=null!==(t=e.data)&&void 0!==t?t:r;if(null!=n&&0!==n.length){var s=PI(e);n.forEach((t,n)=>{var r,l=null==i||o?n:String(sA(t,i,null)),c=sA(t,e.dataKey,0);r=a.has(l)?a.get(l):{},Object.assign(r,{[s]:c}),a.set(l,r)})}}),Array.from(a.values())}function jI(e){return"stackId"in e&&null!=e.stackId&&null!=e.dataKey}var TI=(e,t)=>e===t||null!=e&&null!=t&&(e[0]===t[0]&&e[1]===t[1]);function CI(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||0!==e.length||0!==t.length)||e===t}var MI=e=>{var t=wj(e);return"horizontal"===t?"xAxis":"vertical"===t?"yAxis":"centric"===t?"angleAxis":"radiusAxis"},NI=e=>e.tooltip.settings.axisId;function II(e){if(null!=e){var t=e.ticks,n=e.bandwidth,r=e.range(),o=[Math.min(...r),Math.max(...r)];return{domain:()=>e.domain(),range:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(()=>o),rangeMin:()=>o[0],rangeMax:()=>o[1],isInRange(e){var t=o[0],n=o[1];return t<=n?e>=t&&e<=n:e>=n&&e<=t},bandwidth:n?()=>n.call(e):void 0,ticks:t?n=>t.call(e,n):void 0,map:(t,n)=>{var r=e(t);if(null!=r){if(e.bandwidth&&null!=n&&n.position){var o=e.bandwidth();switch(n.position){case"middle":r+=o/2;break;case"end":r+=o}}return r}}}}}function DI(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _I(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function RI(e){let t,n,r;function o(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<0?o=t+1:i=t}while(o<i)}return o}return 2!==e.length?(t=DI,n=(t,n)=>DI(e(t),n),r=(t,n)=>e(t)-n):(t=e===DI||e===_I?e:LI,n=e,r=e),{left:o,center:function(e,t,n=0,i=e.length){const a=o(e,t,n,i-1);return a>n&&r(e[a-1],t)>-r(e[a],t)?a-1:a},right:function(e,r,o=0,i=e.length){if(o<i){if(0!==t(r,r))return i;do{const t=o+i>>>1;n(e[t],r)<=0?o=t+1:i=t}while(o<i)}return o}}}function LI(){return 0}function zI(e){return null===e?NaN:+e}const VI=RI(DI).right;RI(zI).center;class BI extends Map{constructor(e,t=$I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(FI(this,e))}has(e){return super.has(FI(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);e.has(r)&&(n=e.get(r),e.delete(r));return n}(this,e))}}function FI({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function $I(e){return null!==e&&"object"==typeof e?e.valueOf():e}function UI(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}const WI=Math.sqrt(50),KI=Math.sqrt(10),HI=Math.sqrt(2);function YI(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=WI?10:i>=KI?5:i>=HI?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?YI(e,t,2*n):[s,l,c]}function qI(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,i,a]=r?YI(t,e,n):YI(e,t,n);if(!(i>=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let e=0;e<s;++e)l[e]=(i-e)/-a;else for(let e=0;e<s;++e)l[e]=(i-e)*a;else if(a<0)for(let e=0;e<s;++e)l[e]=(o+e)/-a;else for(let e=0;e<s;++e)l[e]=(o+e)*a;return l}function GI(e,t,n){return YI(e=+e,t=+t,n=+n)[2]}function XI(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?GI(t,e,n):GI(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function ZI(e,t){let n;for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);return n}function JI(e,t){let n;for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);return n}function QI(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=void 0===o?UI:function(e=DI){if(e===DI)return UI;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const i=r-n+1,a=t-n+1,s=Math.log(i),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(i-l)/i)*(a-i/2<0?-1:1);QI(e,t,Math.max(n,Math.floor(t-a*l/i+c)),Math.min(r,Math.floor(t+(i-a)*l/i+c)),o)}const i=e[t];let a=n,s=r;for(eD(e,n,t),o(e[r],i)>0&&eD(e,n,r);a<s;){for(eD(e,a,s),++a,--s;o(e[a],i)<0;)++a;for(;o(e[s],i)>0;)--s}0===o(e[n],i)?eD(e,n,s):(++s,eD(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function eD(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function tD(e,t,n=zI){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e);return a+(+n(e[i+1],i+1,e)-a)*(o-i)}}function nD(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function rD(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const oD=Symbol("implicit");function iD(){var e=new BI,t=[],n=[],r=oD;function o(o){let i=e.get(o);if(void 0===i){if(r!==oD)return r;e.set(o,i=t.push(o)-1)}return n[i%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new BI;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return iD(t,n).unknown(r)},nD.apply(o,arguments),o}function aD(){var e,t,n=iD().unknown(void 0),r=n.domain,o=n.range,i=0,a=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=a<i,f=d?a:i,p=d?i:a;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var h=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(o);++r<o;)i[r]=e+r*n;return i}(n).map(function(t){return f+e*t});return o(d?h.reverse():h)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([i,a]=e,i=+i,a=+a,d()):[i,a]},n.rangeRound=function(e){return[i,a]=e,i=+i,a=+a,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return aD(r(),[i,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},nD.apply(d(),arguments)}function sD(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return sD(t())},e}function lD(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function cD(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function uD(){}var dD=.7,fD=1/dD,pD="\\s*([+-]?\\d+)\\s*",hD="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mD="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vD=/^#([0-9a-f]{3,8})$/,yD=new RegExp(`^rgb\\(${pD},${pD},${pD}\\)$`),gD=new RegExp(`^rgb\\(${mD},${mD},${mD}\\)$`),bD=new RegExp(`^rgba\\(${pD},${pD},${pD},${hD}\\)$`),xD=new RegExp(`^rgba\\(${mD},${mD},${mD},${hD}\\)$`),wD=new RegExp(`^hsl\\(${hD},${mD},${mD}\\)$`),ED=new RegExp(`^hsla\\(${hD},${mD},${mD},${hD}\\)$`),OD={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};function SD(){return this.rgb().formatHex()}function kD(){return this.rgb().formatRgb()}function PD(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=vD.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?AD(t):3===n?new CD(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?jD(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?jD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=yD.exec(e))?new CD(t[1],t[2],t[3],1):(t=gD.exec(e))?new CD(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=bD.exec(e))?jD(t[1],t[2],t[3],t[4]):(t=xD.exec(e))?jD(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=wD.exec(e))?RD(t[1],t[2]/100,t[3]/100,1):(t=ED.exec(e))?RD(t[1],t[2]/100,t[3]/100,t[4]):OD.hasOwnProperty(e)?AD(OD[e]):"transparent"===e?new CD(NaN,NaN,NaN,0):null}function AD(e){return new CD(e>>16&255,e>>8&255,255&e,1)}function jD(e,t,n,r){return r<=0&&(e=t=n=NaN),new CD(e,t,n,r)}function TD(e,t,n,r){return 1===arguments.length?((o=e)instanceof uD||(o=PD(o)),o?new CD((o=o.rgb()).r,o.g,o.b,o.opacity):new CD):new CD(e,t,n,null==r?1:r);var o}function CD(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function MD(){return`#${_D(this.r)}${_D(this.g)}${_D(this.b)}`}function ND(){const e=ID(this.opacity);return`${1===e?"rgb(":"rgba("}${DD(this.r)}, ${DD(this.g)}, ${DD(this.b)}${1===e?")":`, ${e})`}`}function ID(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function DD(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _D(e){return((e=DD(e))<16?"0":"")+e.toString(16)}function RD(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new zD(e,t,n,r)}function LD(e){if(e instanceof zD)return new zD(e.h,e.s,e.l,e.opacity);if(e instanceof uD||(e=PD(e)),!e)return new zD;if(e instanceof zD)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new zD(a,s,l,e.opacity)}function zD(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function VD(e){return(e=(e||0)%360)<0?e+360:e}function BD(e){return Math.max(0,Math.min(1,e||0))}function FD(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}lD(uD,PD,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:SD,formatHex:SD,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return LD(this).formatHsl()},formatRgb:kD,toString:kD}),lD(CD,TD,cD(uD,{brighter(e){return e=null==e?fD:Math.pow(fD,e),new CD(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?dD:Math.pow(dD,e),new CD(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new CD(DD(this.r),DD(this.g),DD(this.b),ID(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:MD,formatHex:MD,formatHex8:function(){return`#${_D(this.r)}${_D(this.g)}${_D(this.b)}${_D(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ND,toString:ND})),lD(zD,function(e,t,n,r){return 1===arguments.length?LD(e):new zD(e,t,n,null==r?1:r)},cD(uD,{brighter(e){return e=null==e?fD:Math.pow(fD,e),new zD(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?dD:Math.pow(dD,e),new zD(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new CD(FD(e>=240?e-240:e+120,o,r),FD(e,o,r),FD(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new zD(VD(this.h),BD(this.s),BD(this.l),ID(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=ID(this.opacity);return`${1===e?"hsl(":"hsla("}${VD(this.h)}, ${100*BD(this.s)}%, ${100*BD(this.l)}%${1===e?")":`, ${e})`}`}}));var $D=e=>()=>e;function UD(e){return 1===(e=+e)?WD:function(t,n){return n-t?function(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)}}(t,n,e):$D(isNaN(t)?n:t)}}function WD(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):$D(isNaN(e)?t:e)}var KD=function e(t){var n=UD(t);function r(e,t){var r=n((e=TD(e)).r,(t=TD(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=WD(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function HD(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(i){for(n=0;n<r;++n)o[n]=e[n]*(1-i)+t[n]*i;return o}}function YD(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,i=new Array(o),a=new Array(r);for(n=0;n<o;++n)i[n]=e_(e[n],t[n]);for(;n<r;++n)a[n]=t[n];return function(e){for(n=0;n<o;++n)a[n]=i[n](e);return a}}function qD(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function GD(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function XD(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=e_(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}var ZD=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,JD=new RegExp(ZD.source,"g");function QD(e,t){var n,r,o,i=ZD.lastIndex=JD.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=ZD.exec(e))&&(r=JD.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:GD(n,r)})),i=JD.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function e_(e,t){var n,r=typeof t;return null==t||"boolean"===r?$D(t):("number"===r?GD:"string"===r?(n=PD(t))?(t=n,KD):QD:t instanceof PD?KD:t instanceof Date?qD:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?HD:Array.isArray(t)?YD:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?XD:GD)(e,t)}function t_(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function n_(e,t){void 0===t&&(t=e,e=e_);for(var n=0,r=t.length-1,o=t[0],i=new Array(r<0?0:r);n<r;)i[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return i[t](e-t)}}function r_(e){return+e}var o_=[0,1];function i_(e){return e}function a_(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function s_(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o<r?(r=a_(o,r),i=n(a,i)):(r=a_(r,o),i=n(i,a)),function(e){return i(r(e))}}function l_(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),i=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)o[a]=a_(e[a],e[a+1]),i[a]=n(t[a],t[a+1]);return function(t){var n=VI(e,t,1,r)-1;return i[n](o[n](t))}}function c_(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function u_(){var e,t,n,r,o,i,a=o_,s=o_,l=e_,c=i_;function u(){var e=Math.min(a.length,s.length);return c!==i_&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(a[0],a[e-1])),r=e>2?l_:s_,o=i=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(a.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((i||(i=r(s,a.map(e),GD)))(n)))},d.domain=function(e){return arguments.length?(a=Array.from(e,r_),u()):a.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=t_,u()},d.clamp=function(e){return arguments.length?(c=!!e||i_,u()):c!==i_},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function d_(){return u_()(i_,i_)}function f_(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function p_(e){return(e=f_(Math.abs(e)))?e[1]:NaN}var h_,m_=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function v_(e){if(!(t=m_.exec(e)))throw new Error("invalid format: "+e);var t;return new y_({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]})}function y_(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function g_(e,t){var n=f_(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}v_.prototype=y_.prototype,y_.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var b_={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>g_(100*e,t),r:g_,s:function(e,t){var n=f_(e,t);if(!n)return h_=void 0,e.toPrecision(t);var r=n[0],o=n[1],i=o-(h_=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+f_(e,Math.max(0,t+i-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function x_(e){return e}var w_,E_,O_,S_=Array.prototype.map,k_=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function P_(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?x_:(t=S_.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,i=[],a=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return i.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?x_:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(S_.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e,t){var n=(e=v_(e)).fill,d=e.align,f=e.sign,p=e.symbol,h=e.zero,m=e.width,v=e.comma,y=e.precision,g=e.trim,b=e.type;"n"===b?(v=!0,b="g"):b_[b]||(void 0===y&&(y=12),g=!0,b="g"),(h||"0"===n&&"="===d)&&(h=!0,n="0",d="=");var x=(t&&void 0!==t.prefix?t.prefix:"")+("$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?i:/[%p]/.test(b)?l:"")+(t&&void 0!==t.suffix?t.suffix:""),E=b_[b],O=/[defgprs%]/.test(b);function S(e){var t,o,i,l=x,p=w;if("c"===b)p=E(e)+p,e="";else{var S=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:E(Math.abs(e),y),g&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),S&&0===+e&&"+"!==f&&(S=!1),l=(S?"("===f?f:c:"-"===f||"("===f?"":f)+l,p=("s"!==b||isNaN(e)||void 0===h_?"":k_[8+h_/3])+p+(S&&"("===f?")":""),O)for(t=-1,o=e.length;++t<o;)if(48>(i=e.charCodeAt(t))||i>57){p=(46===i?a+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}v&&!h&&(e=r(e,1/0));var k=l.length+e.length+p.length,P=k<m?new Array(m-k+1).join(n):"";switch(v&&h&&(e=r(P+e,P.length?m-p.length:1/0),P=""),d){case"<":e=l+e+p+P;break;case"=":e=l+P+e+p;break;case"^":e=P.slice(0,k=P.length>>1)+l+e+p+P.slice(k);break;default:e=P+l+e+p}return s(e)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),S.toString=function(){return e+""},S}return{format:d,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(p_(t)/3))),r=Math.pow(10,-n),o=d(((e=v_(e)).type="f",e),{suffix:k_[8+n/3]});return function(e){return o(r*e)}}}}function A_(e,t,n,r){var o,i=XI(e,t,n);switch((r=v_(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(p_(t)/3)))-p_(Math.abs(e)))}(i,a))||(r.precision=o),O_(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,p_(t)-p_(e))+1}(i,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-p_(Math.abs(e)))}(i))||(r.precision=o-2*("%"===r.type))}return E_(r)}function j_(e){var t=e.domain;return e.ticks=function(e){var n=t();return qI(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return A_(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,i=t(),a=0,s=i.length-1,l=i[a],c=i[s],u=10;for(c<l&&(o=l,l=c,c=o,o=a,a=s,s=o);u-- >0;){if((o=GI(l,c,n))===r)return i[a]=l,i[s]=c,t(i);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function T_(e,t){var n,r=0,o=(e=e.slice()).length-1,i=e[r],a=e[o];return a<i&&(n=r,r=o,o=n,n=i,i=a,a=n),e[r]=t.floor(i),e[o]=t.ceil(a),e}function C_(e){return Math.log(e)}function M_(e){return Math.exp(e)}function N_(e){return-Math.log(-e)}function I_(e){return-Math.exp(-e)}function D_(e){return isFinite(e)?+("1e"+e):e<0?0:e}function __(e){return(t,n)=>-e(-t,n)}function R_(e){const t=e(C_,M_),n=t.domain;let r,o,i=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(i),o=function(e){return 10===e?D_:e===Math.E?Math.exp:t=>Math.pow(e,t)}(i),n()[0]<0?(r=__(r),o=__(o),e(N_,I_)):e(C_,M_),t}return t.base=function(e){return arguments.length?(i=+e,a()):i},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s<a;l&&([a,s]=[s,a]);let c,u,d=r(a),f=r(s);const p=null==e?10:+e;let h=[];if(!(i%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),a>0){for(;d<=f;++d)for(c=1;c<i;++c)if(u=d<0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}}else for(;d<=f;++d)for(c=i-1;c>=1;--c)if(u=d>0?c/o(-d):c*o(d),!(u<a)){if(u>s)break;h.push(u)}2*h.length<p&&(h=qI(a,s,p))}else h=qI(d,f,Math.min(f-d,p)).map(o);return l?h.reverse():h},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=v_(n)).precision||(n.trim=!0),n=E_(n)),e===1/0)return n;const a=Math.max(1,i*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*i<i-.5&&(t*=i),t<=a?n(e):""}},t.nice=()=>n(T_(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function L_(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function z_(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function V_(e){var t=1,n=e(L_(t),z_(t));return n.constant=function(n){return arguments.length?e(L_(t=+n),z_(t)):t},j_(n)}function B_(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function F_(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function $_(e){return e<0?-e*e:e*e}function U_(e){var t=e(i_,i_),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(i_,i_):.5===n?e(F_,$_):e(B_(n),B_(1/n)):n},j_(t)}function W_(){var e=U_(u_());return e.copy=function(){return c_(e,W_()).exponent(e.exponent())},nD.apply(e,arguments),e}function K_(e){return Math.sign(e)*e*e}w_=P_({thousands:",",grouping:[3],currency:["$",""]}),E_=w_.format,O_=w_.formatPrefix;const H_=new Date,Y_=new Date;function q_(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,i)=>{const a=[];if(n=o.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;let s;do{a.push(s=new Date(+n)),t(n,i),e(n)}while(s<n&&n<r);return a},o.filter=n=>q_(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(o.count=(t,r)=>(H_.setTime(+t),Y_.setTime(+r),e(H_),e(Y_),Math.floor(n(H_,Y_))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e===0:t=>o.count(0,t)%e===0):o:null)),o}const G_=q_(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);G_.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?q_(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):G_:null),G_.range;const X_=1e3,Z_=6e4,J_=36e5,Q_=864e5,eR=6048e5,tR=2592e6,nR=31536e6,rR=q_(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*X_)},(e,t)=>(t-e)/X_,e=>e.getUTCSeconds());rR.range;const oR=q_(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*X_)},(e,t)=>{e.setTime(+e+t*Z_)},(e,t)=>(t-e)/Z_,e=>e.getMinutes());oR.range;const iR=q_(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Z_)},(e,t)=>(t-e)/Z_,e=>e.getUTCMinutes());iR.range;const aR=q_(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*X_-e.getMinutes()*Z_)},(e,t)=>{e.setTime(+e+t*J_)},(e,t)=>(t-e)/J_,e=>e.getHours());aR.range;const sR=q_(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*J_)},(e,t)=>(t-e)/J_,e=>e.getUTCHours());sR.range;const lR=q_(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Z_)/Q_,e=>e.getDate()-1);lR.range;const cR=q_(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Q_,e=>e.getUTCDate()-1);cR.range;const uR=q_(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Q_,e=>Math.floor(e/Q_));function dR(e){return q_(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Z_)/eR)}uR.range;const fR=dR(0),pR=dR(1),hR=dR(2),mR=dR(3),vR=dR(4),yR=dR(5),gR=dR(6);function bR(e){return q_(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/eR)}fR.range,pR.range,hR.range,mR.range,vR.range,yR.range,gR.range;const xR=bR(0),wR=bR(1),ER=bR(2),OR=bR(3),SR=bR(4),kR=bR(5),PR=bR(6);xR.range,wR.range,ER.range,OR.range,SR.range,kR.range,PR.range;const AR=q_(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth());AR.range;const jR=q_(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth());jR.range;const TR=q_(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());TR.every=e=>isFinite(e=Math.floor(e))&&e>0?q_(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)}):null,TR.range;const CR=q_(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());function MR(e,t,n,r,o,i){const a=[[rR,1,X_],[rR,5,5e3],[rR,15,15e3],[rR,30,3e4],[i,1,Z_],[i,5,3e5],[i,15,9e5],[i,30,18e5],[o,1,J_],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,Q_],[r,2,1728e5],[n,1,eR],[t,1,tR],[t,3,7776e6],[e,1,nR]];function s(t,n,r){const o=Math.abs(n-t)/r,i=RI(([,,e])=>e).right(a,o);if(i===a.length)return e.every(XI(t/nR,n/nR,r));if(0===i)return G_.every(Math.max(XI(t,n,r),1));const[s,l]=a[o/a[i-1][2]<a[i][2]/o?i-1:i];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),i=o?o.range(e,+t+1):[];return r?i.reverse():i},s]}CR.every=e=>isFinite(e=Math.floor(e))&&e>0?q_(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)}):null,CR.range;const[NR,IR]=MR(CR,jR,xR,uR,sR,iR),[DR,_R]=MR(TR,AR,fR,lR,aR,oR);function RR(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 LR(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 zR(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var VR,BR,FR,$R={"-":"",_:" ",0:"0"},UR=/^\s*\d+/,WR=/^%/,KR=/[\\^$*+?|[\]().{}]/g;function HR(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i<n?new Array(n-i+1).join(t)+o:o)}function YR(e){return e.replace(KR,"\\$&")}function qR(e){return new RegExp("^(?:"+e.map(YR).join("|")+")","i")}function GR(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function XR(e,t,n){var r=UR.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ZR(e,t,n){var r=UR.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function JR(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function QR(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function eL(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function tL(e,t,n){var r=UR.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function nL(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function rL(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 oL(e,t,n){var r=UR.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function iL(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function aL(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function sL(e,t,n){var r=UR.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function lL(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function cL(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function uL(e,t,n){var r=UR.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function dL(e,t,n){var r=UR.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function fL(e,t,n){var r=UR.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pL(e,t,n){var r=WR.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function hL(e,t,n){var r=UR.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function mL(e,t,n){var r=UR.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function vL(e,t){return HR(e.getDate(),t,2)}function yL(e,t){return HR(e.getHours(),t,2)}function gL(e,t){return HR(e.getHours()%12||12,t,2)}function bL(e,t){return HR(1+lR.count(TR(e),e),t,3)}function xL(e,t){return HR(e.getMilliseconds(),t,3)}function wL(e,t){return xL(e,t)+"000"}function EL(e,t){return HR(e.getMonth()+1,t,2)}function OL(e,t){return HR(e.getMinutes(),t,2)}function SL(e,t){return HR(e.getSeconds(),t,2)}function kL(e){var t=e.getDay();return 0===t?7:t}function PL(e,t){return HR(fR.count(TR(e)-1,e),t,2)}function AL(e){var t=e.getDay();return t>=4||0===t?vR(e):vR.ceil(e)}function jL(e,t){return e=AL(e),HR(vR.count(TR(e),e)+(4===TR(e).getDay()),t,2)}function TL(e){return e.getDay()}function CL(e,t){return HR(pR.count(TR(e)-1,e),t,2)}function ML(e,t){return HR(e.getFullYear()%100,t,2)}function NL(e,t){return HR((e=AL(e)).getFullYear()%100,t,2)}function IL(e,t){return HR(e.getFullYear()%1e4,t,4)}function DL(e,t){var n=e.getDay();return HR((e=n>=4||0===n?vR(e):vR.ceil(e)).getFullYear()%1e4,t,4)}function _L(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+HR(t/60|0,"0",2)+HR(t%60,"0",2)}function RL(e,t){return HR(e.getUTCDate(),t,2)}function LL(e,t){return HR(e.getUTCHours(),t,2)}function zL(e,t){return HR(e.getUTCHours()%12||12,t,2)}function VL(e,t){return HR(1+cR.count(CR(e),e),t,3)}function BL(e,t){return HR(e.getUTCMilliseconds(),t,3)}function FL(e,t){return BL(e,t)+"000"}function $L(e,t){return HR(e.getUTCMonth()+1,t,2)}function UL(e,t){return HR(e.getUTCMinutes(),t,2)}function WL(e,t){return HR(e.getUTCSeconds(),t,2)}function KL(e){var t=e.getUTCDay();return 0===t?7:t}function HL(e,t){return HR(xR.count(CR(e)-1,e),t,2)}function YL(e){var t=e.getUTCDay();return t>=4||0===t?SR(e):SR.ceil(e)}function qL(e,t){return e=YL(e),HR(SR.count(CR(e),e)+(4===CR(e).getUTCDay()),t,2)}function GL(e){return e.getUTCDay()}function XL(e,t){return HR(wR.count(CR(e)-1,e),t,2)}function ZL(e,t){return HR(e.getUTCFullYear()%100,t,2)}function JL(e,t){return HR((e=YL(e)).getUTCFullYear()%100,t,2)}function QL(e,t){return HR(e.getUTCFullYear()%1e4,t,4)}function ez(e,t){var n=e.getUTCDay();return HR((e=n>=4||0===n?SR(e):SR.ceil(e)).getUTCFullYear()%1e4,t,4)}function tz(){return"+0000"}function nz(){return"%"}function rz(e){return+e}function oz(e){return Math.floor(+e/1e3)}function iz(e){return new Date(e)}function az(e){return e instanceof Date?+e:+new Date(+e)}function sz(e,t,n,r,o,i,a,s,l,c){var u=d_(),d=u.invert,f=u.domain,p=c(".%L"),h=c(":%S"),m=c("%I:%M"),v=c("%I %p"),y=c("%a %d"),g=c("%b %d"),b=c("%B"),x=c("%Y");function w(e){return(l(e)<e?p:s(e)<e?h:a(e)<e?m:i(e)<e?v:r(e)<e?o(e)<e?y:g:n(e)<e?b:x)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,az)):f().map(iz)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?w:c(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(T_(n,e)):u},u.copy=function(){return c_(u,sz(e,t,n,r,o,i,a,s,l,c))},u}function lz(){var e,t,n,r,o,i=0,a=1,s=i_,l=!1;function c(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(o){return arguments.length?([i,a]=o,e=r(i=+i),t=r(a=+a),n=e===t?0:1/(t-e),c):[i,a]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(e_),c.rangeRound=u(t_),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(i),t=o(a),n=e===t?0:1/(t-e),c}}function cz(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function uz(){var e=U_(lz());return e.copy=function(){return cz(e,uz()).exponent(e.exponent())},rD.apply(e,arguments)}function dz(){var e,t,n,r,o,i,a,s=0,l=.5,c=1,u=1,d=i_,f=!1;function p(e){return isNaN(e=+e)?a:(e=.5+((e=+i(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function h(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=n_(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(a){return arguments.length?([s,l,c]=a,e=i(s=+s),t=i(l=+l),n=i(c=+c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=h(e_),p.rangeRound=h(t_),p.unknown=function(e){return arguments.length?(a=e,p):a},function(a){return i=a,e=a(s),t=a(l),n=a(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function fz(){var e=U_(dz());return e.copy=function(){return cz(e,fz()).exponent(e.exponent())},rD.apply(e,arguments)}!function(e){VR=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,i=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=qR(o),u=GR(o),d=qR(i),f=GR(i),p=qR(a),h=GR(a),m=qR(s),v=GR(s),y=qR(l),g=GR(l),b={a:function(e){return a[e.getDay()]},A:function(e){return i[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:vL,e:vL,f:wL,g:NL,G:DL,H:yL,I:gL,j:bL,L:xL,m:EL,M:OL,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:rz,s:oz,S:SL,u:kL,U:PL,V:jL,w:TL,W:CL,x:null,X:null,y:ML,Y:IL,Z:_L,"%":nz},x={a:function(e){return a[e.getUTCDay()]},A:function(e){return i[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:RL,e:RL,f:FL,g:JL,G:ez,H:LL,I:zL,j:VL,L:BL,m:$L,M:UL,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:rz,s:oz,S:WL,u:KL,U:HL,V:qL,w:GL,W:XL,x:null,X:null,y:ZL,Y:QL,Z:tz,"%":nz},w={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return S(e,t,n,r)},d:aL,e:aL,f:fL,g:nL,G:tL,H:lL,I:lL,j:sL,L:dL,m:iL,M:cL,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:oL,Q:hL,s:mL,S:uL,u:ZR,U:JR,V:QR,w:XR,W:eL,x:function(e,t,r){return S(e,n,t,r)},X:function(e,t,n){return S(e,r,t,n)},y:nL,Y:tL,Z:rL,"%":pL};function E(e,t){return function(n){var r,o,i,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(o=$R[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(i=t[r])&&(r=i(n,o)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}}function O(e,t){return function(n){var r,o,i=zR(1900,void 0,1);if(S(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(o=(r=LR(zR(i.y,0,1))).getUTCDay(),r=o>4||0===o?wR.ceil(r):wR(r),r=cR.offset(r,7*(i.V-1)),i.y=r.getUTCFullYear(),i.m=r.getUTCMonth(),i.d=r.getUTCDate()+(i.w+6)%7):(o=(r=RR(zR(i.y,0,1))).getDay(),r=o>4||0===o?pR.ceil(r):pR(r),r=lR.offset(r,7*(i.V-1)),i.y=r.getFullYear(),i.m=r.getMonth(),i.d=r.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),o="Z"in i?LR(zR(i.y,0,1)).getUTCDay():RR(zR(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(o+5)%7:i.w+7*i.U-(o+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,LR(i)):RR(i)}}function S(e,t,n,r){for(var o,i,a=0,s=t.length,l=n.length;a<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(a++))){if(o=t.charAt(a++),!(i=w[o in $R?t.charAt(a++):o])||(r=i(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=E(n,b),b.X=E(r,b),b.c=E(t,b),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x),{format:function(e){var t=E(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=O(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",x);return t.toString=function(){return e},t},utcParse:function(e){var t=O(e+="",!0);return t.toString=function(){return e},t}}}(e),BR=VR.format,VR.parse,FR=VR.utcFormat,VR.utcParse}({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"]});var pz=Object.freeze({__proto__:null,scaleBand:aD,scaleDiverging:function e(){var t=j_(dz()(i_));return t.copy=function(){return cz(t,e())},rD.apply(t,arguments)},scaleDivergingLog:function e(){var t=R_(dz()).domain([.1,1,10]);return t.copy=function(){return cz(t,e()).base(t.base())},rD.apply(t,arguments)},scaleDivergingPow:fz,scaleDivergingSqrt:function(){return fz.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=V_(dz());return t.copy=function(){return cz(t,e()).constant(t.constant())},rD.apply(t,arguments)},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,r_),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,r_):[0,1],j_(r)},scaleImplicit:oD,scaleLinear:function e(){var t=d_();return t.copy=function(){return c_(t,e())},nD.apply(t,arguments),j_(t)},scaleLog:function e(){const t=R_(u_()).domain([1,10]);return t.copy=()=>c_(t,e()).base(t.base()),nD.apply(t,arguments),t},scaleOrdinal:iD,scalePoint:function(){return sD(aD.apply(null,arguments).paddingInner(1))},scalePow:W_,scaleQuantile:function e(){var t,n=[],r=[],o=[];function i(){var e=0,t=Math.max(1,r.length);for(o=new Array(t-1);++e<t;)o[e-1]=tD(n,e/t);return a}function a(e){return null==e||isNaN(e=+e)?t:r[VI(o,e)]}return a.invertExtent=function(e){var t=r.indexOf(e);return t<0?[NaN,NaN]:[t>0?o[t-1]:n[0],t<o.length?o[t]:n[n.length-1]]},a.domain=function(e){if(!arguments.length)return n.slice();n=[];for(let t of e)null==t||isNaN(t=+t)||n.push(t);return n.sort(DI),i()},a.range=function(e){return arguments.length?(r=Array.from(e),i()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return o.slice()},a.copy=function(){return e().domain(n).range(r).unknown(t)},nD.apply(a,arguments)},scaleQuantize:function e(){var t,n=0,r=1,o=1,i=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[VI(i,e,0,o)]:t}function l(){var e=-1;for(i=new Array(o);++e<o;)i[e]=((e+1)*r-(e-o)*n)/(o+1);return s}return s.domain=function(e){return arguments.length?([n,r]=e,n=+n,r=+r,l()):[n,r]},s.range=function(e){return arguments.length?(o=(a=Array.from(e)).length-1,l()):a.slice()},s.invertExtent=function(e){var t=a.indexOf(e);return t<0?[NaN,NaN]:t<1?[n,i[0]]:t>=o?[i[o-1],r]:[i[t-1],i[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return i.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},nD.apply(j_(s),arguments)},scaleRadial:function e(){var t,n=d_(),r=[0,1],o=!1;function i(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:o?Math.round(r):r}return i.invert=function(e){return n.invert(K_(e))},i.domain=function(e){return arguments.length?(n.domain(e),i):n.domain()},i.range=function(e){return arguments.length?(n.range((r=Array.from(e,r_)).map(K_)),i):r.slice()},i.rangeRound=function(e){return i.range(e).round(!0)},i.round=function(e){return arguments.length?(o=!!e,i):o},i.clamp=function(e){return arguments.length?(n.clamp(e),i):n.clamp()},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e(n.domain(),r).round(o).clamp(n.clamp()).unknown(t)},nD.apply(i,arguments),j_(i)},scaleSequential:function e(){var t=j_(lz()(i_));return t.copy=function(){return cz(t,e())},rD.apply(t,arguments)},scaleSequentialLog:function e(){var t=R_(lz()).domain([1,10]);return t.copy=function(){return cz(t,e()).base(t.base())},rD.apply(t,arguments)},scaleSequentialPow:uz,scaleSequentialQuantile:function e(){var t=[],n=i_;function r(e){if(null!=e&&!isNaN(e=+e))return n((VI(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(DI),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map((e,r)=>n(r/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(n,r)=>function(e,t){if((n=(e=Float64Array.from(function*(e){for(let t of e)null!=t&&(t=+t)>=t&&(yield t)}(e))).length)&&!isNaN(t=+t)){if(t<=0||n<2)return JI(e);if(t>=1)return ZI(e);var n,r=(n-1)*t,o=Math.floor(r),i=ZI(QI(e,o).subarray(0,o+1));return i+(JI(e.subarray(o+1))-i)*(r-o)}}(t,r/e))},r.copy=function(){return e(n).domain(t)},rD.apply(r,arguments)},scaleSequentialSqrt:function(){return uz.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=V_(lz());return t.copy=function(){return cz(t,e()).constant(t.constant())},rD.apply(t,arguments)},scaleSqrt:function(){return W_.apply(null,arguments).exponent(.5)},scaleSymlog:function e(){var t=V_(u_());return t.copy=function(){return c_(t,e()).constant(t.constant())},nD.apply(t,arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],o=1;function i(e){return null!=e&&e<=e?r[VI(n,e,0,o)]:t}return i.domain=function(e){return arguments.length?(n=Array.from(e),o=Math.min(n.length,r.length-1),i):n.slice()},i.range=function(e){return arguments.length?(r=Array.from(e),o=Math.min(n.length,r.length-1),i):r.slice()},i.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return e().domain(n).range(r).unknown(t)},nD.apply(i,arguments)},scaleTime:function(){return nD.apply(sz(DR,_R,TR,AR,fR,lR,aR,oR,rR,BR).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return nD.apply(sz(NR,IR,CR,jR,xR,cR,sR,iR,rR,FR).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},tickFormat:A_});function hz(e,t,n){if("function"==typeof e)return e.copy().domain(t).range(n);if(null!=e){var r=function(e){var t=pz;if(e in t&&"function"==typeof t[e])return t[e]();var n="scale".concat(zw(e));return n in t&&"function"==typeof t[n]?t[n]():void 0}(e);if(null!=r)return r.domain(t).range(n),r}}function mz(e,t,n,r){if(null!=n&&null!=r)return"function"==typeof e.scale?hz(e.scale,n,r):hz(t,n,r)}function vz(e){return function(e){return"scale".concat(zw(e))}(e)in pz}var yz=(e,t,n)=>{if(null!=e){var{scale:r,type:o}=e;return"auto"===r?"category"===o&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!t)?"point":"category"===o?"band":"linear":"string"==typeof r?vz(r)?r:"point":void 0}};function gz(e,t){if(e){var n=null!=t?t:e.domain(),r=n.map(t=>{var n;return null!==(n=e(t))&&void 0!==n?n:0}),o=e.range();if(!(0===n.length||o.length<2))return e=>{var t,o,i=function(e,t){for(var n=0,r=e.length,o=e[0]<e[e.length-1];n<r;){var i=Math.floor((n+r)/2);(o?e[i]<t:e[i]>t)?n=i+1:r=i}return n}(r,e);if(i<=0)return n[0];if(i>=n.length)return n[n.length-1];var a=null!==(t=r[i-1])&&void 0!==t?t:0,s=null!==(o=r[i])&&void 0!==o?o:0;return Math.abs(e-a)<=Math.abs(e-s)?n[i-1]:n[i]}}}function bz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bz(Object(n),!0).forEach(function(t){wz(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bz(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wz(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ez=[0,"auto"],Oz={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},Sz=(e,t)=>e.cartesianAxis.xAxis[t],kz=(e,t)=>{var n=Sz(e,t);return null==n?Oz:n},Pz={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Ez,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:60},Az=(e,t)=>e.cartesianAxis.yAxis[t],jz=(e,t)=>{var n=Az(e,t);return null==n?Pz:n},Tz={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Cz=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return null==n?Tz:n},Mz=(e,t,n)=>{switch(t){case"xAxis":return kz(e,n);case"yAxis":return jz(e,n);case"zAxis":return Cz(e,n);case"angleAxis":return mI(e,n);case"radiusAxis":return vI(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Nz=(e,t,n)=>{switch(t){case"xAxis":return kz(e,n);case"yAxis":return jz(e,n);case"angleAxis":return mI(e,n);case"radiusAxis":return vI(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Iz=e=>e.graphicalItems.cartesianItems.some(e=>"bar"===e.type)||e.graphicalItems.polarItems.some(e=>"radialBar"===e.type);function Dz(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var _z=e=>e.graphicalItems.cartesianItems,Rz=za([SI,kI],Dz),Lz=(e,t,n)=>e.filter(n).filter(e=>!0===(null==t?void 0:t.includeHidden)||!e.hide),zz=za([_z,Mz,Rz],Lz,{memoizeOptions:{resultEqualityCheck:CI}}),Vz=za([zz],e=>e.filter(e=>"area"===e.type||"bar"===e.type).filter(jI)),Bz=e=>e.filter(e=>!("stackId"in e)||void 0===e.stackId),Fz=za([zz],Bz),$z=e=>e.map(e=>e.data).filter(Boolean).flat(1),Uz=za([zz],e=>e.some(e=>!e.data)),Wz=za([zz],$z,{memoizeOptions:{resultEqualityCheck:CI}}),Kz=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:o}=t;return e.length>0?e:n.slice(r,o+1)},Hz=za([Wz,lN],Kz),Yz=(e,t,n,r,o,i)=>{var{chartData:a=[],dataStartIndex:s,dataEndIndex:l}=r,c=((e,t,n)=>null!=(null==t?void 0:t.dataKey)?e.map(e=>({value:sA(e,t.dataKey)})):n.length>0?n.map(e=>e.dataKey).flatMap(t=>e.map(e=>({value:sA(e,t)}))):e.map(e=>({value:e})))(e,t,n);return o&&null!=(null==t?void 0:t.dataKey)&&i.length>0?[...a.slice(s,l+1).map(e=>({value:sA(e,t.dataKey)})).filter(e=>null!=e.value),...c]:c},qz=za([Hz,Mz,zz,lN,Uz,Wz],Yz);function Gz(e){if(Cw(e)||e instanceof Date){var t=Number(e);if(nA(t))return t}}function Xz(e){if(Array.isArray(e)){var t=[Gz(e[0]),Gz(e[1])];return fN(t)?t:void 0}var n=Gz(e);if(null!=n)return[n,n]}function Zz(e){return e.map(Gz).filter(Vw)}function Jz(e,t){var n=Gz(e),r=Gz(t);return null==n&&null==r?0:null==n?-1:null==r?1:n-r}var Qz=za([qz],e=>null==e?void 0:e.map(e=>e.value).sort(Jz));function eV(e,t){switch(e){case"xAxis":return"x"===t.direction;case"yAxis":return"y"===t.direction;default:return!1}}var tV=e=>{var t=MI(e),n=NI(e);return Nz(e,t,n)},nV=za([tV],e=>null==e?void 0:e.dataKey),rV=za([Vz,lN,tV],AI),oV=(e,t,n,r)=>{var o=t.reduce((e,t)=>{if(null==t.stackId)return e;var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{});return Object.fromEntries(Object.entries(o).map(t=>{var[o,i]=t,a=r?[...i].reverse():i,s=a.map(PI);return[o,{stackedData:fA(e,s,n),graphicalItems:a}]}))},iV=za([rV,Vz,tI,nI],oV),aV=(e,t,n,r)=>{var{dataStartIndex:o,dataEndIndex:i}=t;if(null==r&&"zAxis"!==n){var a=vA(e,o,i);if(null==a||0!==a[0]||0!==a[1])return a}},sV=za([Mz],e=>e.allowDataOverflow),lV=e=>{var t;if(null==e||!("domain"in e))return Ez;if(null!=e.domain)return e.domain;if("ticks"in e&&null!=e.ticks){if("number"===e.type){var n=Zz(e.ticks);return[Math.min(...n),Math.max(...n)]}if("category"===e.type)return e.ticks.map(String)}return null!==(t=null==e?void 0:e.domain)&&void 0!==t?t:Ez},cV=za([Mz],lV),uV=za([cV,sV],hN),dV=za([iV,aN,SI,uV],aV,{memoizeOptions:{resultEqualityCheck:TI}}),fV=e=>e.errorBars,pV=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Boolean);if(0!==r.length){var o=r.flat();return[Math.min(...o),Math.max(...o)]}},hV=function(e,t,n,r,o){var i,a,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:[];if(n.length>0&&n.forEach(e=>{var n,l=null!=e.data?[...e.data]:s,c=null===(n=r[e.id])||void 0===n?void 0:n.filter(e=>eV(o,e));l.forEach(n=>{var r,o=sA(n,null!==(r=t.dataKey)&&void 0!==r?r:e.dataKey),s=function(e,t,n){if(!n)return[];if(!n.length)return[];var r;if("number"!=typeof t||Aw(t)){if(Array.isArray(t)){var o=Zz(t);o.length>0&&(r=Math.max(...o))}}else r=t;return null==r?[]:Zz(n.flatMap(t=>{var n,o,i=sA(e,t.dataKey);if(Array.isArray(i)?[n,o]=i:n=o=i,nA(n)&&nA(o))return[r-n,r+o]}))}(n,o,c);if(s.length>=2){var l=Math.min(...s),u=Math.max(...s);(null==i||l<i)&&(i=l),(null==a||u>a)&&(a=u)}var d=Xz(o);null!=d&&(i=null==i?d[0]:Math.min(i,d[0]),a=null==a?d[1]:Math.max(a,d[1]))})}),null!=(null==t?void 0:t.dataKey)&&0===n.length&&e.forEach(e=>{var n=Xz(sA(e,t.dataKey));null!=n&&(i=null==i?n[0]:Math.min(i,n[0]),a=null==a?n[1]:Math.max(a,n[1]))}),nA(i)&&nA(a))return[i,a]},mV=za([Hz,Mz,Fz,fV,SI,uN],hV,{memoizeOptions:{resultEqualityCheck:TI}});function vV(e){var{value:t}=e;if(Cw(t)||t instanceof Date)return t}var yV=e=>e.referenceElements.dots,gV=(e,t,n)=>e.filter(e=>"extendDomain"===e.ifOverflow).filter(e=>"xAxis"===t?e.xAxisId===n:e.yAxisId===n),bV=za([yV,SI,kI],gV),xV=e=>e.referenceElements.areas,wV=za([xV,SI,kI],gV),EV=e=>e.referenceElements.lines,OV=za([EV,SI,kI],gV),SV=(e,t)=>{if(null!=e){var n=Zz(e.map(e=>"xAxis"===t?e.x:e.y));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},kV=za(bV,SI,SV),PV=(e,t)=>{if(null!=e){var n=Zz(e.flatMap(e=>["xAxis"===t?e.x1:e.y1,"xAxis"===t?e.x2:e.y2]));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},AV=za([wV,SI],PV);var jV=(e,t)=>{if(null!=e){var n=e.flatMap(e=>"xAxis"===t?function(e){var t;if(null!=e.x)return Zz([e.x]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.x);return null==n||0===n.length?[]:Zz(n)}(e):function(e){var t;if(null!=e.y)return Zz([e.y]);var n=null===(t=e.segment)||void 0===t?void 0:t.map(e=>e.y);return null==n||0===n.length?[]:Zz(n)}(e));if(0!==n.length)return[Math.min(...n),Math.max(...n)]}},TV=za([OV,SI],jV),CV=za(kV,TV,AV,(e,t,n)=>pV(e,n,t)),MV=(e,t,n,r,o,i,a,s)=>null!=n?n:function(e,t,n){if(n||null!=t){if("function"==typeof e&&null!=t)try{var r=e(t,n);if(fN(r))return pN(r,t,n)}catch(e){}if(Array.isArray(e)&&2===e.length){var o,i,[a,s]=e;if("auto"===a)null!=t&&(o=Math.min(...t));else if(Tw(a))o=a;else if("function"==typeof a)try{null!=t&&(o=a(null==t?void 0:t[0]))}catch(e){}else if("string"==typeof a&&yA.test(a)){var l=yA.exec(a);if(null==l||null==l[1]||null==t)o=void 0;else{var c=+l[1];o=t[0]-c}}else o=null==t?void 0:t[0];if("auto"===s)null!=t&&(i=Math.max(...t));else if(Tw(s))i=s;else if("function"==typeof s)try{null!=t&&(i=s(null==t?void 0:t[1]))}catch(e){}else if("string"==typeof s&&gA.test(s)){var u=gA.exec(s);if(null==u||null==u[1]||null==t)i=void 0;else{var d=+u[1];i=t[1]+d}}else i=null==t?void 0:t[1];var f=[o,i];if(fN(f))return null==t?f:pN(f,t,n)}}}(t,"vertical"===a&&"xAxis"===s||"horizontal"===a&&"yAxis"===s?pV(r,i,o):pV(i,o),e.allowDataOverflow),NV=za([Mz,cV,uV,dV,mV,CV,wj,SI],MV,{memoizeOptions:{resultEqualityCheck:TI}}),IV=[0,1],DV=(e,t,n,r,o,i,a)=>{if(null!=e&&null!=n&&0!==n.length||void 0!==a){var s,{dataKey:l,type:c}=e,u=lA(t,i);return u&&null==l?iN(0,null!==(s=null==n?void 0:n.length)&&void 0!==s?s:0):"category"===c?((e,t,n)=>{var r=e.map(vV).filter(e=>null!=e);return n&&(null==t.dataKey||t.allowDuplicatedCategory&&Dw(r))?iN(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))})(r,e,u):"expand"!==o||u?a:IV}},_V=za([Mz,wj,Hz,qz,tI,SI,NV],DV),RV=za([Mz,Iz,rI],yz),LV=(e,t,n)=>{var{niceTicks:r}=t;if("none"!==r){var o=lV(t),i=Array.isArray(o)&&("auto"===o[0]||"auto"===o[1]);if(("snap125"===r||"adaptive"===r)&&null!=t&&t.tickCount&&fN(e)){if(i)return ZN(e,t.tickCount,t.allowDecimals,r);if("number"===t.type)return JN(e,t.tickCount,t.allowDecimals,r)}if("auto"===r&&"linear"===n&&null!=t&&t.tickCount){if(i&&fN(e))return ZN(e,t.tickCount,t.allowDecimals,"adaptive");if("number"===t.type&&fN(e))return JN(e,t.tickCount,t.allowDecimals,"adaptive")}}},zV=za([_V,Nz,RV],LV),VV=(e,t,n,r)=>{if("angleAxis"!==r&&"number"===(null==e?void 0:e.type)&&fN(t)&&Array.isArray(n)&&n.length>0){var o,i,a=t[0],s=null!==(o=n[0])&&void 0!==o?o:0,l=t[1],c=null!==(i=n[n.length-1])&&void 0!==i?i:0;return[Math.min(a,s),Math.max(l,c)]}return t},BV=za([Mz,_V,zV,SI],VV),FV=za(qz,Mz,(e,t)=>{if(t&&"number"===t.type){var n=1/0,r=Array.from(Zz(e.map(e=>e.value))).sort((e,t)=>e-t),o=r[0],i=r[r.length-1];if(null==o||null==i)return 1/0;var a=i-o;if(0===a)return 1/0;for(var s=0;s<r.length-1;s++){var l=r[s],c=r[s+1];if(null!=l&&null!=c){var u=c-l;n=Math.min(n,u)}}return n/a}}),$V=za(FV,wj,eI,LA,(e,t,n,r,o)=>o,(e,t,n,r,o)=>{if(!nA(e))return 0;var i="vertical"===t?r.height:r.width;if("gap"===o)return e*i/2;if("no-gap"===o){var a=Iw(n,e*i),s=e*i/2;return s-a-(s-a)/i*a}return 0}),UV=za(kz,(e,t,n)=>{var r=kz(e,t);return null==r||"string"!=typeof r.padding?0:$V(e,"xAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{left:0,right:0};var{padding:o}=e;return"string"==typeof o?{left:t,right:t}:{left:(null!==(n=o.left)&&void 0!==n?n:0)+t,right:(null!==(r=o.right)&&void 0!==r?r:0)+t}}),WV=za(jz,(e,t,n)=>{var r=jz(e,t);return null==r||"string"!=typeof r.padding?0:$V(e,"yAxis",t,n,r.padding)},(e,t)=>{var n,r;if(null==e)return{top:0,bottom:0};var{padding:o}=e;return"string"==typeof o?{top:t,bottom:t}:{top:(null!==(n=o.top)&&void 0!==n?n:0)+t,bottom:(null!==(r=o.bottom)&&void 0!==r?r:0)+t}}),KV=za([LA,UV,UA,$A,(e,t,n)=>n],(e,t,n,r,o)=>{var{padding:i}=r;return o?[i.left,n.width-i.right]:[e.left+t.left,e.left+e.width-t.right]}),HV=za([LA,wj,WV,UA,$A,(e,t,n)=>n],(e,t,n,r,o,i)=>{var{padding:a}=o;return i?[r.height-a.bottom,a.top]:"horizontal"===t?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),YV=(e,t,n,r)=>{var o;switch(t){case"xAxis":return KV(e,n,r);case"yAxis":return HV(e,n,r);case"zAxis":return null===(o=Cz(e,n))||void 0===o?void 0:o.range;case"angleAxis":return wI(e);case"radiusAxis":return EI(e,n);default:return}},qV=za([Mz,YV],lI),GV=za([RV,BV],(e,t)=>{if(null!=t){if("linear"===e){if(!fN(t)){for(var n,r,o=0;o<t.length;o++){var i=t[o];nA(i)&&((void 0===n||i<n)&&(n=i),(void 0===r||i>r)&&(r=i))}return void 0!==n&&void 0!==r?[n,r]:void 0}return t}return t}}),XV=za([Mz,RV,GV,qV],mz),ZV=(e,t,n,r)=>{if(null!=n&&null!=n.dataKey){var{type:o,scale:i}=n;return!lA(e,r)||"number"!==o&&"auto"===i?void 0:t.map(e=>e.value)}},JV=za([wj,qz,Nz,SI],ZV),QV=za([XV],II);function eB(e,t){return e.id<t.id?-1:e.id>t.id?1:0}za([XV],function(e){if(null!=e)return"invert"in e&&"function"==typeof e.invert?e.invert.bind(e):gz(e,void 0)}),za([XV,Qz],gz),za([zz,fV,SI],(e,t,n)=>e.flatMap(e=>t[e.id]).filter(Boolean).filter(e=>eV(n,e)));var tB=(e,t)=>t,nB=(e,t,n)=>n,rB=za(PA,tB,nB,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(eB)),oB=za(AA,tB,nB,(e,t,n)=>e.filter(e=>e.orientation===t).filter(e=>e.mirror===n).sort(eB)),iB=(e,t)=>({width:e.width,height:t.height}),aB=za(LA,kz,iB),sB=za(OA,LA,rB,tB,nB,(e,t,n,r,o)=>{var i,a={};return n.forEach(n=>{var s=iB(t,n);null==i&&(i=((e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}})(t,r,e));var l="top"===r&&!o||"bottom"===r&&o;a[n.id]=i-Number(l)*s.height,i+=(l?-1:1)*s.height}),a}),lB=za(EA,LA,oB,tB,nB,(e,t,n,r,o)=>{var i,a={};return n.forEach(n=>{var s=((e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height}))(t,n);null==i&&(i=((e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}})(t,r,e));var l="left"===r&&!o||"right"===r&&o;a[n.id]=i-Number(l)*s.width,i+=(l?-1:1)*s.width}),a}),cB=za([LA,kz,(e,t)=>{var n=kz(e,t);if(null!=n)return sB(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var o=null==n?void 0:n[r];return null==o?{x:e.left,y:0}:{x:e.left,y:o}}}),uB=za([LA,jz,(e,t)=>{var n=jz(e,t);if(null!=n)return lB(e,n.orientation,n.mirror)},(e,t)=>t],(e,t,n,r)=>{if(null!=t){var o=null==n?void 0:n[r];return null==o?{x:0,y:e.top}:{x:o,y:e.top}}}),dB=za(LA,jz,(e,t)=>({width:"number"==typeof t.width?t.width:60,height:e.height})),fB=(e,t,n)=>{switch(t){case"xAxis":return aB(e,n).width;case"yAxis":return dB(e,n).height;default:return}},pB=(e,t,n,r)=>{if(null!=n){var{allowDuplicatedCategory:o,type:i,dataKey:a}=n,s=lA(e,r),l=t.map(e=>e.value),c=l.filter(e=>null!=e);return a&&s&&"category"===i&&o&&Dw(c)?l:void 0}},hB=za([wj,qz,Mz,SI],pB),mB=za([wj,(e,t,n)=>{switch(t){case"xAxis":return kz(e,n);case"yAxis":return jz(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},RV,QV,hB,JV,YV,zV,SI],(e,t,n,r,o,i,a,s,l)=>{if(null!=t){var c=lA(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:i,duplicateDomain:o,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}}),vB=za([wj,Nz,RV,QV,zV,YV,hB,JV,SI],(e,t,n,r,o,i,a,s,l)=>{if(null!=t&&null!=r){var c=lA(e,l),{type:u,ticks:d,tickCount:f}=t,p="scaleBand"===n&&"function"==typeof r.bandwidth?r.bandwidth()/2:2,h="category"===u&&r.bandwidth?r.bandwidth()/p:0;h="angleAxis"===l&&null!=i&&i.length>=2?2*Pw(i[0]-i[1])*h:h;var m=d||o;return m?m.map((e,t)=>{var n=a?a.indexOf(e):e,o=r.map(n);return nA(o)?{index:t,coordinate:o+h,value:e,offset:h}:null}).filter(Vw):c&&s?s.map((e,t)=>{var n=r.map(e);return nA(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Vw):r.ticks?r.ticks(f).map((e,t)=>{var n=r.map(e);return nA(n)?{coordinate:n+h,value:e,index:t,offset:h}:null}).filter(Vw):r.domain().map((e,t)=>{var n=r.map(e);return nA(n)?{coordinate:n+h,value:a?a[e]:e,index:t,offset:h}:null}).filter(Vw)}}),yB=za([wj,Nz,QV,YV,hB,JV,SI],(e,t,n,r,o,i,a)=>{if(null!=t&&null!=n&&null!=r&&r[0]!==r[1]){var s=lA(e,a),{tickCount:l}=t,c=0;return c="angleAxis"===a&&(null==r?void 0:r.length)>=2?2*Pw(r[0]-r[1])*c:c,s&&i?i.map((e,t)=>{var r=n.map(e);return nA(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(Vw):n.ticks?n.ticks(l).map((e,t)=>{var r=n.map(e);return nA(r)?{coordinate:r+c,value:e,index:t,offset:c}:null}).filter(Vw):n.domain().map((e,t)=>{var r=n.map(e);return nA(r)?{coordinate:r+c,value:o?o[e]:e,index:t,offset:c}:null}).filter(Vw)}}),gB=za(Mz,QV,(e,t)=>{if(null!=e&&null!=t)return xz(xz({},e),{},{scale:t})}),bB=za([Mz,RV,_V,qV],mz),xB=za([bB],II),wB=za((e,t,n)=>Cz(e,n),xB,(e,t)=>{if(null!=e&&null!=t)return xz(xz({},e),{},{scale:t})}),EB=za([wj,PA,AA],(e,t,n)=>{switch(e){case"horizontal":return t.some(e=>e.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(e=>e.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}});za([(e,t,n)=>{var r;return null===(r=e.renderedTicks[t])||void 0===r?void 0:r[n]}],e=>{if(e&&0!==e.length)return t=>{var n,r=1/0,o=e[0];for(var i of e){var a=Math.abs(i.coordinate-t);a<r&&(r=a,o=i)}return null===(n=o)||void 0===n?void 0:n.value}});var OB=e=>e.options.defaultTooltipEventType,SB=e=>e.options.validateTooltipEventTypes;function kB(e,t,n){if(null==e)return t;var r=e?"axis":"item";return null==n?t:n.includes(r)?r:t}function PB(e,t){return kB(t,OB(e),SB(e))}var AB=(e,t)=>{var n,r=Number(t);if(!Aw(r)&&null!=t)return r>=0?null==e||null===(n=e[r])||void 0===n?void 0:n.value:void 0},jB={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},TB=mP({name:"tooltip",initialState:{itemInteraction:{click:jB,hover:jB},axisInteraction:{click:jB,hover:jB},keyboardInteraction:jB,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:iP()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:n,next:r}=t.payload,o=_k(e).tooltipItemPayloads.indexOf(n);o>-1&&(e.tooltipItemPayloads[o]=r)},prepare:iP()},removeTooltipEntrySettings:{reducer(e,t){var n=_k(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,1)},prepare:iP()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:CB,replaceTooltipEntrySettings:MB,removeTooltipEntrySettings:NB,setTooltipSettingsState:IB,setActiveMouseOverItemIndex:DB,mouseLeaveItem:_B,mouseLeaveChart:RB,setActiveClickItemIndex:LB,setMouseOverAxisIndex:zB,setMouseClickAxisIndex:VB,setSyncInteraction:BB,setKeyboardInteraction:FB}=TB.actions,$B=TB.reducer;function UB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WB(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UB(Object(n),!0).forEach(function(t){KB(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function KB(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HB=(e,t,n,r)=>{if(null==t)return jB;var o=function(e,t,n){return"axis"===t?"click"===n?e.axisInteraction.click:e.axisInteraction.hover:"click"===n?e.itemInteraction.click:e.itemInteraction.hover}(e,t,n);if(null==o)return jB;if(o.active)return o;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&null!=e.syncInteraction.index)return e.syncInteraction;var i=!0===e.settings.active;if(null!=o.index){if(i)return WB(WB({},o),{},{active:!0})}else if(null!=r)return{active:!0,coordinate:void 0,dataKey:void 0,index:r,graphicalItemId:void 0};return WB(WB({},jB),{},{coordinate:o.coordinate})};function YB(e,t){var n=function(e){if("number"==typeof e)return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var n=Number(e);return Number.isFinite(n)?n:void 0}(e),r=t[0],o=t[1];if(void 0===n)return!1;var i=Math.min(r,o),a=Math.max(r,o);return n>=i&&n<=a}var qB=(e,t,n,r)=>{var o=null==e?void 0:e.index;if(null==o)return null;var i=Number(o);if(!nA(i))return o;var a=1/0;t.length>0&&(a=t.length-1);var s=Math.max(0,Math.min(i,a)),l=t[s];return null==l||function(e,t,n){if(null==n||null==t)return!0;var r=sA(e,t);return null==r||!fN(n)||YB(r,n)}(l,n,r)?String(s):null},GB=(e,t,n,r,o,i,a)=>{if(null!=i){var s=a[0],l=null==s?void 0:s.getPosition(i);if(null!=l)return l;var c=null==o?void 0:o[Number(i)];if(c)return"horizontal"===n?{x:c.coordinate,y:(r.top+t)/2}:{x:(r.left+e)/2,y:c.coordinate}}},XB=(e,t,n,r)=>{if("axis"===t)return e.tooltipItemPayloads;if(0===e.tooltipItemPayloads.length)return[];var o;if(o="hover"===n?e.itemInteraction.hover.graphicalItemId:e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&null==o)return e.tooltipItemPayloads;if(null==o&&(null!=r||e.keyboardInteraction.active)){var i=e.tooltipItemPayloads[0];return null!=i?[i]:[]}return e.tooltipItemPayloads.filter(e=>{var t;return(null===(t=e.settings)||void 0===t?void 0:t.graphicalItemId)===o})},ZB=e=>e.options.tooltipPayloadSearcher,JB=e=>e.tooltip;function QB(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QB(Object(n),!0).forEach(function(t){tF(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QB(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tF(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nF(e){if("string"==typeof e)return e}var rF=(e,t,n,r,o,i,a)=>{if(null!=t&&null!=i){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n;return e.reduce((e,n)=>{var d,f,p,{dataDefinedOnItem:h,settings:m}=n,v=function(e,t){return null!=e?e:t}(h,s),y=Array.isArray(v)?tA(v,c,u):v,g=null!==(d=null==m?void 0:m.dataKey)&&void 0!==d?d:r,b=null==m?void 0:m.nameKey;(f=r&&Array.isArray(y)&&!Array.isArray(y[0])&&"axis"===a?Rw(y,r,o):i(y,t,l,b),Array.isArray(f))?f.forEach(t=>{var n,r,o=function(e){if(null!=e&&"object"==typeof e){var t,n="name"in e?function(e){if("string"==typeof e||"number"==typeof e)return e}(e.name):void 0,r="unit"in e?function(e){if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return e}(e.unit):void 0;return{name:n,unit:r,dataKey:"dataKey"in e?"string"==typeof(t=e.dataKey)||"number"==typeof t?t:"function"==typeof t?e=>t(e):void 0:void 0,payload:"payload"in e?e.payload:void 0,color:"color"in e?nF(e.color):void 0,fill:"fill"in e?nF(e.fill):void 0}}}(t),i=null==o?void 0:o.name,a=null==o?void 0:o.dataKey,s=null==o?void 0:o.payload,l=eF(eF({},m),{},{name:i,unit:null==o?void 0:o.unit,color:null!==(n=null==o?void 0:o.color)&&void 0!==n?n:null==m?void 0:m.color,fill:null!==(r=null==o?void 0:o.fill)&&void 0!==r?r:null==m?void 0:m.fill});e.push(xA({tooltipEntrySettings:l,dataKey:a,payload:s,value:sA(s,a),name:null==i?void 0:String(i)}))}):e.push(xA({tooltipEntrySettings:m,dataKey:g,payload:f,value:sA(f,g),name:null!==(p=sA(f,b))&&void 0!==p?p:null==m?void 0:m.name}));return e},[])}},oF=za([tV,Iz,rI],yz),iF=za([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),aF=za([MI,NI],Dz),sF=za([iF,tV,aF],Lz,{memoizeOptions:{resultEqualityCheck:CI}}),lF=za([sF],e=>e.filter(jI)),cF=za([sF],$z,{memoizeOptions:{resultEqualityCheck:CI}}),uF=za([sF],e=>e.some(e=>!e.data)),dF=za([cF,aN],Kz),fF=za([lF,aN,tV],AI),pF=za([dF,tV,sF,aN,uF,cF],Yz),hF=za([tV],lV),mF=za([tV],e=>e.allowDataOverflow),vF=za([hF,mF],hN),yF=za([sF],e=>e.filter(jI)),gF=za([fF,yF,tI,nI],oV),bF=za([gF,aN,MI,vF],aV),xF=za([sF],Bz),wF=za([dF,tV,xF,fV,MI,dN],hV,{memoizeOptions:{resultEqualityCheck:TI}}),EF=za([yV,MI,NI],gV),OF=za([EF,MI],SV),SF=za([xV,MI,NI],gV),kF=za([SF,MI],PV),PF=za([EV,MI,NI],gV),AF=za([PF,MI],jV),jF=za([OF,AF,kF],pV),TF=za([tV,hF,vF,bF,wF,jF,wj,MI],MV),CF=za([tV,wj,dF,pF,tI,MI,TF],DV),MF=za([CF,tV,oF],LV),NF=za([tV,CF,MF,MI],VV),IF=e=>{var t=MI(e),n=NI(e);return YV(e,t,n,!1)},DF=za([tV,IF],lI),_F=za([tV,oF,NF,DF],mz),RF=za([_F],II),LF=za([wj,pF,tV,MI],pB),zF=za([wj,pF,tV,MI],ZV),VF=za([wj,tV,oF,RF,IF,LF,zF,MI],(e,t,n,r,o,i,a,s)=>{if(t){var{type:l}=t,c=lA(e,s);if(r){var u="scaleBand"===n&&r.bandwidth?r.bandwidth()/2:2,d="category"===l&&r.bandwidth?r.bandwidth()/u:0;return d="angleAxis"===s&&null!=o&&(null==o?void 0:o.length)>=2?2*Pw(o[0]-o[1])*d:d,c&&a?a.map((e,t)=>{var n=r.map(e);return nA(n)?{coordinate:n+d,value:e,index:t,offset:d}:null}).filter(Vw):r.domain().map((e,t)=>{var n=r.map(e);return nA(n)?{coordinate:n+d,value:i?i[e]:e,index:t,offset:d}:null}).filter(Vw)}}}),BF=za([OB,SB,e=>e.tooltip.settings],(e,t,n)=>kB(n.shared,e,t)),FF=e=>e.tooltip.settings.trigger,$F=e=>e.tooltip.settings.defaultIndex,UF=za([JB,BF,FF,$F],HB),WF=za([UF,dF,nV,CF],qB),KF=za([VF,WF],AB),HF=za([UF],e=>{if(e)return e.dataKey}),YF=za([UF],e=>{if(e)return e.graphicalItemId}),qF=za([JB,BF,FF,$F],XB),GF=za([EA,OA,wj,LA,VF,$F,qF],GB),XF=za([UF,GF],(e,t)=>null!=e&&e.coordinate?e.coordinate:t),ZF=za([UF],e=>{var t;return null!==(t=null==e?void 0:e.active)&&void 0!==t&&t}),JF=za([qF,WF,aN,nV,KF,ZB,BF],rF),QF=za([JF],e=>{if(null!=e){var t=e.map(e=>e.payload).filter(e=>null!=e);return Array.from(new Set(t))}});function e$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function t$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?e$(Object(n),!0).forEach(function(t){n$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function n$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var r$=()=>{var e=FO(tV),t=FO(VF),n=FO(RF);return bA(e&&n?t$(t$({},e),{},{scale:n}):void 0,t)};function o$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o$(Object(n),!0).forEach(function(t){a$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s$=(e,t,n,r,o)=>{var i,a=null!==(i=null==t?void 0:t.length)&&void 0!==i?i:0;if(a<=1||null==e)return 0;if("angleAxis"===r&&null!=o&&Math.abs(Math.abs(o[1]-o[0])-360)<=1e-6)for(var s=0;s<a;s++){var l,c,u,d,f,p=s>0?null===(l=n[s-1])||void 0===l?void 0:l.coordinate:null===(c=n[a-1])||void 0===c?void 0:c.coordinate,h=null===(u=n[s])||void 0===u?void 0:u.coordinate,m=s>=a-1?null===(d=n[0])||void 0===d?void 0:d.coordinate:null===(f=n[s+1])||void 0===f?void 0:f.coordinate,v=void 0;if(null!=p&&null!=h&&null!=m)if(Pw(h-p)!==Pw(m-h)){var y=[];if(Pw(m-h)===Pw(o[1]-o[0])){v=m;var g=h+o[1]-o[0];y[0]=Math.min(g,(g+p)/2),y[1]=Math.max(g,(g+p)/2)}else{v=p;var b=m+o[1]-o[0];y[0]=Math.min(h,(b+h)/2),y[1]=Math.max(h,(b+h)/2)}var x,w=[Math.min(h,(v+h)/2),Math.max(h,(v+h)/2)];if(e>w[0]&&e<=w[1]||e>=y[0]&&e<=y[1])return null===(x=n[s])||void 0===x?void 0:x.index}else{var E,O=Math.min(p,m),S=Math.max(p,m);if(e>(O+h)/2&&e<=(S+h)/2)return null===(E=n[s])||void 0===E?void 0:E.index}}else if(t)for(var k=0;k<a;k++){var P=t[k];if(null!=P){var A=t[k+1],j=t[k-1];if(0===k&&null!=A&&e<=(P.coordinate+A.coordinate)/2)return P.index;if(k===a-1&&null!=j&&e>(P.coordinate+j.coordinate)/2)return P.index;if(k>0&&k<a-1&&null!=j&&null!=A&&e>(P.coordinate+j.coordinate)/2&&e<=(P.coordinate+A.coordinate)/2)return P.index}}return-1},l$=()=>FO(rI),c$=(e,t)=>t,u$=(e,t,n)=>n,d$=(e,t,n,r)=>r,f$=za(VF,e=>fS(e,e=>e.coordinate)),p$=za([JB,c$,u$,d$],HB),h$=za([p$,dF,nV,CF],qB),m$=za([JB,c$,u$,d$],XB),v$=za([EA,OA,wj,LA,VF,d$,m$],GB),y$=za([p$,v$],(e,t)=>{var n;return null!==(n=e.coordinate)&&void 0!==n?n:t}),g$=za([VF,h$],AB),b$=za([m$,h$,aN,nV,g$,ZB,c$],rF),x$=za([p$,h$],(e,t)=>({isActive:e.active&&null!=t,activeIndex:t})),w$=(e,t,n,r,o,i,a)=>{if(e&&r&&o&&i&&n){var s=zM(e,n);if(s){var l=((e,t)=>"centric"===t?e.angle:e.radius)(s,t),c=s$(l,a,i,r,o),u=((e,t,n,r)=>{var o=t.find(e=>e&&e.index===n);if(o){if("centric"===e){var i=o.coordinate,{radius:a}=r;return i$(i$(i$({},r),_M(r.cx,r.cy,a,i)),{},{angle:i,radius:a})}var s=o.coordinate,{angle:l}=r;return i$(i$(i$({},r),_M(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}})(t,i,c,s);return{activeIndex:String(c),activeCoordinate:u}}}},E$=za(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,n)=>n,(e,t,n)=>{if(null!=t){var r=e[t];if(null!=r)return n?r.panoramaElement:r.element}}),O$=za(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(e=>parseInt(e,10)).concat(Object.values(sI));return Array.from(new Set(t)).sort((e,t)=>e-t)},{memoizeOptions:{resultEqualityCheck:function(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return!1}}});function S$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function k$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S$(Object(n),!0).forEach(function(t){P$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function P$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var A$={zIndexMap:Object.values(sI).reduce((e,t)=>k$(k$({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),{})},j$=new Set(Object.values(sI));var T$=mP({name:"zIndex",initialState:A$,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]?e.zIndexMap[n].consumers+=1:e.zIndexMap[n]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:iP()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(e.zIndexMap[n].consumers-=1,e.zIndexMap[n].consumers<=0&&!function(e){return j$.has(e)}(n)&&delete e.zIndexMap[n])},prepare:iP()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n,element:r,isPanorama:o}=t.payload;e.zIndexMap[n]?o?e.zIndexMap[n].panoramaElement=r:e.zIndexMap[n].element=r:e.zIndexMap[n]={consumers:0,element:o?void 0:r,panoramaElement:o?r:void 0}},prepare:iP()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:n}=t.payload;e.zIndexMap[n]&&(t.payload.isPanorama?e.zIndexMap[n].panoramaElement=void 0:e.zIndexMap[n].element=void 0)},prepare:iP()}}}),{registerZIndexPortal:C$,unregisterZIndexPortal:M$,registerZIndexPortalElement:N$,unregisterZIndexPortalElement:I$}=T$.actions,D$=T$.reducer;function _$(n){var{zIndex:r,children:o}=n,i=void 0!==Ej()&&void 0!==r&&0!==r,a=FA(),s=e.useRef(void 0),l=e.useRef(new Set),c=LO(),u=FO(e=>E$(e,r,a));if(e.useLayoutEffect(()=>{if(!i){var e=l.current;return e.forEach(e=>{c(M$({zIndex:e}))}),e.clear(),void(s.current=void 0)}if(l.current.has(r)||(c(C$({zIndex:r})),l.current.add(r)),u){s.current=u;var t=l.current;t.forEach(e=>{e!==r&&(c(M$({zIndex:e})),t.delete(e))})}},[c,r,i,u]),e.useLayoutEffect(()=>{var e=l.current;return()=>{e.forEach(e=>{c(M$({zIndex:e}))}),e.clear()}},[c]),!i)return o;var d=null!=u?u:s.current;return d?t.createPortal(o,d):null}function R$(){return R$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R$.apply(null,arguments)}function L$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function z$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L$(Object(n),!0).forEach(function(t){V$(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L$(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V$(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B$(t){var{cursor:n,cursorComp:r,cursorProps:o}=t;return e.isValidElement(n)?e.cloneElement(n,o):e.createElement(r,o)}function F$(e){var t,n,o,i,{coordinate:a,payload:s,index:l,offset:c,tooltipAxisBandSize:u,layout:d,cursor:f,tooltipEventType:p,chartName:h}=e,m=a,v=s,y=l;if(!f||!m||"ScatterChart"!==h&&"axis"!==p)return null;if("ScatterChart"===h)n=m,o=PC,i=sI.cursorLine;else if("BarChart"===h)n=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(d,m,c,u),o=EM,i=sI.cursorRectangle;else if("radial"===d&&Gw(m)){var{cx:g,cy:b,radius:x,startAngle:w,endAngle:E}=VM(m);n={cx:g,cy:b,startAngle:w,endAngle:E,innerRadius:x,outerRadius:x},o=KM,i=sI.cursorLine}else n={points:HM(d,m,c)},o=xC,i=sI.cursorLine;var O="object"==typeof f&&"className"in f?f.className:void 0,S=z$(z$(z$(z$({stroke:"#ccc",pointerEvents:"none"},c),n),Ub(f)),{},{payload:v,payloadIndex:y,className:Y("recharts-tooltip-cursor",O)});return r.createElement(_$,{zIndex:null!==(t=e.zIndex)&&void 0!==t?t:i},r.createElement(B$,{cursor:f,cursorComp:o,cursorProps:S}))}function $$(e){var t=r$(),n=gj(),o=Ej(),i=l$();return null==t||null==n||null==o||null==i?null:r.createElement(F$,R$({},e,{offset:n,layout:o,tooltipAxisBandSize:t,chartName:i}))}var U$,W$=e.createContext(null),K$={exports:{}};var H$=(U$||(U$=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,i||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,i=r.length,a=new Array(i);o<i;o++)a[o]=r[o].fn;return a},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,i,a){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,i),!0;case 6:return u.fn.call(u.context,t,r,o,i,a),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,o);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||a(this,i);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[i]=1===c.length?c[0]:c:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&a(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s}(K$)),K$.exports),Y$=new(i(H$)),q$="recharts.syncEvent.tooltip",G$="recharts.syncEvent.brush",X$=(e,t)=>{if(t&&Array.isArray(e)){var n=Number.parseInt(t,10);if(!Aw(n))return e[n]}},Z$=mP({name:"options",initialState:{chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},reducers:{createEventEmitter:e=>{null==e.eventEmitter&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),J$=Z$.reducer,{createEventEmitter:Q$}=Z$.actions;function eU(e){return e.tooltip.syncInteraction}var tU=mP({name:"chartData",initialState:{chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},reducers:{setChartData(e,t){if(e.chartData=t.payload,null==t.payload)return e.dataStartIndex=0,void(e.dataEndIndex=0);t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:n,endIndex:r}=t.payload;null!=n&&(e.dataStartIndex=n),null!=r&&(e.dataEndIndex=r)}}}),{setChartData:nU,setDataStartEndIndexes:rU,setComputedData:oU}=tU.actions,iU=tU.reducer,aU=["x","y"];function sU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sU(Object(n),!0).forEach(function(t){cU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function cU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uU(){var t=FO(oI),n=FO(aI),r=LO(),o=FO(iI),i=FO(VF),a=Ej(),s=vj(),l=FO(e=>e.rootProps.className);e.useEffect(()=>{if(null==t)return Bw;var e=(e,l,c)=>{var u;if(n!==c&&t===e)if(!1!==l.payload.active)if("index"!==o){if(null!=i){var d;if("function"==typeof o){var f={activeTooltipIndex:null==l.payload.index?void 0:Number(l.payload.index),isTooltipActive:l.payload.active,activeIndex:null==l.payload.index?void 0:Number(l.payload.index),activeLabel:l.payload.label,activeDataKey:l.payload.dataKey,activeCoordinate:l.payload.coordinate},p=o(i,f);d=i[p]}else"value"===o&&(d=i.find(e=>String(e.value)===l.payload.label));var{coordinate:h}=l.payload;if(null!=h&&null!=s)if(null!=d){var{x:m,y:v}=h,y=Math.min(m,s.x+s.width),g=Math.min(v,s.y+s.height),b={x:"horizontal"===a?d.coordinate:y,y:"horizontal"===a?g:d.coordinate},x=BB({active:l.payload.active,coordinate:b,dataKey:l.payload.dataKey,index:String(d.index),label:l.payload.label,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:l.payload.graphicalItemId});r(x)}else r(BB({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:l.payload.sourceViewBox,graphicalItemId:void 0}));else r(BB({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))}}else if(s&&null!=l&&null!==(u=l.payload)&&void 0!==u&&u.coordinate&&l.payload.sourceViewBox){var w=l.payload.coordinate,{x:E,y:O}=w,S=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(w,aU),{x:k,y:P,width:A,height:j}=l.payload.sourceViewBox,T=lU(lU({},S),{},{x:s.x+(A?(E-k)/A:0)*s.width,y:s.y+(j?(O-P)/j:0)*s.height});r(lU(lU({},l),{},{payload:lU(lU({},l.payload),{},{coordinate:T})}))}else r(l);else r(BB({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}))};return Y$.on(q$,e),()=>{Y$.off(q$,e)}},[l,r,n,t,o,i,a,s])}function dU(){var t=LO();e.useEffect(()=>{t(Q$())},[t]),uU(),function(){var t=FO(oI),n=FO(aI),r=LO();e.useEffect(()=>{if(null==t)return Bw;var e=(e,o,i)=>{n!==i&&t===e&&r(rU(o))};return Y$.on(G$,e),()=>{Y$.off(G$,e)}},[r,n,t])}()}function fU(t,n,r,o,i,a){var s=FO(e=>((e,t,n)=>{if(null!=t){var r=JB(e);return"axis"===t?"hover"===n?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:"hover"===n?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}})(e,t,n)),l=FO(YF),c=FO(aI),u=FO(oI),d=FO(iI),f=FO(eU),p=null!=(null==f?void 0:f.sourceViewBox),h=vj();e.useEffect(()=>{if(!p&&null!=u&&null!=c){var e=BB({active:a,coordinate:r,dataKey:s,index:i,label:"number"==typeof o?String(o):o,sourceViewBox:h,graphicalItemId:l});Y$.emit(q$,u,e,c)}},[p,r,s,l,i,o,c,u,d,a,h])}function pU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pU(Object(n),!0).forEach(function(t){mU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vU(e){return e.dataKey}var yU=[],gU={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function bU(n){var o,i,a=eE(n,gU),{active:s,allowEscapeViewBox:l,animationDuration:c,animationEasing:u,content:d,filterNull:f,isAnimationActive:p,offset:h,payloadUniqBy:m,position:v,reverseDirection:y,useTranslate3d:g,wrapperStyle:b,cursor:x,shared:w,trigger:E,defaultIndex:O,portal:S,axisId:k}=a,P=LO(),A="number"==typeof O?String(O):O;e.useEffect(()=>{P(IB({shared:w,trigger:E,axisId:k,active:s,defaultIndex:A}))},[P,w,E,k,s,A]);var j=vj(),T=lC(),C=function(e){return FO(t=>PB(t,e))}(w),{activeIndex:M,isActive:N}=null!==(o=FO(e=>x$(e,C,E,A)))&&void 0!==o?o:{},I=FO(e=>b$(e,C,E,A)),D=FO(e=>g$(e,C,E,A)),_=FO(e=>y$(e,C,E,A)),R=I,L=e.useContext(W$),z=null!==(i=null!=s?s:N)&&void 0!==i&&i,[V,B]=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],[n,r]=e.useState({height:0,left:0,top:0,width:0}),o=e.useCallback(e=>{if(null!=e){var t=e.getBoundingClientRect(),o={height:t.height,left:t.left,top:t.top,width:t.width};(Math.abs(o.height-n.height)>1||Math.abs(o.left-n.left)>1||Math.abs(o.top-n.top)>1||Math.abs(o.width-n.width)>1)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[n.width,n.height,n.top,n.left,...t]);return[n,o]}([R,z]),F="axis"===C?D:void 0;fU(C,E,_,F,M,z);var $=null!=S?S:L;if(null==$||null==j||null==C)return null;var U=null!=R?R:yU;z||(U=yU),f&&U.length&&(U=function(e,t,n){return!0===t?DO(e,n):"function"==typeof t?DO(e,t):e}(U.filter(e=>null!=e.value&&(!0!==e.hide||a.includeHidden)),m,vU));var W=U.length>0,K=hU(hU({},a),{},{payload:U,label:F,active:z,activeIndex:M,coordinate:_,accessibilityLayer:T}),H=r.createElement(sC,{allowEscapeViewBox:l,animationDuration:c,animationEasing:u,isAnimationActive:p,active:z,coordinate:_,hasPayload:W,offset:h,position:v,reverseDirection:y,useTranslate3d:g,viewBox:j,wrapperStyle:b,lastBoundingBox:V,innerRef:B,hasPortalFromProps:Boolean(S)},function(e,t){return r.isValidElement(e)?r.cloneElement(e,t):"function"==typeof e?r.createElement(e,t):r.createElement(GT,t)}(d,K));return r.createElement(r.Fragment,null,t.createPortal(H,$),z&&r.createElement($$,{cursor:x,tooltipEventType:C,coordinate:_,payload:U,index:M}))}var xU=e=>null;function wU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}xU.displayName="Cell";function EU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function OU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var SU=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EU(Object(n),!0).forEach(function(t){OU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},{cacheSize:2e3,enableCache:!0}),kU=new class{constructor(e){wU(this,"cache",new Map),this.maxSize=e}get(e){var t=this.cache.get(e);return void 0!==t&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;null!=n&&this.cache.delete(n)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}}(SU.cacheSize),PU={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},AU="recharts_measurement_span";var jU=(e,t)=>{try{var n=document.getElementById(AU);n||((n=document.createElement("span")).setAttribute("id",AU),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,PU,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch(e){return{width:0,height:0}}},TU=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||eC)return{width:0,height:0};if(!SU.enableCache)return jU(e,t);var n=function(e,t){var n=t.fontSize||"",r=t.fontFamily||"",o=t.fontWeight||"",i=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(o,"|").concat(i,"|").concat(a,"|").concat(s)}(e,t),r=kU.get(n);if(r)return r;var o=jU(e,t);return kU.set(n,o),o};var CU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,MU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,NU=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,IU=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,DU={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},_U=["cm","mm","pt","pc","in","Q","px"];var RU="NaN";class LU{static parse(e){var t,[,n,r]=null!==(t=IU.exec(e))&&void 0!==t?t:[];return null==n?LU.NaN:new LU(parseFloat(n),null!=r?r:"")}constructor(e,t){this.num=e,this.unit=t,this.num=e,this.unit=t,Aw(e)&&(this.unit=""),""===t||NU.test(t)||(this.num=NaN,this.unit=""),function(e){return _U.includes(e)}(t)&&(this.num=function(e,t){return e*DU[t]}(e,t),this.unit="px")}add(e){return this.unit!==e.unit?new LU(NaN,""):new LU(this.num+e.num,this.unit)}subtract(e){return this.unit!==e.unit?new LU(NaN,""):new LU(this.num-e.num,this.unit)}multiply(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new LU(NaN,""):new LU(this.num*e.num,this.unit||e.unit)}divide(e){return""!==this.unit&&""!==e.unit&&this.unit!==e.unit?new LU(NaN,""):new LU(this.num/e.num,this.unit||e.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Aw(this.num)}}function zU(e){if(null==e||e.includes(RU))return RU;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,o,i]=null!==(n=CU.exec(t))&&void 0!==n?n:[],a=LU.parse(null!=r?r:""),s=LU.parse(null!=i?i:""),l="*"===o?a.multiply(s):a.divide(s);if(l.isNaN())return RU;t=t.replace(CU,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=null!==(c=MU.exec(t))&&void 0!==c?c:[],p=LU.parse(null!=u?u:""),h=LU.parse(null!=f?f:""),m="+"===d?p.add(h):p.subtract(h);if(m.isNaN())return RU;t=t.replace(MU,m.toString())}return t}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(LU,"NaN",new LU(NaN,""));var VU=/\(([^()]*)\)/;function BU(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t,n=e;null!=(t=VU.exec(n));){var[,r]=t;n=n.replace(VU,zU(r))}return n}(t),t=zU(t)}function FU(e){var t=function(e){try{return BU(e)}catch(e){return RU}}(e.slice(5,-1));return t===RU?"":t}var $U=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],UU=["dx","dy","angle","className","breakAll"];function WU(){return WU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WU.apply(null,arguments)}function KU(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var HU=/[ \f\n\r\t\v\u2028\u2029]+/,YU=e=>{var{children:t,breakAll:n,style:r}=e;try{var o=[];return Lw(t)||(o=n?t.toString().split(""):t.toString().split(HU)),{wordsWithComputedWidth:o.map(e=>({word:e,width:TU(e,r).width})),spaceWidth:n?0:TU(" ",r).width}}catch(e){return null}};function qU(e){return"start"===e||"middle"===e||"end"===e||"inherit"===e}var GU=(e,t,n,r)=>e.reduce((e,o)=>{var{word:i,width:a}=o,s=e[e.length-1];if(s&&null!=a&&(null==t||r||s.width+a+n<Number(t)))s.words.push(i),s.width+=a+n;else{var l={words:[i],width:a};e.push(l)}return e},[]),XU=e=>e.reduce((e,t)=>e.width>t.width?e:t),ZU=(e,t,n,r,o,i,a,s)=>{var l=e.slice(0,t),c=YU({breakAll:n,style:r,children:l+"…"});if(!c)return[!1,[]];var u=GU(c.wordsWithComputedWidth,i,a,s);return[u.length>o||XU(u).width>Number(i),u]},JU=e=>[{words:Lw(e)?[]:e.toString().split(HU),width:void 0}],QU=e=>{var{width:t,scaleToFit:n,children:r,style:o,breakAll:i,maxLines:a}=e;if((t||n)&&!eC){var s=YU({breakAll:i,children:r,style:o});if(!s)return JU(r);var{wordsWithComputedWidth:l,spaceWidth:c}=s;return((e,t,n,r,o)=>{var{maxLines:i,children:a,style:s,breakAll:l}=e,c=Tw(i),u=String(a),d=GU(t,r,n,o);if(!c||o)return d;if(!(d.length>i||XU(d).width>Number(r)))return d;for(var f,p=0,h=u.length-1,m=0;p<=h&&m<=u.length-1;){var v=Math.floor((p+h)/2),y=v-1,[g,b]=ZU(u,y,l,s,i,r,n,o),[x]=ZU(u,v,l,s,i,r,n,o);if(g||x||(p=v+1),g&&x&&(h=v-1),!g&&x){f=b;break}m++}return f||d})({breakAll:i,children:r,maxLines:a,style:o},l,c,t,Boolean(n))}return JU(r)},eW="#808080",tW={angle:0,breakAll:!1,capHeight:"0.71em",fill:eW,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},nW=e.forwardRef((t,n)=>{var o=eE(t,tW),{x:i,y:a,lineHeight:s,capHeight:l,fill:c,scaleToFit:u,textAnchor:d,verticalAnchor:f}=o,p=KU(o,$U),h=e.useMemo(()=>QU({breakAll:p.breakAll,children:p.children,maxLines:p.maxLines,scaleToFit:u,style:p.style,width:p.width}),[p.breakAll,p.children,p.maxLines,u,p.style,p.width]),{dx:m,dy:v,angle:y,className:g,breakAll:b}=p,x=KU(p,UU);if(!Cw(i)||!Cw(a)||0===h.length)return null;var w,E=Number(i)+(Tw(m)?m:0),O=Number(a)+(Tw(v)?v:0);if(!nA(E)||!nA(O))return null;switch(f){case"start":w=FU("calc(".concat(l,")"));break;case"middle":w=FU("calc(".concat((h.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:w=FU("calc(".concat(h.length-1," * -").concat(s,")"))}var S=[],k=h[0];if(u&&null!=k){var P=k.width,{width:A}=p;S.push("scale(".concat(Tw(A)&&Tw(P)?A/P:1,")"))}return y&&S.push("rotate(".concat(y,", ").concat(E,", ").concat(O,")")),S.length&&(x.transform=S.join(" ")),r.createElement("text",WU({},Wb(x),{ref:n,x:E,y:O,className:Y("recharts-text",g),textAnchor:d,fill:c.includes("url")?eW:c}),h.map((e,t)=>{var n=e.words.join(b?"":" ");return r.createElement("tspan",{x:E,dy:0===t?w:s,key:"".concat(n,"-").concat(t)},n)}))});function rW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function oW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rW(Object(n),!0).forEach(function(t){iW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function iW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}nW.displayName="Text";var aW=["labelRef"],sW=["content"];function lW(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function cW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uW(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cW(Object(n),!0).forEach(function(t){dW(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cW(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dW(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fW(){return fW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fW.apply(null,arguments)}var pW=e.createContext(null),hW=t=>{var{x:n,y:o,upperWidth:i,lowerWidth:a,width:s,height:l,children:c}=t,u=e.useMemo(()=>({x:n,y:o,upperWidth:i,lowerWidth:a,width:s,height:l}),[n,o,i,a,s,l]);return r.createElement(pW.Provider,{value:u},c)},mW=()=>{var t=e.useContext(pW),n=vj();return t||(n?mj(n):void 0)},vW=e.createContext(null),yW=e=>null!=e&&"function"==typeof e,gW=(e,t,n,o,i)=>{var a,s,{offset:l,className:c}=e,{cx:u,cy:d,innerRadius:f,outerRadius:p,startAngle:h,endAngle:m,clockWise:v}=i,y=(f+p)/2,g=((e,t)=>Pw(t-e)*Math.min(Math.abs(t-e),360))(h,m),b=g>=0?1:-1;switch(t){case"insideStart":a=h+b*l,s=v;break;case"insideEnd":a=m-b*l,s=!v;break;case"end":a=m+b*l,s=v;break;default:throw new Error("Unsupported position ".concat(t))}s=g<=0?s:!s;var x=_M(u,d,y,a),w=_M(u,d,y,a+359*(s?1:-1)),E="M".concat(x.x,",").concat(x.y,"\n A").concat(y,",").concat(y,",0,1,").concat(s?0:1,",\n ").concat(w.x,",").concat(w.y),O=Lw(e.id)?Nw("recharts-radial-line-"):e.id;return r.createElement("text",fW({},o,{dominantBaseline:"central",className:Y("recharts-radial-bar-label",c)}),r.createElement("defs",null,r.createElement("path",{id:O,d:E})),r.createElement("textPath",{xlinkHref:"#".concat(O)},n))},bW=e=>null!=e&&"cx"in e&&Tw(e.cx),xW={angle:0,offset:5,zIndex:sI.label,position:"middle",textBreakAll:!1};function wW(t){var n,o,i,a,s,l=eE(t,xW),{viewBox:c,parentViewBox:u,position:d,value:f,children:p,content:h,className:m="",textBreakAll:v,labelRef:y}=l,g=(n=e.useContext(vW),o=FO(OI),n||o),b=mW(),x=function(e){if(!bW(e))return e;var{cx:t,cy:n,outerRadius:r}=e,o=2*r;return{x:t-r,y:n-r,width:o,upperWidth:o,lowerWidth:o,height:o}}(i=null==c?"center"===d?b:null!=g?g:b:bW(c)?c:mj(c));if(!i||Lw(f)&&Lw(p)&&!e.isValidElement(h)&&"function"!=typeof h)return null;var w=uW(uW({},l),{},{viewBox:i});if(e.isValidElement(h)){var{labelRef:E}=w,O=lW(w,aW);return e.cloneElement(h,O)}if("function"==typeof h){var{content:S}=w,k=lW(w,sW);if(a=e.createElement(h,k),e.isValidElement(a))return a}else a=(e=>{var{value:t,formatter:n}=e,r=Lw(e.children)?t:e.children;return"function"==typeof n?n(r):r})(l);var P=Wb(l);if(bW(i)){if("insideStart"===d||"insideEnd"===d||"end"===d)return gW(l,d,a,P,i);s=((e,t,n)=>{var{cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if("outside"===n){var{x:u,y:d}=_M(r,o,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if("center"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===n)return{x:r,y:o,textAnchor:"middle",verticalAnchor:"end"};var f=(i+a)/2,{x:p,y:h}=_M(r,o,f,c);return{x:p,y:h,textAnchor:"middle",verticalAnchor:"middle"}})(i,l.offset,l.position)}else{if(!x)return null;var A=(e=>{var{viewBox:t,position:n,offset:r=0,parentViewBox:o}=e,{x:i,y:a,height:s,upperWidth:l,lowerWidth:c}=mj(t),u=i,d=i+(l-c)/2,f=(u+d)/2,p=(l+c)/2,h=u+l/2,m=s>=0?1:-1,v=m*r,y=m>0?"end":"start",g=m>0?"start":"end",b=l>=0?1:-1,x=b*r,w=b>0?"end":"start",E=b>0?"start":"end",O=o;if("top"===n){var S={x:u+l/2,y:a-v,horizontalAnchor:"middle",verticalAnchor:y};return O&&(S.height=Math.max(a-O.y,0),S.width=l),S}if("bottom"===n){var k={x:d+c/2,y:a+s+v,horizontalAnchor:"middle",verticalAnchor:g};return O&&(k.height=Math.max(O.y+O.height-(a+s),0),k.width=c),k}if("left"===n){var P={x:f-x,y:a+s/2,horizontalAnchor:w,verticalAnchor:"middle"};return O&&(P.width=Math.max(P.x-O.x,0),P.height=s),P}if("right"===n){var A={x:f+p+x,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"};return O&&(A.width=Math.max(O.x+O.width-A.x,0),A.height=s),A}var j=O?{width:p,height:s}:{};return"insideLeft"===n?oW({x:f+x,y:a+s/2,horizontalAnchor:E,verticalAnchor:"middle"},j):"insideRight"===n?oW({x:f+p-x,y:a+s/2,horizontalAnchor:w,verticalAnchor:"middle"},j):"insideTop"===n?oW({x:u+l/2,y:a+v,horizontalAnchor:"middle",verticalAnchor:g},j):"insideBottom"===n?oW({x:d+c/2,y:a+s-v,horizontalAnchor:"middle",verticalAnchor:y},j):"insideTopLeft"===n?oW({x:u+x,y:a+v,horizontalAnchor:E,verticalAnchor:g},j):"insideTopRight"===n?oW({x:u+l-x,y:a+v,horizontalAnchor:w,verticalAnchor:g},j):"insideBottomLeft"===n?oW({x:d+x,y:a+s-v,horizontalAnchor:E,verticalAnchor:y},j):"insideBottomRight"===n?oW({x:d+c-x,y:a+s-v,horizontalAnchor:w,verticalAnchor:y},j):n&&"object"==typeof n&&(Tw(n.x)||jw(n.x))&&(Tw(n.y)||jw(n.y))?oW({x:i+Iw(n.x,p),y:a+Iw(n.y,s),horizontalAnchor:"end",verticalAnchor:"end"},j):oW({x:h,y:a+s/2,horizontalAnchor:"middle",verticalAnchor:"middle"},j)})({viewBox:x,position:d,offset:l.offset,parentViewBox:bW(u)?void 0:u});s=uW(uW({x:A.x,y:A.y,textAnchor:A.horizontalAnchor,verticalAnchor:A.verticalAnchor},void 0!==A.width?{width:A.width}:{}),void 0!==A.height?{height:A.height}:{})}return r.createElement(_$,{zIndex:l.zIndex},r.createElement(nW,fW({ref:y,className:Y("recharts-label",m)},P,s,{textAnchor:qU(P.textAnchor)?P.textAnchor:s.textAnchor,breakAll:v}),a))}wW.displayName="Label";function EW(t){var{label:n,labelRef:o}=t;return((t,n,o)=>{if(!t)return null;var i={viewBox:n,labelRef:o};return!0===t?r.createElement(wW,fW({key:"label-implicit"},i)):Cw(t)?r.createElement(wW,fW({key:"label-implicit",value:t},i)):e.isValidElement(t)?t.type===wW?e.cloneElement(t,uW({key:"label-implicit"},i)):r.createElement(wW,fW({key:"label-implicit",content:t},i)):yW(t)?r.createElement(wW,fW({key:"label-implicit",content:t},i)):t&&"object"==typeof t?r.createElement(wW,fW({},t,{key:"label-implicit"},i)):null})(n,mW(),o)||null}var OW=["valueAccessor"],SW=["dataKey","clockWise","id","textBreakAll","zIndex"];function kW(){return kW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kW.apply(null,arguments)}function PW(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var AW=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(function(e){return Lw(e)||"string"==typeof e||"number"==typeof e||"boolean"==typeof e}(t))return t},jW=e.createContext(void 0),TW=jW.Provider,CW=e.createContext(void 0);function MW(t){var{valueAccessor:n=AW}=t,o=PW(t,OW),{dataKey:i,clockWise:a,id:s,textBreakAll:l,zIndex:c}=o,u=PW(o,SW),d=e.useContext(jW),f=e.useContext(CW),p=d||f;return p&&p.length?r.createElement(_$,{zIndex:null!=c?c:sI.label},r.createElement(Xb,{className:"recharts-label-list"},p.map((e,t)=>{var a,c=Lw(i)?n(e,t):sA(e.payload,i),d=Lw(s)?{}:{id:"".concat(s,"-").concat(t)};return r.createElement(wW,kW({key:"label-".concat(t)},Wb(e),u,d,{fill:null!==(a=o.fill)&&void 0!==a?a:e.fill,parentViewBox:e.parentViewBox,value:c,textBreakAll:l,viewBox:e.viewBox,index:t,zIndex:0}))}))):null}function NW(e){var{label:t}=e;return t?!0===t?r.createElement(MW,{key:"labelList-implicit"}):r.isValidElement(t)||yW(t)?r.createElement(MW,{key:"labelList-implicit",content:t}):"object"==typeof t?r.createElement(MW,kW({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function IW(){return IW=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IW.apply(null,arguments)}CW.Provider,MW.displayName="LabelList";var DW=e=>{var{cx:t,cy:n,r:o,className:i}=e,a=Y("recharts-dot",i);return Tw(t)&&Tw(n)&&Tw(o)?r.createElement("circle",IW({},$b(e),Xw(e),{className:a,cx:t,cy:n,r:o})):null},_W=mP({name:"polarAxis",initialState:{radiusAxis:{},angleAxis:{}},reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:RW,removeRadiusAxis:LW,addAngleAxis:zW,removeAngleAxis:VW}=_W.actions,BW=_W.reducer;var FW,$W={exports:{}},UW={};function WW(){if(FW)return UW;FW=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var h=p.$$typeof;switch(h){case e:switch(p=p.type){case n:case o:case r:case l:case c:case f:return p;default:switch(p=p&&p.$$typeof){case a:case s:case d:case u:case i:return p;default:return h}}case t:return h}}}return UW.ContextConsumer=i,UW.ContextProvider=a,UW.Element=e,UW.ForwardRef=s,UW.Fragment=n,UW.Lazy=d,UW.Memo=u,UW.Portal=t,UW.Profiler=o,UW.StrictMode=r,UW.Suspense=l,UW.SuspenseList=c,UW.isContextConsumer=function(e){return h(e)===i},UW.isContextProvider=function(e){return h(e)===a},UW.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},UW.isForwardRef=function(e){return h(e)===s},UW.isFragment=function(e){return h(e)===n},UW.isLazy=function(e){return h(e)===d},UW.isMemo=function(e){return h(e)===u},UW.isPortal=function(e){return h(e)===t},UW.isProfiler=function(e){return h(e)===o},UW.isStrictMode=function(e){return h(e)===r},UW.isSuspense=function(e){return h(e)===l},UW.isSuspenseList=function(e){return h(e)===c},UW.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},UW.typeOf=h,UW}var KW,HW,YW={};
|
|
67
|
+
/**
|
|
68
|
+
* @license React
|
|
69
|
+
* react-is.development.js
|
|
70
|
+
*
|
|
71
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the MIT license found in the
|
|
74
|
+
* LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/function qW(){return KW||(KW=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case i:case o:case c:case u:case p:return e;default:switch(e=e&&e.$$typeof){case s:case l:case f:case d:case a:return e;default:return h}}case n:return h}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");YW.ContextConsumer=a,YW.ContextProvider=s,YW.Element=t,YW.ForwardRef=l,YW.Fragment=r,YW.Lazy=f,YW.Memo=d,YW.Portal=n,YW.Profiler=i,YW.StrictMode=o,YW.Suspense=c,YW.SuspenseList=u,YW.isContextConsumer=function(t){return e(t)===a},YW.isContextProvider=function(t){return e(t)===s},YW.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},YW.isForwardRef=function(t){return e(t)===l},YW.isFragment=function(t){return e(t)===r},YW.isLazy=function(t){return e(t)===f},YW.isMemo=function(t){return e(t)===d},YW.isPortal=function(t){return e(t)===n},YW.isProfiler=function(t){return e(t)===i},YW.isStrictMode=function(t){return e(t)===o},YW.isSuspense=function(t){return e(t)===c},YW.isSuspenseList=function(t){return e(t)===u},YW.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===o||e===c||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===h||void 0!==e.getModuleId)},YW.typeOf=e}()),YW}function GW(){return HW||(HW=1,"production"===process.env.NODE_ENV?$W.exports=WW():$W.exports=qW()),$W.exports}var XW=GW(),ZW=e=>"string"==typeof e?e:e?e.displayName||e.name||"Component":"",JW=null,QW=null,eK=t=>{if(t===JW&&Array.isArray(QW))return QW;var n=[];return e.Children.forEach(t,e=>{Lw(e)||(XW.isFragment(e)?n=n.concat(eK(e.props.children)):n.push(e))}),QW=n,JW=t,n};function tK(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(e=>ZW(e)):[ZW(t)],eK(e).forEach(e=>{var t=Ow(e,"type.displayName")||Ow(e,"type.name");t&&-1!==r.indexOf(t)&&n.push(e)}),n}var nK,rK,oK,iK=e=>!e||"object"!=typeof e||!("clipDot"in e)||Boolean(e.clipDot),aK={};function sK(){return nK||(nK=1,e=aK,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),e.isPlainObject=function(e){if("object"!=typeof e)return!1;if(null==e)return!1;if(null===Object.getPrototypeOf(e))return!0;if("[object Object]"!==Object.prototype.toString.call(e)){const t=e[Symbol.toStringTag];return null!=t&&(!!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable&&e.toString()===`[object ${t}]`)}let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}),aK;var e}function lK(){return oK?rK:(oK=1,rK=sK().isPlainObject)}var cK,uK,dK,fK,pK,hK=i(lK());function mK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mK(Object(n),!0).forEach(function(t){yK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gK(){return gK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gK.apply(null,arguments)}function bK(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var xK=(e,t,n,r,o)=>{var i,a=n-r;return i=kw(cK||(cK=bK(["M ",",",""])),e,t),i+=kw(uK||(uK=bK(["L ",",",""])),e+n,t),i+=kw(dK||(dK=bK(["L ",",",""])),e+n-a/2,t+o),i+=kw(fK||(fK=bK(["L ",",",""])),e+n-a/2-r,t+o),i+=kw(pK||(pK=bK(["L ",","," Z"])),e,t)},wK={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},EK=t=>{var n=eE(t,wK),{x:o,y:i,upperWidth:a,lowerWidth:s,height:l,className:c}=n,{animationEasing:u,animationDuration:d,animationBegin:f,isUpdateAnimationActive:p}=n,h=e.useRef(null),[m,v]=e.useState(-1),y=e.useRef(a),g=e.useRef(s),b=e.useRef(l),x=e.useRef(o),w=e.useRef(i),E=tM(t,"trapezoid-");if(e.useEffect(()=>{if(h.current&&h.current.getTotalLength)try{var e=h.current.getTotalLength();e&&v(e)}catch(e){}},[]),o!==+o||i!==+i||a!==+a||s!==+s||l!==+l||0===a&&0===s||0===l)return null;var O=Y("recharts-trapezoid",c);if(!p)return r.createElement("g",null,r.createElement("path",gK({},Wb(n),{className:O,d:xK(o,i,a,s,l)})));var S=y.current,k=g.current,P=b.current,A=x.current,j=w.current,T="0px ".concat(-1===m?1:m,"px"),C="".concat(m,"px ").concat(m,"px"),M=CC(["strokeDasharray"],d,u);return r.createElement(eM,{animationId:E,key:E,canBegin:m>0,duration:d,easing:u,isActive:p,begin:f},e=>{var t=_w(S,a,e),c=_w(k,s,e),u=_w(P,l,e),d=_w(A,o,e),f=_w(j,i,e);h.current&&(y.current=t,g.current=c,b.current=u,x.current=d,w.current=f);var p=e>0?{transition:M,strokeDasharray:C}:{strokeDasharray:T};return r.createElement("path",gK({},Wb(n),{className:O,d:xK(d,f,t,c,u),ref:h,style:vK(vK({},p),n.style)}))})},OK=["option","shapeType","activeClassName","inActiveClassName"];function SK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SK(Object(n),!0).forEach(function(t){PK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AK(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return r.createElement(EM,n);case"trapezoid":return r.createElement(EK,n);case"sector":return r.createElement(KM,n);case"symbols":if(function(e){return"symbols"===e}(t))return r.createElement(qw,n);break;case"curve":return r.createElement(xC,n);default:return null}}function jK(t){var n,{option:o,shapeType:i,activeClassName:a="recharts-active-shape",inActiveClassName:s="recharts-shape"}=t,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,OK);if(e.isValidElement(o))n=e.cloneElement(o,kK(kK({},l),function(t){return e.isValidElement(t)?t.props:t}(o)));else if("function"==typeof o)n=o(l,l.index);else if(hK(o)&&"boolean"!=typeof o){var c=function(e,t){return kK(kK({},t),e)}(o,l);n=r.createElement(AK,{shapeType:i,elementProps:c})}else{var u=l;n=r.createElement(AK,{shapeType:i,elementProps:u})}return l.isActive?r.createElement(Xb,{className:a},n):r.createElement(Xb,{className:s},n)}var TK,CK=(e,t,n)=>{var r=LO();return(o,i)=>a=>{null==e||e(o,i,a),r(DB({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}},MK=e=>{var t=LO();return(n,r)=>o=>{null==e||e(n,r,o),t(_B())}},NK=(e,t,n)=>{var r=LO();return(o,i)=>a=>{null==e||e(o,i,a),r(LB({activeIndex:String(i),activeDataKey:t,activeCoordinate:o.tooltipPosition,activeGraphicalItemId:n}))}};function IK(t){var{tooltipEntrySettings:n}=t,r=LO(),o=FA(),i=e.useRef(null);return e.useLayoutEffect(()=>{o||(null===i.current?r(CB(n)):i.current!==n&&r(MB({prev:i.current,next:n})),i.current=n)},[n,r,o]),e.useLayoutEffect(()=>()=>{i.current&&(r(NB(i.current)),i.current=null)},[r]),null}function DK(t){var{legendPayload:n}=t,r=LO(),o=FA(),i=e.useRef(null);return e.useLayoutEffect(()=>{o||(null===i.current?r(xT(n)):i.current!==n&&r(wT({prev:i.current,next:n})),i.current=n)},[r,o,n]),e.useLayoutEffect(()=>()=>{i.current&&(r(ET(i.current)),i.current=null)},[r]),null}var _K=null!==(TK=r["useId".toString()])&&void 0!==TK?TK:()=>{var[e]=r.useState(()=>Nw("uid-"));return e};var RK=e.createContext(void 0),LK=e=>{var{id:t,type:n,children:o}=e,i=function(e,t){var n=_K();return t||(e?"".concat(e,"-").concat(n):n)}("recharts-".concat(n),t);return r.createElement(RK.Provider,{value:i},o(i))},zK=mP({name:"graphicalItems",initialState:{cartesianItems:[],polarItems:[]},reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:iP()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,o=_k(e).cartesianItems.indexOf(n);o>-1&&(e.cartesianItems[o]=r)},prepare:iP()},removeCartesianGraphicalItem:{reducer(e,t){var n=_k(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},prepare:iP()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:iP()},removePolarGraphicalItem:{reducer(e,t){var n=_k(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)},prepare:iP()},replacePolarGraphicalItem:{reducer(e,t){var{prev:n,next:r}=t.payload,o=_k(e).polarItems.indexOf(n);o>-1&&(e.polarItems[o]=r)},prepare:iP()}}}),{addCartesianGraphicalItem:VK,replaceCartesianGraphicalItem:BK,removeCartesianGraphicalItem:FK,addPolarGraphicalItem:$K,removePolarGraphicalItem:UK,replacePolarGraphicalItem:WK}=zK.actions,KK=zK.reducer,HK=t=>{var n=LO(),r=e.useRef(null);return e.useLayoutEffect(()=>{null===r.current?n(VK(t)):r.current!==t&&n(BK({prev:r.current,next:t})),r.current=t},[n,t]),e.useLayoutEffect(()=>()=>{r.current&&(n(FK(r.current)),r.current=null)},[n]),null},YK=e.memo(HK),qK=["points"];function GK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function XK(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?GK(Object(n),!0).forEach(function(t){ZK(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GK(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ZK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JK(){return JK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JK.apply(null,arguments)}function QK(t){var{option:n,dotProps:o,className:i}=t;if(e.isValidElement(n))return e.cloneElement(n,o);if("function"==typeof n)return n(o);var a=Y(i,"boolean"!=typeof n?n.className:""),s=null!=o?o:{},{points:l}=s,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(s,qK);return r.createElement(DW,JK({},c,{className:a}))}function eH(t){var{points:n,dot:o,className:i,dotClassName:a,dataKey:s,baseProps:l,needClip:c,clipPathId:u,zIndex:d=sI.scatter}=t;if(!function(e,t){return null!=e&&(!!t||1===e.length)}(n,o))return null;var f,p=iK(o),h=null==(f=o)?null:e.isValidElement(f)?Wb(f.props):"object"!=typeof f||Array.isArray(f)?null:Wb(f),m=n.map((e,t)=>{var i,c,u=XK(XK(XK({r:3},l),h),{},{index:t,cx:null!==(i=e.x)&&void 0!==i?i:void 0,cy:null!==(c=e.y)&&void 0!==c?c:void 0,dataKey:s,value:e.value,payload:e.payload,points:n});return r.createElement(QK,{key:"dot-".concat(t),option:o,dotProps:u,className:a})}),v={};return c&&null!=u&&(v.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(u,")")),r.createElement(_$,{zIndex:d},r.createElement(Xb,JK({className:i},v),m))}function tH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tH(Object(n),!0).forEach(function(t){rH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oH=mP({name:"cartesianAxis",initialState:{xAxis:{},yAxis:{},zAxis:{}},reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:iP()},replaceXAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.xAxis[n.id]&&(n.id!==r.id&&delete e.xAxis[n.id],e.xAxis[r.id]=r)},prepare:iP()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:iP()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:iP()},replaceYAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.yAxis[n.id]&&(n.id!==r.id&&delete e.yAxis[n.id],e.yAxis[r.id]=r)},prepare:iP()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:iP()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:iP()},replaceZAxis:{reducer(e,t){var{prev:n,next:r}=t.payload;void 0!==e.zAxis[n.id]&&(n.id!==r.id&&delete e.zAxis[n.id],e.zAxis[r.id]=r)},prepare:iP()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:iP()},updateYAxisWidth(e,t){var{id:n,width:r}=t.payload,o=e.yAxis[n];if(o){var i,a=o.widthHistory||[];if(3===a.length&&a[0]===a[2]&&r===a[1]&&r!==o.width&&Math.abs(r-(null!==(i=a[0])&&void 0!==i?i:0))<=1)return;var s=[...a,r].slice(-3);e.yAxis[n]=nH(nH({},o),{},{width:r,widthHistory:s})}}}}),{addXAxis:iH,replaceXAxis:aH,removeXAxis:sH,addYAxis:lH,replaceYAxis:cH,removeYAxis:uH,addZAxis:dH,replaceZAxis:fH,removeZAxis:pH,updateYAxisWidth:hH}=oH.actions,mH=oH.reducer,vH=za([LA],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),yH=za([vH,EA,OA],(e,t,n)=>{if(e&&null!=t&&null!=n)return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),gH=()=>FO(yH);function bH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bH(Object(n),!0).forEach(function(t){wH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function wH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var EH=t=>{var{point:n,childIndex:o,mainColor:i,activeDot:a,dataKey:s,clipPath:l}=t;if(!1===a||null==n.x||null==n.y)return null;var c,u=xH(xH(xH({},{index:o,dataKey:s,cx:n.x,cy:n.y,r:4,fill:null!=i?i:"none",strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value}),Ub(a)),Xw(a));return c=e.isValidElement(a)?e.cloneElement(a,u):"function"==typeof a?a(u):r.createElement(DW,u),r.createElement(Xb,{className:"recharts-active-dot",clipPath:l},c)};function OH(e){var{points:t,mainColor:n,activeDot:o,itemDataKey:i,clipPath:a,zIndex:s=sI.activeDot}=e,l=FO(WF),c=FO(QF);if(null==t||null==c)return null;var u=t.find(e=>c.includes(e.payload));return Lw(u)?null:r.createElement(_$,{zIndex:s},r.createElement(EH,{point:u,childIndex:Number(l),mainColor:n,dataKey:i,activeDot:o,clipPath:a}))}var SH=(e,t,n)=>{var r=null!=n?n:e;if(!Lw(r))return Iw(r,t,0)};function kH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function PH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kH(Object(n),!0).forEach(function(t){AH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function AH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jH=t=>{var{chartData:n}=t,r=LO(),o=FA();return e.useEffect(()=>o?()=>{}:(r(nU(n)),()=>{r(nU(void 0))}),[n,r,o]),null},TH={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},CH=mP({name:"brush",initialState:TH,reducers:{setBrushSettings:(e,t)=>null==t.payload?TH:t.payload}}),{setBrushSettings:MH}=CH.actions,NH=CH.reducer;var IH=mP({name:"referenceElements",initialState:{dots:[],areas:[],lines:[]},reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=_k(e).dots.findIndex(e=>e===t.payload);-1!==n&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=_k(e).areas.findIndex(e=>e===t.payload);-1!==n&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=_k(e).lines.findIndex(e=>e===t.payload);-1!==n&&e.lines.splice(n,1)}}}),{addDot:DH,removeDot:_H,addArea:RH,removeArea:LH,addLine:zH,removeLine:VH}=IH.actions,BH=IH.reducer,FH=e.createContext(void 0),$H=t=>{var{children:n}=t,[o]=e.useState("".concat(Nw("recharts"),"-clip")),i=gH();if(null==i)return null;var{x:a,y:s,width:l,height:c}=i;return r.createElement(FH.Provider,{value:o},r.createElement("defs",null,r.createElement("clipPath",{id:o},r.createElement("rect",{x:a,y:s,height:c,width:l}))),n)};function UH(e,t){if(t<1)return[];if(1===t)return e;for(var n=[],r=0;r<e.length;r+=t){var o=e[r];void 0!==o&&n.push(o)}return n}function WH(e,t,n){return function(e){var{width:t,height:n}=e,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,i=Math.atan(n/t),a=o>i&&o<Math.PI-i?n/Math.sin(o):t/Math.cos(o);return Math.abs(a)}({width:e.width+t.width,height:e.height+t.height},n)}function KH(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function HH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function YH(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?HH(Object(n),!0).forEach(function(t){qH(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HH(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function qH(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GH(e,t,n){var r,{tick:o,ticks:i,viewBox:a,minTickGap:s,orientation:l,interval:c,tickFormatter:u,unit:d,angle:f}=e;if(!i||!i.length||!o)return[];if(Tw(c)||eC)return null!==(r=function(e,t){return UH(e,t+1)}(i,Tw(c)?c:0))&&void 0!==r?r:[];var p=[],h="top"===l||"bottom"===l?"width":"height",m=d&&"width"===h?TU(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=(e,r)=>{var o="function"==typeof u?u(e.value,r):e.value;return"width"===h?WH(TU(o,{fontSize:t,letterSpacing:n}),m,f):TU(o,{fontSize:t,letterSpacing:n})[h]},y=i[0],g=i[1],b=i.length>=2&&null!=y&&null!=g?Pw(g.coordinate-y.coordinate):1,x=function(e,t,n){var r="width"===n,{x:o,y:i,width:a,height:s}=e;return 1===t?{start:r?o:i,end:r?o+a:i+s}:{start:r?o+a:i+s,end:r?o:i}}(a,b,h);return"equidistantPreserveStart"===c?function(e,t,n,r,o){for(var i,a=(r||[]).slice(),{start:s,end:l}=t,c=0,u=1,d=s,f=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:UH(r,u)};var i,a=c,f=()=>(void 0===i&&(i=n(t,a)),i),p=t.coordinate,h=0===c||KH(e,p,f,d,l);h||(c=0,d=s,u+=1),h&&(d=p+e*(f()/2+o),c+=u)};u<=a.length;)if(i=f())return i.v;return[]}(b,x,v,i,s):"equidistantPreserveEnd"===c?function(e,t,n,r,o){var i=(r||[]).slice().length;if(0===i)return[];for(var{start:a,end:s}=t,l=1;l<=i;l++){for(var c,u=(i-1)%l,d=a,f=!0,p=function(){var t=r[h];if(null==t)return 0;var i,a=h,l=()=>(void 0===i&&(i=n(t,a)),i),c=t.coordinate,p=h===u||KH(e,c,l,d,s);if(!p)return f=!1,1;p&&(d=c+e*(l()/2+o))},h=u;h<i&&(0===(c=p())||1!==c);h+=l);if(f){for(var m=[],v=u;v<i;v+=l){var y=r[v];null!=y&&m.push(y)}return m}}return[]}(b,x,v,i,s):(p="preserveStart"===c||"preserveStartEnd"===c?function(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(i){var u=r[s-1];if(null!=u){var d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=YH(YH({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),null!=u.tickCoord&&KH(e,u.tickCoord,()=>d,l,c)&&(c=u.tickCoord-e*(d/2+o),a[s-1]=YH(YH({},u),{},{isShow:!0}))}}for(var p=i?s-1:s,h=function(t){var r=a[t];if(null==r)return 1;var i,s=r,u=()=>(void 0===i&&(i=n(r,t)),i);if(0===t){var d=e*(s.coordinate-e*u()/2-l);a[t]=s=YH(YH({},s),{},{tickCoord:d<0?s.coordinate-d*e:s.coordinate})}else a[t]=s=YH(YH({},s),{},{tickCoord:s.coordinate});null!=s.tickCoord&&KH(e,s.tickCoord,u,l,c)&&(l=s.tickCoord+e*(u()/2+o),a[t]=YH(YH({},s),{},{isShow:!0}))},m=0;m<p;m++)h(m);return a}(b,x,v,i,s,"preserveStartEnd"===c):function(e,t,n,r,o){for(var i=(r||[]).slice(),a=i.length,{start:s}=t,{end:l}=t,c=function(t){var r=i[t];if(null==r)return 1;var c,u=r,d=()=>(void 0===c&&(c=n(r,t)),c);if(t===a-1){var f=e*(u.coordinate+e*d()/2-l);i[t]=u=YH(YH({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate})}else i[t]=u=YH(YH({},u),{},{tickCoord:u.coordinate});null!=u.tickCoord&&KH(e,u.tickCoord,d,s,l)&&(l=u.tickCoord-e*(d()/2+o),i[t]=YH(YH({},u),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}(b,x,v,i,s),p.filter(e=>e.isShow))}var XH=mP({name:"renderedTicks",initialState:{xAxis:{},yAxis:{}},reducers:{setRenderedTicks:(e,t)=>{var{axisType:n,axisId:r,ticks:o}=t.payload;e[n][r]=o},removeRenderedTicks:(e,t)=>{var{axisType:n,axisId:r}=t.payload;delete e[n][r]}}}),{setRenderedTicks:ZH,removeRenderedTicks:JH}=XH.actions,QH=XH.reducer,eY=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function tY(){return tY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tY.apply(null,arguments)}function nY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nY(Object(n),!0).forEach(function(t){oY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var iY={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:sI.axis};function aY(e){var{x:t,y:n,width:o,height:i,orientation:a,mirror:s,axisLine:l,otherSvgProps:c}=e;if(!l)return null;var u=rY(rY(rY({},c),$b(l)),{},{fill:"none"});if("top"===a||"bottom"===a){var d=+("top"===a&&!s||"bottom"===a&&s);u=rY(rY({},u),{},{x1:t,y1:n+d*i,x2:t+o,y2:n+d*i})}else{var f=+("left"===a&&!s||"right"===a&&s);u=rY(rY({},u),{},{x1:t+f*o,y1:n,x2:t+f*o,y2:n+i})}return r.createElement("line",tY({},u,{className:Y("recharts-cartesian-axis-line",Ow(l,"className"))}))}function sY(e){var t,n,{option:o,tickProps:i,value:a}=e,s=Y(i.className,"recharts-cartesian-axis-tick-value");if(r.isValidElement(o))t=r.cloneElement(o,rY(rY({},i),{},{className:s}));else if("function"==typeof o)t=o(rY(rY({},i),{},{className:s}));else{var l="recharts-cartesian-axis-tick-value";"boolean"!=typeof o&&(l=Y(l,(n=o)&&"object"==typeof n&&"className"in n&&"string"==typeof n.className?n.className:"")),t=r.createElement(nW,tY({},i,{className:l}),a)}return t}function lY(t){var{ticks:n,axisType:r,axisId:o}=t,i=LO();return e.useEffect(()=>{if(null==o||null==r)return Bw;var e=n.map(e=>({value:e.value,coordinate:e.coordinate,offset:e.offset,index:e.index}));return i(ZH({ticks:e,axisId:o,axisType:r})),()=>{i(JH({axisId:o,axisType:r}))}},[i,n,o,r]),null}var cY=e.forwardRef((e,t)=>{var{ticks:n=[],tick:o,tickLine:i,stroke:a,tickFormatter:s,unit:l,padding:c,tickTextProps:u,orientation:d,mirror:f,x:p,y:h,width:m,height:v,tickSize:y,tickMargin:g,fontSize:b,letterSpacing:x,getTicksConfig:w,events:E,axisType:O,axisId:S}=e,k=GH(rY(rY({},w),{},{ticks:n}),b,x),P=$b(w),A=Ub(o),j=qU(P.textAnchor)?P.textAnchor:function(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}(d,f),T=function(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}(d,f),C={};"object"==typeof i&&(C=i);var M=rY(rY({},P),{},{fill:"none"},C),N=k.map(e=>rY({entry:e},function(e,t,n,r,o,i,a,s,l){var c,u,d,f,p,h,m=s?-1:1,v=e.tickSize||a,y=Tw(e.tickCoord)?e.tickCoord:e.coordinate;switch(i){case"top":c=u=e.coordinate,h=(d=(f=n+ +!s*o)-m*v)-m*l,p=y;break;case"left":d=f=e.coordinate,p=(c=(u=t+ +!s*r)-m*v)-m*l,h=y;break;case"right":d=f=e.coordinate,p=(c=(u=t+ +s*r)+m*v)+m*l,h=y;break;default:c=u=e.coordinate,h=(d=(f=n+ +s*o)+m*v)+m*l,p=y}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:h}}}(e,p,h,m,v,d,y,f,g))),I=N.map(e=>{var{entry:t,line:n}=e;return r.createElement(Xb,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(t.value,"-").concat(t.coordinate,"-").concat(t.tickCoord)},i&&r.createElement("line",tY({},M,n,{className:Y("recharts-cartesian-axis-tick-line",Ow(i,"className"))})))}),D=N.map((e,t)=>{var n,i,{entry:d,tick:f}=e,p=rY(rY(rY(rY({verticalAnchor:T},P),{},{textAnchor:j,stroke:"none",fill:a},f),{},{index:t,payload:d,visibleTicksCount:k.length,tickFormatter:s,padding:c},u),{},{angle:null!==(n=null!==(i=null==u?void 0:u.angle)&&void 0!==i?i:P.angle)&&void 0!==n?n:0}),h=rY(rY({},p),A);return r.createElement(Xb,tY({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(d.value,"-").concat(d.coordinate,"-").concat(d.tickCoord)},Zw(E,d,t)),o&&r.createElement(sY,{option:o,tickProps:h,value:"".concat("function"==typeof s?s(d.value,t):d.value).concat(l||"")}))});return r.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(O,"-ticks")},r.createElement(lY,{ticks:k,axisId:S,axisType:O}),D.length>0&&r.createElement(_$,{zIndex:sI.label},r.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(O,"-tick-labels"),ref:t},D)),I.length>0&&r.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(O,"-tick-lines")},I))}),uY=e.forwardRef((t,n)=>{var{axisLine:o,width:i,height:a,className:s,hide:l,ticks:c,axisType:u,axisId:d}=t,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,eY),[p,h]=e.useState(""),[m,v]=e.useState(""),y=e.useRef(null);e.useImperativeHandle(n,()=>({getCalculatedWidth:()=>{var e;return(e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:o=0,tickMargin:i=0}=e,a=0;if(t){Array.from(t).forEach(e=>{if(e){var t=e.getBoundingClientRect();t.width>a&&(a=t.width)}});var s=n?n.getBoundingClientRect().width:0,l=a+(o+i)+s+(n?r:0);return Math.round(l)}return 0})({ticks:y.current,label:null===(e=t.labelRef)||void 0===e?void 0:e.current,labelGapWithTick:5,tickSize:t.tickSize,tickMargin:t.tickMargin})}}));var g=e.useCallback(e=>{if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value");y.current=t;var n=t[0];if(n){var r=window.getComputedStyle(n),o=r.fontSize,i=r.letterSpacing;o===p&&i===m||(h(o),v(i))}}},[p,m]);return l||null!=i&&i<=0||null!=a&&a<=0?null:r.createElement(_$,{zIndex:t.zIndex},r.createElement(Xb,{className:Y("recharts-cartesian-axis",s)},r.createElement(aY,{x:t.x,y:t.y,width:i,height:a,orientation:t.orientation,mirror:t.mirror,axisLine:o,otherSvgProps:$b(t)}),r.createElement(cY,{ref:g,axisType:u,events:f,fontSize:p,getTicksConfig:t,height:t.height,letterSpacing:m,mirror:t.mirror,orientation:t.orientation,padding:t.padding,stroke:t.stroke,tick:t.tick,tickFormatter:t.tickFormatter,tickLine:t.tickLine,tickMargin:t.tickMargin,tickSize:t.tickSize,tickTextProps:t.tickTextProps,ticks:c,unit:t.unit,width:t.width,x:t.x,y:t.y,axisId:d}),r.createElement(hW,{x:t.x,y:t.y,width:t.width,height:t.height,lowerWidth:t.width,upperWidth:t.width},r.createElement(EW,{label:t.label,labelRef:t.labelRef}),t.children)))}),dY=r.forwardRef((e,t)=>{var n=eE(e,iY);return r.createElement(uY,tY({},n,{ref:t}))});dY.displayName="CartesianAxis";var fY=["x1","y1","x2","y2","key"],pY=["offset"],hY=["xAxisId","yAxisId"],mY=["xAxisId","yAxisId"];function vY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function yY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vY(Object(n),!0).forEach(function(t){gY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function gY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bY(){return bY=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bY.apply(null,arguments)}function xY(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var wY=e=>{var{fill:t}=e;if(!t||"none"===t)return null;var{fillOpacity:n,x:o,y:i,width:a,height:s,ry:l}=e;return r.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function EY(e){var t,{option:n,lineItemProps:o}=e;if(r.isValidElement(n))t=r.cloneElement(n,o);else if("function"==typeof n)t=n(o);else{var i,{x1:a,y1:s,x2:l,y2:c,key:u}=o,d=null!==(i=$b(xY(o,fY)))&&void 0!==i?i:{},{offset:f}=d,p=xY(d,pY);t=r.createElement("line",bY({},p,{x1:a,y1:s,x2:l,y2:c,fill:"none",key:u}))}return t}function OY(e){var{x:t,width:n,horizontal:o=!0,horizontalPoints:i}=e;if(!o||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,l=xY(e,hY),c=i.map((e,i)=>{var a=yY(yY({},l),{},{x1:t,y1:e,x2:t+n,y2:e,key:"line-".concat(i),index:i});return r.createElement(EY,{key:"line-".concat(i),option:o,lineItemProps:a})});return r.createElement("g",{className:"recharts-cartesian-grid-horizontal"},c)}function SY(e){var{y:t,height:n,vertical:o=!0,verticalPoints:i}=e;if(!o||!i||!i.length)return null;var{xAxisId:a,yAxisId:s}=e,l=xY(e,mY),c=i.map((e,i)=>{var a=yY(yY({},l),{},{x1:e,y1:t,x2:e,y2:t+n,key:"line-".concat(i),index:i});return r.createElement(EY,{option:o,lineItemProps:a,key:"line-".concat(i)})});return r.createElement("g",{className:"recharts-cartesian-grid-vertical"},c)}function kY(e){var{horizontalFill:t,fillOpacity:n,x:o,y:i,width:a,height:s,horizontalPoints:l,horizontal:c=!0}=e;if(!c||!t||!t.length||null==l)return null;var u=l.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==u[0]&&u.unshift(0);var d=u.map((e,l)=>{var c=u[l+1],d=null==c?i+s-e:c-e;if(d<=0)return null;var f=l%t.length;return r.createElement("rect",{key:"react-".concat(l),y:e,x:o,height:d,width:a,stroke:"none",fill:t[f],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return r.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function PY(e){var{vertical:t=!0,verticalFill:n,fillOpacity:o,x:i,y:a,width:s,height:l,verticalPoints:c}=e;if(!t||!n||!n.length)return null;var u=c.map(e=>Math.round(e+i-i)).sort((e,t)=>e-t);i!==u[0]&&u.unshift(0);var d=u.map((e,t)=>{var c=u[t+1],d=null==c?i+s-e:c-e;if(d<=0)return null;var f=t%n.length;return r.createElement("rect",{key:"react-".concat(t),x:e,y:a,width:d,height:l,stroke:"none",fill:n[f],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return r.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var AY=(e,t)=>{var{xAxis:n,width:r,height:o,offset:i}=e;return cA(GH(yY(yY(yY({},iY),n),{},{ticks:uA(n),viewBox:{x:0,y:0,width:r,height:o}})),i.left,i.left+i.width,t)},jY=(e,t)=>{var{yAxis:n,width:r,height:o,offset:i}=e;return cA(GH(yY(yY(yY({},iY),n),{},{ticks:uA(n),viewBox:{x:0,y:0,width:r,height:o}})),i.top,i.top+i.height,t)},TY={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:sI.grid};function CY(e){var t=bj(),n=xj(),o=gj(),i=yY(yY({},eE(e,TY)),{},{x:Tw(e.x)?e.x:o.left,y:Tw(e.y)?e.y:o.top,width:Tw(e.width)?e.width:o.width,height:Tw(e.height)?e.height:o.height}),{xAxisId:a,yAxisId:s,x:l,y:c,width:u,height:d,syncWithTicks:f,horizontalValues:p,verticalValues:h}=i,m=FA(),v=FO(e=>mB(e,"xAxis",a,m)),y=FO(e=>mB(e,"yAxis",s,m));if(!(rA(u)&&rA(d)&&Tw(l)&&Tw(c)))return null;var g=i.verticalCoordinatesGenerator||AY,b=i.horizontalCoordinatesGenerator||jY,{horizontalPoints:x,verticalPoints:w}=i;if(!(x&&x.length||"function"!=typeof b)){var E=p&&p.length,O=b({yAxis:y?yY(yY({},y),{},{ticks:E?p:y.ticks}):void 0,width:null!=t?t:u,height:null!=n?n:d,offset:o},!!E||f);JA(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(x=O)}if(!(w&&w.length||"function"!=typeof g)){var S=h&&h.length,k=g({xAxis:v?yY(yY({},v),{},{ticks:S?h:v.ticks}):void 0,width:null!=t?t:u,height:null!=n?n:d,offset:o},!!S||f);JA(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(w=k)}return r.createElement(_$,{zIndex:i.zIndex},r.createElement("g",{className:"recharts-cartesian-grid"},r.createElement(wY,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),r.createElement(kY,bY({},i,{horizontalPoints:x})),r.createElement(PY,bY({},i,{verticalPoints:w})),r.createElement(OY,bY({},i,{offset:o,horizontalPoints:x,xAxis:v,yAxis:y})),r.createElement(SY,bY({},i,{offset:o,verticalPoints:w,xAxis:v,yAxis:y}))))}CY.displayName="CartesianGrid";var MY=mP({name:"errorBars",initialState:{},reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:o}=t.payload;e[n]&&(e[n]=e[n].map(e=>e.dataKey===r.dataKey&&e.direction===r.direction?o:e))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(e=>e.dataKey!==r.dataKey||e.direction!==r.direction))}}}),{addErrorBar:NY,replaceErrorBar:IY,removeErrorBar:DY}=MY.actions,_Y=MY.reducer,RY=["children"];var LY={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},zY=e.createContext(LY);function VY(e){var{children:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,RY);return r.createElement(zY.Provider,{value:n},t)}function BY(e,t){var n,r,o=FO(t=>kz(t,e)),i=FO(e=>jz(e,t)),a=null!==(n=null==o?void 0:o.allowDataOverflow)&&void 0!==n?n:Oz.allowDataOverflow,s=null!==(r=null==i?void 0:i.allowDataOverflow)&&void 0!==r?r:Pz.allowDataOverflow;return{needClip:a||s,needClipX:a,needClipY:s}}function FY(e){var{xAxisId:t,yAxisId:n,clipPathId:o}=e,i=gH(),{needClipX:a,needClipY:s,needClip:l}=BY(t,n);if(!l||!i)return null;var{x:c,y:u,width:d,height:f}=i;return r.createElement("clipPath",{id:"clipPath-".concat(o)},r.createElement("rect",{x:a?c:c-d/2,y:s?u:u-f/2,width:a?d:2*d,height:s?f:2*f}))}var $Y=(e,t,n,r)=>gB(e,"xAxis",t,r),UY=(e,t,n,r)=>yB(e,"xAxis",t,r),WY=(e,t,n,r)=>gB(e,"yAxis",n,r),KY=(e,t,n,r)=>yB(e,"yAxis",n,r),HY=za([wj,$Y,WY,UY,KY],(e,t,n,r,o)=>lA(e,"xAxis")?bA(t,r,!1):bA(n,o,!1));function YY(e){return"line"===e.type}var qY=za([_z,(e,t,n,r,o)=>o],(e,t)=>e.filter(YY).find(e=>e.id===t)),GY=za([wj,$Y,WY,UY,KY,qY,HY,lN],(e,t,n,r,o,i,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(null!=i&&null!=t&&null!=n&&null!=r&&null!=o&&0!==r.length&&0!==o.length&&null!=a&&("horizontal"===e||"vertical"===e)){var d,{dataKey:f,data:p}=i;if(null!=(d=null!=p&&p.length>0?p:null==l?void 0:l.slice(c,u+1)))return function(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:o,yAxisTicks:i,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((e,l)=>{var c=sA(e,a);if("horizontal"===t){var u=hA({axis:n,ticks:o,bandSize:s,entry:e,index:l}),d=Lw(c)?null:r.scale.map(c);return{x:u,y:null!=d?d:null,value:c,payload:e}}var f=Lw(c)?null:n.scale.map(c),p=hA({axis:r,ticks:i,bandSize:s,entry:e,index:l});return null==f||null==p?null:{x:f,y:p,value:c,payload:e}}).filter(Boolean)}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:o,dataKey:f,bandSize:a,displayedData:d})}});function XY(e){var t=Ub(e);if(null!=t){var{r:n,strokeWidth:r}=t,o=Number(n),i=Number(r);return(Number.isNaN(o)||o<0)&&(o=3),(Number.isNaN(i)||i<0)&&(i=2),{r:o,strokeWidth:i}}return{r:3,strokeWidth:2}}var ZY=["id"],JY=["type","layout","connectNulls","needClip","shape"],QY=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function eq(){return eq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eq.apply(null,arguments)}function tq(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function nq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tq(Object(n),!0).forEach(function(t){rq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tq(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oq(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var iq=e=>{var{dataKey:t,name:n,stroke:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:wA(n,t),payload:e}]},aq=r.memo(e=>{var{dataKey:t,data:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:n,getPosition:Bw,settings:{stroke:o,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:wA(s,t),hide:l,type:u,color:o,unit:c,graphicalItemId:d}};return r.createElement(IK,{tooltipEntrySettings:f})}),sq=(e,t)=>"".concat(t,"px ").concat(e,"px");function lq(e,t){for(var n=e.length%2!=0?[...e,0]:e,r=[],o=0;o<t;++o)r.push(...n);return r}function cq(e){var{clipPathId:t,points:n,props:o}=e,{dot:i,dataKey:a,needClip:s}=o,{id:l}=o,c=$b(oq(o,ZY));return r.createElement(eH,{points:n,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:c,needClip:s,clipPathId:t})}function uq(t){var{showLabels:n,children:o,points:i}=t,a=e.useMemo(()=>null==i?void 0:i.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return nq(nq({},r),{},{value:e.value,payload:e.payload,viewBox:r,parentViewBox:void 0,fill:void 0})}),[i]);return r.createElement(TW,{value:n?a:void 0},o)}function dq(e){var{clipPathId:t,pathRef:n,points:o,strokeDasharray:i,props:a}=e,{type:s,layout:l,connectNulls:c,needClip:u,shape:d}=a,f=nq(nq({},Wb(oq(a,JY))),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(t,")"):void 0,points:o,type:s,layout:l,connectNulls:c,strokeDasharray:null!=i?i:a.strokeDasharray});return r.createElement(r.Fragment,null,(null==o?void 0:o.length)>1&&r.createElement(jK,eq({shapeType:"curve",option:d},f,{pathRef:n})),r.createElement(cq,{points:o,clipPathId:t,props:a}))}function fq(t){var{clipPathId:n,props:o,pathRef:i,previousPointsRef:a,longestAnimatedLengthRef:s}=t,{points:l,strokeDasharray:c,isAnimationActive:u,animationBegin:d,animationDuration:f,animationEasing:p,animateNewValues:h,width:m,height:v,onAnimationEnd:y,onAnimationStart:g}=o,b=a.current,x=tM(l,"recharts-line-"),w=e.useRef(x),[E,O]=e.useState(!1),S=!E,k=e.useCallback(()=>{"function"==typeof y&&y(),O(!1)},[y]),P=e.useCallback(()=>{"function"==typeof g&&g(),O(!0)},[g]),A=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(i.current),j=e.useRef(0);w.current!==x&&(j.current=s.current,w.current=x);var T=j.current;return r.createElement(uq,{points:l,showLabels:S},o.children,r.createElement(eM,{animationId:x,begin:d,duration:f,isActive:u,easing:p,onAnimationEnd:k,onAnimationStart:P,key:x},e=>{var t,d=_w(T,A+T,e),f=Math.min(d,A);if(u)if(c){var p="".concat(c).split(/[,\s]+/gim).map(e=>parseFloat(e));t=((e,t,n)=>{var r=n.reduce((e,t)=>e+t,0);if(!r)return sq(t,e);for(var o=Math.floor(e/r),i=e%r,a=[],s=0,l=0;s<n.length;l+=null!==(c=n[s])&&void 0!==c?c:0,++s){var c,u=n[s];if(null!=u&&l+u>i){a=[...n.slice(0,s),i-l];break}}var d=a.length%2==0?[0,t]:[t];return[...lq(n,o),...a,...d].map(e=>"".concat(e,"px")).join(", ")})(f,A,p)}else t=sq(A,f);else t=null==c?void 0:String(c);if(e>0&&A>0&&(a.current=l,s.current=Math.max(s.current,f)),b){var y=b.length/l.length,g=1===e?l:l.map((t,n)=>{var r=Math.floor(n*y);if(b[r]){var o=b[r];return nq(nq({},t),{},{x:_w(o.x,t.x,e),y:_w(o.y,t.y,e)})}return nq(nq({},t),{},h?{x:_w(2*m,t.x,e),y:_w(v/2,t.y,e)}:{x:t.x,y:t.y})});return a.current=g,r.createElement(dq,{props:o,points:g,clipPathId:n,pathRef:i,strokeDasharray:t})}return r.createElement(dq,{props:o,points:l,clipPathId:n,pathRef:i,strokeDasharray:t})}),r.createElement(NW,{label:o.label}))}function pq(t){var{clipPathId:n,props:o}=t,i=e.useRef(null),a=e.useRef(0),s=e.useRef(null);return r.createElement(fq,{props:o,clipPathId:n,previousPointsRef:i,longestAnimatedLengthRef:a,pathRef:s})}var hq=(e,t)=>{var n,r;return{x:null!==(n=e.x)&&void 0!==n?n:void 0,y:null!==(r=e.y)&&void 0!==r?r:void 0,value:e.value,errorVal:sA(e.payload,t)}};class mq extends e.Component{render(){var{hide:e,dot:t,points:n,className:o,xAxisId:i,yAxisId:a,top:s,left:l,width:c,height:u,id:d,needClip:f,zIndex:p}=this.props;if(e)return null;var h=Y("recharts-line",o),m=d,{r:v,strokeWidth:y}=XY(t),g=iK(t),b=2*v+y,x=f?"url(#clipPath-".concat(g?"":"dots-").concat(m,")"):void 0;return r.createElement(_$,{zIndex:p},r.createElement(Xb,{className:h},f&&r.createElement("defs",null,r.createElement(FY,{clipPathId:m,xAxisId:i,yAxisId:a}),!g&&r.createElement("clipPath",{id:"clipPath-dots-".concat(m)},r.createElement("rect",{x:l-b/2,y:s-b/2,width:c+b,height:u+b}))),r.createElement(VY,{xAxisId:i,yAxisId:a,data:n,dataPointFormatter:hq,errorBarOffset:0},r.createElement(pq,{props:this.props,clipPathId:m}))),r.createElement(OH,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:x}))}}var vq={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:sI.line,type:"linear"};function yq(e){var t=eE(e,vq),{activeDot:n,animateNewValues:o,animationBegin:i,animationDuration:a,animationEasing:s,connectNulls:l,dot:c,hide:u,isAnimationActive:d,label:f,legendType:p,xAxisId:h,yAxisId:m,id:v}=t,y=oq(t,QY),{needClip:g}=BY(h,m),b=gH(),x=Ej(),w=FA(),E=FO(e=>GY(e,h,m,w,v));if("horizontal"!==x&&"vertical"!==x||null==E||null==b)return null;var{height:O,width:S,x:k,y:P}=b;return r.createElement(mq,eq({},y,{id:v,connectNulls:l,dot:c,activeDot:n,animateNewValues:o,animationBegin:i,animationDuration:a,animationEasing:s,isAnimationActive:d,hide:u,label:f,legendType:p,xAxisId:h,yAxisId:m,points:E,layout:x,height:O,width:S,left:k,top:P,needClip:g}))}function gq(e){var t=eE(e,vq),n=FA();return r.createElement(LK,{id:t.id,type:"line"},e=>r.createElement(r.Fragment,null,r.createElement(DK,{legendPayload:iq(t)}),r.createElement(aq,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),r.createElement(YK,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),r.createElement(yq,eq({},t,{id:e}))))}var bq=r.memo(gq,$T);function xq(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.xAxisId)&&void 0!==n?n:0}function wq(e,t){var n,r;return null!==(n=null===(r=e.graphicalItems.cartesianItems.find(e=>e.id===t))||void 0===r?void 0:r.yAxisId)&&void 0!==n?n:0}bq.displayName="Line";var Eq=(e,t,n)=>gB(e,"xAxis",xq(e,t),n),Oq=(e,t,n)=>yB(e,"xAxis",xq(e,t),n),Sq=(e,t,n)=>gB(e,"yAxis",wq(e,t),n),kq=(e,t,n)=>yB(e,"yAxis",wq(e,t),n),Pq=za([wj,Eq,Sq,Oq,kq],(e,t,n,r,o)=>lA(e,"xAxis")?bA(t,r,!1):bA(n,o,!1)),Aq=za([_z,(e,t)=>t],(e,t)=>e.filter(e=>"area"===e.type).find(e=>e.id===t)),jq=e=>{var t=wj(e);return lA(t,"xAxis")?"yAxis":"xAxis"},Tq=za([Aq,(e,t,n)=>iV(e,jq(e),((e,t)=>"yAxis"===jq(e)?wq(e,t):xq(e,t))(e,t),n)],(e,t)=>{var n;if(null!=e&&null!=t){var{stackId:r}=e,o=PI(e);if(null!=r&&null!=o){var i=null===(n=t[r])||void 0===n?void 0:n.stackedData,a=null==i?void 0:i.find(e=>e.key===o);if(null!=a)return a.map(e=>[e[0],e[1]])}}}),Cq=za([wj,Eq,Sq,Oq,kq,Tq,cN,Pq,Aq,e=>e.rootProps.baseValue],(e,t,n,r,o,i,a,s,l,c)=>{var{chartData:u,dataStartIndex:d,dataEndIndex:f}=a;if(null!=l&&("horizontal"===e||"vertical"===e)&&null!=t&&null!=n&&null!=r&&null!=o&&0!==r.length&&0!==o.length&&null!=s){var p,{data:h}=l;if(null!=(p=h&&h.length>0?h:null==u?void 0:u.slice(d,f+1)))return function(e){var t,{areaSettings:{connectNulls:n,baseValue:r,dataKey:o},stackedData:i,layout:a,chartBaseValue:s,xAxis:l,yAxis:c,displayedData:u,dataStartIndex:d,xAxisTicks:f,yAxisTicks:p,bandSize:h}=e,m=i&&i.length,v=Jq(a,s,r,l,c),y="horizontal"===a,g=!1,b=u.map((e,t)=>{var r,a,s,u;if(m)u=i[d+t];else{var b=sA(e,o);Array.isArray(b)?(u=b,g=!0):u=[v,b]}var x,w=null!==(r=null===(a=u)||void 0===a?void 0:a[1])&&void 0!==r?r:null,E=null==w||m&&!n&&null==sA(e,o);return y?{x:hA({axis:l,ticks:f,bandSize:h,entry:e,index:t}),y:E?null:null!==(x=c.scale.map(w))&&void 0!==x?x:null,value:u,payload:e}:{x:E?null:null!==(s=l.scale.map(w))&&void 0!==s?s:null,y:hA({axis:c,ticks:p,bandSize:h,entry:e,index:t}),value:u,payload:e}});t=m||g?b.map(e=>{var t,n,r=Array.isArray(e.value)?e.value[0]:null;return y?{x:e.x,y:null!=r&&null!=e.y&&null!==(n=c.scale.map(r))&&void 0!==n?n:null,payload:e.payload}:{x:null!=r&&null!==(t=l.scale.map(r))&&void 0!==t?t:null,y:e.y,payload:e.payload}}):y?c.scale.map(v):l.scale.map(v);return{points:b,baseLine:null!=t?t:0,isRange:g}}({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:o,dataStartIndex:d,areaSettings:l,stackedData:i,displayedData:p,chartBaseValue:c,bandSize:s})}}),Mq=["id"],Nq=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Iq(){return Iq=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iq.apply(null,arguments)}function Dq(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rq(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_q(Object(n),!0).forEach(function(t){Lq(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_q(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Lq(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zq(e,t){return e&&"none"!==e?e:t}var Vq=e=>{var{dataKey:t,name:n,stroke:r,fill:o,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:zq(r,o),value:wA(n,t),payload:e}]},Bq=r.memo(e=>{var{dataKey:t,data:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,unit:c,tooltipType:u,id:d}=e,f={dataDefinedOnItem:n,getPosition:Bw,settings:{stroke:o,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:wA(s,t),hide:l,type:u,color:zq(o,a),unit:c,graphicalItemId:d}};return r.createElement(IK,{tooltipEntrySettings:f})});function Fq(e){var{clipPathId:t,points:n,props:o}=e,{needClip:i,dot:a,dataKey:s}=o,l=$b(o);return r.createElement(eH,{points:n,dot:a,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:s,baseProps:l,needClip:i,clipPathId:t})}function $q(e){var{showLabels:t,children:n,points:o}=e,i=o.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Rq(Rq({},r),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:r,fill:void 0})});return r.createElement(TW,{value:t?i:void 0},n)}function Uq(e){var{points:t,baseLine:n,needClip:o,clipPathId:i,props:a}=e,{layout:s,type:l,stroke:c,connectNulls:u,isRange:d}=a,{id:f}=a,p=Dq(a,Mq),h=$b(p),m=Wb(p);return r.createElement(r.Fragment,null,(null==t?void 0:t.length)>1&&r.createElement(Xb,{clipPath:o?"url(#clipPath-".concat(i,")"):void 0},r.createElement(xC,Iq({},m,{id:f,points:t,connectNulls:u,type:l,baseLine:n,layout:s,stroke:"none",className:"recharts-area-area"})),"none"!==c&&r.createElement(xC,Iq({},h,{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:t})),"none"!==c&&d&&Array.isArray(n)&&r.createElement(xC,Iq({},h,{className:"recharts-area-curve",layout:s,type:l,connectNulls:u,fill:"none",points:n}))),r.createElement(Fq,{points:t,props:p,clipPathId:i}))}function Wq(e){var t,n,{alpha:o,baseLine:i,points:a,strokeWidth:s}=e,l=null===(t=a[0])||void 0===t?void 0:t.y,c=null===(n=a[a.length-1])||void 0===n?void 0:n.y;if(!nA(l)||!nA(c))return null;var u=o*Math.abs(l-c),d=Math.max(...a.map(e=>e.x||0));return Tw(i)?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(...i.map(e=>e.x||0),d)),Tw(d)?r.createElement("rect",{x:0,y:l<c?l:l-u,width:d+(s?parseInt("".concat(s),10):1),height:Math.floor(u)}):null}function Kq(e){var t,n,{alpha:o,baseLine:i,points:a,strokeWidth:s}=e,l=null===(t=a[0])||void 0===t?void 0:t.x,c=null===(n=a[a.length-1])||void 0===n?void 0:n.x;if(!nA(l)||!nA(c))return null;var u=o*Math.abs(l-c),d=Math.max(...a.map(e=>e.y||0));return Tw(i)?d=Math.max(i,d):i&&Array.isArray(i)&&i.length&&(d=Math.max(...i.map(e=>e.y||0),d)),Tw(d)?r.createElement("rect",{x:l<c?l:l-u,y:0,width:u,height:Math.floor(d+(s?parseInt("".concat(s),10):1))}):null}function Hq(e){var{alpha:t,layout:n,points:o,baseLine:i,strokeWidth:a}=e;return"vertical"===n?r.createElement(Wq,{alpha:t,points:o,baseLine:i,strokeWidth:a}):r.createElement(Kq,{alpha:t,points:o,baseLine:i,strokeWidth:a})}function Yq(t){var{needClip:n,clipPathId:o,props:i,previousPointsRef:a,previousBaselineRef:s}=t,{points:l,baseLine:c,isAnimationActive:u,animationBegin:d,animationDuration:f,animationEasing:p,onAnimationStart:h,onAnimationEnd:m}=i,v=tM(e.useMemo(()=>({points:l,baseLine:c}),[l,c]),"recharts-area-"),y=Oj(),[g,b]=e.useState(!1),x=!g,w=e.useCallback(()=>{"function"==typeof m&&m(),b(!1)},[m]),E=e.useCallback(()=>{"function"==typeof h&&h(),b(!0)},[h]);if(null==y)return null;var O=a.current,S=s.current;return r.createElement($q,{showLabels:x,points:l},i.children,r.createElement(eM,{animationId:v,begin:d,duration:f,isActive:u,easing:p,onAnimationEnd:w,onAnimationStart:E,key:v},e=>{if(O){var t,d=O.length/l.length,f=1===e?l:l.map((t,n)=>{var r=Math.floor(n*d);if(O[r]){var o=O[r];return Rq(Rq({},t),{},{x:_w(o.x,t.x,e),y:_w(o.y,t.y,e)})}return t});return t=Tw(c)?_w(S,c,e):Lw(c)||Aw(c)?_w(S,0,e):c.map((t,n)=>{var r=Math.floor(n*d);if(Array.isArray(S)&&S[r]){var o=S[r];return Rq(Rq({},t),{},{x:_w(o.x,t.x,e),y:_w(o.y,t.y,e)})}return t}),e>0&&(a.current=f,s.current=t),r.createElement(Uq,{points:f,baseLine:t,needClip:n,clipPathId:o,props:i})}return e>0&&(a.current=l,s.current=c),r.createElement(Xb,null,u&&r.createElement("defs",null,r.createElement("clipPath",{id:"animationClipPath-".concat(o)},r.createElement(Hq,{alpha:e,points:l,baseLine:c,layout:y,strokeWidth:i.strokeWidth}))),r.createElement(Xb,{clipPath:"url(#animationClipPath-".concat(o,")")},r.createElement(Uq,{points:l,baseLine:c,needClip:n,clipPathId:o,props:i})))}),r.createElement(NW,{label:i.label}))}function qq(t){var{needClip:n,clipPathId:o,props:i}=t,a=e.useRef(null),s=e.useRef();return r.createElement(Yq,{needClip:n,clipPathId:o,props:i,previousPointsRef:a,previousBaselineRef:s})}class Gq extends e.PureComponent{render(){var{hide:e,dot:t,points:n,className:o,top:i,left:a,needClip:s,xAxisId:l,yAxisId:c,width:u,height:d,id:f,baseLine:p,zIndex:h}=this.props;if(e)return null;var m=Y("recharts-area",o),v=f,{r:y,strokeWidth:g}=XY(t),b=iK(t),x=2*y+g,w=s?"url(#clipPath-".concat(b?"":"dots-").concat(v,")"):void 0;return r.createElement(_$,{zIndex:h},r.createElement(Xb,{className:m},s&&r.createElement("defs",null,r.createElement(FY,{clipPathId:v,xAxisId:l,yAxisId:c}),!b&&r.createElement("clipPath",{id:"clipPath-dots-".concat(v)},r.createElement("rect",{x:a-x/2,y:i-x/2,width:u+x,height:d+x}))),r.createElement(qq,{needClip:s,clipPathId:v,props:this.props})),r.createElement(OH,{points:n,mainColor:zq(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}),this.props.isRange&&Array.isArray(p)&&r.createElement(OH,{points:p,mainColor:zq(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}))}}var Xq={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:sI.area};function Zq(e){var t,{activeDot:n,animationBegin:o,animationDuration:i,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:h,xAxisId:m,yAxisId:v}=e,y=Dq(e,Nq),g=Ej(),b=l$(),{needClip:x}=BY(m,v),w=FA(),{points:E,isRange:O,baseLine:S}=null!==(t=FO(t=>Cq(t,e.id,w)))&&void 0!==t?t:{},k=gH();if("horizontal"!==g&&"vertical"!==g||null==k)return null;if("AreaChart"!==b&&"ComposedChart"!==b)return null;var{height:P,width:A,x:j,y:T}=k;return E&&E.length?r.createElement(Gq,Iq({},y,{activeDot:n,animationBegin:o,animationDuration:i,animationEasing:a,baseLine:S,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:P,hide:d,layout:g,isAnimationActive:f,isRange:O,legendType:p,needClip:x,points:E,stroke:h,width:A,left:j,top:T,xAxisId:m,yAxisId:v})):null}var Jq=(e,t,n,r,o)=>{var i=null!=n?n:t;if(Tw(i))return i;var a="horizontal"===e?o:r,s=a.scale.domain();if("number"===a.type){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return"dataMin"===i?c:"dataMax"===i||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===i?s[0]:"dataMax"===i?s[1]:s[0]};function Qq(e){var t=eE(e,Xq),n=FA();return r.createElement(LK,{id:t.id,type:"area"},e=>r.createElement(r.Fragment,null,r.createElement(DK,{legendPayload:Vq(t)}),r.createElement(Bq,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:e}),r.createElement(YK,{type:"area",id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:pA(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),r.createElement(Zq,Iq({},t,{id:e}))))}var eG=r.memo(Qq,$T);eG.displayName="Area";var tG="production"===process.env.NODE_ENV,nG="Invariant failed";function rG(){return rG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rG.apply(null,arguments)}function oG(e){return r.createElement(jK,rG({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var iG=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(n,r)=>{if(Tw(e))return e;var o=Tw(n)||Lw(n);return o?e(n,r):(o||function(e,t){if(tG)throw new Error(nG);var n="function"==typeof t?t():t,r=n?"".concat(nG,": ").concat(n):nG;throw new Error(r)}(0,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")),t)}},aG=za([_z,(e,t)=>t],(e,t)=>e.filter(e=>"bar"===e.type).find(e=>e.id===t)),sG=za([aG],e=>null==e?void 0:e.maxBarSize),lG=za([wj,_z,xq,wq,(e,t,n)=>n],(e,t,n,r,o)=>t.filter(t=>"horizontal"===e?t.xAxisId===n:t.yAxisId===r).filter(e=>e.isPanorama===o).filter(e=>!1===e.hide).filter(e=>"bar"===e.type)),cG=za([lG,e=>e.rootProps.barSize,(e,t)=>{var n=wj(e),r=xq(e,t),o=wq(e,t);if(null!=r&&null!=o)return"horizontal"===n?fB(e,"xAxis",r):fB(e,"yAxis",o)}],(e,t,n)=>{var r=e.filter(jI),o=e.filter(e=>null==e.stackId),i=r.reduce((e,t)=>{var n=e[t.stackId];return null==n&&(n=[]),n.push(t),e[t.stackId]=n,e},{}),a=Object.entries(i).map(e=>{var r,[o,i]=e;return{stackId:o,dataKeys:i.map(e=>e.dataKey),barSize:SH(t,n,null===(r=i[0])||void 0===r?void 0:r.barSize)}});return[...a,...o.map(e=>({stackId:void 0,dataKeys:[e.dataKey].filter(e=>null!=e),barSize:SH(t,n,e.barSize)}))]}),uG=(e,t,n)=>{var r,o,i=wj(e),a=xq(e,t),s=wq(e,t);if(null!=a&&null!=s)return"horizontal"===i?(r=gB(e,"xAxis",a,n),o=yB(e,"xAxis",a,n)):(r=gB(e,"yAxis",s,n),o=yB(e,"yAxis",s,n)),bA(r,o)},dG=za([cG,QN,e=>e.rootProps.barGap,eI,(e,t,n)=>{var r,o,i=aG(e,t);if(null==i)return 0;var a=xq(e,t),s=wq(e,t);if(null==a||null==s)return 0;var l,c,u=wj(e),d=QN(e),{maxBarSize:f}=i,p=Lw(f)?d:f;return"horizontal"===u?(l=gB(e,"xAxis",a,n),c=yB(e,"xAxis",a,n)):(l=gB(e,"yAxis",s,n),c=yB(e,"yAxis",s,n)),null!==(r=null!==(o=bA(l,c,!0))&&void 0!==o?o:p)&&void 0!==r?r:0},uG,sG],(e,t,n,r,o,i,a)=>{var s=Lw(a)?t:a,l=function(e,t,n,r,o){var i,a=r.length;if(!(a<1)){var s,l=Iw(e,n,0,!0),c=[];if(nA(null===(i=r[0])||void 0===i?void 0:i.barSize)){var u=!1,d=n/a,f=r.reduce((e,t)=>e+(t.barSize||0),0);(f+=(a-1)*l)>=n&&(f-=(a-1)*l,l=0),f>=n&&d>0&&(u=!0,f=a*(d*=.9));var p={offset:((n-f)/2|0)-l,size:0};s=r.reduce((e,t)=>{var n,r={stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:p.offset+p.size+l,size:u?d:null!==(n=t.barSize)&&void 0!==n?n:0}},o=[...e,r];return p=r.position,o},c)}else{var h=Iw(t,n,0,!0);n-2*h-(a-1)*l<=0&&(l=0);var m=(n-2*h-(a-1)*l)/a;m>1&&(m>>=0);var v=nA(o)?Math.min(m,o):m;s=r.reduce((e,t,n)=>[...e,{stackId:t.stackId,dataKeys:t.dataKeys,position:{offset:h+(m+l)*n+(m-v)/2,size:v}}],c)}return s}}(n,r,o!==i?o:i,e,s);return o!==i&&null!=l&&(l=l.map(e=>PH(PH({},e),{},{position:PH(PH({},e.position),{},{offset:e.position.offset-o/2})}))),l}),fG=za([dG,aG],(e,t)=>{if(null!=e&&null!=t){var n=e.find(e=>e.stackId===t.stackId&&null!=t.dataKey&&e.dataKeys.includes(t.dataKey));if(null!=n)return n.position}}),pG=za([(e,t,n)=>{var r=wj(e),o=xq(e,t),i=wq(e,t);if(null!=o&&null!=i)return"horizontal"===r?iV(e,"yAxis",i,n):iV(e,"xAxis",o,n)},aG],(e,t)=>{var n=PI(t);if(e&&null!=n&&null!=t){var{stackId:r}=t;if(null!=r){var o=e[r];if(o){var{stackedData:i}=o;if(i)return i.find(e=>e.key===n)}}}}),hG=za([LA,VA,(e,t,n)=>{var r=xq(e,t);if(null!=r)return gB(e,"xAxis",r,n)},(e,t,n)=>{var r=wq(e,t);if(null!=r)return gB(e,"yAxis",r,n)},(e,t,n)=>{var r=xq(e,t);if(null!=r)return yB(e,"xAxis",r,n)},(e,t,n)=>{var r=wq(e,t);if(null!=r)return yB(e,"yAxis",r,n)},fG,wj,cN,uG,pG,aG,(e,t,n,r)=>r],(e,t,n,r,o,i,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:h,dataEndIndex:m}=l;if(null!=d&&null!=a&&null!=t&&("horizontal"===s||"vertical"===s)&&null!=n&&null!=r&&null!=o&&null!=i&&null!=c){var v,{data:y}=d;if(null!=(v=null!=y&&y.length>0?y:null==p?void 0:p.slice(h,m+1)))return function(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r,hasCustomShape:o},pos:i,bandSize:a,xAxis:s,yAxis:l,xAxisTicks:c,yAxisTicks:u,stackedData:d,displayedData:f,offset:p,cells:h,parentViewBox:m,dataStartIndex:v}=e,y="horizontal"===t?l:s,g=d?y.scale.domain():null,b=(e=>{var{numericAxis:t}=e,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]})({numericAxis:y}),x=y.scale.map(b);return f.map((e,f)=>{var y,w,E,O,S,k;if(d){var P=d[f+v];if(null==P)return null;y=((e,t)=>{if(!t||2!==t.length||!Tw(t[0])||!Tw(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!Tw(e[0])||e[0]<n)&&(o[0]=n),(!Tw(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o})(P,g)}else y=sA(e,n),Array.isArray(y)||(y=[b,y]);var A=iG(r,LG)(y[1],f);if("horizontal"===t){var j,T=l.scale.map(y[0]),C=l.scale.map(y[1]);if(null==T||null==C)return null;w=mA({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:e,index:f}),E=null!==(j=null!=C?C:T)&&void 0!==j?j:void 0,O=i.size;var M=T-C;if(S=Aw(M)?0:M,k={x:w,y:p.top,width:O,height:p.height},Math.abs(A)>0&&Math.abs(S)<Math.abs(A)){var N=Pw(S||A)*(Math.abs(A)-Math.abs(S));E-=N,S+=N}}else{var I=s.scale.map(y[0]),D=s.scale.map(y[1]);if(null==I||null==D)return null;if(w=I,E=mA({axis:l,ticks:u,bandSize:a,offset:i.offset,entry:e,index:f}),O=D-I,S=i.size,k={x:p.left,y:E,width:p.width,height:S},Math.abs(A)>0&&Math.abs(O)<Math.abs(A))O+=Pw(O||A)*(Math.abs(A)-Math.abs(O))}return null!=w&&null!=E&&null!=O&&null!=S&&(o||0!==O&&0!==S)?kG(kG({},e),{},{stackedBarStart:x,x:w,y:E,width:O,height:S,value:d?y:y[1],payload:e,background:k,tooltipPosition:{x:w+O/2,y:E+S/2},parentViewBox:m,originalDataIndex:f},h&&h[f]&&h[f].props):null}).filter(Boolean)}({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:o,yAxisTicks:i,stackedData:u,displayedData:v,offset:e,cells:f,dataStartIndex:h})}}),mG=["index"];function vG(){return vG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vG.apply(null,arguments)}var yG=e.createContext(void 0),gG=t=>{var{index:n}=t,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,mG),i=(t=>{var n=e.useContext(yG);if(null!=n){var{stackId:r}=n;return"url(#".concat(((e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t))(r,t),")")}})(n);return r.createElement(Xb,vG({className:"recharts-bar-stack-layer",clipPath:i},o))},bG=["onMouseEnter","onMouseLeave","onClick"],xG=["value","background","tooltipPosition"],wG=["id"],EG=["onMouseEnter","onClick","onMouseLeave"];function OG(){return OG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OG.apply(null,arguments)}function SG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kG(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SG(Object(n),!0).forEach(function(t){PG(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SG(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AG(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var jG=e=>{var{dataKey:t,name:n,fill:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:wA(n,t),payload:e}]},TG=r.memo(e=>{var{dataKey:t,stroke:n,strokeWidth:o,fill:i,name:a,hide:s,unit:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:void 0,getPosition:Bw,settings:{stroke:n,strokeWidth:o,fill:i,dataKey:t,nameKey:void 0,name:wA(a,t),hide:s,type:c,color:i,unit:l,graphicalItemId:u}};return r.createElement(IK,{tooltipEntrySettings:d})});function CG(e){var t=FO(WF),{data:n,dataKey:o,background:i,allOtherBarProps:a}=e,{onMouseEnter:s,onMouseLeave:l,onClick:c}=a,u=AG(a,bG),d=CK(s,o,a.id),f=MK(l),p=NK(c,o,a.id);if(!i||null==n)return null;var h,m,v=Ub(i);return r.createElement(_$,{zIndex:(h=i,m=sI.barBackground,h&&"object"==typeof h&&"zIndex"in h&&"number"==typeof h.zIndex&&nA(h.zIndex)?h.zIndex:m)},n.map((e,n)=>{var{value:a,background:s,tooltipPosition:l}=e,c=AG(e,xG);if(!s)return null;var h=d(e,n),m=f(e,n),y=p(e,n),g=kG(kG(kG(kG(kG({option:i,isActive:String(n)===t},c),{},{fill:"#eee"},s),v),Zw(u,e,n)),{},{onMouseEnter:h,onMouseLeave:m,onClick:y,dataKey:o,index:n,className:"recharts-bar-background-rectangle"});return r.createElement(oG,OG({key:"background-bar-".concat(n)},g))}))}function MG(e){var{showLabels:t,children:n,rects:o}=e,i=null==o?void 0:o.map(e=>{var t={x:e.x,y:e.y,width:e.width,lowerWidth:e.width,upperWidth:e.width,height:e.height};return kG(kG({},t),{},{value:e.value,payload:e.payload,parentViewBox:e.parentViewBox,viewBox:t,fill:e.fill})});return r.createElement(TW,{value:t?i:void 0},n)}function NG(t){var{shape:n,activeBar:o,baseProps:i,entry:a,index:s,dataKey:l}=t,c=FO(WF),u=FO(HF),d=o&&String(a.originalDataIndex)===c&&(null==u||l===u),[f,p]=e.useState(!1),[h,m]=e.useState(!1);e.useEffect(()=>{var e;return d?(p(!0),e=requestAnimationFrame(()=>{m(!0)})):m(!1),()=>{cancelAnimationFrame(e)}},[d]);var v,y=e.useCallback(()=>{d||p(!1)},[d]),g=d&&h,b=d||f;v=d?!0===o?n:o:n;var x=r.createElement(oG,OG({},i,{name:String(i.name)},a,{isActive:g,option:v,index:s,dataKey:l,onTransitionEnd:y}));return b?r.createElement(_$,{zIndex:sI.activeBar},r.createElement(gG,{index:a.originalDataIndex},x)):x}function IG(e){var{shape:t,baseProps:n,entry:o,index:i,dataKey:a}=e;return r.createElement(oG,OG({},n,{name:String(n.name)},o,{isActive:!1,option:t,index:i,dataKey:a}))}function DG(e){var t,{data:n,props:o}=e,i=null!==(t=$b(o))&&void 0!==t?t:{},{id:a}=i,s=AG(i,wG),{shape:l,dataKey:c,activeBar:u}=o,{onMouseEnter:d,onClick:f,onMouseLeave:p}=o,h=AG(o,EG),m=CK(d,c,a),v=MK(p),y=NK(f,c,a);return n?r.createElement(r.Fragment,null,n.map((e,t)=>r.createElement(gG,OG({index:e.originalDataIndex,key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value,"-").concat(t),className:"recharts-bar-rectangle"},Zw(h,e,t),{onMouseEnter:m(e,t),onMouseLeave:v(e,t),onClick:y(e,t)}),u?r.createElement(NG,{shape:l,activeBar:u,baseProps:s,entry:e,index:t,dataKey:c}):r.createElement(IG,{shape:l,baseProps:s,entry:e,index:t,dataKey:c})))):null}function _G(t){var{props:n,previousRectanglesRef:o}=t,{data:i,layout:a,isAnimationActive:s,animationBegin:l,animationDuration:c,animationEasing:u,onAnimationEnd:d,onAnimationStart:f}=n,p=o.current,h=tM(n,"recharts-bar-"),[m,v]=e.useState(!1),y=!m,g=e.useCallback(()=>{"function"==typeof d&&d(),v(!1)},[d]),b=e.useCallback(()=>{"function"==typeof f&&f(),v(!0)},[f]);return r.createElement(MG,{showLabels:y,rects:i},r.createElement(eM,{animationId:h,begin:l,duration:c,isActive:s,easing:u,onAnimationEnd:g,onAnimationStart:b,key:h},e=>{var t=1===e?i:null==i?void 0:i.map((t,n)=>{var r=p&&p[n];if(r)return kG(kG({},t),{},{x:_w(r.x,t.x,e),y:_w(r.y,t.y,e),width:_w(r.width,t.width,e),height:_w(r.height,t.height,e)});if("horizontal"===a){var o=_w(0,t.height,e),i=_w(t.stackedBarStart,t.y,e);return kG(kG({},t),{},{y:i,height:o})}var s=_w(0,t.width,e),l=_w(t.stackedBarStart,t.x,e);return kG(kG({},t),{},{width:s,x:l})});return e>0&&(o.current=null!=t?t:null),null==t?null:r.createElement(Xb,null,r.createElement(DG,{props:n,data:t}))}),r.createElement(NW,{label:n.label}),n.children)}function RG(t){var n=e.useRef(null);return r.createElement(_G,{previousRectanglesRef:n,props:t})}var LG=0,zG=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:sA(e,t)}};class VG extends e.PureComponent{render(){var{hide:e,data:t,dataKey:n,className:o,xAxisId:i,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(e||null==t)return null;var u=Y("recharts-bar",o),d=c;return r.createElement(Xb,{className:u,id:c},s&&r.createElement("defs",null,r.createElement(FY,{clipPathId:d,xAxisId:i,yAxisId:a})),r.createElement(Xb,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},r.createElement(CG,{data:t,dataKey:n,background:l,allOtherBarProps:this.props}),r.createElement(RG,this.props)))}}var BG={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:LG,xAxisId:0,yAxisId:0,zIndex:sI.bar};function FG(e){var t,{xAxisId:n,yAxisId:o,hide:i,legendType:a,minPointSize:s,activeBar:l,animationBegin:c,animationDuration:u,animationEasing:d,isAnimationActive:f}=e,{needClip:p}=BY(n,o),h=Ej(),m=FA(),v=tK(e.children,xU),y=FO(t=>hG(t,e.id,m,v));if("vertical"!==h&&"horizontal"!==h)return null;var g=null==y?void 0:y[0];return t=null==g||null==g.height||null==g.width?0:"vertical"===h?g.height/2:g.width/2,r.createElement(VY,{xAxisId:n,yAxisId:o,data:y,dataPointFormatter:zG,errorBarOffset:t},r.createElement(VG,OG({},e,{layout:h,needClip:p,data:y,xAxisId:n,yAxisId:o,hide:i,legendType:a,minPointSize:s,activeBar:l,animationBegin:c,animationDuration:u,animationEasing:d,isAnimationActive:f})))}function $G(t){var n,o,i=eE(t,BG),a=(n=i.stackId,null!=(o=e.useContext(yG))?o.stackId:null!=n?pA(n):void 0),s=FA();return r.createElement(LK,{id:i.id,type:"bar"},e=>r.createElement(r.Fragment,null,r.createElement(DK,{legendPayload:jG(i)}),r.createElement(TG,{dataKey:i.dataKey,stroke:i.stroke,strokeWidth:i.strokeWidth,fill:i.fill,name:i.name,hide:i.hide,unit:i.unit,tooltipType:i.tooltipType,id:e}),r.createElement(YK,{type:"bar",id:e,data:void 0,xAxisId:i.xAxisId,yAxisId:i.yAxisId,zAxisId:0,dataKey:i.dataKey,stackId:a,hide:i.hide,barSize:i.barSize,minPointSize:i.minPointSize,maxBarSize:i.maxBarSize,isPanorama:s,hasCustomShape:null!=i.shape}),r.createElement(_$,{zIndex:i.zIndex},r.createElement(FG,OG({},i,{id:e})))))}var UG=r.memo($G,$T);UG.displayName="Bar";var WG=["option","isActive"];function KG(){return KG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KG.apply(null,arguments)}function HG(e){var{option:t,isActive:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,WG);return"string"==typeof t?r.createElement(jK,KG({option:r.createElement(qw,KG({type:t},o)),isActive:n,shapeType:"symbols"},o)):r.createElement(jK,KG({option:t,isActive:n,shapeType:"symbols"},o))}var YG=za([_z,(e,t,n,r,o)=>o],(e,t)=>e.filter(e=>"scatter"===e.type).find(e=>e.id===t)),qG=za([(e,t,n,r,o,i,a)=>lN(e,0,0,a),(e,t,n,r,o,i,a)=>gB(e,"xAxis",t,a),(e,t,n,r,o,i,a)=>yB(e,"xAxis",t,a),(e,t,n,r,o,i,a)=>gB(e,"yAxis",n,a),(e,t,n,r,o,i,a)=>yB(e,"yAxis",n,a),(e,t,n,r)=>wB(e,"zAxis",r,!1),YG,(e,t,n,r,o,i)=>i],(e,t,n,r,o,i,a,s)=>{var l,{chartData:c,dataStartIndex:u,dataEndIndex:d}=e;if(null!=a&&(null!=(l=null!=(null==a?void 0:a.data)&&a.data.length>0?a.data:null==c?void 0:c.slice(u,d+1))&&null!=t&&null!=r&&null!=n&&null!=o&&0!==(null==n?void 0:n.length)&&0!==(null==o?void 0:o.length)))return function(e){var{displayedData:t,xAxis:n,yAxis:r,zAxis:o,scatterSettings:i,xAxisTicks:a,yAxisTicks:s,cells:l}=e,c=Lw(n.dataKey)?i.dataKey:n.dataKey,u=Lw(r.dataKey)?i.dataKey:r.dataKey,d=o&&o.dataKey,f=o?o.range:Tz.range,p=f&&f[0],h=n.scale.bandwidth?n.scale.bandwidth():0,m=r.scale.bandwidth?r.scale.bandwidth():0;return t.map((e,t)=>{var f=sA(e,c),v=sA(e,u),y=!Lw(d)&&sA(e,d)||"-",g=[{name:Lw(n.dataKey)?i.name:n.name||String(n.dataKey),unit:n.unit||"",value:f,payload:e,dataKey:c,type:i.tooltipType,graphicalItemId:i.id},{name:Lw(r.dataKey)?i.name:r.name||String(r.dataKey),unit:r.unit||"",value:v,payload:e,dataKey:u,type:i.tooltipType,graphicalItemId:i.id}];"-"!==y&&null!=o&&g.push({name:o.name||o.dataKey,unit:o.unit||"",value:y,payload:e,dataKey:d,type:i.tooltipType,graphicalItemId:i.id});var b=hA({axis:n,ticks:a,bandSize:h,entry:e,index:t,dataKey:c}),x=hA({axis:r,ticks:s,bandSize:m,entry:e,index:t,dataKey:u}),w="-"!==y&&null!=o?o.scale.map(y):p,E=null==w?0:Math.sqrt(Math.max(w,0)/Math.PI);return tX(tX({},e),{},{cx:b,cy:x,x:null==b?void 0:b-E,y:null==x?void 0:x-E,width:2*E,height:2*E,size:w,node:{x:f,y:v,z:y},tooltipPayload:g,tooltipPosition:{x:b,y:x},payload:e},l&&l[t]&&l[t].props)})}({displayedData:l,xAxis:t,yAxis:r,zAxis:i,scatterSettings:a,xAxisTicks:n,yAxisTicks:o,cells:s})}),GG=["id"],XG=["onMouseEnter","onClick","onMouseLeave"],ZG=["animationBegin","animationDuration","animationEasing","hide","isAnimationActive","legendType","lineJointType","lineType","shape","xAxisId","yAxisId","zAxisId"];function JG(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function QG(){return QG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},QG.apply(null,arguments)}function eX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function tX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eX(Object(n),!0).forEach(function(t){nX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function nX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rX=e=>{var{dataKey:t,name:n,fill:r,legendType:o,hide:i}=e;return[{inactive:i,dataKey:t,type:o,color:r,value:wA(n,t),payload:e}]},oX=r.memo(e=>{var{dataKey:t,points:n,stroke:o,strokeWidth:i,fill:a,name:s,hide:l,tooltipType:c,id:u}=e,d={dataDefinedOnItem:null==n?void 0:n.map(e=>e.tooltipPayload),getPosition:e=>{var t;return null==n||null===(t=n[Number(e)])||void 0===t?void 0:t.tooltipPosition},settings:{stroke:o,strokeWidth:i,fill:a,nameKey:void 0,dataKey:t,name:wA(s,t),hide:l,type:c,color:a,unit:"",graphicalItemId:u}};return r.createElement(IK,{tooltipEntrySettings:d})});function iX(e){var{points:t,props:n}=e,{line:o,lineType:i,lineJointType:a}=n;if(!o)return null;var s,l,c=$b(n),u=Ub(o);if("joint"===i)s=t.map(e=>{var t,n;return{x:null!==(t=e.cx)&&void 0!==t?t:null,y:null!==(n=e.cy)&&void 0!==n?n:null}});else if("fitting"===i){var{xmin:d,xmax:f,a:p,b:h}=(e=>{for(var t=e.length,n=0,r=0,o=0,i=0,a=1/0,s=-1/0,l=0,c=0,u=0;u<t;u++){var d,f;n+=l=(null===(d=e[u])||void 0===d?void 0:d.cx)||0,r+=c=(null===(f=e[u])||void 0===f?void 0:f.cy)||0,o+=l*c,i+=l*l,a=Math.min(a,l),s=Math.max(s,l)}var p=t*i!==n*n?(t*o-n*r)/(t*i-n*n):0;return{xmin:a,xmax:s,a:p,b:(r-p*n)/t}})(t),m=e=>p*e+h;s=[{x:d,y:m(d)},{x:f,y:m(f)}]}var v=tX(tX(tX({},c),{},{fill:"none",stroke:c&&c.fill},u),{},{points:s});return l=r.isValidElement(o)?r.cloneElement(o,v):"function"==typeof o?o(v):r.createElement(xC,QG({},v,{type:a})),r.createElement(Xb,{className:"recharts-scatter-line",key:"recharts-scatter-line"},l)}function aX(t){var{showLabels:n,points:o,children:i}=t,a=vj(),s=e.useMemo(()=>null==o?void 0:o.map(e=>{var t,n,r={x:null!==(t=e.x)&&void 0!==t?t:0,y:null!==(n=e.y)&&void 0!==n?n:0,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width};return tX(tX({},r),{},{value:void 0,payload:e.payload,viewBox:r,parentViewBox:a,fill:void 0})}),[a,o]);return r.createElement(TW,{value:n?s:void 0},i)}function sX(e){var t,{points:n,allOtherScatterProps:o}=e,{shape:i,activeShape:a,dataKey:s}=o,{id:l}=o,c=JG(o,GG),u=FO(WF),{onMouseEnter:d,onClick:f,onMouseLeave:p}=o,h=JG(o,XG),m=CK(d,s,l),v=MK(p),y=NK(f,s,l);if(t=n,!(Array.isArray(t)&&t.length>0))return null;var g=$b(c);return r.createElement(r.Fragment,null,r.createElement(iX,{points:n,props:c}),n.map((e,t)=>{var n=null!=a&&!1!==a,o=n&&u===String(t),s=n&&o?a:i,c=tX(tX(tX({},g),e),{},{index:t,[jA]:String(l)});return r.createElement(_$,{key:"symbol-".concat(null==e?void 0:e.cx,"-").concat(null==e?void 0:e.cy,"-").concat(null==e?void 0:e.size,"-").concat(t),zIndex:o?sI.activeDot:void 0},r.createElement(Xb,QG({className:"recharts-scatter-symbol"},Zw(h,e,t),{onMouseEnter:m(e,t),onMouseLeave:v(e,t),onClick:y(e,t)}),r.createElement(HG,QG({option:s,isActive:o},c))))}))}function lX(t){var{previousPointsRef:n,props:o}=t,{points:i,isAnimationActive:a,animationBegin:s,animationDuration:l,animationEasing:c}=o,u=n.current,d=tM(o,"recharts-scatter-"),[f,p]=e.useState(!1),h=e.useCallback(()=>{p(!1)},[]),m=e.useCallback(()=>{p(!0)},[]),v=!f;return r.createElement(aX,{showLabels:v,points:i},o.children,r.createElement(eM,{animationId:d,begin:s,duration:l,isActive:a,easing:c,onAnimationEnd:h,onAnimationStart:m,key:d},e=>{var t=1===e?i:null==i?void 0:i.map((t,n)=>{var r=u&&u[n];return tX(tX({},t),{},r?{cx:null==t.cx?void 0:_w(r.cx,t.cx,e),cy:null==t.cy?void 0:_w(r.cy,t.cy,e),size:_w(r.size,t.size,e)}:{size:_w(0,t.size,e)})});return e>0&&(n.current=t),r.createElement(Xb,null,r.createElement(sX,{points:t,allOtherScatterProps:o,showLabels:v}))}),r.createElement(NW,{label:o.label}))}var cX=(e,t,n)=>({x:e.cx,y:e.cy,value:Number("x"===n?e.node.x:e.node.y),errorVal:sA(e,t)});function uX(t){var{hide:n,points:o,className:i,needClip:a,xAxisId:s,yAxisId:l,id:c}=t,u=e.useRef(null);if(n)return null;var d=Y("recharts-scatter",i),f=c;return r.createElement(_$,{zIndex:t.zIndex},r.createElement(Xb,{className:d,clipPath:a?"url(#clipPath-".concat(f,")"):void 0,id:c},a&&r.createElement("defs",null,r.createElement(FY,{clipPathId:f,xAxisId:s,yAxisId:l})),r.createElement(VY,{xAxisId:s,yAxisId:l,data:o,dataPointFormatter:cX,errorBarOffset:0},r.createElement(Xb,{key:"recharts-scatter-symbols"},r.createElement(lX,{props:t,previousPointsRef:u})))))}var dX={xAxisId:0,yAxisId:0,zAxisId:0,label:!1,line:!1,legendType:"circle",lineType:"joint",lineJointType:"linear",shape:"circle",hide:!1,isAnimationActive:"auto",animationBegin:0,animationDuration:400,animationEasing:"linear",zIndex:sI.scatter};function fX(t){var n=eE(t,dX),{animationBegin:o,animationDuration:i,animationEasing:a,hide:s,isAnimationActive:l,legendType:c,lineJointType:u,lineType:d,shape:f,xAxisId:p,yAxisId:h,zAxisId:m}=n,v=JG(n,ZG),{needClip:y}=BY(p,h),g=e.useMemo(()=>tK(t.children,xU),[t.children]),b=FA(),x=FO(e=>qG(e,p,h,m,t.id,g,b));return null==y||null==x?null:r.createElement(r.Fragment,null,r.createElement(oX,{dataKey:t.dataKey,points:x,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,tooltipType:t.tooltipType,id:t.id}),r.createElement(uX,QG({},v,{xAxisId:p,yAxisId:h,zAxisId:m,lineType:d,lineJointType:u,legendType:c,shape:f,hide:s,isAnimationActive:l,animationBegin:o,animationDuration:i,animationEasing:a,points:x,needClip:y})))}function pX(e){var t=eE(e,dX),n=FA();return r.createElement(LK,{id:t.id,type:"scatter"},e=>r.createElement(r.Fragment,null,r.createElement(DK,{legendPayload:rX(t)}),r.createElement(YK,{type:"scatter",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:t.zAxisId,dataKey:t.dataKey,hide:t.hide,name:t.name,tooltipType:t.tooltipType,isPanorama:n}),r.createElement(fX,QG({},t,{id:e}))))}var hX=r.memo(pX,$T);hX.displayName="Scatter";var mX=["domain","range"],vX=["domain","range"];function yX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function gX(e,t){return e===t||!(!Array.isArray(e)||2!==e.length||!Array.isArray(t)||2!==t.length)&&(e[0]===t[0]&&e[1]===t[1])}function bX(e,t){if(e===t)return!0;var{domain:n,range:r}=e,o=yX(e,mX),{domain:i,range:a}=t,s=yX(t,vX);return!!gX(n,i)&&(!!gX(r,a)&&$T(o,s))}var xX=["type"],wX=["dangerouslySetInnerHTML","ticks","scale"],EX=["id","scale"];function OX(){return OX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OX.apply(null,arguments)}function SX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?SX(Object(n),!0).forEach(function(t){PX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function jX(t){var n=LO(),r=e.useRef(null),o=Oj(),{type:i}=t,a=AX(t,xX),s=cI(o,"xAxis",i),l=e.useMemo(()=>{if(null!=s)return kX(kX({},a),{},{type:s})},[a,s]);return e.useLayoutEffect(()=>{null!=l&&(null===r.current?n(iH(l)):r.current!==l&&n(aH({prev:r.current,next:l})),r.current=l)},[l,n]),e.useLayoutEffect(()=>()=>{r.current&&(n(sH(r.current)),r.current=null)},[n]),null}var TX=e=>{var{xAxisId:t,className:n}=e,o=FO(VA),i=FA(),a="xAxis",s=FO(e=>vB(e,a,t,i)),l=FO(e=>aB(e,t)),c=FO(e=>cB(e,t)),u=FO(e=>Sz(e,t));if(null==l||null==c||null==u)return null;var{dangerouslySetInnerHTML:d,ticks:f,scale:p}=e,h=AX(e,wX),{id:m,scale:v}=u,y=AX(u,EX);return r.createElement(dY,OX({},h,y,{x:c.x,y:c.y,width:l.width,height:l.height,className:Y("recharts-".concat(a," ").concat(a),n),viewBox:o,ticks:s,axisType:a,axisId:t}))},CX={allowDataOverflow:Oz.allowDataOverflow,allowDecimals:Oz.allowDecimals,allowDuplicatedCategory:Oz.allowDuplicatedCategory,angle:Oz.angle,axisLine:iY.axisLine,height:Oz.height,hide:!1,includeHidden:Oz.includeHidden,interval:Oz.interval,label:!1,minTickGap:Oz.minTickGap,mirror:Oz.mirror,orientation:Oz.orientation,padding:Oz.padding,reversed:Oz.reversed,scale:Oz.scale,tick:Oz.tick,tickCount:Oz.tickCount,tickLine:iY.tickLine,tickSize:iY.tickSize,type:Oz.type,niceTicks:Oz.niceTicks,xAxisId:0},MX=e=>{var t=eE(e,CX);return r.createElement(r.Fragment,null,r.createElement(jX,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),r.createElement(TX,t))},NX=r.memo(MX,bX);NX.displayName="XAxis";var IX=["type"],DX=["dangerouslySetInnerHTML","ticks","scale"],_X=["id","scale"];function RX(){return RX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RX.apply(null,arguments)}function LX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LX(Object(n),!0).forEach(function(t){VX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function VX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BX(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function FX(t){var n=LO(),r=e.useRef(null),o=Oj(),{type:i}=t,a=BX(t,IX),s=cI(o,"yAxis",i),l=e.useMemo(()=>{if(null!=s)return zX(zX({},a),{},{type:s})},[s,a]);return e.useLayoutEffect(()=>{null!=l&&(null===r.current?n(lH(l)):r.current!==l&&n(cH({prev:r.current,next:l})),r.current=l)},[l,n]),e.useLayoutEffect(()=>()=>{r.current&&(n(uH(r.current)),r.current=null)},[n]),null}function $X(t){var{yAxisId:n,className:o,width:i,label:a}=t,s=e.useRef(null),l=e.useRef(null),c=FO(VA),u=FA(),d=LO(),f="yAxis",p=FO(e=>dB(e,n)),h=FO(e=>uB(e,n)),m=FO(e=>vB(e,f,n,u)),v=FO(e=>Az(e,n));if(e.useLayoutEffect(()=>{if("auto"===i&&p&&!yW(a)&&!e.isValidElement(a)&&null!=v){var t=s.current;if(t){var r=t.getCalculatedWidth();Math.round(p.width)!==Math.round(r)&&d(hH({id:n,width:r}))}}},[m,p,d,a,n,i,v]),null==p||null==h||null==v)return null;var{dangerouslySetInnerHTML:y,ticks:g,scale:b}=t,x=BX(t,DX),{id:w,scale:E}=v,O=BX(v,_X);return r.createElement(dY,RX({},x,O,{ref:s,labelRef:l,x:h.x,y:h.y,tickTextProps:"auto"===i?{width:void 0}:{width:i},width:p.width,height:p.height,className:Y("recharts-".concat(f," ").concat(f),o),viewBox:c,ticks:m,axisType:f,axisId:n}))}var UX={allowDataOverflow:Pz.allowDataOverflow,allowDecimals:Pz.allowDecimals,allowDuplicatedCategory:Pz.allowDuplicatedCategory,angle:Pz.angle,axisLine:iY.axisLine,hide:!1,includeHidden:Pz.includeHidden,interval:Pz.interval,label:!1,minTickGap:Pz.minTickGap,mirror:Pz.mirror,orientation:Pz.orientation,padding:Pz.padding,reversed:Pz.reversed,scale:Pz.scale,tick:Pz.tick,tickCount:Pz.tickCount,tickLine:iY.tickLine,tickSize:iY.tickSize,type:Pz.type,niceTicks:Pz.niceTicks,width:Pz.width,yAxisId:0},WX=e=>{var t=eE(e,UX);return r.createElement(r.Fragment,null,r.createElement(FX,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),r.createElement($X,t))},KX=r.memo(WX,bX);KX.displayName="YAxis";var HX=za([(e,t)=>t,wj,OI,MI,DF,VF,f$,LA],(e,t,n,r,o,i,a,s)=>{if(e&&t&&r&&o&&i)return"horizontal"===t||"vertical"===t?((e,t,n,r,o,i,a)=>{if(e&&n&&r&&o&&function(e,t){var{relativeX:n,relativeY:r}=e;return n>=t.left&&n<=t.left+t.width&&r>=t.top&&r<=t.top+t.height}(e,a)){var s=((e,t)=>"horizontal"===t?e.relativeX:"vertical"===t?e.relativeY:void 0)(e,t),l=s$(s,i,o,n,r),c=((e,t,n,r)=>{var o=t.find(e=>e&&e.index===n);if(o){if("horizontal"===e)return{x:o.coordinate,y:r.relativeY};if("vertical"===e)return{x:r.relativeX,y:o.coordinate}}return{x:0,y:0}})(t,o,l,e);return{activeIndex:String(l),activeCoordinate:c}}})(e,t,r,o,i,a,s):w$(e,t,n,r,o,i,a)});function YX(e){var t,n,r,o=e.currentTarget.getBoundingClientRect();if("getBBox"in(r=e).currentTarget&&"function"==typeof r.currentTarget.getBBox){var i=e.currentTarget.getBBox();t=i.width>0?o.width/i.width:1,n=i.height>0?o.height/i.height:1}else{var a=e.currentTarget;t=a.offsetWidth>0?o.width/a.offsetWidth:1,n=a.offsetHeight>0?o.height/a.offsetHeight:1}var s=(e,r)=>({relativeX:Math.round((e-o.left)/t),relativeY:Math.round((r-o.top)/n)});return"touches"in e?Array.from(e.touches).map(e=>s(e.clientX,e.clientY)):s(e.clientX,e.clientY)}var qX=Uk("mouseClick"),GX=YP();GX.startListening({actionCreator:qX,effect:(e,t)=>{var n=e.payload,r=HX(t.getState(),YX(n));null!=(null==r?void 0:r.activeIndex)&&t.dispatch(VB({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var XX=Uk("mouseMove"),ZX=YP(),JX=null,QX=null,eZ=null;function tZ(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":"children"===e&&"object"==typeof t&&null!==t?"<<CHILDREN>>":t}ZX.startListening({actionCreator:XX,effect:(e,t)=>{var n=e.payload,r=t.getState(),{throttleDelay:o,throttledEvents:i}=r.eventSettings,a="all"===i||(null==i?void 0:i.includes("mousemove"));null!==JX&&(cancelAnimationFrame(JX),JX=null),null===QX||"number"==typeof o&&a||(clearTimeout(QX),QX=null),eZ=YX(n);var s=()=>{var e=t.getState(),n=PB(e,e.tooltip.settings.shared);if(!eZ)return JX=null,void(QX=null);if("axis"===n){var r=HX(e,eZ);null!=(null==r?void 0:r.activeIndex)?t.dispatch(zB({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate})):t.dispatch(RB())}JX=null,QX=null};a?"raf"===o?JX=requestAnimationFrame(s):"number"==typeof o&&null===QX&&(QX=setTimeout(s,o)):s()}});var nZ={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},rZ=mP({name:"rootProps",initialState:nZ,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=null!==(n=t.payload.barGap)&&void 0!==n?n:nZ.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),oZ=rZ.reducer,{updateOptions:iZ}=rZ.actions,aZ=mP({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>null===e?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)}}),{updatePolarOptions:sZ}=aZ.actions,lZ=aZ.reducer,cZ=Uk("keyDown"),uZ=Uk("focus"),dZ=Uk("blur"),fZ=YP(),pZ=null,hZ=null,mZ=null;function vZ(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(e,n)=>{if("currentTarget"===n)return t;var r=Reflect.get(e,n);return"function"==typeof r?r.bind(e):r}})}fZ.startListening({actionCreator:cZ,effect:(e,t)=>{mZ=e.payload,null!==pZ&&(cancelAnimationFrame(pZ),pZ=null);var n=t.getState(),{throttleDelay:r,throttledEvents:o}=n.eventSettings,i="all"===o||o.includes("keydown");null===hZ||"number"==typeof r&&i||(clearTimeout(hZ),hZ=null);var a=()=>{try{var e=t.getState();if(!(!1!==e.rootProps.accessibilityLayer))return;var{keyboardInteraction:n}=e.tooltip,r=mZ;if("ArrowRight"!==r&&"ArrowLeft"!==r&&"Enter"!==r)return;var o=qB(n,dF(e),nV(e),CF(e)),i=null==o?-1:Number(o),a=!Number.isFinite(i)||i<0,s=VF(e),l=dF(e),c=PB(e,e.tooltip.settings.shared);if("Enter"===r){if(a)return;var u=v$(e,c,"hover",String(n.index));return void t.dispatch(FB({active:!n.active,activeIndex:n.index,activeCoordinate:u}))}var d,f="left-to-right"===EB(e)?1:-1,p="ArrowRight"===r?1:-1;if(a){var h=nV(e),m=CF(e),v=e=>({active:!1,index:String(e),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(d=-1,p*f>0){for(var y=0;y<l.length;y++)if(null!=qB(v(y),l,h,m)){d=y;break}}else for(var g=l.length-1;g>=0;g--)if(null!=qB(v(g),l,h,m)){d=g;break}if(d<0)return}else{d=i+p*f;var b=(null==s?void 0:s.length)||l.length;if(0===b||d>=b||d<0)return}var x=v$(e,c,"hover",String(d));t.dispatch(FB({active:!0,activeIndex:d.toString(),activeCoordinate:x}))}finally{pZ=null,hZ=null}};i?"raf"===r?pZ=requestAnimationFrame(a):"number"==typeof r&&null===hZ&&(a(),mZ=null,hZ=setTimeout(()=>{mZ?a():(hZ=null,pZ=null)},r)):a()}}),fZ.startListening({actionCreator:uZ,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;if(!r.active&&null==r.index){var o=PB(n,n.tooltip.settings.shared),i=v$(n,o,"hover",String("0"));t.dispatch(FB({active:!0,activeIndex:"0",activeCoordinate:i}))}}}}),fZ.startListening({actionCreator:dZ,effect:(e,t)=>{var n=t.getState();if(!1!==n.rootProps.accessibilityLayer){var{keyboardInteraction:r}=n.tooltip;r.active&&t.dispatch(FB({active:!1,activeIndex:r.index,activeCoordinate:r.coordinate}))}}});var yZ=Uk("externalEvent"),gZ=YP(),bZ=new Map,xZ=new Map,wZ=new Map;gZ.startListening({actionCreator:yZ,effect:(e,t)=>{var{handler:n,reactEvent:r}=e.payload;if(null!=n){var o=r.type,i=vZ(r);wZ.set(o,{handler:n,reactEvent:i});var a=bZ.get(o);void 0!==a&&(cancelAnimationFrame(a),bZ.delete(o));var s=t.getState(),{throttleDelay:l,throttledEvents:c}=s.eventSettings,u=c,d="all"===u||(null==u?void 0:u.includes(o)),f=xZ.get(o);void 0===f||"number"==typeof l&&d||(clearTimeout(f),xZ.delete(o));var p=()=>{var e=wZ.get(o);try{if(!e)return;var{handler:n,reactEvent:r}=e,i=t.getState(),a={activeCoordinate:XF(i),activeDataKey:HF(i),activeIndex:WF(i),activeLabel:KF(i),activeTooltipIndex:WF(i),isTooltipActive:ZF(i)};n&&n(a,r)}finally{bZ.delete(o),xZ.delete(o),wZ.delete(o)}};if(d)if("raf"===l){var h=requestAnimationFrame(p);bZ.set(o,h)}else if("number"==typeof l){if(!xZ.has(o)){p();var m=setTimeout(p,l);xZ.set(o,m)}}else p();else p()}}});var EZ=za([JB],e=>e.tooltipItemPayloads),OZ=za([EZ,(e,t)=>t,(e,t,n)=>n],(e,t,n)=>{if(null!=t){var r=e.find(e=>e.settings.graphicalItemId===n);if(null!=r){var{getPosition:o}=r;if(null!=o)return o(t)}}}),SZ=Uk("touchMove"),kZ=YP(),PZ=null,AZ=null,jZ=null,TZ=null;kZ.startListening({actionCreator:SZ,effect:(e,t)=>{var n=e.payload;if(null!=n.touches&&0!==n.touches.length){TZ=vZ(n);var r=t.getState(),{throttleDelay:o,throttledEvents:i}=r.eventSettings,a="all"===i||i.includes("touchmove");null!==PZ&&(cancelAnimationFrame(PZ),PZ=null),null===AZ||"number"==typeof o&&a||(clearTimeout(AZ),AZ=null),jZ=Array.from(n.touches).map(e=>YX({clientX:e.clientX,clientY:e.clientY,currentTarget:n.currentTarget}));var s=()=>{if(null!=TZ){var e=t.getState(),n=PB(e,e.tooltip.settings.shared);if("axis"===n){var r,o=null===(r=jZ)||void 0===r?void 0:r[0];if(null==o)return PZ=null,void(AZ=null);var i=HX(e,o);null!=(null==i?void 0:i.activeIndex)&&t.dispatch(zB({activeIndex:i.activeIndex,activeDataKey:void 0,activeCoordinate:i.activeCoordinate}))}else if("item"===n){var a,s=TZ.touches[0];if(null==document.elementFromPoint||null==s)return;var l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute("data-recharts-item-index"),u=null!==(a=l.getAttribute(jA))&&void 0!==a?a:void 0,d=sF(e).find(e=>e.id===u);if(null==c||null==d||null==u)return;var{dataKey:f}=d,p=OZ(e,c,u);t.dispatch(DB({activeDataKey:f,activeIndex:c,activeCoordinate:p,activeGraphicalItemId:u}))}PZ=null,AZ=null}};a?"raf"===o?PZ=requestAnimationFrame(s):"number"==typeof o&&null===AZ&&(s(),TZ=null,AZ=setTimeout(()=>{TZ?s():(AZ=null,PZ=null)},o)):s()}}});var CZ={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},MZ=mP({name:"eventSettings",initialState:CZ,reducers:{setEventSettings:(e,t)=>{null!=t.payload.throttleDelay&&(e.throttleDelay=t.payload.throttleDelay),null!=t.payload.throttledEvents&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:NZ}=MZ.actions,IZ=OS({brush:NH,cartesianAxis:mH,chartData:iU,errorBars:_Y,eventSettings:MZ.reducer,graphicalItems:KK,layout:eA,legend:OT,options:J$,polarAxis:BW,polarOptions:lZ,referenceElements:BH,renderedTicks:QH,rootProps:oZ,tooltip:$B,zIndex:D$});function DZ(t){var{preloadedState:n,children:o,reduxStoreName:i}=t,a=FA(),s=e.useRef(null);if(a)return o;null==s.current&&(s.current=function(e){return lP({reducer:IZ,preloadedState:e,middleware:e=>e({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes("es6")}).concat([GX.middleware,ZX.middleware,fZ.middleware,gZ.middleware,kZ.middleware]),enhancers:e=>{var t=e;return"function"==typeof e&&(t=e()),t.concat(sP({type:"raf"}))},devTools:{serialize:{replacer:tZ},name:"recharts-".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Chart")}})}(n,i));var l=_O;return r.createElement(VT,{context:l,store:s.current},o)}function _Z(t){var{layout:n,margin:r}=t,o=LO(),i=FA();return e.useEffect(()=>{i||(o(ZP(n)),o(XP(r)))},[o,i,n,r]),null}var RZ=e.memo(_Z,$T);function LZ(t){var n=LO();return e.useEffect(()=>{n(iZ(t))},[n,t]),null}var zZ=t=>{var n=LO();return e.useEffect(()=>{n(NZ(t))},[n,t]),null},VZ=e.memo(zZ,$T);function BZ(t){var{zIndex:n,isPanorama:o}=t,i=e.useRef(null),a=LO();return e.useLayoutEffect(()=>(i.current&&a(N$({zIndex:n,element:i.current,isPanorama:o})),()=>{a(I$({zIndex:n,isPanorama:o}))}),[a,n,o]),r.createElement("g",{tabIndex:-1,ref:i,className:"recharts-zIndex-layer_".concat(n)})}function FZ(e){var{children:t,isPanorama:n}=e,o=FO(O$);if(!o||0===o.length)return t;var i=o.filter(e=>e<0),a=o.filter(e=>e>0);return r.createElement(r.Fragment,null,i.map(e=>r.createElement(BZ,{key:e,zIndex:e,isPanorama:n})),t,a.map(e=>r.createElement(BZ,{key:e,zIndex:e,isPanorama:n})))}var $Z=["children"];function UZ(){return UZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UZ.apply(null,arguments)}var WZ={width:"100%",height:"100%",display:"block"},KZ=e.forwardRef((e,t)=>{var n=bj(),o=xj(),i=lC();if(!rA(n)||!rA(o))return null;var a,s,{children:l,otherAttributes:c,title:u,desc:d}=e;return null!=c&&(a="number"==typeof c.tabIndex?c.tabIndex:i?0:void 0,s="string"==typeof c.role?c.role:i?"application":void 0),r.createElement(Yb,UZ({},c,{title:u,desc:d,role:s,tabIndex:a,width:n,height:o,style:WZ,ref:t}),l)}),HZ=e=>{var{children:t}=e,n=FO(UA);if(!n)return null;var{width:o,height:i,y:a,x:s}=n;return r.createElement(Yb,{width:o,height:i,x:s,y:a},t)},YZ=e.forwardRef((e,t)=>{var{children:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,$Z);return FA()?r.createElement(HZ,null,r.createElement(FZ,{isPanorama:!0},n)):r.createElement(KZ,UZ({ref:t},o),r.createElement(FZ,{isPanorama:!1},n))});function qZ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GZ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qZ(Object(n),!0).forEach(function(t){XZ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qZ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XZ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZZ(){return ZZ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZZ.apply(null,arguments)}var JZ=()=>(dU(),null);function QZ(e){if("number"==typeof e)return e;if("string"==typeof e){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var eJ=e.forwardRef((t,n)=>{var o,i,a=e.useRef(null),[s,l]=e.useState({containerWidth:QZ(null===(o=t.style)||void 0===o?void 0:o.width),containerHeight:QZ(null===(i=t.style)||void 0===i?void 0:i.height)}),c=e.useCallback((e,t)=>{l(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]),u=e.useCallback(e=>{if("function"==typeof n&&n(e),null!=a.current&&(a.current.disconnect(),a.current=null),null!=e&&"undefined"!=typeof ResizeObserver){var{width:t,height:r}=e.getBoundingClientRect();c(t,r);var o=new ResizeObserver(e=>{var t=e[0];if(null!=t){var{width:n,height:r}=t.contentRect;c(n,r)}});o.observe(e),a.current=o}},[n,c]);return e.useEffect(()=>()=>{var e=a.current;null!=e&&e.disconnect()},[c]),r.createElement(r.Fragment,null,r.createElement(kj,{width:s.containerWidth,height:s.containerHeight}),r.createElement("div",ZZ({ref:u},t)))}),tJ=e.forwardRef((t,n)=>{var{width:o,height:i}=t,[a,s]=e.useState({containerWidth:QZ(o),containerHeight:QZ(i)}),l=e.useCallback((e,t)=>{s(n=>{var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]),c=e.useCallback(e=>{if("function"==typeof n&&n(e),null!=e){var{width:t,height:r}=e.getBoundingClientRect();l(t,r)}},[n,l]);return r.createElement(r.Fragment,null,r.createElement(kj,{width:a.containerWidth,height:a.containerHeight}),r.createElement("div",ZZ({ref:c},t)))}),nJ=e.forwardRef((e,t)=>{var{width:n,height:o}=e;return r.createElement(r.Fragment,null,r.createElement(kj,{width:n,height:o}),r.createElement("div",ZZ({ref:t},e)))}),rJ=e.forwardRef((e,t)=>{var{width:n,height:o}=e;return"string"==typeof n||"string"==typeof o?r.createElement(tJ,ZZ({},e,{ref:t})):"number"==typeof n&&"number"==typeof o?r.createElement(nJ,ZZ({},e,{width:n,height:o,ref:t})):r.createElement(r.Fragment,null,r.createElement(kj,{width:n,height:o}),r.createElement("div",ZZ({ref:t},e)))});var oJ=e.forwardRef((t,n)=>{var{children:o,className:i,height:a,onClick:s,onContextMenu:l,onDoubleClick:c,onMouseDown:u,onMouseEnter:d,onMouseLeave:f,onMouseMove:p,onMouseUp:h,onTouchEnd:m,onTouchMove:v,onTouchStart:y,style:g,width:b,responsive:x,dispatchTouchEvents:w=!0}=t,E=e.useRef(null),O=LO(),[S,k]=e.useState(null),[P,A]=e.useState(null),j=function(){var t=LO(),[n,r]=e.useState(null),o=FO(SA);return e.useEffect(()=>{if(null!=n){var e=n.getBoundingClientRect().width/n.offsetWidth;nA(e)&&e!==o&&t(QP(e))}},[n,t,o]),r}(),T=fj(),C=(null==T?void 0:T.width)>0?T.width:b,M=(null==T?void 0:T.height)>0?T.height:a,N=e.useCallback(e=>{j(e),"function"==typeof n&&n(e),k(e),A(e),null!=e&&(E.current=e)},[j,n,k,A]),I=e.useCallback(e=>{O(qX(e)),O(yZ({handler:s,reactEvent:e}))},[O,s]),D=e.useCallback(e=>{O(XX(e)),O(yZ({handler:d,reactEvent:e}))},[O,d]),_=e.useCallback(e=>{O(RB()),O(yZ({handler:f,reactEvent:e}))},[O,f]),R=e.useCallback(e=>{O(XX(e)),O(yZ({handler:p,reactEvent:e}))},[O,p]),L=e.useCallback(()=>{O(uZ())},[O]),z=e.useCallback(()=>{O(dZ())},[O]),V=e.useCallback(e=>{O(cZ(e.key))},[O]),B=e.useCallback(e=>{O(yZ({handler:l,reactEvent:e}))},[O,l]),F=e.useCallback(e=>{O(yZ({handler:c,reactEvent:e}))},[O,c]),$=e.useCallback(e=>{O(yZ({handler:u,reactEvent:e}))},[O,u]),U=e.useCallback(e=>{O(yZ({handler:h,reactEvent:e}))},[O,h]),W=e.useCallback(e=>{O(yZ({handler:y,reactEvent:e}))},[O,y]),K=e.useCallback(e=>{w&&O(SZ(e)),O(yZ({handler:v,reactEvent:e}))},[O,w,v]),H=e.useCallback(e=>{O(yZ({handler:m,reactEvent:e}))},[O,m]),q=function(e){return e?eJ:rJ}(x);return r.createElement(W$.Provider,{value:S},r.createElement(Zb.Provider,{value:P},r.createElement(q,{width:null!=C?C:null==g?void 0:g.width,height:null!=M?M:null==g?void 0:g.height,className:Y("recharts-wrapper",i),style:GZ({position:"relative",cursor:"default",width:C,height:M},g),onClick:I,onContextMenu:B,onDoubleClick:F,onFocus:L,onBlur:z,onKeyDown:V,onMouseDown:$,onMouseEnter:D,onMouseLeave:_,onMouseMove:R,onMouseUp:U,onTouchEnd:H,onTouchMove:K,onTouchStart:W,ref:N},r.createElement(JZ,null),o)))}),iJ=["width","height","responsive","children","className","style","compact","title","desc"];var aJ=e.forwardRef((e,t)=>{var{width:n,height:o,responsive:i,children:a,className:s,style:l,compact:c,title:u,desc:d}=e,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,iJ),p=$b(f);return c?r.createElement(r.Fragment,null,r.createElement(kj,{width:n,height:o}),r.createElement(YZ,{otherAttributes:p,title:u,desc:d},a)):r.createElement(oJ,{className:s,style:l,width:n,height:o,responsive:null!=i&&i,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},r.createElement(YZ,{otherAttributes:p,title:u,desc:d,ref:t},r.createElement($H,null,a)))});function sJ(){return sJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sJ.apply(null,arguments)}function lJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function cJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var uJ=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lJ(Object(n),!0).forEach(function(t){cJ(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lJ(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:{top:5,right:5,bottom:5,left:5},responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},CZ),dJ=e.forwardRef(function(e,t){var n,o=eE(e.categoricalChartProps,uJ),{chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:c}=e,u={chartName:i,defaultTooltipEventType:a,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return r.createElement(DZ,{preloadedState:{options:u},reduxStoreName:null!==(n=c.id)&&void 0!==n?n:i},r.createElement(jH,{chartData:c.data}),r.createElement(RZ,{layout:o.layout,margin:o.margin}),r.createElement(VZ,{throttleDelay:o.throttleDelay,throttledEvents:o.throttledEvents}),r.createElement(LZ,{baseValue:o.baseValue,accessibilityLayer:o.accessibilityLayer,barCategoryGap:o.barCategoryGap,maxBarSize:o.maxBarSize,stackOffset:o.stackOffset,barGap:o.barGap,barSize:o.barSize,syncId:o.syncId,syncMethod:o.syncMethod,className:o.className,reverseStackOrder:o.reverseStackOrder}),r.createElement(aJ,sJ({},o,{ref:t})))}),fJ=["axis"],pJ=e.forwardRef((e,t)=>r.createElement(dJ,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:fJ,tooltipPayloadSearcher:X$,categoricalChartProps:e,ref:t})),hJ=["axis","item"],mJ=e.forwardRef((e,t)=>r.createElement(dJ,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:hJ,tooltipPayloadSearcher:X$,categoricalChartProps:e,ref:t})),vJ=["item"],yJ=e.forwardRef((e,t)=>r.createElement(dJ,{chartName:"ScatterChart",defaultTooltipEventType:"item",validateTooltipEventTypes:vJ,tooltipPayloadSearcher:X$,categoricalChartProps:e,ref:t})),gJ=["axis"],bJ=e.forwardRef((e,t)=>r.createElement(dJ,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:gJ,tooltipPayloadSearcher:X$,categoricalChartProps:e,ref:t}));exports.AppSidebar=Lg,exports.ChartCard=function(e){var t=e.title,n=e.description,r=e.data,o=e.dataKey,i=e.categoryKey,a=e.color,s=void 0===a?"var(--primary)":a,l=e.className,c=e.loading,u=e.type,d=void 0===u?"area":u;return c?p.jsxs(Nb,{className:mt("col-span-full lg:col-span-2",l),children:[p.jsxs(Ib,{children:[p.jsx(nc,{className:"h-6 w-40 mb-2"}),p.jsx(nc,{className:"h-4 w-64"})]}),p.jsx(Rb,{className:"h-75 w-full pt-4",children:p.jsx(nc,{className:"h-full w-full rounded-lg"})})]}):p.jsxs(Nb,{className:mt("bmj-card-hover col-span-full lg:col-span-2",l),children:[p.jsxs(Ib,{children:[p.jsx(Db,{className:"text-lg font-semibold",children:t}),n&&p.jsx(_b,{children:n})]}),p.jsx(Rb,{className:"h-75 w-full pt-4",children:p.jsx(hj,{width:"100%",height:"100%",children:function(){var e={data:r,margin:{top:10,right:10,left:-20,bottom:0}},n={xAxis:p.jsx(NX,{dataKey:i,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"var(--muted-foreground)"},dy:10,type:"scatter"===d?"number":"category"}),yAxis:p.jsx(KX,{dataKey:"scatter"===d?o:void 0,axisLine:!1,tickLine:!1,tick:{fontSize:12,fill:"var(--muted-foreground)"},type:"number"}),grid:p.jsx(CY,{strokeDasharray:"3 3",vertical:!1,stroke:"var(--border)",opacity:.5}),tooltip:p.jsx(bU,{cursor:"scatter"===d?{strokeDasharray:"3 3"}:void 0,contentStyle:{backgroundColor:"var(--card)",borderRadius:"8px",border:"1px solid var(--border)",boxShadow:"0 4px 12px rgba(0,0,0,0.1)",color:"var(--card-foreground)"},itemStyle:{color:"var(--card-foreground)"}})};switch(d){case"bar":return p.jsxs(mJ,h({},e,{children:[n.grid,n.xAxis,n.yAxis,n.tooltip,p.jsx(UG,{dataKey:o,fill:s,radius:[4,4,0,0],barSize:32})]}));case"line":return p.jsxs(pJ,h({},e,{children:[n.grid,n.xAxis,n.yAxis,n.tooltip,p.jsx(bq,{type:"monotone",dataKey:o,stroke:s,strokeWidth:2,dot:{r:4,fill:s,strokeWidth:2,stroke:"var(--card)"},activeDot:{r:6,strokeWidth:0}})]}));case"scatter":return p.jsxs(yJ,h({},e,{children:[n.grid,n.xAxis,n.yAxis,n.tooltip,p.jsx(hX,{name:t,data:r,fill:s,shape:"circle"})]}));default:return p.jsxs(bJ,h({},e,{children:[p.jsx("defs",{children:p.jsxs("linearGradient",{id:"colorValue-".concat(t.replace(/\s+/g,"-")),x1:"0",y1:"0",x2:"0",y2:"1",children:[p.jsx("stop",{offset:"5%",stopColor:s,stopOpacity:.1}),p.jsx("stop",{offset:"95%",stopColor:s,stopOpacity:0})]})}),n.grid,n.xAxis,n.yAxis,n.tooltip,p.jsx(eG,{type:"monotone",dataKey:o,stroke:s,strokeWidth:2,fillOpacity:1,fill:"url(#colorValue-".concat(t.replace(/\s+/g,"-"),")")})]}))}}()})})]})},exports.DashboardLayout=function(e){var t=e.children,n=e.sidebarItems,r=e.onSidebarItemClick,o=e.activeSidebarItem;return p.jsxs(Rc,{children:[p.jsx(Lg,{items:n,onItemClick:r,activeItem:o}),p.jsxs(Vc,{className:"flex flex-col",children:[p.jsx(Mb,{}),p.jsx("main",{className:"flex-1 p-6 overflow-y-auto",children:t})]})]})},exports.StatCard=function(e){var t=e.title,n=e.value,r=e.description,o=e.trend,i=e.icon,a=e.className;return e.loading?p.jsxs(Nb,{className:mt("overflow-hidden",a),children:[p.jsxs(Ib,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(nc,{className:"h-4 w-24"}),p.jsx(nc,{className:"h-4 w-4 rounded-full"})]}),p.jsxs(Rb,{className:"space-y-2",children:[p.jsx(nc,{className:"h-8 w-32"}),p.jsx(nc,{className:"h-3 w-40"})]})]}):p.jsx(_g.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},children:p.jsxs(Nb,{className:mt("bmj-card-hover overflow-hidden",a),children:[p.jsxs(Ib,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[p.jsx(Db,{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider",children:t}),i&&p.jsx(i,{className:"h-4 w-4 text-muted-foreground"})]}),p.jsxs(Rb,{children:[p.jsx("div",{className:"text-2xl font-bold tracking-tight",children:n}),(r||o)&&p.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[o&&p.jsxs("span",{className:mt("flex items-center text-xs font-medium",o.isPositive?"text-emerald-500":"text-rose-500"),children:[o.isPositive?p.jsx(Wl,{className:"w-3 h-3 mr-1"}):p.jsx(Ul,{className:"w-3 h-3 mr-1"}),o.value,"%"]}),r&&p.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})]})})},exports.Topbar=Mb;
|
|
2
76
|
//# sourceMappingURL=index.js.map
|